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
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 };
package/dist/index.d.ts 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-rkV_WL-k.js";
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-B9aRLp6c.js";
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-DAH41w0W.js";
3
3
  import { t as UnknownRecord } from "./values-CeMH-mYG.js";
4
4
  import { n as TraceContext$1, r as defineBaggageSchema, t as AttributeValue$2 } from "./trace-context-CqCblIQE.js";
5
5
  import { BaggageError, BaggageFieldDefinition, BaggageFieldType, BusinessBaggage, BusinessBaggageValues, SafeBaggageOptions, SafeBaggageSchema, createSafeBaggageSchema } from "./business-baggage.js";
6
6
  import { CORRELATION_ID_BAGGAGE_KEY, generateCorrelationId, getCorrelationId, getOrCreateCorrelationId, runWithCorrelationId, setCorrelationId, setCorrelationIdInBaggage } from "./correlation-id.js";
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-CZi7OM9u.js";
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-SeRUabkE.js";
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-B_8orhSB.js";
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-CbcInXMJ.js";
9
9
  import { DrainPipelineOptions, PipelineDrainFn, createDrainPipeline } from "./drain-pipeline.js";
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.js";
11
11
  import { Event, EventsOptions, getEvents, resetEvents } from "./event.js";
12
- import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-vkewzbqB.js";
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-CnoRlJqS.js";
12
+ import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BDGe1myy.js";
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-DUIFqRRS.js";
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-DHcg1bSP.js";
15
- import "./canonical-log-line-processor-Bwrt_L4c.js";
15
+ import "./canonical-log-line-processor-DDGzm-wi.js";
16
16
  import { i as defineEvent, n as DefinedEvent, r as SchemaLike, t as DefineEventOptions } from "./define-event-Bd8f8mST.js";
17
17
  import { ParsedError, parseError } from "./parse-error.js";
18
18
  import { Metric, MetricsOptions, getMetrics, resetMetrics } from "./metric.js";
19
19
  import { createCounter, createHistogram, createObservableGauge, createUpDownCounter, getMeter } from "./metric-helpers.js";
20
20
  import { TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan } from "./trace-helpers.js";
21
- import { getAutotelTracer, getAutotelTracerProvider, setAutotelTracerProvider } from "./tracer-provider.js";
21
+ import { getAutotelTracer, getAutotelTracerProvider, hasTracerProvider, setAutotelTracerProvider } from "./tracer-provider.js";
22
22
  import { DBConfig, HTTPConfig, MessagingConfig, traceDB, traceHTTP, traceMessaging } from "./semantic-helpers.js";
23
- import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-FhSxv-bK.js";
23
+ import { a as URLAttributes, i as ServiceAttributes, n as httpResponseHeaderAttribute, r as HTTPAttributes, t as httpRequestHeaderAttribute } from "./semantic-conventions-yG0X2AsN.js";
24
24
  import { ConsumerConfig, ConsumerContext, LagMetricsConfig, MessagingOperation, MessagingSystem, ProducerConfig, ProducerContext, traceConsumer, traceProducer } from "./messaging.js";
25
25
  import { StepConfig, StepContext, StepStatus, WorkflowConfig, WorkflowContext, WorkflowStatus, getCurrentWorkflowContext, isInWorkflow, traceStep, traceWorkflow } from "./workflow.js";
26
26
  import { AttributeValue, Attributes, Baggage, BaggageEntry, Context, Context as Context$1, Exception, HrTime, Link, Link as SpanLink, ROOT_CONTEXT, Span, Span as Span$1, SpanAttributes, SpanContext, SpanKind, SpanStatusCode, TextMapGetter, TextMapSetter, TimeInput, TraceFlags, TraceState, Tracer, TracerProvider, context, propagation, trace as otelTrace, trace as trace$1 } from "@opentelemetry/api";
@@ -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$1, 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 };
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { B as markForceKept, D as AlwaysSampler, E as AdaptiveSampler, F as createLinkFromHeaders, H as samplingPresets, J as getEventQueue, L as extractLinksFromBatch, M as NeverSampler, N as RandomSampler, P as UserIdSampler, Q as getCorrelationId, S as AUTOTEL_DEBUG_BAGGAGE_KEY, T as AUTOTEL_SAMPLING_TAIL_KEEP, U as createTraceContext, V as resolveSamplingPreset, W as defineBaggageSchema, X as CORRELATION_ID_BAGGAGE_KEY, Y as track, Z as generateCorrelationId, a as init, b as BaggageSpanProcessor, c as lockLogger, d as Event, et as getOrCreateCorrelationId, f as getEvents, h as runInOperationContext, l as flush, m as getOperationContext, nt as setCorrelationId, o as isInitialized, p as resetEvents, rt as setCorrelationIdInBaggage, s as isLoggerLocked, tt as runWithCorrelationId, u as shutdown, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, y as createStringRedactor } from "./init-8SISAGdE.js";
1
+ import { $ as generateCorrelationId, D as AUTOTEL_SAMPLING_TAIL_KEEP, E as AUTOTEL_SAMPLING_TAIL_EVALUATED, F as RandomSampler, G as createTraceContext, H as markForceKept, I as UserIdSampler, K as defineBaggageSchema, L as createLinkFromHeaders, O as AdaptiveSampler, P as NeverSampler, Q as CORRELATION_ID_BAGGAGE_KEY, S as BaggageSpanProcessor, U as resolveSamplingPreset, W as samplingPresets, X as getEventQueue, Z as track, a as init, at as setCorrelationIdInBaggage, c as lockLogger, d as Event, et as getCorrelationId, f as getEvents, h as runInOperationContext, it as setCorrelationId, k as AlwaysSampler, l as flush, m as getOperationContext, nt as getOrCreateCorrelationId, o as isInitialized, p as resetEvents, rt as runWithCorrelationId, s as isLoggerLocked, u as shutdown, w as AUTOTEL_DEBUG_BAGGAGE_KEY, y as createStringRedactor, z as extractLinksFromBatch } from "./init-rVPOUqng.js";
2
2
  import { g as nonEmptyString, i as asNumber, l as asString, r as asFunction, s as asRecord, x as toError } from "./values-xBtdXtjA.js";
3
- import { getAutotelTracer, getAutotelTracerProvider, setAutotelTracerProvider } from "./tracer-provider.js";
3
+ import { getAutotelTracer, getAutotelTracerProvider, hasTracerProvider, setAutotelTracerProvider } from "./tracer-provider.js";
4
4
  import { a as flattenToAttributes, i as structuredErrorToJSON, n as getStructuredErrorAttributes, o as toAttributeValue, r as recordStructuredError, t as createStructuredError } from "./structured-error-Y9y-1Pae.js";
5
5
  import { FilteringSpanProcessor } from "./filtering-span-processor.js";
6
6
  import { NORMALIZER_PATTERNS, NORMALIZER_PRESETS, SpanNameNormalizingProcessor } from "./span-name-normalizer.js";
7
7
  import { AttributeRedactingProcessor, REDACTOR_PATTERNS, REDACTOR_PRESETS, builtinPatterns, createAttributeRedactor, createRedactedSpan, normalizeAttributeRedactorConfig } from "./attribute-redacting-processor.js";
8
8
  import { n as formatDuration } from "./canonical-log-line-processor-BQ6NeZAk.js";
9
9
  import { Metric, getMetrics, resetMetrics } from "./metric.js";
10
- import { a as span, c as withNewContext, i as requestCtx, l as withTracing, n as getActiveTraceContext, o as trace$2, r as instrument, s as withBaggage, t as ctx } from "./functional-CC2BFGAO.js";
10
+ import { a as span, c as withNewContext, i as requestCtx, l as withTracing, n as getActiveTraceContext, o as trace$2, r as instrument, s as withBaggage, t as ctx } from "./functional-DHn-xGtR.js";
11
11
  import { createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan } from "./trace-helpers.js";
12
12
  import { t as hashJson } from "./stable-hash-AOUgw1DW.js";
13
13
  import { t as emitCorrelatedEvent } from "./correlated-events-BfpH5uS-.js";
@@ -548,4 +548,4 @@ function defineEnricher(def, options = {}) {
548
548
  }
549
549
 
550
550
  //#endregion
551
- export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, AttributeRedactingProcessor, BaggageSpanProcessor, BusinessBaggage, CORRELATION_ID_BAGGAGE_KEY, Event, FilteringSpanProcessor, HTTPAttributes, Metric, NORMALIZER_PATTERNS, NORMALIZER_PRESETS, NeverSampler, REDACTOR_PATTERNS, REDACTOR_PRESETS, ROOT_CONTEXT, RandomSampler, ServiceAttributes, SpanKind, SpanNameNormalizingProcessor, SpanStatusCode, URLAttributes, UserIdSampler, 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 };
551
+ export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, AttributeRedactingProcessor, BaggageSpanProcessor, BusinessBaggage, CORRELATION_ID_BAGGAGE_KEY, Event, FilteringSpanProcessor, HTTPAttributes, Metric, NORMALIZER_PATTERNS, NORMALIZER_PRESETS, NeverSampler, REDACTOR_PATTERNS, REDACTOR_PRESETS, ROOT_CONTEXT, RandomSampler, ServiceAttributes, SpanKind, SpanNameNormalizingProcessor, SpanStatusCode, URLAttributes, UserIdSampler, 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, hasTracerProvider, 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 };
@@ -1,11 +1,11 @@
1
1
  import { a as AttributeRedactorPreset, r as AttributeRedactorConfig } from "./attribute-redacting-processor-CvBE0z1p.cjs";
2
- import { s as Logger } from "./logger-S1Fgl0g3.cjs";
3
- import { g as SamplingPreset, m as Sampler$1 } from "./sampling-DENUjT_8.cjs";
2
+ import { s as Logger } from "./logger-C9UT1aZ_.cjs";
3
+ import { g as SamplingPreset, m as Sampler$1 } from "./sampling-Dud4XU2m.cjs";
4
4
  import { o as EventSubscriber } from "./event-subscriber-DMACQA-1.cjs";
5
- import { r as SpanFilterPredicate } from "./filtering-span-processor-BpDagWNa.cjs";
5
+ import { r as SpanFilterPredicate } from "./filtering-span-processor-BYvLMiNz.cjs";
6
6
  import { r as Policy } from "./policy-C4QcZnqv.cjs";
7
7
  import { r as SpanNameNormalizerConfig } from "./span-name-normalizer-CN1-8C76.cjs";
8
- import { t as CanonicalLogLineOptions } from "./canonical-log-line-processor-C0Z_N4oL.cjs";
8
+ import { t as CanonicalLogLineOptions } from "./canonical-log-line-processor-DLeAQjgb.cjs";
9
9
  import { BasicTracerProvider, ReadableSpan, SpanExporter, SpanProcessor } from "@opentelemetry/sdk-trace-base";
10
10
  import { Attributes, Sampler, TextMapPropagator } from "@opentelemetry/api";
11
11
  import { Resource, ResourceDetector } from "@opentelemetry/resources";
@@ -403,6 +403,20 @@ interface AutotelConfig {
403
403
  * autotel added no listener.
404
404
  */
405
405
  flushOnExit?: boolean;
406
+ /**
407
+ * Record `console.error(...)` calls made inside a span as an exception on
408
+ * that span, leaving its status alone (the error was handled). Read from
409
+ * Node's `console.*` diagnostics channels; `console` is never patched.
410
+ * Default: `true`.
411
+ */
412
+ captureConsoleErrors?: boolean;
413
+ /**
414
+ * Record one `autotel.LogFlood` exception on the active span when a single
415
+ * log template (digits, UUIDs and hex ids collapsed) is written more than
416
+ * this many times in one trace — logging inside a loop. Default: `100`;
417
+ * `0` disables.
418
+ */
419
+ logFloodThreshold?: number;
406
420
  /**
407
421
  * Local developer UX for autotel-devtools.
408
422
  *