autotel 7.8.0 → 7.10.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 (158) hide show
  1. package/README.md +14 -0
  2. package/dist/analysis.cjs +1 -1
  3. package/dist/analysis.d.cts +6 -7
  4. package/dist/analysis.d.ts +6 -7
  5. package/dist/analysis.js +1 -1
  6. package/dist/attributes.d.cts +1 -1
  7. package/dist/attributes.d.ts +1 -1
  8. package/dist/auto.cjs +1 -1
  9. package/dist/auto.js +1 -1
  10. package/dist/business-baggage.d.cts +12 -13
  11. package/dist/business-baggage.d.ts +12 -13
  12. package/dist/{canonical-log-line-processor-Bwrt_L4c.d.ts → canonical-log-line-processor-DDGzm-wi.d.ts} +1 -1
  13. package/dist/{canonical-log-line-processor-C0Z_N4oL.d.cts → canonical-log-line-processor-DLeAQjgb.d.cts} +1 -1
  14. package/dist/channel-BobQKsZd.js +64 -0
  15. package/dist/channel-D0eaVqn3.cjs +81 -0
  16. package/dist/config.d.cts +7 -7
  17. package/dist/config.d.ts +7 -7
  18. package/dist/correlation-id.cjs +1 -1
  19. package/dist/correlation-id.d.cts +9 -10
  20. package/dist/correlation-id.d.ts +9 -10
  21. package/dist/correlation-id.js +1 -1
  22. package/dist/db.d.cts +18 -19
  23. package/dist/db.d.ts +18 -19
  24. package/dist/decorators.cjs +1 -1
  25. package/dist/decorators.d.cts +7 -7
  26. package/dist/decorators.d.ts +7 -7
  27. package/dist/decorators.js +1 -1
  28. package/dist/diagnostics.cjs +10 -70
  29. package/dist/diagnostics.d.cts +6 -6
  30. package/dist/diagnostics.d.ts +6 -6
  31. package/dist/diagnostics.js +1 -61
  32. package/dist/drain-pipeline.d.cts +4 -5
  33. package/dist/drain-pipeline.d.ts +4 -5
  34. package/dist/enrichers.d.cts +7 -8
  35. package/dist/enrichers.d.ts +7 -8
  36. package/dist/event.cjs +1 -1
  37. package/dist/event.d.cts +6 -6
  38. package/dist/event.d.ts +6 -6
  39. package/dist/event.js +1 -1
  40. package/dist/evidence.d.cts +13 -14
  41. package/dist/evidence.d.ts +13 -14
  42. package/dist/exception-fingerprint.d.cts +10 -11
  43. package/dist/exception-fingerprint.d.ts +10 -11
  44. package/dist/exporters.d.cts +2 -2
  45. package/dist/exporters.d.ts +2 -2
  46. package/dist/feature-flags.d.cts +23 -24
  47. package/dist/feature-flags.d.ts +23 -24
  48. package/dist/{filtering-span-processor-vkewzbqB.d.ts → filtering-span-processor-BDGe1myy.d.ts} +1 -1
  49. package/dist/{filtering-span-processor-BpDagWNa.d.cts → filtering-span-processor-BYvLMiNz.d.cts} +1 -1
  50. package/dist/filtering-span-processor.cjs +3 -3
  51. package/dist/filtering-span-processor.d.cts +1 -1
  52. package/dist/filtering-span-processor.d.ts +1 -1
  53. package/dist/filtering-span-processor.js +3 -3
  54. package/dist/{functional-SeRUabkE.d.ts → functional-CbcInXMJ.d.ts} +1 -1
  55. package/dist/{functional-u5Qwjray.cjs → functional-CjZT7Jur.cjs} +19 -21
  56. package/dist/{functional-CC2BFGAO.js → functional-DHn-xGtR.js} +21 -23
  57. package/dist/{functional-DPZTpGh6.d.cts → functional-j8Joyrwd.d.cts} +1 -1
  58. package/dist/functional.cjs +1 -1
  59. package/dist/functional.d.cts +1 -1
  60. package/dist/functional.d.ts +1 -1
  61. package/dist/functional.js +1 -1
  62. package/dist/http.cjs +1 -1
  63. package/dist/http.d.cts +6 -7
  64. package/dist/http.d.ts +6 -7
  65. package/dist/http.js +1 -1
  66. package/dist/{index-B9aRLp6c.d.ts → index-DAH41w0W.d.ts} +4 -4
  67. package/dist/{index-8bFU4kmd.d.cts → index-DVPsz3DK.d.cts} +4 -4
  68. package/dist/index.cjs +3 -2
  69. package/dist/index.d.cts +38 -38
  70. package/dist/index.d.ts +38 -38
  71. package/dist/index.js +4 -4
  72. package/dist/{init-COfMwKbc.d.cts → init-BtYaU5n9.d.cts} +18 -4
  73. package/dist/{init-CnoRlJqS.d.ts → init-DUIFqRRS.d.ts} +18 -4
  74. package/dist/{init-8SISAGdE.js → init-rVPOUqng.js} +171 -10
  75. package/dist/{init-21HWbm7_.cjs → init-zb68UvOW.cjs} +180 -6
  76. package/dist/instrumentation.cjs +1 -1
  77. package/dist/instrumentation.d.cts +4 -5
  78. package/dist/instrumentation.d.ts +4 -5
  79. package/dist/instrumentation.js +1 -1
  80. package/dist/{logger-S1Fgl0g3.d.cts → logger-C9UT1aZ_.d.cts} +4 -4
  81. package/dist/{logger-S1Fgl0g3.d.ts → logger-C9UT1aZ_.d.ts} +4 -4
  82. package/dist/logger.d.cts +1 -1
  83. package/dist/logger.d.ts +1 -1
  84. package/dist/messaging-adapters.d.cts +10 -11
  85. package/dist/messaging-adapters.d.ts +10 -11
  86. package/dist/messaging-testing.d.cts +19 -20
  87. package/dist/messaging-testing.d.ts +19 -20
  88. package/dist/messaging.cjs +2 -2
  89. package/dist/messaging.d.cts +23 -24
  90. package/dist/messaging.d.ts +23 -24
  91. package/dist/messaging.js +2 -2
  92. package/dist/metric-helpers.d.cts +6 -7
  93. package/dist/metric-helpers.d.ts +6 -7
  94. package/dist/metric.d.cts +7 -7
  95. package/dist/metric.d.ts +7 -7
  96. package/dist/parse-error.d.cts +3 -4
  97. package/dist/parse-error.d.ts +3 -4
  98. package/dist/policy.cjs +0 -0
  99. package/dist/policy.js +0 -0
  100. package/dist/processors.d.cts +1 -1
  101. package/dist/processors.d.ts +1 -1
  102. package/dist/{sampling-CZi7OM9u.d.ts → sampling-B_8orhSB.d.ts} +1 -1
  103. package/dist/{sampling-DENUjT_8.d.cts → sampling-Dud4XU2m.d.cts} +1 -1
  104. package/dist/sampling.cjs +1 -1
  105. package/dist/sampling.d.cts +1 -1
  106. package/dist/sampling.d.ts +1 -1
  107. package/dist/sampling.js +1 -1
  108. package/dist/security-schema.d.cts +30 -31
  109. package/dist/security-schema.d.ts +30 -31
  110. package/dist/semantic-conventions-yG0X2AsN.d.cts +31 -0
  111. package/dist/semantic-conventions-yG0X2AsN.d.ts +31 -0
  112. package/dist/semantic-conventions.d.cts +1 -1
  113. package/dist/semantic-conventions.d.ts +1 -1
  114. package/dist/semantic-helpers.cjs +1 -1
  115. package/dist/semantic-helpers.d.cts +10 -11
  116. package/dist/semantic-helpers.d.ts +10 -11
  117. package/dist/semantic-helpers.js +1 -1
  118. package/dist/slo.d.cts +12 -13
  119. package/dist/slo.d.ts +12 -13
  120. package/dist/tail-sampling-processor.cjs +1 -1
  121. package/dist/tail-sampling-processor.d.cts +2 -3
  122. package/dist/tail-sampling-processor.d.ts +2 -3
  123. package/dist/tail-sampling-processor.js +1 -1
  124. package/dist/test-span-collector.d.cts +4 -5
  125. package/dist/test-span-collector.d.ts +4 -5
  126. package/dist/testing.d.cts +18 -18
  127. package/dist/testing.d.ts +18 -18
  128. package/dist/trace-helpers.d.cts +15 -16
  129. package/dist/trace-helpers.d.ts +15 -16
  130. package/dist/tracer-provider.cjs +21 -1
  131. package/dist/tracer-provider.d.cts +16 -6
  132. package/dist/tracer-provider.d.ts +16 -6
  133. package/dist/tracer-provider.js +22 -3
  134. package/dist/validate.cjs +8 -7
  135. package/dist/validate.d.cts +12 -12
  136. package/dist/validate.d.ts +12 -12
  137. package/dist/validate.js +8 -7
  138. package/dist/validation-attributes.d.cts +14 -15
  139. package/dist/validation-attributes.d.ts +14 -15
  140. package/dist/webhook.cjs +1 -1
  141. package/dist/webhook.d.cts +11 -12
  142. package/dist/webhook.d.ts +11 -12
  143. package/dist/webhook.js +1 -1
  144. package/dist/workflow-distributed.cjs +1 -1
  145. package/dist/workflow-distributed.d.cts +26 -27
  146. package/dist/workflow-distributed.d.ts +26 -27
  147. package/dist/workflow-distributed.js +1 -1
  148. package/dist/workflow.cjs +1 -1
  149. package/dist/workflow.d.cts +11 -12
  150. package/dist/workflow.d.ts +11 -12
  151. package/dist/workflow.js +1 -1
  152. package/dist/yaml-config.cjs +1 -1
  153. package/dist/yaml-config.d.cts +9 -10
  154. package/dist/yaml-config.d.ts +9 -10
  155. package/dist/yaml-config.js +1 -1
  156. package/package.json +15 -21
  157. package/dist/semantic-conventions-FhSxv-bK.d.cts +0 -31
  158. package/dist/semantic-conventions-FhSxv-bK.d.ts +0 -31
@@ -39,7 +39,7 @@ interface FilteringSpanProcessorOptions {
39
39
  */
40
40
  declare class FilteringSpanProcessor implements SpanProcessor {
41
41
  private readonly wrappedProcessor;
42
- private readonly filter;
42
+ private readonly predicate;
43
43
  constructor(wrappedProcessor: SpanProcessor, options: FilteringSpanProcessorOptions);
44
44
  /**
45
45
  * Pass through onStart - we need spans to start so child spans work
@@ -39,7 +39,7 @@ interface FilteringSpanProcessorOptions {
39
39
  */
40
40
  declare class FilteringSpanProcessor implements SpanProcessor {
41
41
  private readonly wrappedProcessor;
42
- private readonly filter;
42
+ private readonly predicate;
43
43
  constructor(wrappedProcessor: SpanProcessor, options: FilteringSpanProcessorOptions);
44
44
  /**
45
45
  * Pass through onStart - we need spans to start so child spans work
@@ -16,10 +16,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
16
16
  */
17
17
  var FilteringSpanProcessor = class {
18
18
  wrappedProcessor;
19
- filter;
19
+ predicate;
20
20
  constructor(wrappedProcessor, options) {
21
21
  this.wrappedProcessor = wrappedProcessor;
22
- this.filter = options.filter;
22
+ this.predicate = options.filter;
23
23
  }
24
24
  /**
25
25
  * Pass through onStart - we need spans to start so child spans work
@@ -33,7 +33,7 @@ var FilteringSpanProcessor = class {
33
33
  */
34
34
  onEnd(span) {
35
35
  try {
36
- if (this.filter(span)) this.wrappedProcessor.onEnd(span);
36
+ if (this.predicate(span)) this.wrappedProcessor.onEnd(span);
37
37
  } catch {
38
38
  this.wrappedProcessor.onEnd(span);
39
39
  }
@@ -1,2 +1,2 @@
1
- import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BpDagWNa.cjs";
1
+ import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BYvLMiNz.cjs";
2
2
  export { FilteringSpanProcessor, FilteringSpanProcessorOptions, SpanFilterPredicate };
@@ -1,2 +1,2 @@
1
- import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-vkewzbqB.js";
1
+ import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BDGe1myy.js";
2
2
  export { FilteringSpanProcessor, FilteringSpanProcessorOptions, SpanFilterPredicate };
@@ -15,10 +15,10 @@
15
15
  */
16
16
  var FilteringSpanProcessor = class {
17
17
  wrappedProcessor;
18
- filter;
18
+ predicate;
19
19
  constructor(wrappedProcessor, options) {
20
20
  this.wrappedProcessor = wrappedProcessor;
21
- this.filter = options.filter;
21
+ this.predicate = options.filter;
22
22
  }
23
23
  /**
24
24
  * Pass through onStart - we need spans to start so child spans work
@@ -32,7 +32,7 @@ var FilteringSpanProcessor = class {
32
32
  */
33
33
  onEnd(span) {
34
34
  try {
35
- if (this.filter(span)) this.wrappedProcessor.onEnd(span);
35
+ if (this.predicate(span)) this.wrappedProcessor.onEnd(span);
36
36
  } catch {
37
37
  this.wrappedProcessor.onEnd(span);
38
38
  }
@@ -1,5 +1,5 @@
1
1
  import { n as TraceContext } from "./trace-context-CqCblIQE.js";
2
- import { m as Sampler$1 } from "./sampling-CZi7OM9u.js";
2
+ import { m as Sampler$1 } from "./sampling-B_8orhSB.js";
3
3
  import { Attributes, Span, SpanKind } from "@opentelemetry/api";
4
4
  //#region src/functional-wrapper.d.ts
5
5
  type WrappedFunction<TArgs extends unknown[], TReturn> = (...args: TArgs) => TReturn | Promise<TReturn>;
@@ -1,8 +1,9 @@
1
1
  const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
2
- const require_init = require('./init-21HWbm7_.cjs');
2
+ const require_init = require('./init-zb68UvOW.cjs');
3
3
  const require_values = require('./values-AxGpgYBA.cjs');
4
4
  const require_tracer_provider = require('./tracer-provider.cjs');
5
5
  const require_config = require('./config.cjs');
6
+ const require_structured_error = require('./structured-error-DynjWTTu.cjs');
6
7
  const require_evidence = require('./evidence.cjs');
7
8
  const require_trace_helpers = require('./trace-helpers.cjs');
8
9
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -607,11 +608,11 @@ const INACTIVE_CTX_METHODS = {
607
608
  recordError: noop,
608
609
  track: noop,
609
610
  isRecording: () => false,
610
- getBaggage: () => void 0,
611
+ getBaggage: () => {},
611
612
  setBaggage: (_key, value) => value,
612
613
  deleteBaggage: noop,
613
614
  getAllBaggage: () => /* @__PURE__ */ new Map(),
614
- getTypedBaggage: () => void 0,
615
+ getTypedBaggage: () => {},
615
616
  setTypedBaggage: noop
616
617
  };
617
618
  /** A `ctx`-shaped view of whatever context `resolve` finds at access time. */
@@ -648,22 +649,6 @@ function createCtxProxy(resolve) {
648
649
  }
649
650
  const ctx = createCtxProxy(getCtxValue);
650
651
  /**
651
- * The key `@opentelemetry/core` publishes RPC metadata under. `createContextKey`
652
- * is `Symbol.for`, so this reads exactly what `instrumentation-http` (and every
653
- * framework instrumentation that renames the route) wrote, without taking a
654
- * dependency on core.
655
- */
656
- const RPC_METADATA_KEY = (0, _opentelemetry_api.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
657
- /**
658
- * The span the current request is being recorded on, or the active span when
659
- * there is no request - a queue consumer or a cron job has none, and an
660
- * attribute belongs somewhere real rather than nowhere.
661
- */
662
- function getRequestSpan() {
663
- const requestSpan = require_values.readProperty(_opentelemetry_api.context.active().getValue(RPC_METADATA_KEY), "span");
664
- return require_values.isFunction(require_values.readProperty(requestSpan, "spanContext")) ? requestSpan : _opentelemetry_api.trace.getActiveSpan();
665
- }
666
- /**
667
652
  * The ambient {@link ctx}, aimed at the **request** span rather than at
668
653
  * whatever span the calling code happens to be inside.
669
654
  *
@@ -686,8 +671,21 @@ function getRequestSpan() {
686
671
  * ```
687
672
  */
688
673
  const requestCtx = createCtxProxy(() => {
689
- const span = getRequestSpan();
690
- return span ? require_init.createTraceContext(span) : null;
674
+ const span = require_init.getRequestSpanIn() ?? _opentelemetry_api.trace.getActiveSpan();
675
+ if (!span) return null;
676
+ return {
677
+ ...require_init.createTraceContext(span),
678
+ setAttribute: (key, value) => {
679
+ const attrs = require_structured_error.flattenToAttributes({ [key]: value });
680
+ span.setAttributes(attrs);
681
+ require_init.rememberRequestAttributes(span, attrs);
682
+ },
683
+ setAttributes: (attrs) => {
684
+ const flattened = require_structured_error.flattenToAttributes(attrs);
685
+ span.setAttributes(flattened);
686
+ require_init.rememberRequestAttributes(span, flattened);
687
+ }
688
+ };
691
689
  });
692
690
  function traceImpl(fnOrNameOrOptions, maybeFn) {
693
691
  if (typeof fnOrNameOrOptions === "function") return wrapPlainWithTracing(fnOrNameOrOptions, {});
@@ -1,10 +1,11 @@
1
- import { C as AUTOTEL_SAMPLING_RATE, D as AlwaysSampler, G as getActiveContextWithBaggage, I as debugCaptureRequested, J as getEventQueue, K as getContextStorage, T as AUTOTEL_SAMPLING_TAIL_KEEP, U as createTraceContext, h as runInOperationContext, i as getSdk, n as getConfiguredSampler, q as hasExplicitSpanStatus, t as getConfig, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, z as isForceKept } from "./init-8SISAGdE.js";
2
- import { _ as readProperty, h as isFunction, l as asString, m as isDevelopment } from "./values-xBtdXtjA.js";
1
+ import { D as AUTOTEL_SAMPLING_TAIL_KEEP, E as AUTOTEL_SAMPLING_TAIL_EVALUATED, G as createTraceContext, J as getContextStorage, R as debugCaptureRequested, T as AUTOTEL_SAMPLING_RATE, V as isForceKept, X as getEventQueue, Y as hasExplicitSpanStatus, b as getRequestSpanIn, h as runInOperationContext, i as getSdk, k as AlwaysSampler, n as getConfiguredSampler, q as getActiveContextWithBaggage, t as getConfig, x as rememberRequestAttributes } from "./init-rVPOUqng.js";
2
+ import { l as asString, m as isDevelopment } from "./values-xBtdXtjA.js";
3
3
  import { getForceFlushableProvider } from "./tracer-provider.js";
4
4
  import { getConfig as getConfig$1 } from "./config.js";
5
+ import { a as flattenToAttributes } from "./structured-error-Y9y-1Pae.js";
5
6
  import { evidenceAttribute } from "./evidence.js";
6
7
  import { setSpanName } from "./trace-helpers.js";
7
- import { SpanStatusCode, context, createContextKey, propagation, trace } from "@opentelemetry/api";
8
+ import { SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
8
9
  import * as nodeFs from "node:fs";
9
10
  import * as nodeUrl from "node:url";
10
11
 
@@ -604,11 +605,11 @@ const INACTIVE_CTX_METHODS = {
604
605
  recordError: noop,
605
606
  track: noop,
606
607
  isRecording: () => false,
607
- getBaggage: () => void 0,
608
+ getBaggage: () => {},
608
609
  setBaggage: (_key, value) => value,
609
610
  deleteBaggage: noop,
610
611
  getAllBaggage: () => /* @__PURE__ */ new Map(),
611
- getTypedBaggage: () => void 0,
612
+ getTypedBaggage: () => {},
612
613
  setTypedBaggage: noop
613
614
  };
614
615
  /** A `ctx`-shaped view of whatever context `resolve` finds at access time. */
@@ -645,22 +646,6 @@ function createCtxProxy(resolve) {
645
646
  }
646
647
  const ctx = createCtxProxy(getCtxValue);
647
648
  /**
648
- * The key `@opentelemetry/core` publishes RPC metadata under. `createContextKey`
649
- * is `Symbol.for`, so this reads exactly what `instrumentation-http` (and every
650
- * framework instrumentation that renames the route) wrote, without taking a
651
- * dependency on core.
652
- */
653
- const RPC_METADATA_KEY = createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");
654
- /**
655
- * The span the current request is being recorded on, or the active span when
656
- * there is no request - a queue consumer or a cron job has none, and an
657
- * attribute belongs somewhere real rather than nowhere.
658
- */
659
- function getRequestSpan() {
660
- const requestSpan = readProperty(context.active().getValue(RPC_METADATA_KEY), "span");
661
- return isFunction(readProperty(requestSpan, "spanContext")) ? requestSpan : trace.getActiveSpan();
662
- }
663
- /**
664
649
  * The ambient {@link ctx}, aimed at the **request** span rather than at
665
650
  * whatever span the calling code happens to be inside.
666
651
  *
@@ -683,8 +668,21 @@ function getRequestSpan() {
683
668
  * ```
684
669
  */
685
670
  const requestCtx = createCtxProxy(() => {
686
- const span = getRequestSpan();
687
- return span ? createTraceContext(span) : null;
671
+ const span = getRequestSpanIn() ?? trace.getActiveSpan();
672
+ if (!span) return null;
673
+ return {
674
+ ...createTraceContext(span),
675
+ setAttribute: (key, value) => {
676
+ const attrs = flattenToAttributes({ [key]: value });
677
+ span.setAttributes(attrs);
678
+ rememberRequestAttributes(span, attrs);
679
+ },
680
+ setAttributes: (attrs) => {
681
+ const flattened = flattenToAttributes(attrs);
682
+ span.setAttributes(flattened);
683
+ rememberRequestAttributes(span, flattened);
684
+ }
685
+ };
688
686
  });
689
687
  function traceImpl(fnOrNameOrOptions, maybeFn) {
690
688
  if (typeof fnOrNameOrOptions === "function") return wrapPlainWithTracing(fnOrNameOrOptions, {});
@@ -1,5 +1,5 @@
1
1
  import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
2
- import { m as Sampler$1 } from "./sampling-DENUjT_8.cjs";
2
+ import { m as Sampler$1 } from "./sampling-Dud4XU2m.cjs";
3
3
  import { Attributes, Span, SpanKind } from "@opentelemetry/api";
4
4
  //#region src/functional-wrapper.d.ts
5
5
  type WrappedFunction<TArgs extends unknown[], TReturn> = (...args: TArgs) => TReturn | Promise<TReturn>;
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_functional = require('./functional-u5Qwjray.cjs');
2
+ const require_functional = require('./functional-CjZT7Jur.cjs');
3
3
 
4
4
  exports.ctx = require_functional.ctx;
5
5
  exports.getActiveTraceContext = require_functional.getActiveTraceContext;
@@ -1,3 +1,3 @@
1
1
  import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
2
- import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, h as TracingOptions, i as ctx, l as trace, m as SingleInstrumentOptions, n as WithBaggageOptions, o as instrument, p as InstrumentOptions, r as WithNewContextOptions, s as requestCtx, t as SpanOptions, u as withBaggage } from "./functional-DPZTpGh6.cjs";
2
+ import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, h as TracingOptions, i as ctx, l as trace, m as SingleInstrumentOptions, n as WithBaggageOptions, o as instrument, p as InstrumentOptions, r as WithNewContextOptions, s as requestCtx, t as SpanOptions, u as withBaggage } from "./functional-j8Joyrwd.cjs";
3
3
  export { type InstrumentOptions, type SingleInstrumentOptions, SpanOptions, type TraceContext, type TracingOptions, WithBaggageOptions, WithNewContextOptions, ctx, getActiveTraceContext, instrument, requestCtx, span, trace, withBaggage, withNewContext, withTracing };
@@ -1,3 +1,3 @@
1
1
  import { n as TraceContext } from "./trace-context-CqCblIQE.js";
2
- import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, h as TracingOptions, i as ctx, l as trace, m as SingleInstrumentOptions, n as WithBaggageOptions, o as instrument, p as InstrumentOptions, r as WithNewContextOptions, s as requestCtx, t as SpanOptions, u as withBaggage } from "./functional-SeRUabkE.js";
2
+ import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, h as TracingOptions, i as ctx, l as trace, m as SingleInstrumentOptions, n as WithBaggageOptions, o as instrument, p as InstrumentOptions, r as WithNewContextOptions, s as requestCtx, t as SpanOptions, u as withBaggage } from "./functional-CbcInXMJ.js";
3
3
  export { type InstrumentOptions, type SingleInstrumentOptions, SpanOptions, type TraceContext, type TracingOptions, WithBaggageOptions, WithNewContextOptions, ctx, getActiveTraceContext, instrument, requestCtx, span, trace, withBaggage, withNewContext, withTracing };
@@ -1,3 +1,3 @@
1
- import { a as span, c as withNewContext, i as requestCtx, l as withTracing, n as getActiveTraceContext, o as trace, r as instrument, s as withBaggage, t as ctx } from "./functional-CC2BFGAO.js";
1
+ import { a as span, c as withNewContext, i as requestCtx, l as withTracing, n as getActiveTraceContext, o as trace, r as instrument, s as withBaggage, t as ctx } from "./functional-DHn-xGtR.js";
2
2
 
3
3
  export { ctx, getActiveTraceContext, instrument, requestCtx, span, trace, withBaggage, withNewContext, withTracing };
package/dist/http.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-21HWbm7_.cjs');
2
+ const require_init = require('./init-zb68UvOW.cjs');
3
3
  const require_values = require('./values-AxGpgYBA.cjs');
4
4
  const require_config = require('./config.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
package/dist/http.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { context } from "@opentelemetry/api";
2
2
  //#region src/http.d.ts
3
- interface HttpInstrumentedOptions {
3
+ export interface HttpInstrumentedOptions {
4
4
  /** Service name for HTTP calls (default: 'http-client') */
5
5
  serviceName?: string;
6
6
  /** Extract URL from method arguments (default: first arg) */
@@ -54,7 +54,7 @@ interface HttpInstrumentedOptions {
54
54
  * }
55
55
  * ```
56
56
  */
57
- declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends {
57
+ export declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends {
58
58
  new (...args: any[]): {};
59
59
  }>(target: T, _context: ClassDecoratorContext) => {
60
60
  new (...args: any[]): {};
@@ -72,7 +72,7 @@ declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends
72
72
  * )
73
73
  * ```
74
74
  */
75
- declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
75
+ export declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
76
76
  /**
77
77
  * Inject trace context into HTTP headers (for distributed tracing)
78
78
  *
@@ -106,7 +106,7 @@ declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, att
106
106
  * });
107
107
  * ```
108
108
  */
109
- declare function injectTraceContext(headers?: Record<string, string>): Record<string, string>;
109
+ export declare function injectTraceContext(headers?: Record<string, string>): Record<string, string>;
110
110
  /**
111
111
  * Extract trace context from HTTP headers (for distributed tracing)
112
112
  *
@@ -142,6 +142,5 @@ declare function injectTraceContext(headers?: Record<string, string>): Record<st
142
142
  * });
143
143
  * ```
144
144
  */
145
- declare function extractTraceContext(headers: Record<string, string | string[] | undefined>): ReturnType<typeof context.active>;
146
- //#endregion
147
- export { HttpInstrumented, HttpInstrumentedOptions, extractTraceContext, injectTraceContext, traceHttpRequest };
145
+ export declare function extractTraceContext(headers: Record<string, string | string[] | undefined>): ReturnType<typeof context.active>;
146
+ //#endregion
package/dist/http.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { context } from "@opentelemetry/api";
2
2
  //#region src/http.d.ts
3
- interface HttpInstrumentedOptions {
3
+ export interface HttpInstrumentedOptions {
4
4
  /** Service name for HTTP calls (default: 'http-client') */
5
5
  serviceName?: string;
6
6
  /** Extract URL from method arguments (default: first arg) */
@@ -54,7 +54,7 @@ interface HttpInstrumentedOptions {
54
54
  * }
55
55
  * ```
56
56
  */
57
- declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends {
57
+ export declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends {
58
58
  new (...args: any[]): {};
59
59
  }>(target: T, _context: ClassDecoratorContext) => {
60
60
  new (...args: any[]): {};
@@ -72,7 +72,7 @@ declare function HttpInstrumented(options?: HttpInstrumentedOptions): <T extends
72
72
  * )
73
73
  * ```
74
74
  */
75
- declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
75
+ export declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, attributes?: Record<string, string | number>): Promise<T>;
76
76
  /**
77
77
  * Inject trace context into HTTP headers (for distributed tracing)
78
78
  *
@@ -106,7 +106,7 @@ declare function traceHttpRequest<T>(spanName: string, fn: () => Promise<T>, att
106
106
  * });
107
107
  * ```
108
108
  */
109
- declare function injectTraceContext(headers?: Record<string, string>): Record<string, string>;
109
+ export declare function injectTraceContext(headers?: Record<string, string>): Record<string, string>;
110
110
  /**
111
111
  * Extract trace context from HTTP headers (for distributed tracing)
112
112
  *
@@ -142,6 +142,5 @@ declare function injectTraceContext(headers?: Record<string, string>): Record<st
142
142
  * });
143
143
  * ```
144
144
  */
145
- declare function extractTraceContext(headers: Record<string, string | string[] | undefined>): ReturnType<typeof context.active>;
146
- //#endregion
147
- export { HttpInstrumented, HttpInstrumentedOptions, extractTraceContext, injectTraceContext, traceHttpRequest };
145
+ export declare function extractTraceContext(headers: Record<string, string | string[] | undefined>): ReturnType<typeof context.active>;
146
+ //#endregion
package/dist/http.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as getActiveContextWithBaggage } from "./init-8SISAGdE.js";
1
+ import { q as getActiveContextWithBaggage } from "./init-rVPOUqng.js";
2
2
  import { _ as readProperty, h as isFunction, i as asNumber, l as asString } from "./values-xBtdXtjA.js";
3
3
  import { getConfig } from "./config.js";
4
4
  import { SpanStatusCode, context, propagation } from "@opentelemetry/api";
@@ -495,8 +495,8 @@ declare const attrs: {
495
495
  readonly destination: (value: string) => {
496
496
  "messaging.destination.name": string;
497
497
  };
498
- readonly operation: (value: "publish" | "receive" | "process") => {
499
- "messaging.operation.type": "publish" | "receive" | "process";
498
+ readonly operation: (value: 'publish' | 'receive' | 'process') => {
499
+ "messaging.operation.type": "process" | "publish" | "receive";
500
500
  };
501
501
  readonly messageId: (value: string) => {
502
502
  "messaging.message.id": string;
@@ -527,8 +527,8 @@ declare const attrs: {
527
527
  readonly operationName: (value: string) => {
528
528
  "graphql.operation.name": string;
529
529
  };
530
- readonly operationType: (value: "query" | "mutation" | "subscription") => {
531
- "graphql.operation.type": "query" | "mutation" | "subscription";
530
+ readonly operationType: (value: 'query' | 'mutation' | 'subscription') => {
531
+ "graphql.operation.type": "mutation" | "query" | "subscription";
532
532
  };
533
533
  };
534
534
  readonly otel: {
@@ -495,8 +495,8 @@ declare const attrs: {
495
495
  readonly destination: (value: string) => {
496
496
  "messaging.destination.name": string;
497
497
  };
498
- readonly operation: (value: "publish" | "receive" | "process") => {
499
- "messaging.operation.type": "publish" | "receive" | "process";
498
+ readonly operation: (value: 'publish' | 'receive' | 'process') => {
499
+ "messaging.operation.type": "process" | "publish" | "receive";
500
500
  };
501
501
  readonly messageId: (value: string) => {
502
502
  "messaging.message.id": string;
@@ -527,8 +527,8 @@ declare const attrs: {
527
527
  readonly operationName: (value: string) => {
528
528
  "graphql.operation.name": string;
529
529
  };
530
- readonly operationType: (value: "query" | "mutation" | "subscription") => {
531
- "graphql.operation.type": "query" | "mutation" | "subscription";
530
+ readonly operationType: (value: 'query' | 'mutation' | 'subscription') => {
531
+ "graphql.operation.type": "mutation" | "query" | "subscription";
532
532
  };
533
533
  };
534
534
  readonly otel: {
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
3
- const require_init = require('./init-21HWbm7_.cjs');
3
+ const require_init = require('./init-zb68UvOW.cjs');
4
4
  const require_values = require('./values-AxGpgYBA.cjs');
5
5
  const require_tracer_provider = require('./tracer-provider.cjs');
6
6
  const require_structured_error = require('./structured-error-DynjWTTu.cjs');
@@ -9,7 +9,7 @@ const require_span_name_normalizer = require('./span-name-normalizer.cjs');
9
9
  const require_attribute_redacting_processor = require('./attribute-redacting-processor.cjs');
10
10
  const require_canonical_log_line_processor = require('./canonical-log-line-processor-BU03jJeA.cjs');
11
11
  const require_metric = require('./metric.cjs');
12
- const require_functional = require('./functional-u5Qwjray.cjs');
12
+ const require_functional = require('./functional-CjZT7Jur.cjs');
13
13
  const require_trace_helpers = require('./trace-helpers.cjs');
14
14
  const require_stable_hash = require('./stable-hash-sLi1o4jj.cjs');
15
15
  const require_correlated_events = require('./correlated-events-DE_4A3oD.cjs');
@@ -653,6 +653,7 @@ exports.getStructuredErrorAttributes = require_structured_error.getStructuredErr
653
653
  exports.getTraceContext = require_trace_helpers.getTraceContext;
654
654
  exports.getTracer = require_trace_helpers.getTracer;
655
655
  exports.hasRequestContext = hasRequestContext;
656
+ exports.hasTracerProvider = require_tracer_provider.hasTracerProvider;
656
657
  exports.httpClient = require_attributes.httpClient;
657
658
  exports.httpRequestHeaderAttribute = require_semantic_conventions.httpRequestHeaderAttribute;
658
659
  exports.httpResponseHeaderAttribute = require_semantic_conventions.httpResponseHeaderAttribute;