autotel 7.9.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-DxHvvWc_.cjs → functional-CjZT7Jur.cjs} +3 -3
  56. package/dist/{functional-6QPJDqUW.js → functional-DHn-xGtR.js} +3 -3
  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-C-qfxo_u.js → init-rVPOUqng.js} +98 -8
  75. package/dist/{init-W_klPrYk.cjs → init-zb68UvOW.cjs} +97 -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,5 +1,5 @@
1
1
  const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
2
- const require_init = require('./init-W_klPrYk.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');
@@ -608,11 +608,11 @@ const INACTIVE_CTX_METHODS = {
608
608
  recordError: noop,
609
609
  track: noop,
610
610
  isRecording: () => false,
611
- getBaggage: () => void 0,
611
+ getBaggage: () => {},
612
612
  setBaggage: (_key, value) => value,
613
613
  deleteBaggage: noop,
614
614
  getAllBaggage: () => /* @__PURE__ */ new Map(),
615
- getTypedBaggage: () => void 0,
615
+ getTypedBaggage: () => {},
616
616
  setTypedBaggage: noop
617
617
  };
618
618
  /** A `ctx`-shaped view of whatever context `resolve` finds at access time. */
@@ -1,4 +1,4 @@
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-C-qfxo_u.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
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";
@@ -605,11 +605,11 @@ const INACTIVE_CTX_METHODS = {
605
605
  recordError: noop,
606
606
  track: noop,
607
607
  isRecording: () => false,
608
- getBaggage: () => void 0,
608
+ getBaggage: () => {},
609
609
  setBaggage: (_key, value) => value,
610
610
  deleteBaggage: noop,
611
611
  getAllBaggage: () => /* @__PURE__ */ new Map(),
612
- getTypedBaggage: () => void 0,
612
+ getTypedBaggage: () => {},
613
613
  setTypedBaggage: noop
614
614
  };
615
615
  /** A `ctx`-shaped view of whatever context `resolve` finds at access time. */
@@ -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-DxHvvWc_.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-6QPJDqUW.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-W_klPrYk.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 { q as getActiveContextWithBaggage } from "./init-C-qfxo_u.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-W_klPrYk.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-DxHvvWc_.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;
package/dist/index.d.cts CHANGED
@@ -1,26 +1,26 @@
1
1
  import { a as AttributeRedactorPreset, c as REDACTOR_PATTERNS, d as builtinPatterns, f as createAttributeRedactor, i as AttributeRedactorFn, l as REDACTOR_PRESETS, m as normalizeAttributeRedactorConfig, n as AttributeRedactingProcessorOptions, o as BuiltinPatternName, p as createRedactedSpan, r as AttributeRedactorConfig, s as MaskFn, t as AttributeRedactingProcessor, u as ValuePatternConfig } from "./attribute-redacting-processor-CvBE0z1p.cjs";
2
- import { A as ExceptionAttrs, B as PeerAttrs, C as CloudAttrs, D as DeploymentAttrs, E as DBAttrs, F as HTTPServerAttrs, G as SessionAttrs, H as RPCAttrs, I as K8sAttrs, J as URLAttrs, K as TLSAttrs, L as MessagingAttrs, M as FeatureFlagAttrs, N as GraphQLAttrs, O as DeviceAttrs, P as HTTPClientAttrs, R as NetworkAttrs, S as ClientAttrs, T as ContainerAttrs, U as ServerAddressAttrs, V as ProcessAttrs, W as ServiceAttrs, Y as UserAttrs, _ as autoRedactPII, a as httpClient, b as validateAttribute, c as mergeServiceResource, d as setError, f as setException, g as AttributePolicy, h as AttributeGuardrails, i as dbClient, j as FaaSAttrs, k as ErrorAttrs, l as request, m as setUser, n as safeSetAttributes, o as httpServer, p as setSession, q as ThreadAttrs, s as identify, t as mergeAttrs, u as setDevice, w as CodeAttrs, x as attrs, z as OTelAttrs } from "./index-8bFU4kmd.cjs";
2
+ import { A as ExceptionAttrs, B as PeerAttrs, C as CloudAttrs, D as DeploymentAttrs, E as DBAttrs, F as HTTPServerAttrs, G as SessionAttrs, H as RPCAttrs, I as K8sAttrs, J as URLAttrs, K as TLSAttrs, L as MessagingAttrs, M as FeatureFlagAttrs, N as GraphQLAttrs, O as DeviceAttrs, P as HTTPClientAttrs, R as NetworkAttrs, S as ClientAttrs, T as ContainerAttrs, U as ServerAddressAttrs, V as ProcessAttrs, W as ServiceAttrs, Y as UserAttrs, _ as autoRedactPII, a as httpClient, b as validateAttribute, c as mergeServiceResource, d as setError, f as setException, g as AttributePolicy, h as AttributeGuardrails, i as dbClient, j as FaaSAttrs, k as ErrorAttrs, l as request, m as setUser, n as safeSetAttributes, o as httpServer, p as setSession, q as ThreadAttrs, s as identify, t as mergeAttrs, u as setDevice, w as CodeAttrs, x as attrs, z as OTelAttrs } from "./index-DVPsz3DK.cjs";
3
3
  import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
4
4
  import { n as TraceContext$1, r as defineBaggageSchema, t as AttributeValue$2 } from "./trace-context-f7Xq0Q2q.cjs";
5
5
  import { BaggageError, BaggageFieldDefinition, BaggageFieldType, BusinessBaggage, BusinessBaggageValues, SafeBaggageOptions, SafeBaggageSchema, createSafeBaggageSchema } from "./business-baggage.cjs";
6
6
  import { CORRELATION_ID_BAGGAGE_KEY, generateCorrelationId, getCorrelationId, getOrCreateCorrelationId, runWithCorrelationId, setCorrelationId, setCorrelationIdInBaggage } from "./correlation-id.cjs";
7
- import { T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, d as NeverSampler, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, m as Sampler, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, t as AUTOTEL_DEBUG_BAGGAGE_KEY, v as createLinkFromHeaders, w as resolveSamplingPreset } from "./sampling-DENUjT_8.cjs";
8
- import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, i as ctx, l as trace$2, 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";
7
+ import { T as samplingPresets, _ as UserIdSampler, a as AdaptiveSampler, b as extractLinksFromBatch, d as NeverSampler, g as SamplingPreset, h as SamplingContext, i as AUTOTEL_SAMPLING_TAIL_KEEP, m as Sampler, o as AlwaysSampler, p as RandomSampler, r as AUTOTEL_SAMPLING_TAIL_EVALUATED, t as AUTOTEL_DEBUG_BAGGAGE_KEY, v as createLinkFromHeaders, w as resolveSamplingPreset } from "./sampling-Dud4XU2m.cjs";
8
+ import { a as getActiveTraceContext, c as span, d as withNewContext, f as withTracing, i as ctx, l as trace$2, 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";
9
9
  import { DrainPipelineOptions, PipelineDrainFn, createDrainPipeline } from "./drain-pipeline.cjs";
10
10
  import { a as EventSchemaMetadata, c as FunnelStatus, l as OutcomeStatus, n as EventAttributeValue, o as EventSubscriber, r as EventAttributes, s as EventTrackingOptions, t as AutotelEventContext } from "./event-subscriber-DMACQA-1.cjs";
11
11
  import { Event, EventsOptions, getEvents, resetEvents } from "./event.cjs";
12
- import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BpDagWNa.cjs";
13
- import { a as AutotelConfig, c as StringRedactor, i as lockLogger, l as createStringRedactor, n as isInitialized, r as isLoggerLocked, s as ProcessHandlersConfig, t as init } from "./init-COfMwKbc.cjs";
12
+ import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BYvLMiNz.cjs";
13
+ import { a as AutotelConfig, c as StringRedactor, i as lockLogger, l as createStringRedactor, n as isInitialized, r as isLoggerLocked, s as ProcessHandlersConfig, t as init } from "./init-BtYaU5n9.cjs";
14
14
  import { a as SpanNameNormalizerPreset, i as SpanNameNormalizerFn, n as NORMALIZER_PRESETS, o as SpanNameNormalizingProcessor, r as SpanNameNormalizerConfig, s as SpanNameNormalizingProcessorOptions, t as NORMALIZER_PATTERNS } from "./span-name-normalizer-CN1-8C76.cjs";
15
- import "./canonical-log-line-processor-C0Z_N4oL.cjs";
15
+ import "./canonical-log-line-processor-DLeAQjgb.cjs";
16
16
  import { i as defineEvent, n as DefinedEvent, r as SchemaLike, t as DefineEventOptions } from "./define-event-BNeuKUPv.cjs";
17
17
  import { ParsedError, parseError } from "./parse-error.cjs";
18
18
  import { Metric, MetricsOptions, getMetrics, resetMetrics } from "./metric.cjs";
19
19
  import { createCounter, createHistogram, createObservableGauge, createUpDownCounter, getMeter } from "./metric-helpers.cjs";
20
20
  import { TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan } from "./trace-helpers.cjs";
21
- import { getAutotelTracer, getAutotelTracerProvider, setAutotelTracerProvider } from "./tracer-provider.cjs";
21
+ import { getAutotelTracer, getAutotelTracerProvider, hasTracerProvider, setAutotelTracerProvider } from "./tracer-provider.cjs";
22
22
  import { DBConfig, HTTPConfig, MessagingConfig, traceDB, traceHTTP, traceMessaging } from "./semantic-helpers.cjs";
23
- import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-FhSxv-bK.cjs";
23
+ import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-yG0X2AsN.cjs";
24
24
  import { ConsumerConfig, ConsumerContext, LagMetricsConfig, MessagingOperation, MessagingSystem, ProducerConfig, ProducerContext, traceConsumer, traceProducer } from "./messaging.cjs";
25
25
  import { StepConfig, StepContext, StepStatus, WorkflowConfig, WorkflowContext, WorkflowStatus, getCurrentWorkflowContext, isInWorkflow, traceStep, traceWorkflow } from "./workflow.cjs";
26
26
  import { ReadableSpan, SpanProcessor } from "@opentelemetry/sdk-trace-base";
@@ -64,7 +64,7 @@ interface BaggageSpanProcessorOptions {
64
64
  * // Creates attributes: ctx.tenant.id, ctx.user.id
65
65
  * ```
66
66
  */
67
- declare class BaggageSpanProcessor implements SpanProcessor {
67
+ export declare class BaggageSpanProcessor implements SpanProcessor {
68
68
  private readonly prefix;
69
69
  constructor(options?: BaggageSpanProcessorOptions);
70
70
  onStart(span: Span$2, parentContext: Context$1): void;
@@ -80,7 +80,7 @@ declare class BaggageSpanProcessor implements SpanProcessor {
80
80
  * Reach for it where a trace is worth more than the sampling budget: a
81
81
  * payment, an audit-relevant action, or a request you are debugging now.
82
82
  */
83
- declare function forceKeep(): void;
83
+ export declare function forceKeep(): void;
84
84
  //#endregion
85
85
  //#region src/experiment.d.ts
86
86
  interface ExperimentOptions {
@@ -91,10 +91,10 @@ interface ExperimentOptions {
91
91
  /** What you expect this variant to do, in your own words. */
92
92
  expect?: string;
93
93
  }
94
- declare function experiment(options: ExperimentOptions): void;
94
+ export declare function experiment(options: ExperimentOptions): void;
95
95
  //#endregion
96
96
  //#region src/trace-hybrid.d.ts
97
- declare const trace: typeof trace$2 & typeof trace$1;
97
+ export declare const trace: typeof trace$2 & typeof trace$1;
98
98
  //#endregion
99
99
  //#region src/operation-context.d.ts
100
100
  /**
@@ -129,7 +129,7 @@ interface OperationContext {
129
129
  * }
130
130
  * ```
131
131
  */
132
- declare function getOperationContext(): OperationContext | undefined;
132
+ export declare function getOperationContext(): OperationContext | undefined;
133
133
  /**
134
134
  * Run a function within an operation context
135
135
  *
@@ -150,7 +150,7 @@ declare function getOperationContext(): OperationContext | undefined;
150
150
  * });
151
151
  * ```
152
152
  */
153
- declare function runInOperationContext<T>(name: string, fn: () => T): T;
153
+ export declare function runInOperationContext<T>(name: string, fn: () => T): T;
154
154
  //#endregion
155
155
  //#region src/rate-limiter.d.ts
156
156
  /**
@@ -340,12 +340,12 @@ declare class EventQueue {
340
340
  * }
341
341
  * ```
342
342
  */
343
- declare function track<Events extends Record<string, any> = Record<string, any>>(event: keyof Events & string, data?: Events[typeof event], options?: EventTrackingOptions): void;
343
+ export declare function track<Events extends Record<string, any> = Record<string, any>>(event: keyof Events & string, data?: Events[typeof event], options?: EventTrackingOptions): void;
344
344
  /**
345
345
  * Get events queue (for flush/shutdown)
346
346
  * @internal
347
347
  */
348
- declare function getEventQueue(): EventQueue | null;
348
+ export declare function getEventQueue(): EventQueue | null;
349
349
  //#endregion
350
350
  //#region src/shutdown.d.ts
351
351
  /**
@@ -379,7 +379,7 @@ declare function getEventQueue(): EventQueue | null;
379
379
  * await flush({ timeout: 5000 }); // 5 second timeout
380
380
  * ```
381
381
  */
382
- declare function flush(options?: {
382
+ export declare function flush(options?: {
383
383
  timeout?: number;
384
384
  forShutdown?: boolean;
385
385
  }): Promise<void>;
@@ -406,10 +406,10 @@ declare function flush(options?: {
406
406
  * })
407
407
  * ```
408
408
  */
409
- declare function shutdown(): Promise<void>;
409
+ export declare function shutdown(): Promise<void>;
410
410
  //#endregion
411
411
  //#region src/request-logger.d.ts
412
- declare function runWithRequestContext<T>(ctx: TraceContext$1, fn: () => T): T;
412
+ export declare function runWithRequestContext<T>(ctx: TraceContext$1, fn: () => T): T;
413
413
  interface RequestLogger {
414
414
  set(fields: UnknownRecord): void;
415
415
  /** Set snapshot severity without adding a log event or exception. */
@@ -446,7 +446,7 @@ interface ForkLifecycle {
446
446
  interface ForkOptions {
447
447
  lifecycle?: ForkLifecycle;
448
448
  }
449
- declare function getRequestLogger(ctx?: TraceContext$1, options?: RequestLoggerOptions): RequestLogger;
449
+ export declare function getRequestLogger(ctx?: TraceContext$1, options?: RequestLoggerOptions): RequestLogger;
450
450
  /**
451
451
  * Returns `true` when a request-logger context can be resolved without throwing —
452
452
  * i.e. an explicit `ctx` was provided, a `runWithRequestContext()` scope is active,
@@ -455,19 +455,19 @@ declare function getRequestLogger(ctx?: TraceContext$1, options?: RequestLoggerO
455
455
  * Use this to branch on observability availability instead of wrapping
456
456
  * {@link getRequestLogger} in try/catch.
457
457
  */
458
- declare function hasRequestContext(ctx?: TraceContext$1): boolean;
458
+ export declare function hasRequestContext(ctx?: TraceContext$1): boolean;
459
459
  /**
460
460
  * Like {@link getRequestLogger}, but returns `null` instead of throwing when no
461
461
  * request context is available. Intended for best-effort instrumentation where a
462
462
  * missing telemetry context must never crash business logic.
463
463
  */
464
- declare function getRequestLoggerSafe(ctx?: TraceContext$1, options?: RequestLoggerOptions): RequestLogger | null;
464
+ export declare function getRequestLoggerSafe(ctx?: TraceContext$1, options?: RequestLoggerOptions): RequestLogger | null;
465
465
  /**
466
466
  * A no-op {@link RequestLogger} whose methods do nothing. Used as a fallback by
467
467
  * best-effort instrumentation so wrapped handlers can run un-instrumented without
468
468
  * branching on logger presence.
469
469
  */
470
- declare function createNoopRequestLogger(): RequestLogger;
470
+ export declare function createNoopRequestLogger(): RequestLogger;
471
471
  //#endregion
472
472
  //#region src/structured-error.d.ts
473
473
  interface StructuredErrorInput {
@@ -493,12 +493,12 @@ interface StructuredError extends Error {
493
493
  /** Backend-only context. Omitted from toJSON() and never serialized to clients. */
494
494
  readonly internal?: UnknownRecord;
495
495
  }
496
- declare function createStructuredError(input: StructuredErrorInput): StructuredError;
497
- declare function structuredErrorToJSON(error: StructuredError): UnknownRecord;
496
+ export declare function createStructuredError(input: StructuredErrorInput): StructuredError;
497
+ export declare function structuredErrorToJSON(error: StructuredError): UnknownRecord;
498
498
  /** The `error.*` attributes a failure contributes to a span. */
499
499
  type ErrorAttributes = Record<string, AttributeValue$2>;
500
- declare function getStructuredErrorAttributes(error: Error): ErrorAttributes;
501
- declare function recordStructuredError(ctx: Pick<TraceContext$1, 'setAttributes' | 'setStatus'>, error: Error): void;
500
+ export declare function getStructuredErrorAttributes(error: Error): ErrorAttributes;
501
+ export declare function recordStructuredError(ctx: Pick<TraceContext$1, 'setAttributes' | 'setStatus'>, error: Error): void;
502
502
  //#endregion
503
503
  //#region src/error-catalog.d.ts
504
504
  /**
@@ -550,15 +550,15 @@ interface ErrorBuilder<E extends ErrorCatalogEntry> {
550
550
  }
551
551
  type ErrorCatalog<T extends Record<string, ErrorCatalogEntry>> = { readonly [K in keyof T]: ErrorBuilder<T[K]>; };
552
552
  /** True when `error` was produced by any autotel error catalog. */
553
- declare function isCatalogError(error: unknown): error is StructuredError;
553
+ export declare function isCatalogError(error: unknown): error is StructuredError;
554
554
  /** Returns the catalog code of `error`, or `undefined` if it has none. */
555
- declare function getCatalogCode(error: unknown): string | number | undefined;
555
+ export declare function getCatalogCode(error: unknown): string | number | undefined;
556
556
  /**
557
557
  * Define a typed error catalog. Returns an object whose keys are error
558
558
  * builders. Each builder produces a {@link StructuredError} carrying the
559
559
  * entry's message, status, code, why, fix, and link.
560
560
  */
561
- declare function defineErrorCatalog<const T extends Record<string, ErrorCatalogEntry>>(namespace: string, entries: T): ErrorCatalog<T>;
561
+ export declare function defineErrorCatalog<const T extends Record<string, ErrorCatalogEntry>>(namespace: string, entries: T): ErrorCatalog<T>;
562
562
  /** Severity of an audit action. */
563
563
  type AuditSeverity = 'info' | 'warn' | 'critical';
564
564
  /** Definition of a single action in an audit catalog. */
@@ -588,7 +588,7 @@ type AuditCatalog<T extends Record<string, AuditCatalogEntry>> = { readonly [K i
588
588
  * Define a typed audit catalog. Returns typed action descriptors you can pass
589
589
  * to `track()` or audit helpers without scattering magic strings.
590
590
  */
591
- declare function defineAuditCatalog<const T extends Record<string, AuditCatalogEntry>>(namespace: string, entries: T): AuditCatalog<T>;
591
+ export declare function defineAuditCatalog<const T extends Record<string, AuditCatalogEntry>>(namespace: string, entries: T): AuditCatalog<T>;
592
592
  //#endregion
593
593
  //#region src/flatten-attributes.d.ts
594
594
  /**
@@ -601,7 +601,7 @@ declare function defineAuditCatalog<const T extends Record<string, AuditCatalogE
601
601
  * attribute setter, so a value that cannot be read is a marker in the
602
602
  * telemetry, never an exception on the request path.
603
603
  */
604
- declare function toAttributeValue(value: unknown): AttributeValue$2 | undefined;
604
+ export declare function toAttributeValue(value: unknown): AttributeValue$2 | undefined;
605
605
  /** A flat, dot-notation attribute bag: what a nested object flattens to. */
606
606
  interface FlatAttributes {
607
607
  [key: string]: AttributeValue$2;
@@ -615,7 +615,7 @@ interface FlatAttributes {
615
615
  * - costs that key alone and never the call. Keys are listed before their
616
616
  * values are read, so a sibling of the bad value still lands.
617
617
  */
618
- declare function flattenToAttributes(fields: UnknownRecord, prefix?: string): FlatAttributes;
618
+ export declare function flattenToAttributes(fields: UnknownRecord, prefix?: string): FlatAttributes;
619
619
  //#endregion
620
620
  //#region src/drain-toolkit.d.ts
621
621
  interface DrainOptions<TContext, TConfig, TPayload = TContext> {
@@ -640,8 +640,8 @@ interface HttpDrainOptions<TContext, TConfig, TPayload = TContext> extends Omit<
640
640
  resolveTimeoutMs?: (config: TConfig) => number | undefined;
641
641
  resolveRetries?: (config: TConfig) => number | undefined;
642
642
  }
643
- declare function defineDrain<TContext, TConfig, TPayload = TContext>(options: DrainOptions<TContext, TConfig, TPayload>): (ctx: TContext | TContext[]) => Promise<void>;
644
- declare function defineHttpDrain<TContext, TConfig, TPayload = TContext>(options: HttpDrainOptions<TContext, TConfig, TPayload>): (ctx: TContext | TContext[]) => Promise<void>;
643
+ export declare function defineDrain<TContext, TConfig, TPayload = TContext>(options: DrainOptions<TContext, TConfig, TPayload>): (ctx: TContext | TContext[]) => Promise<void>;
644
+ export declare function defineHttpDrain<TContext, TConfig, TPayload = TContext>(options: HttpDrainOptions<TContext, TConfig, TPayload>): (ctx: TContext | TContext[]) => Promise<void>;
645
645
  //#endregion
646
646
  //#region src/enricher-toolkit.d.ts
647
647
  interface EnrichContext<TEvent extends UnknownRecord> {
@@ -668,7 +668,7 @@ interface EnricherOptions {
668
668
  /** Replace existing field value instead of merge. Default false. */
669
669
  overwrite?: boolean;
670
670
  }
671
- declare function defineEnricher<TEvent extends UnknownRecord, TValue extends object>(def: EnricherDefinition<TEvent, TValue>, options?: EnricherOptions): (ctx: EnrichContext<TEvent>) => void;
671
+ export declare function defineEnricher<TEvent extends UnknownRecord, TValue extends object>(def: EnricherDefinition<TEvent, TValue>, options?: EnricherOptions): (ctx: EnrichContext<TEvent>) => void;
672
672
  //#endregion
673
673
  //#region src/pretty-log-formatter.d.ts
674
674
  /**
@@ -679,6 +679,6 @@ declare function defineEnricher<TEvent extends UnknownRecord, TValue extends obj
679
679
  * formatDuration(1234) // "1.2s"
680
680
  * formatDuration(65000) // "1m 5s"
681
681
  */
682
- declare function formatDuration(ms: number): string;
682
+ export declare function formatDuration(ms: number): string;
683
683
  //#endregion
684
- export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, type AttributeGuardrails, type AttributePolicy, AttributeRedactingProcessor, type AttributeRedactingProcessorOptions, type AttributeRedactorConfig, type AttributeRedactorFn, type AttributeRedactorPreset, type AttributeValue, type Attributes, type AuditAction, type AuditCatalog, type AuditCatalogEntry, type AuditDescriptor, type AuditSeverity, type AutotelConfig, type Baggage, type BaggageEntry, type BaggageError, type BaggageFieldDefinition, type BaggageFieldType, BaggageSpanProcessor, type BaggageSpanProcessorOptions, type BuiltinPatternName, BusinessBaggage, type BusinessBaggageValues, CORRELATION_ID_BAGGAGE_KEY, type ClientAttrs, type CloudAttrs, type CodeAttrs, type ConsumerConfig, type ConsumerContext, type ContainerAttrs, type Context, type DBAttrs, type DBConfig, type DefineEventOptions, type DefinedEvent, type DeploymentAttrs, type DeviceAttrs, type DrainOptions, type DrainPipelineOptions, type EnrichContext, type EnricherDefinition, type EnricherOptions, type ErrorAttrs, type ErrorBuildOptions, type ErrorBuilder, type ErrorCatalog, type ErrorCatalogEntry, Event, type EventAttributes, type EventSubscriber, type EventsOptions, type Exception, type ExceptionAttrs, type ExperimentOptions, type FaaSAttrs, type FeatureFlagAttrs, FilteringSpanProcessor, type FilteringSpanProcessorOptions, type ForkLifecycle, type ForkOptions, type FunnelStatus, type GraphQLAttrs, HTTPAttributes, type HTTPClientAttrs, type HTTPConfig, type HTTPServerAttrs, type HrTime, type HttpDrainOptions, type HttpDrainRequest, type InstrumentOptions, type K8sAttrs, type LagMetricsConfig, type Link, type MaskFn, type MessagingAttrs, type MessagingConfig, type MessagingOperation, type MessagingSystem, Metric, type MetricsOptions, NORMALIZER_PATTERNS, NORMALIZER_PRESETS, type NetworkAttrs, NeverSampler, type OTelAttrs, type OperationContext, type TraceContext as OtelTraceContext, type OutcomeStatus, type ParsedError, type PeerAttrs, type PipelineDrainFn, type ProcessAttrs, type ProcessHandlersConfig, type ProducerConfig, type ProducerContext, REDACTOR_PATTERNS, REDACTOR_PRESETS, ROOT_CONTEXT, type RPCAttrs, RandomSampler, type RequestLogLevel, type RequestLogSnapshot, type RequestLogger, type RequestLoggerOptions, type SafeBaggageOptions, type SafeBaggageSchema, type Sampler, type SamplingContext, type SamplingPreset, type SchemaLike, type ServerAddressAttrs, ServiceAttributes, type ServiceAttrs, type SessionAttrs, type SingleInstrumentOptions, type Span, type SpanAttributes, type SpanContext, type SpanFilterPredicate, SpanKind, type SpanLink, type SpanNameNormalizerConfig, type SpanNameNormalizerFn, type SpanNameNormalizerPreset, SpanNameNormalizingProcessor, type SpanNameNormalizingProcessorOptions, type SpanOptions, SpanStatusCode, type StepConfig, type StepContext, type StepStatus, type StringRedactor, type StructuredError, type StructuredErrorInput, type TLSAttrs, type TextMapGetter, type TextMapSetter, type ThreadAttrs, type TimeInput, type TraceContext$1 as TraceContext, type TraceFlags, type TraceState, type Tracer, type TracerProvider, URLAttributes, type URLAttrs, type UserAttrs, UserIdSampler, type ValuePatternConfig, type WithBaggageOptions, type WithNewContextOptions, type WorkflowConfig, type WorkflowContext, type WorkflowStatus, attrs, autoRedactPII, builtinPatterns, context, createAttributeRedactor, createCounter, createDeterministicTraceId, createDrainPipeline, createHistogram, createLinkFromHeaders, createNoopRequestLogger, createObservableGauge, createRedactedSpan, createSafeBaggageSchema, createStringRedactor, createStructuredError, createUpDownCounter, ctx, dbClient, defineAuditCatalog, defineBaggageSchema, defineDrain, defineEnricher, defineErrorCatalog, defineEvent, defineHttpDrain, enrichWithTraceContext, experiment, extractLinksFromBatch, finalizeSpan, flattenMetadata, flattenToAttributes, flush, forceKeep, formatDuration, generateCorrelationId, getActiveContext, getActiveSpan, getActiveTraceContext, getAutotelTracer, getAutotelTracerProvider, getCatalogCode, getCorrelationId, getCurrentWorkflowContext, getEventQueue, getEvents, getMeter, getMetrics, getOperationContext, getOrCreateCorrelationId, getRequestLogger, getRequestLoggerSafe, getStructuredErrorAttributes, getTraceContext, getTracer, hasRequestContext, httpClient, httpRequestHeaderAttribute, httpResponseHeaderAttribute, httpServer, identify, init, instrument, isCatalogError, isInWorkflow, isInitialized, isLoggerLocked, isTracing, lockLogger, mergeAttrs, mergeServiceResource, normalizeAttributeRedactorConfig, otelTrace, parseError, propagation, recordStructuredError, request, requestCtx, resetEvents, resetMetrics, resolveSamplingPreset, resolveTraceUrl, runInOperationContext, runWithCorrelationId, runWithRequestContext, runWithSpan, safeSetAttributes, samplingPresets, setAutotelTracerProvider, setCorrelationId, setCorrelationIdInBaggage, setDevice, setError, setException, setSession, setUser, shutdown, span, structuredErrorToJSON, toAttributeValue, trace, traceConsumer, traceDB, traceHTTP, traceMessaging, traceProducer, traceStep, traceWorkflow, track, validateAttribute, withBaggage, withNewContext, withTracing };
684
+ export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, type AttributeGuardrails, type AttributePolicy, AttributeRedactingProcessor, type AttributeRedactingProcessorOptions, type AttributeRedactorConfig, type AttributeRedactorFn, type AttributeRedactorPreset, type AttributeValue, type Attributes, type AuditAction, type AuditCatalog, type AuditCatalogEntry, type AuditDescriptor, type AuditSeverity, type AutotelConfig, type Baggage, type BaggageEntry, type BaggageError, type BaggageFieldDefinition, type BaggageFieldType, type BaggageSpanProcessorOptions, type BuiltinPatternName, BusinessBaggage, type BusinessBaggageValues, CORRELATION_ID_BAGGAGE_KEY, type ClientAttrs, type CloudAttrs, type CodeAttrs, type ConsumerConfig, type ConsumerContext, type ContainerAttrs, type Context, type DBAttrs, type DBConfig, type DefineEventOptions, type DefinedEvent, type DeploymentAttrs, type DeviceAttrs, type DrainOptions, type DrainPipelineOptions, type EnrichContext, type EnricherDefinition, type EnricherOptions, type ErrorAttrs, type ErrorBuildOptions, type ErrorBuilder, type ErrorCatalog, type ErrorCatalogEntry, Event, type EventAttributes, type EventSubscriber, type EventsOptions, type Exception, type ExceptionAttrs, type ExperimentOptions, type FaaSAttrs, type FeatureFlagAttrs, FilteringSpanProcessor, type FilteringSpanProcessorOptions, type ForkLifecycle, type ForkOptions, type FunnelStatus, type GraphQLAttrs, HTTPAttributes, type HTTPClientAttrs, type HTTPConfig, type HTTPServerAttrs, type HrTime, type HttpDrainOptions, type HttpDrainRequest, type InstrumentOptions, type K8sAttrs, type LagMetricsConfig, type Link, type MaskFn, type MessagingAttrs, type MessagingConfig, type MessagingOperation, type MessagingSystem, Metric, type MetricsOptions, NORMALIZER_PATTERNS, NORMALIZER_PRESETS, type NetworkAttrs, NeverSampler, type OTelAttrs, type OperationContext, type TraceContext as OtelTraceContext, type OutcomeStatus, type ParsedError, type PeerAttrs, type PipelineDrainFn, type ProcessAttrs, type ProcessHandlersConfig, type ProducerConfig, type ProducerContext, REDACTOR_PATTERNS, REDACTOR_PRESETS, ROOT_CONTEXT, type RPCAttrs, RandomSampler, type RequestLogLevel, type RequestLogSnapshot, type RequestLogger, type RequestLoggerOptions, type SafeBaggageOptions, type SafeBaggageSchema, type Sampler, type SamplingContext, type SamplingPreset, type SchemaLike, type ServerAddressAttrs, ServiceAttributes, type ServiceAttrs, type SessionAttrs, type SingleInstrumentOptions, type Span, type SpanAttributes, type SpanContext, type SpanFilterPredicate, SpanKind, type SpanLink, type SpanNameNormalizerConfig, type SpanNameNormalizerFn, type SpanNameNormalizerPreset, SpanNameNormalizingProcessor, type SpanNameNormalizingProcessorOptions, type SpanOptions, SpanStatusCode, type StepConfig, type StepContext, type StepStatus, type StringRedactor, type StructuredError, type StructuredErrorInput, type TLSAttrs, type TextMapGetter, type TextMapSetter, type ThreadAttrs, type TimeInput, type TraceContext$1 as TraceContext, type TraceFlags, type TraceState, type Tracer, type TracerProvider, URLAttributes, type URLAttrs, type UserAttrs, UserIdSampler, type ValuePatternConfig, type WithBaggageOptions, type WithNewContextOptions, type WorkflowConfig, type WorkflowContext, type WorkflowStatus, attrs, autoRedactPII, builtinPatterns, context, createAttributeRedactor, createCounter, createDeterministicTraceId, createDrainPipeline, createHistogram, createLinkFromHeaders, createObservableGauge, createRedactedSpan, createSafeBaggageSchema, createStringRedactor, createUpDownCounter, ctx, dbClient, defineBaggageSchema, defineEvent, enrichWithTraceContext, extractLinksFromBatch, finalizeSpan, flattenMetadata, generateCorrelationId, getActiveContext, getActiveSpan, getActiveTraceContext, getAutotelTracer, getAutotelTracerProvider, getCorrelationId, getCurrentWorkflowContext, getEvents, getMeter, getMetrics, getOrCreateCorrelationId, getTraceContext, getTracer, hasTracerProvider, httpClient, httpRequestHeaderAttribute, httpResponseHeaderAttribute, httpServer, identify, init, instrument, isInWorkflow, isInitialized, isLoggerLocked, isTracing, lockLogger, mergeAttrs, mergeServiceResource, normalizeAttributeRedactorConfig, otelTrace, parseError, propagation, request, requestCtx, resetEvents, resetMetrics, resolveSamplingPreset, resolveTraceUrl, runWithCorrelationId, runWithSpan, safeSetAttributes, samplingPresets, setAutotelTracerProvider, setCorrelationId, setCorrelationIdInBaggage, setDevice, setError, setException, setSession, setUser, span, traceConsumer, traceDB, traceHTTP, traceMessaging, traceProducer, traceStep, traceWorkflow, validateAttribute, withBaggage, withNewContext, withTracing };