@atrim/instrument-node 0.7.2-dev.e12da4b.20260116190803 → 0.8.1-dev.e12da4b.20260116192447

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atrim/instrument-node",
3
- "version": "0.7.2-dev.e12da4b.20260116190803",
3
+ "version": "0.8.1-dev.e12da4b.20260116192447",
4
4
  "description": "OpenTelemetry instrumentation for Node.js with centralized YAML configuration",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -89,7 +89,7 @@
89
89
  "tsx": "^4.7.0",
90
90
  "typescript": "^5.7.2",
91
91
  "vitest": "^4.0.16",
92
- "@atrim/instrument-core": "0.6.0"
92
+ "@atrim/instrument-core": "0.7.0"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "@opentelemetry/api": "^1.0.0",
@@ -2088,8 +2088,8 @@ var defaultOperations = [
2088
2088
  { name: "all", includeCount: true, includeStack: true },
2089
2089
  { name: "forEach", includeCount: true, includeStack: true }
2090
2090
  ];
2091
- var makeOperationTracingLayer = (operations = defaultOperations) => {
2092
- const supervisor = new OperationTracingSupervisor(operations);
2091
+ var makeOperationTracingLayer = (operations = defaultOperations, spanNaming = defaultSpanNaming) => {
2092
+ const supervisor = new OperationTracingSupervisor(operations, spanNaming);
2093
2093
  return effect.Supervisor.addSupervisor(supervisor);
2094
2094
  };
2095
2095
  var enableOpSupervision = (effect$1) => effect.Effect.withRuntimeFlagsPatch(effect$1, effect.RuntimeFlagsPatch.enable(effect.RuntimeFlags.OpSupervision));
@@ -2107,9 +2107,14 @@ var loadOperationTracingLayer = () => effect.Layer.unwrapEffect(
2107
2107
  logger.log("@atrim/operation-tracing: Operation tracing disabled in config");
2108
2108
  return effect.Layer.empty;
2109
2109
  }
2110
+ const spanNaming = {
2111
+ includeLocation: opTracingConfig?.span_naming?.include_location ?? true,
2112
+ template: opTracingConfig?.span_naming?.template ?? "effect.{op} ({filename}:{line})"
2113
+ };
2114
+ logger.log(`@atrim/operation-tracing: Span naming - includeLocation=${spanNaming.includeLocation}, template="${spanNaming.template}"`);
2110
2115
  const operations = opTracingConfig?.operations ? opTracingConfig.operations.map((op) => ({
2111
2116
  name: op.name,
2112
- ...op.span_name && { spanName: op.span_name },
2117
+ ...op.span_name && { spanNameTemplate: op.span_name },
2113
2118
  includeCount: op.include_count ?? true,
2114
2119
  includeStack: op.include_stack ?? true
2115
2120
  })) : defaultOperations;
@@ -2117,7 +2122,7 @@ var loadOperationTracingLayer = () => effect.Layer.unwrapEffect(
2117
2122
  logger.log(
2118
2123
  `@atrim/operation-tracing: Loaded ${operations.length} operation configs from ${source}`
2119
2124
  );
2120
- return makeOperationTracingLayer(operations);
2125
+ return makeOperationTracingLayer(operations, spanNaming);
2121
2126
  })
2122
2127
  );
2123
2128
  var OperationTracingLive = loadOperationTracingLayer();