autotel 7.4.0 → 7.6.0

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.
Files changed (66) hide show
  1. package/README.md +29 -12
  2. package/dist/{attributes-Dt4YUYbP.js → attributes-DQQl-D6Q.js} +3 -1
  3. package/dist/{attributes-Cxys8tgr.cjs → attributes-DnfoMlA9.cjs} +3 -1
  4. package/dist/attributes.cjs +1 -1
  5. package/dist/attributes.d.cts +1 -1
  6. package/dist/attributes.d.ts +1 -1
  7. package/dist/attributes.js +1 -1
  8. package/dist/auto.cjs +1 -1
  9. package/dist/auto.js +1 -1
  10. package/dist/{canonical-log-line-processor-DolzdawH.cjs → canonical-log-line-processor-B-tzezhk.cjs} +24 -10
  11. package/dist/{canonical-log-line-processor-l0Aqe6yp.d.cts → canonical-log-line-processor-C0Z_N4oL.d.cts} +17 -3
  12. package/dist/{canonical-log-line-processor-hFUmS__K.js → canonical-log-line-processor-CBv-OCp4.js} +24 -10
  13. package/dist/{canonical-log-line-processor-cPB4Axk-.d.ts → canonical-log-line-processor-Yq4cXcD5.d.ts} +17 -3
  14. package/dist/correlation-id.cjs +1 -1
  15. package/dist/correlation-id.js +1 -1
  16. package/dist/db.cjs +7 -7
  17. package/dist/db.js +7 -7
  18. package/dist/decorators.cjs +1 -1
  19. package/dist/decorators.js +1 -1
  20. package/dist/event.cjs +1 -1
  21. package/dist/event.js +1 -1
  22. package/dist/{functional-C4js2vTM.js → functional-BXgTFVTA.js} +1 -1
  23. package/dist/{functional-DHlD7V0x.cjs → functional-zasLBPyX.cjs} +1 -1
  24. package/dist/functional.cjs +1 -1
  25. package/dist/functional.js +1 -1
  26. package/dist/http.cjs +12 -9
  27. package/dist/http.js +12 -9
  28. package/dist/{index-CwrNAsgk.d.ts → index-CsoeCsGL.d.ts} +2 -2
  29. package/dist/{index-DQHf4cNl.d.cts → index-Y7If_wH4.d.cts} +2 -2
  30. package/dist/index.cjs +5 -5
  31. package/dist/index.d.cts +3 -3
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.js +5 -5
  34. package/dist/{init-8GSy2bza.d.cts → init-BU7qa-Ii.d.cts} +67 -6
  35. package/dist/{init-CsKK9vZO.js → init-Bst_BhiS.js} +35 -13
  36. package/dist/{init-UnKrXhpq.d.ts → init-DDCgmfa4.d.ts} +67 -6
  37. package/dist/{init-DmM7dprX.cjs → init-OSYC19sK.cjs} +35 -13
  38. package/dist/instrumentation.cjs +3 -1
  39. package/dist/instrumentation.js +3 -1
  40. package/dist/messaging.cjs +2 -4
  41. package/dist/messaging.js +2 -4
  42. package/dist/processors.cjs +1 -1
  43. package/dist/processors.d.cts +1 -1
  44. package/dist/processors.d.ts +1 -1
  45. package/dist/processors.js +1 -1
  46. package/dist/{registry-DVSmWg6Y.js → registry-Cy4JjIB-.js} +2 -2
  47. package/dist/{registry-DYgvb62e.cjs → registry-DIoklBz5.cjs} +2 -2
  48. package/dist/sampling.cjs +1 -1
  49. package/dist/sampling.js +1 -1
  50. package/dist/semantic-conventions.cjs +1 -1
  51. package/dist/semantic-conventions.js +1 -1
  52. package/dist/semantic-helpers.cjs +4 -5
  53. package/dist/semantic-helpers.js +4 -5
  54. package/dist/tail-sampling-processor.cjs +1 -1
  55. package/dist/tail-sampling-processor.js +1 -1
  56. package/dist/webhook.cjs +1 -1
  57. package/dist/webhook.js +1 -1
  58. package/dist/workflow-distributed.cjs +1 -1
  59. package/dist/workflow-distributed.js +1 -1
  60. package/dist/workflow.cjs +1 -1
  61. package/dist/workflow.js +1 -1
  62. package/dist/yaml-config.cjs +1 -1
  63. package/dist/yaml-config.d.cts +1 -1
  64. package/dist/yaml-config.d.ts +1 -1
  65. package/dist/yaml-config.js +1 -1
  66. package/package.json +34 -34
@@ -9,7 +9,7 @@ const require_policy = require('./policy.cjs');
9
9
  const require_span_name_normalizer = require('./span-name-normalizer.cjs');
10
10
  const require_attribute_redacting_processor = require('./attribute-redacting-processor.cjs');
11
11
  const require_pretty_console_exporter = require('./pretty-console-exporter-CMzlrRNg.cjs');
12
- const require_canonical_log_line_processor = require('./canonical-log-line-processor-DolzdawH.cjs');
12
+ const require_canonical_log_line_processor = require('./canonical-log-line-processor-B-tzezhk.cjs');
13
13
  const require_metric = require('./metric.cjs');
14
14
  let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
15
15
  let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
@@ -2837,7 +2837,10 @@ var Event = class {
2837
2837
  const config = getConfig();
2838
2838
  if (config) {
2839
2839
  if (config.version) enriched["service.version"] = config.version;
2840
- if (config.environment) enriched["deployment.environment"] = config.environment;
2840
+ if (config.environment) {
2841
+ enriched["deployment.environment"] = config.environment;
2842
+ enriched["deployment.environment.name"] = config.environment;
2843
+ }
2841
2844
  }
2842
2845
  const spanContext = _opentelemetry_api.trace.getActiveSpan()?.spanContext();
2843
2846
  if (spanContext) {
@@ -3496,7 +3499,7 @@ function loadGRPCTraceExporter() {
3496
3499
  OTLPTraceExporterGRPC = require_node_require.requireModule("@opentelemetry/exporter-trace-otlp-grpc").OTLPTraceExporter;
3497
3500
  return OTLPTraceExporterGRPC;
3498
3501
  } catch {
3499
- throw new Error("gRPC trace exporter not found. Install @opentelemetry/exporter-trace-otlp-grpc");
3502
+ throw new Error("gRPC trace exporter not found. Install @opentelemetry/exporter-trace-otlp-grpc. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel.");
3500
3503
  }
3501
3504
  }
3502
3505
  /**
@@ -3508,7 +3511,7 @@ function loadGRPCMetricExporter() {
3508
3511
  OTLPMetricExporterGRPC = require_node_require.requireModule("@opentelemetry/exporter-metrics-otlp-grpc").OTLPMetricExporter;
3509
3512
  return OTLPMetricExporterGRPC;
3510
3513
  } catch {
3511
- throw new Error("gRPC metric exporter not found. Install @opentelemetry/exporter-metrics-otlp-grpc");
3514
+ throw new Error("gRPC metric exporter not found. Install @opentelemetry/exporter-metrics-otlp-grpc. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel.");
3512
3515
  }
3513
3516
  }
3514
3517
  /**
@@ -3520,7 +3523,7 @@ function loadProtoTraceExporter() {
3520
3523
  OTLPTraceExporterPROTO = require_node_require.requireModule("@opentelemetry/exporter-trace-otlp-proto").OTLPTraceExporter;
3521
3524
  return OTLPTraceExporterPROTO;
3522
3525
  } catch {
3523
- throw new Error("Protobuf trace exporter not found. Install @opentelemetry/exporter-trace-otlp-proto");
3526
+ throw new Error("Protobuf trace exporter not found. Install @opentelemetry/exporter-trace-otlp-proto. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel. Or drop `protocol` to use the default JSON exporter, which ships with autotel and is accepted by Grafana Cloud, Honeycomb and the other hosted OTLP gateways.");
3524
3527
  }
3525
3528
  }
3526
3529
  /**
@@ -3540,7 +3543,7 @@ function createMetricExporter(protocol, config) {
3540
3543
  if (!OTLPMetricExporterPROTO) try {
3541
3544
  OTLPMetricExporterPROTO = require_node_require.requireModule("@opentelemetry/exporter-metrics-otlp-proto").OTLPMetricExporter;
3542
3545
  } catch {
3543
- throw new Error("Protobuf metric exporter not found. Install @opentelemetry/exporter-metrics-otlp-proto");
3546
+ throw new Error("Protobuf metric exporter not found. Install @opentelemetry/exporter-metrics-otlp-proto. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel. Or drop `protocol` to use the default JSON exporter, which ships with autotel and is accepted by Grafana Cloud, Honeycomb and the other hosted OTLP gateways.");
3544
3547
  }
3545
3548
  return new OTLPMetricExporterPROTO(config);
3546
3549
  }
@@ -3555,7 +3558,7 @@ function loadGRPCLogExporter() {
3555
3558
  OTLPLogExporterGRPC = require_node_require.requireModule("@opentelemetry/exporter-logs-otlp-grpc").OTLPLogExporter;
3556
3559
  return OTLPLogExporterGRPC;
3557
3560
  } catch {
3558
- throw new Error("gRPC log exporter not found. Install @opentelemetry/exporter-logs-otlp-grpc");
3561
+ throw new Error("gRPC log exporter not found. Install @opentelemetry/exporter-logs-otlp-grpc. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel.");
3559
3562
  }
3560
3563
  }
3561
3564
  /**
@@ -3567,7 +3570,7 @@ function createLogExporter(protocol, config) {
3567
3570
  if (!OTLPLogExporterPROTO) try {
3568
3571
  OTLPLogExporterPROTO = require_node_require.requireModule("@opentelemetry/exporter-logs-otlp-proto").OTLPLogExporter;
3569
3572
  } catch {
3570
- throw new Error("Protobuf log exporter not found. Install @opentelemetry/exporter-logs-otlp-proto");
3573
+ throw new Error("Protobuf log exporter not found. Install @opentelemetry/exporter-logs-otlp-proto. It is an optional peer dependency, and bundlers (Vercel, Nitro, esbuild) do not follow the lazy require that loads it, so add it as a direct dependency of your application, not just of autotel. Or drop `protocol` to use the default JSON exporter, which ships with autotel and is accepted by Grafana Cloud, Honeycomb and the other hosted OTLP gateways.");
3571
3574
  }
3572
3575
  return new OTLPLogExporterPROTO(config);
3573
3576
  }
@@ -3865,6 +3868,20 @@ function getAutoInstrumentations(integrations, manualInstrumentationNames = /* @
3865
3868
  * Replaces initInstrumentation() and separate events config.
3866
3869
  */
3867
3870
  /**
3871
+ * Records nothing and exports nothing, so a `TracerProvider` is still
3872
+ * registered when there is no destination. See where it is used below.
3873
+ */
3874
+ var NoopSpanProcessor = class {
3875
+ onStart() {}
3876
+ onEnd() {}
3877
+ forceFlush() {
3878
+ return Promise.resolve();
3879
+ }
3880
+ shutdown() {
3881
+ return Promise.resolve();
3882
+ }
3883
+ };
3884
+ /**
3868
3885
  * Adapts an Autotel Sampler to the OTel SDK Sampler interface.
3869
3886
  */
3870
3887
  function toOtelSampler(sampler) {
@@ -4011,7 +4028,10 @@ function init(cfg) {
4011
4028
  const version = mergedConfig.version || detectVersion();
4012
4029
  const environment = mergedConfig.environment || process.env.NODE_ENV || "development";
4013
4030
  const metricsEnabled = resolveMetricsFlag(mergedConfig.metrics);
4014
- const logsEnabled = resolveLogsFlag(mergedConfig.logs);
4031
+ const canonicalLogger = mergedConfig.canonicalLogLines?.logger ?? mergedConfig.logger;
4032
+ const hasCanonicalLogger = Array.isArray(canonicalLogger) ? canonicalLogger.length > 0 : canonicalLogger !== void 0;
4033
+ const canonicalUsesOtel = mergedConfig.canonicalLogLines?.enabled === true && (mergedConfig.canonicalLogLines.otel ?? !hasCanonicalLogger);
4034
+ const logsEnabled = resolveLogsFlag(mergedConfig.logs ?? (canonicalUsesOtel ? true : "auto"));
4015
4035
  if (devtoolsConfig.enabled && devtoolsConfig.embedded) {
4016
4036
  const devtoolsModule = _optionalRequire("autotel-devtools");
4017
4037
  if (devtoolsModule?.createDevtools) {
@@ -4039,12 +4059,12 @@ function init(cfg) {
4039
4059
  if (mergedConfig.resource) resource = resource.merge(mergedConfig.resource);
4040
4060
  if (mergedConfig.resourceAttributes) resource = resource.merge((0, _opentelemetry_resources.resourceFromAttributes)(mergedConfig.resourceAttributes));
4041
4061
  const otlpDestinations = resolveOtlpDestinations(mergedConfig, endpoint);
4042
- const configuredSpanProcessors = mergedConfig.spanProcessors && mergedConfig.spanProcessors.length > 0 ? mergedConfig.spanProcessors : mergedConfig.spanProcessor ? [mergedConfig.spanProcessor] : void 0;
4062
+ const configuredSpanProcessors = mergedConfig.spanProcessors !== void 0 ? mergedConfig.spanProcessors : mergedConfig.spanProcessor ? [mergedConfig.spanProcessor] : void 0;
4043
4063
  const configuredSpanExporters = mergedConfig.spanExporters && mergedConfig.spanExporters.length > 0 ? mergedConfig.spanExporters : mergedConfig.spanExporter ? [mergedConfig.spanExporter] : void 0;
4044
4064
  const configuredMetricReaders = mergedConfig.metricReaders && mergedConfig.metricReaders.length > 0 ? mergedConfig.metricReaders : mergedConfig.metricReader ? [mergedConfig.metricReader] : void 0;
4045
4065
  const configuredLogRecordProcessors = mergedConfig.logRecordProcessors && mergedConfig.logRecordProcessors.length > 0 ? mergedConfig.logRecordProcessors : mergedConfig.logRecordProcessor ? [mergedConfig.logRecordProcessor] : void 0;
4046
4066
  let spanProcessors = [];
4047
- if (configuredSpanProcessors && configuredSpanProcessors.length > 0) spanProcessors.push(...configuredSpanProcessors);
4067
+ if (configuredSpanProcessors !== void 0) spanProcessors.push(...configuredSpanProcessors);
4048
4068
  else if (configuredSpanExporters && configuredSpanExporters.length > 0) for (const exporter of configuredSpanExporters) spanProcessors.push(new TailSamplingSpanProcessor(new _opentelemetry_sdk_trace_base.BatchSpanProcessor(exporter)));
4049
4069
  else for (const destination of otlpDestinations) {
4050
4070
  if (!destinationSupportsSignal(destination, "traces")) continue;
@@ -4063,7 +4083,8 @@ function init(cfg) {
4063
4083
  else if (debugMode === true) spanProcessors.push(new _opentelemetry_sdk_trace_base.SimpleSpanProcessor(new _opentelemetry_sdk_trace_base.ConsoleSpanExporter()));
4064
4084
  if (mergedConfig.canonicalLogLines?.enabled) {
4065
4085
  const canonicalOptions = {
4066
- logger: mergedConfig.canonicalLogLines.logger || mergedConfig.logger,
4086
+ logger: canonicalLogger,
4087
+ otel: mergedConfig.canonicalLogLines.otel,
4067
4088
  rootSpansOnly: mergedConfig.canonicalLogLines.rootSpansOnly,
4068
4089
  minLevel: mergedConfig.canonicalLogLines.minLevel,
4069
4090
  messageFormat: mergedConfig.canonicalLogLines.messageFormat,
@@ -4152,9 +4173,10 @@ function init(cfg) {
4152
4173
  sampler,
4153
4174
  instrumentations: finalInstrumentations
4154
4175
  };
4155
- if (spanProcessors.length > 0) sdkOptions.spanProcessors = spanProcessors;
4176
+ sdkOptions.spanProcessors = spanProcessors.length > 0 ? spanProcessors : [new NoopSpanProcessor()];
4156
4177
  if (metricReaders.length > 0) sdkOptions.metricReaders = metricReaders;
4157
4178
  if (logRecordProcessors && logRecordProcessors.length > 0) sdkOptions.logRecordProcessors = logRecordProcessors;
4179
+ else if (!process.env.OTEL_LOGS_EXPORTER) sdkOptions.logRecordProcessors = [];
4158
4180
  sdk = mergedConfig.sdkFactory ? mergedConfig.sdkFactory(sdkOptions) : new _opentelemetry_sdk_node.NodeSDK(sdkOptions);
4159
4181
  if (!sdk) throw new Error("[autotel] sdkFactory must return a NodeSDK instance");
4160
4182
  sdk.start();
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-DmM7dprX.cjs');
2
+ const require_init = require('./init-OSYC19sK.cjs');
3
3
  const require_node_require = require('./node-require-EifOMikz.cjs');
4
4
  let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
5
5
  let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
@@ -108,12 +108,14 @@ async function initInstrumentation(config) {
108
108
  [_opentelemetry_semantic_conventions_incubating.ATTR_SERVICE_NAME]: config.serviceName,
109
109
  [_opentelemetry_semantic_conventions_incubating.ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
110
110
  "deployment.environment": config.deploymentEnvironment || "development",
111
+ "deployment.environment.name": config.deploymentEnvironment || "development",
111
112
  ...customResourceAttributes
112
113
  }));
113
114
  else resource = (0, _opentelemetry_resources.resourceFromAttributes)({
114
115
  [_opentelemetry_semantic_conventions_incubating.ATTR_SERVICE_NAME]: config.serviceName,
115
116
  [_opentelemetry_semantic_conventions_incubating.ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
116
117
  "deployment.environment": config.deploymentEnvironment || "development",
118
+ "deployment.environment.name": config.deploymentEnvironment || "development",
117
119
  ...customResourceAttributes
118
120
  });
119
121
  let instrumentations = config.instrumentations || [];
@@ -1,4 +1,4 @@
1
- import { r as getLogger, x as TailSamplingSpanProcessor } from "./init-CsKK9vZO.js";
1
+ import { r as getLogger, x as TailSamplingSpanProcessor } from "./init-Bst_BhiS.js";
2
2
  import { n as safeRequire, t as requireModule } from "./node-require-DSPjaw_l.js";
3
3
  import { NodeSDK } from "@opentelemetry/sdk-node";
4
4
  import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
@@ -107,12 +107,14 @@ async function initInstrumentation(config) {
107
107
  [ATTR_SERVICE_NAME]: config.serviceName,
108
108
  [ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
109
109
  "deployment.environment": config.deploymentEnvironment || "development",
110
+ "deployment.environment.name": config.deploymentEnvironment || "development",
110
111
  ...customResourceAttributes
111
112
  }));
112
113
  else resource = resourceFromAttributes({
113
114
  [ATTR_SERVICE_NAME]: config.serviceName,
114
115
  [ATTR_SERVICE_VERSION]: config.serviceVersion || "1.0.0",
115
116
  "deployment.environment": config.deploymentEnvironment || "development",
117
+ "deployment.environment.name": config.deploymentEnvironment || "development",
116
118
  ...customResourceAttributes
117
119
  });
118
120
  let instrumentations = config.instrumentations || [];
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-DApyq53y.cjs');
3
- const require_init = require('./init-DmM7dprX.cjs');
4
- const require_functional = require('./functional-DHlD7V0x.cjs');
3
+ const require_init = require('./init-OSYC19sK.cjs');
4
+ const require_functional = require('./functional-zasLBPyX.cjs');
5
5
  const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
6
6
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -480,7 +480,6 @@ function setProducerAttributes(ctx, config) {
480
480
  ctx.setAttribute("messaging.system", config.system);
481
481
  ctx.setAttribute("messaging.operation.name", "publish");
482
482
  ctx.setAttribute("messaging.operation.type", "send");
483
- ctx.setAttribute("messaging.operation", "publish");
484
483
  ctx.setAttribute("messaging.destination.name", config.destination);
485
484
  if (config.system === "kafka") ctx.setAttribute("messaging.kafka.destination.topic", config.destination);
486
485
  if (config.attributes) setCustomAttributes(ctx, config.attributes);
@@ -509,7 +508,6 @@ function setConsumerAttributes(ctx, config) {
509
508
  ctx.setAttribute("messaging.system", config.system);
510
509
  ctx.setAttribute("messaging.operation.name", config.batchMode ? "receive" : "process");
511
510
  ctx.setAttribute("messaging.operation.type", config.batchMode ? "receive" : "process");
512
- ctx.setAttribute("messaging.operation", config.batchMode ? "receive" : "process");
513
511
  ctx.setAttribute("messaging.destination.name", config.destination);
514
512
  if (config.consumerGroup) {
515
513
  ctx.setAttribute("messaging.consumer.group.name", config.consumerGroup);
package/dist/messaging.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as readProperty, b as toAttributeValue, c as asScalar, g as nonEmptyString, h as isFunction, s as asRecord, v as resolveValue, y as splitNameOrOptions } from "./values-BenyvWKz.js";
2
- import { F as createLinkFromHeaders, L as extractLinksFromBatch } from "./init-CsKK9vZO.js";
3
- import { c as withTracing } from "./functional-C4js2vTM.js";
2
+ import { F as createLinkFromHeaders, L as extractLinksFromBatch } from "./init-Bst_BhiS.js";
3
+ import { c as withTracing } from "./functional-BXgTFVTA.js";
4
4
  import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
5
5
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
6
6
  import { SpanKind, context, propagation } from "@opentelemetry/api";
@@ -479,7 +479,6 @@ function setProducerAttributes(ctx, config) {
479
479
  ctx.setAttribute("messaging.system", config.system);
480
480
  ctx.setAttribute("messaging.operation.name", "publish");
481
481
  ctx.setAttribute("messaging.operation.type", "send");
482
- ctx.setAttribute("messaging.operation", "publish");
483
482
  ctx.setAttribute("messaging.destination.name", config.destination);
484
483
  if (config.system === "kafka") ctx.setAttribute("messaging.kafka.destination.topic", config.destination);
485
484
  if (config.attributes) setCustomAttributes(ctx, config.attributes);
@@ -508,7 +507,6 @@ function setConsumerAttributes(ctx, config) {
508
507
  ctx.setAttribute("messaging.system", config.system);
509
508
  ctx.setAttribute("messaging.operation.name", config.batchMode ? "receive" : "process");
510
509
  ctx.setAttribute("messaging.operation.type", config.batchMode ? "receive" : "process");
511
- ctx.setAttribute("messaging.operation", config.batchMode ? "receive" : "process");
512
510
  ctx.setAttribute("messaging.destination.name", config.destination);
513
511
  if (config.consumerGroup) {
514
512
  ctx.setAttribute("messaging.consumer.group.name", config.consumerGroup);
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_canonical_log_line_processor = require('./canonical-log-line-processor-DolzdawH.cjs');
2
+ const require_canonical_log_line_processor = require('./canonical-log-line-processor-B-tzezhk.cjs');
3
3
  let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
4
4
 
5
5
  Object.defineProperty(exports, 'BatchSpanProcessor', {
@@ -1,3 +1,3 @@
1
- import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-l0Aqe6yp.cjs";
1
+ import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-C0Z_N4oL.cjs";
2
2
  import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
  export { BatchSpanProcessor, type CanonicalLogLineOptions, CanonicalLogLineProcessor, SimpleSpanProcessor };
@@ -1,3 +1,3 @@
1
- import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-cPB4Axk-.js";
1
+ import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-Yq4cXcD5.js";
2
2
  import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
  export { BatchSpanProcessor, type CanonicalLogLineOptions, CanonicalLogLineProcessor, SimpleSpanProcessor };
@@ -1,4 +1,4 @@
1
- import { t as CanonicalLogLineProcessor } from "./canonical-log-line-processor-hFUmS__K.js";
1
+ import { t as CanonicalLogLineProcessor } from "./canonical-log-line-processor-CBv-OCp4.js";
2
2
  import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
3
3
 
4
4
  export { BatchSpanProcessor, CanonicalLogLineProcessor, SimpleSpanProcessor };
@@ -130,14 +130,14 @@ const FeatureFlagAttributes = {
130
130
  const MessagingAttributes = {
131
131
  system: "messaging.system",
132
132
  destination: "messaging.destination.name",
133
- operation: "messaging.operation",
133
+ operation: "messaging.operation.type",
134
134
  messageId: "messaging.message.id",
135
135
  conversationId: "messaging.conversation_id",
136
136
  batchMessageCount: "messaging.batch.message_count",
137
137
  consumerGroup: "messaging.consumer.group"
138
138
  };
139
139
  const RPCAttributes = {
140
- system: "rpc.system",
140
+ system: "rpc.system.name",
141
141
  service: "rpc.service",
142
142
  method: "rpc.method",
143
143
  grpcStatusCode: "rpc.grpc.status_code"
@@ -131,14 +131,14 @@ const FeatureFlagAttributes = {
131
131
  const MessagingAttributes = {
132
132
  system: "messaging.system",
133
133
  destination: "messaging.destination.name",
134
- operation: "messaging.operation",
134
+ operation: "messaging.operation.type",
135
135
  messageId: "messaging.message.id",
136
136
  conversationId: "messaging.conversation_id",
137
137
  batchMessageCount: "messaging.batch.message_count",
138
138
  consumerGroup: "messaging.consumer.group"
139
139
  };
140
140
  const RPCAttributes = {
141
- system: "rpc.system",
141
+ system: "rpc.system.name",
142
142
  service: "rpc.service",
143
143
  method: "rpc.method",
144
144
  grpcStatusCode: "rpc.grpc.status_code"
package/dist/sampling.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-DmM7dprX.cjs');
2
+ const require_init = require('./init-OSYC19sK.cjs');
3
3
 
4
4
  exports.AUTOTEL_DEBUG_BAGGAGE_KEY = require_init.AUTOTEL_DEBUG_BAGGAGE_KEY;
5
5
  exports.AUTOTEL_SAMPLING_RATE = require_init.AUTOTEL_SAMPLING_RATE;
package/dist/sampling.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as FeatureFlagSampler, B as markForceKept, C as AUTOTEL_SAMPLING_RATE, D as AlwaysSampler, E as AdaptiveSampler, F as createLinkFromHeaders, H as samplingPresets, I as debugCaptureRequested, L as extractLinksFromBatch, M as NeverSampler, N as RandomSampler, O as CompositeSampler, P as UserIdSampler, R as hashUnitInterval, S as AUTOTEL_DEBUG_BAGGAGE_KEY, T as AUTOTEL_SAMPLING_TAIL_KEEP, V as resolveSamplingPreset, j as KeyTargetRateSampler, k as DeterministicSampler, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, z as isForceKept } from "./init-CsKK9vZO.js";
1
+ import { A as FeatureFlagSampler, B as markForceKept, C as AUTOTEL_SAMPLING_RATE, D as AlwaysSampler, E as AdaptiveSampler, F as createLinkFromHeaders, H as samplingPresets, I as debugCaptureRequested, L as extractLinksFromBatch, M as NeverSampler, N as RandomSampler, O as CompositeSampler, P as UserIdSampler, R as hashUnitInterval, S as AUTOTEL_DEBUG_BAGGAGE_KEY, T as AUTOTEL_SAMPLING_TAIL_KEEP, V as resolveSamplingPreset, j as KeyTargetRateSampler, k as DeterministicSampler, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, z as isForceKept } from "./init-Bst_BhiS.js";
2
2
 
3
3
  export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_RATE, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, CompositeSampler, DeterministicSampler, FeatureFlagSampler, KeyTargetRateSampler, NeverSampler, RandomSampler, UserIdSampler, createLinkFromHeaders, debugCaptureRequested, extractLinksFromBatch, hashUnitInterval, isForceKept, markForceKept, resolveSamplingPreset, samplingPresets };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_registry = require('./registry-DYgvb62e.cjs');
2
+ const require_registry = require('./registry-DIoklBz5.cjs');
3
3
 
4
4
  //#region src/semantic-conventions.ts
5
5
  function httpRequestHeaderAttribute(name) {
@@ -1,4 +1,4 @@
1
- import { C as URLAttributes, d as HTTPAttributes, y as ServiceAttributes } from "./registry-DVSmWg6Y.js";
1
+ import { C as URLAttributes, d as HTTPAttributes, y as ServiceAttributes } from "./registry-Cy4JjIB-.js";
2
2
 
3
3
  //#region src/semantic-conventions.ts
4
4
  function httpRequestHeaderAttribute(name) {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-DApyq53y.cjs');
3
- const require_functional = require('./functional-DHlD7V0x.cjs');
3
+ const require_functional = require('./functional-zasLBPyX.cjs');
4
4
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
6
6
 
@@ -55,14 +55,14 @@ function traceDB(config, fn) {
55
55
  const spanName = (config.querySummary ?? [config.operation, target].filter(Boolean).join(" ")) || config.system;
56
56
  const configure = (ctx) => {
57
57
  ctx.setAttribute("db.system.name", config.system);
58
- ctx.setAttribute("db.system", config.system);
58
+ ctx.setAttribute("db.system.name", config.system);
59
59
  if (config.operation) {
60
60
  ctx.setAttribute("db.operation.name", config.operation);
61
- ctx.setAttribute("db.operation", config.operation);
61
+ ctx.setAttribute("db.operation.name", config.operation);
62
62
  }
63
63
  if (config.database) {
64
64
  ctx.setAttribute("db.namespace", config.database);
65
- ctx.setAttribute("db.name", config.database);
65
+ ctx.setAttribute("db.namespace", config.database);
66
66
  }
67
67
  if (config.collection) ctx.setAttribute("db.collection.name", config.collection);
68
68
  if (config.querySummary) ctx.setAttribute("db.query.summary", config.querySummary);
@@ -96,7 +96,6 @@ function traceMessaging(config, fn) {
96
96
  if (config.operation) {
97
97
  ctx.setAttribute("messaging.operation.name", config.operation);
98
98
  ctx.setAttribute("messaging.operation.type", operationType);
99
- ctx.setAttribute("messaging.operation", config.operation);
100
99
  }
101
100
  if (config.destination) ctx.setAttribute("messaging.destination.name", config.destination);
102
101
  setConfiguredAttributes(ctx, config.attributes);
@@ -1,5 +1,5 @@
1
1
  import { b as toAttributeValue, g as nonEmptyString, s as asRecord } from "./values-BenyvWKz.js";
2
- import { c as withTracing } from "./functional-C4js2vTM.js";
2
+ import { c as withTracing } from "./functional-BXgTFVTA.js";
3
3
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
4
4
  import { SpanKind } from "@opentelemetry/api";
5
5
 
@@ -54,14 +54,14 @@ function traceDB(config, fn) {
54
54
  const spanName = (config.querySummary ?? [config.operation, target].filter(Boolean).join(" ")) || config.system;
55
55
  const configure = (ctx) => {
56
56
  ctx.setAttribute("db.system.name", config.system);
57
- ctx.setAttribute("db.system", config.system);
57
+ ctx.setAttribute("db.system.name", config.system);
58
58
  if (config.operation) {
59
59
  ctx.setAttribute("db.operation.name", config.operation);
60
- ctx.setAttribute("db.operation", config.operation);
60
+ ctx.setAttribute("db.operation.name", config.operation);
61
61
  }
62
62
  if (config.database) {
63
63
  ctx.setAttribute("db.namespace", config.database);
64
- ctx.setAttribute("db.name", config.database);
64
+ ctx.setAttribute("db.namespace", config.database);
65
65
  }
66
66
  if (config.collection) ctx.setAttribute("db.collection.name", config.collection);
67
67
  if (config.querySummary) ctx.setAttribute("db.query.summary", config.querySummary);
@@ -95,7 +95,6 @@ function traceMessaging(config, fn) {
95
95
  if (config.operation) {
96
96
  ctx.setAttribute("messaging.operation.name", config.operation);
97
97
  ctx.setAttribute("messaging.operation.type", operationType);
98
- ctx.setAttribute("messaging.operation", config.operation);
99
98
  }
100
99
  if (config.destination) ctx.setAttribute("messaging.destination.name", config.destination);
101
100
  setConfiguredAttributes(ctx, config.attributes);
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-DmM7dprX.cjs');
2
+ const require_init = require('./init-OSYC19sK.cjs');
3
3
 
4
4
  exports.TailSamplingSpanProcessor = require_init.TailSamplingSpanProcessor;
@@ -1,3 +1,3 @@
1
- import { x as TailSamplingSpanProcessor } from "./init-CsKK9vZO.js";
1
+ import { x as TailSamplingSpanProcessor } from "./init-Bst_BhiS.js";
2
2
 
3
3
  export { TailSamplingSpanProcessor };
package/dist/webhook.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_structured_error = require('./structured-error--_wXpd_C.cjs');
3
- const require_functional = require('./functional-DHlD7V0x.cjs');
3
+ const require_functional = require('./functional-zasLBPyX.cjs');
4
4
  const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
6
6
 
package/dist/webhook.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { r as recordStructuredError } from "./structured-error-YIuka-FE.js";
2
- import { c as withTracing } from "./functional-C4js2vTM.js";
2
+ import { c as withTracing } from "./functional-BXgTFVTA.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
4
4
  import { SpanKind, trace } from "@opentelemetry/api";
5
5
 
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-DApyq53y.cjs');
3
- const require_functional = require('./functional-DHlD7V0x.cjs');
3
+ const require_functional = require('./functional-zasLBPyX.cjs');
4
4
  const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
5
5
  const require_business_baggage = require('./business-baggage.cjs');
6
6
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,5 +1,5 @@
1
1
  import { h as isFunction, x as toError } from "./values-BenyvWKz.js";
2
- import { c as withTracing } from "./functional-C4js2vTM.js";
2
+ import { c as withTracing } from "./functional-BXgTFVTA.js";
3
3
  import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
4
4
  import { createSafeBaggageSchema } from "./business-baggage.js";
5
5
  import { SpanKind, context, propagation } from "@opentelemetry/api";
package/dist/workflow.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
3
3
  const require_values = require('./values-DApyq53y.cjs');
4
- const require_functional = require('./functional-DHlD7V0x.cjs');
4
+ const require_functional = require('./functional-zasLBPyX.cjs');
5
5
  const require_trace_helpers = require('./trace-helpers.cjs');
6
6
  const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
7
7
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
package/dist/workflow.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { b as toAttributeValue, g as nonEmptyString, h as isFunction, l as asString, s as asRecord, x as toError } from "./values-BenyvWKz.js";
2
- import { c as withTracing } from "./functional-C4js2vTM.js";
2
+ import { c as withTracing } from "./functional-BXgTFVTA.js";
3
3
  import { getActiveSpan } from "./trace-helpers.js";
4
4
  import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
5
5
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-DmM7dprX.cjs');
2
+ const require_init = require('./init-OSYC19sK.cjs');
3
3
 
4
4
  exports.hasYamlConfig = require_init.hasYamlConfig;
5
5
  exports.loadYamlConfig = require_init.loadYamlConfig;
@@ -1,5 +1,5 @@
1
1
  import { g as SamplingPreset } from "./sampling-Er217Mge.cjs";
2
- import { a as AutotelConfig, o as OtlpSignal } from "./init-8GSy2bza.cjs";
2
+ import { a as AutotelConfig, o as OtlpSignal } from "./init-BU7qa-Ii.cjs";
3
3
  //#region src/yaml-config.d.ts
4
4
  /** A value as a YAML document carries it: scalars, sequences, mappings. */
5
5
  type YamlValue = string | number | boolean | null | YamlValue[] | YamlMapping;
@@ -1,5 +1,5 @@
1
1
  import { g as SamplingPreset } from "./sampling-DBng4Foa.js";
2
- import { a as AutotelConfig, o as OtlpSignal } from "./init-UnKrXhpq.js";
2
+ import { a as AutotelConfig, o as OtlpSignal } from "./init-DDCgmfa4.js";
3
3
  //#region src/yaml-config.d.ts
4
4
  /** A value as a YAML document carries it: scalars, sequences, mappings. */
5
5
  type YamlValue = string | number | boolean | null | YamlValue[] | YamlMapping;
@@ -1,3 +1,3 @@
1
- import { _ as loadYamlConfig, g as hasYamlConfig, v as loadYamlConfigFromFile } from "./init-CsKK9vZO.js";
1
+ import { _ as loadYamlConfig, g as hasYamlConfig, v as loadYamlConfigFromFile } from "./init-Bst_BhiS.js";
2
2
 
3
3
  export { hasYamlConfig, loadYamlConfig, loadYamlConfigFromFile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel",
3
- "version": "7.4.0",
3
+ "version": "7.6.0",
4
4
  "description": "Write Once, Observe Anywhere",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -299,31 +299,31 @@
299
299
  "license": "Apache-2.0",
300
300
  "dependencies": {
301
301
  "@opentelemetry/api": "^1.9.1",
302
- "@opentelemetry/api-logs": "^0.221.0",
303
- "@opentelemetry/exporter-logs-otlp-http": "^0.221.0",
304
- "@opentelemetry/exporter-metrics-otlp-http": "^0.221.0",
305
- "@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
306
- "@opentelemetry/instrumentation": "^0.221.0",
307
- "@opentelemetry/resources": "^2.10.0",
308
- "@opentelemetry/sdk-logs": "^0.221.0",
309
- "@opentelemetry/sdk-metrics": "^2.10.0",
310
- "@opentelemetry/sdk-node": "^0.221.0",
311
- "@opentelemetry/sdk-trace-base": "^2.10.0",
302
+ "@opentelemetry/api-logs": "^0.222.0",
303
+ "@opentelemetry/exporter-logs-otlp-http": "^0.222.0",
304
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.222.0",
305
+ "@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
306
+ "@opentelemetry/instrumentation": "^0.222.0",
307
+ "@opentelemetry/resources": "^2.11.0",
308
+ "@opentelemetry/sdk-logs": "^0.222.0",
309
+ "@opentelemetry/sdk-metrics": "^2.11.0",
310
+ "@opentelemetry/sdk-node": "^0.222.0",
311
+ "@opentelemetry/sdk-trace-base": "^2.11.0",
312
312
  "@opentelemetry/semantic-conventions": "^1.43.0",
313
313
  "import-in-the-middle": "^3.3.2"
314
314
  },
315
315
  "peerDependencies": {
316
- "@opentelemetry/auto-instrumentations-node": "^0.79.0",
317
- "@opentelemetry/exporter-logs-otlp-grpc": "^0.221.0",
318
- "@opentelemetry/exporter-logs-otlp-proto": "^0.221.0",
319
- "@opentelemetry/exporter-metrics-otlp-grpc": "^0.221.0",
320
- "@opentelemetry/exporter-metrics-otlp-proto": "^0.221.0",
321
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
322
- "@opentelemetry/exporter-trace-otlp-proto": "^0.221.0",
323
- "@opentelemetry/resource-detector-aws": "^2.21.0",
324
- "@opentelemetry/resource-detector-container": "^0.8.12",
325
- "@opentelemetry/resource-detector-gcp": "^0.56.0",
326
- "@opentelemetry/sdk-trace-node": "^2.10.0",
316
+ "@opentelemetry/auto-instrumentations-node": "^0.80.0",
317
+ "@opentelemetry/exporter-logs-otlp-grpc": "^0.222.0",
318
+ "@opentelemetry/exporter-logs-otlp-proto": "^0.222.0",
319
+ "@opentelemetry/exporter-metrics-otlp-grpc": "^0.222.0",
320
+ "@opentelemetry/exporter-metrics-otlp-proto": "^0.222.0",
321
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
322
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.222.0",
323
+ "@opentelemetry/resource-detector-aws": "^2.22.0",
324
+ "@opentelemetry/resource-detector-container": "^0.8.13",
325
+ "@opentelemetry/resource-detector-gcp": "^0.57.0",
326
+ "@opentelemetry/sdk-trace-node": "^2.11.0",
327
327
  "@traceloop/node-server-sdk": "^0.27.0",
328
328
  "pino": "^10.3.1",
329
329
  "pino-pretty": "^13.1.3",
@@ -379,18 +379,18 @@
379
379
  "devDependencies": {
380
380
  "@arethetypeswrong/cli": "^0.18.5",
381
381
  "@edge-runtime/vm": "^5.0.0",
382
- "@opentelemetry/auto-instrumentations-node": "^0.79.0",
383
- "@opentelemetry/context-async-hooks": "^2.10.0",
384
- "@opentelemetry/exporter-logs-otlp-grpc": "^0.221.0",
385
- "@opentelemetry/exporter-logs-otlp-proto": "^0.221.0",
386
- "@opentelemetry/exporter-metrics-otlp-grpc": "^0.221.0",
387
- "@opentelemetry/exporter-metrics-otlp-proto": "^0.221.0",
388
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.221.0",
389
- "@opentelemetry/exporter-trace-otlp-proto": "^0.221.0",
390
- "@opentelemetry/resource-detector-aws": "^2.21.0",
391
- "@opentelemetry/resource-detector-container": "^0.8.12",
392
- "@opentelemetry/resource-detector-gcp": "^0.56.0",
393
- "@opentelemetry/sdk-trace-node": "^2.10.0",
382
+ "@opentelemetry/auto-instrumentations-node": "^0.80.0",
383
+ "@opentelemetry/context-async-hooks": "^2.11.0",
384
+ "@opentelemetry/exporter-logs-otlp-grpc": "^0.222.0",
385
+ "@opentelemetry/exporter-logs-otlp-proto": "^0.222.0",
386
+ "@opentelemetry/exporter-metrics-otlp-grpc": "^0.222.0",
387
+ "@opentelemetry/exporter-metrics-otlp-proto": "^0.222.0",
388
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
389
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.222.0",
390
+ "@opentelemetry/resource-detector-aws": "^2.22.0",
391
+ "@opentelemetry/resource-detector-container": "^0.8.13",
392
+ "@opentelemetry/resource-detector-gcp": "^0.57.0",
393
+ "@opentelemetry/sdk-trace-node": "^2.11.0",
394
394
  "@swc/core": "^1.15.46",
395
395
  "@total-typescript/ts-reset": "^0.6.1",
396
396
  "@total-typescript/tsconfig": "^1.0.4",