autotel 7.6.2 → 7.7.1

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 (75) hide show
  1. package/dist/attributes.d.cts +1 -1
  2. package/dist/attributes.d.ts +1 -1
  3. package/dist/auto.cjs +1 -1
  4. package/dist/auto.js +1 -1
  5. package/dist/business-baggage.d.cts +1 -1
  6. package/dist/business-baggage.d.ts +1 -1
  7. package/dist/correlation-id.cjs +1 -1
  8. package/dist/correlation-id.js +1 -1
  9. package/dist/db.cjs +1 -1
  10. package/dist/db.js +1 -1
  11. package/dist/decorators.cjs +1 -1
  12. package/dist/decorators.d.cts +2 -2
  13. package/dist/decorators.d.ts +2 -2
  14. package/dist/decorators.js +1 -1
  15. package/dist/event.cjs +1 -1
  16. package/dist/event.js +1 -1
  17. package/dist/{functional-CgWcRXGX.d.cts → functional-C4mjgtJb.d.cts} +25 -2
  18. package/dist/{functional-RFFpQzAV.d.ts → functional-DN_ztd9C.d.ts} +25 -2
  19. package/dist/{functional-DzIFi7ml.js → functional-S9IJNlBn.js} +111 -26
  20. package/dist/{functional-uOagkiCk.cjs → functional-UIJ0CaTV.cjs} +114 -23
  21. package/dist/functional.cjs +2 -1
  22. package/dist/functional.d.cts +3 -3
  23. package/dist/functional.d.ts +3 -3
  24. package/dist/functional.js +2 -2
  25. package/dist/http.cjs +1 -1
  26. package/dist/http.js +1 -1
  27. package/dist/{index-Y7If_wH4.d.cts → index-8bFU4kmd.d.cts} +1 -1
  28. package/dist/{index-CsoeCsGL.d.ts → index-o_6YjZhV.d.ts} +1 -1
  29. package/dist/index.cjs +4 -3
  30. package/dist/index.d.cts +14 -5
  31. package/dist/index.d.ts +14 -5
  32. package/dist/index.js +4 -4
  33. package/dist/{init-zGVUHByM.cjs → init-BYXDCfRL.cjs} +57 -20
  34. package/dist/{init-BHV2gWsV.d.ts → init-CKSMbJUG.d.ts} +17 -1
  35. package/dist/{init-Dwj1goyE.js → init-Dyq6WtsO.js} +57 -20
  36. package/dist/{init-DxmeJ3d0.d.cts → init-WwjD-kQu.d.cts} +17 -1
  37. package/dist/instrumentation.cjs +1 -1
  38. package/dist/instrumentation.js +1 -1
  39. package/dist/messaging.cjs +2 -2
  40. package/dist/messaging.d.cts +1 -1
  41. package/dist/messaging.d.ts +1 -1
  42. package/dist/messaging.js +2 -2
  43. package/dist/sampling.cjs +1 -1
  44. package/dist/sampling.js +1 -1
  45. package/dist/semantic-helpers.cjs +1 -1
  46. package/dist/semantic-helpers.d.cts +1 -1
  47. package/dist/semantic-helpers.d.ts +1 -1
  48. package/dist/semantic-helpers.js +1 -1
  49. package/dist/{structured-error-BI9PFKZr.cjs → structured-error-BAXhglRE.cjs} +47 -24
  50. package/dist/{structured-error-XpBdwnmv.js → structured-error-Y9y-1Pae.js} +47 -24
  51. package/dist/tail-sampling-processor.cjs +1 -1
  52. package/dist/tail-sampling-processor.js +1 -1
  53. package/dist/testing.cjs +14 -0
  54. package/dist/testing.js +15 -1
  55. package/dist/{trace-context-f89xPJbK.d.ts → trace-context-CqCblIQE.d.ts} +12 -5
  56. package/dist/{trace-context-C1Cn1q0y.d.cts → trace-context-f7Xq0Q2q.d.cts} +12 -5
  57. package/dist/validate.cjs +1 -1
  58. package/dist/validate.js +1 -1
  59. package/dist/webhook.cjs +2 -2
  60. package/dist/webhook.d.cts +1 -1
  61. package/dist/webhook.d.ts +1 -1
  62. package/dist/webhook.js +2 -2
  63. package/dist/workflow-distributed.cjs +1 -1
  64. package/dist/workflow-distributed.d.cts +1 -1
  65. package/dist/workflow-distributed.d.ts +1 -1
  66. package/dist/workflow-distributed.js +1 -1
  67. package/dist/workflow.cjs +1 -1
  68. package/dist/workflow.d.cts +1 -1
  69. package/dist/workflow.d.ts +1 -1
  70. package/dist/workflow.js +1 -1
  71. package/dist/yaml-config.cjs +1 -1
  72. package/dist/yaml-config.d.cts +2 -2
  73. package/dist/yaml-config.d.ts +2 -2
  74. package/dist/yaml-config.js +1 -1
  75. package/package.json +419 -159
@@ -1,4 +1,4 @@
1
- import { n as TraceContext, t as AttributeValue$1 } from "./trace-context-C1Cn1q0y.cjs";
1
+ import { n as TraceContext, t as AttributeValue$1 } from "./trace-context-f7Xq0Q2q.cjs";
2
2
  import { AttributeValue, Attributes, Span } from "@opentelemetry/api";
3
3
  import { Resource } from "@opentelemetry/resources";
4
4
  //#region src/attributes/types.d.ts
@@ -1,4 +1,4 @@
1
- import { n as TraceContext, t as AttributeValue$1 } from "./trace-context-f89xPJbK.js";
1
+ import { n as TraceContext, t as AttributeValue$1 } from "./trace-context-CqCblIQE.js";
2
2
  import { Resource } from "@opentelemetry/resources";
3
3
  import { AttributeValue, Attributes, Span } from "@opentelemetry/api";
4
4
  //#region src/attributes/types.d.ts
package/dist/index.cjs CHANGED
@@ -2,14 +2,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
3
3
  const require_values = require('./values-tm4bi0FF.cjs');
4
4
  const require_tracer_provider = require('./tracer-provider.cjs');
5
- const require_structured_error = require('./structured-error-BI9PFKZr.cjs');
6
- const require_init = require('./init-zGVUHByM.cjs');
5
+ const require_structured_error = require('./structured-error-BAXhglRE.cjs');
6
+ const require_init = require('./init-BYXDCfRL.cjs');
7
7
  const require_filtering_span_processor = require('./filtering-span-processor.cjs');
8
8
  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-Bvgb1lE4.cjs');
11
11
  const require_metric = require('./metric.cjs');
12
- const require_functional = require('./functional-uOagkiCk.cjs');
12
+ const require_functional = require('./functional-UIJ0CaTV.cjs');
13
13
  const require_trace_helpers = require('./trace-helpers.cjs');
14
14
  const require_stable_hash = require('./stable-hash-C9F6xjzx.cjs');
15
15
  const require_correlated_events = require('./correlated-events-9RRdfyWR.cjs');
@@ -684,6 +684,7 @@ Object.defineProperty(exports, 'propagation', {
684
684
  });
685
685
  exports.recordStructuredError = require_structured_error.recordStructuredError;
686
686
  exports.request = require_attributes.request;
687
+ exports.requestCtx = require_functional.requestCtx;
687
688
  exports.resetEvents = require_init.resetEvents;
688
689
  exports.resetMetrics = require_metric.resetMetrics;
689
690
  exports.resolveSamplingPreset = require_init.resolveSamplingPreset;
package/dist/index.d.cts CHANGED
@@ -1,16 +1,16 @@
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-Y7If_wH4.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";
3
3
  import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
4
- import { n as TraceContext$1, r as defineBaggageSchema, t as AttributeValue$2 } from "./trace-context-C1Cn1q0y.cjs";
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
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-Er217Mge.cjs";
8
- import { a as getActiveTraceContext, c as trace$2, d as withTracing, f as InstrumentOptions, i as ctx, l as withBaggage, n as WithBaggageOptions, o as instrument, p as SingleInstrumentOptions, r as WithNewContextOptions, s as span, t as SpanOptions, u as withNewContext } from "./functional-CgWcRXGX.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-C4mjgtJb.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
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-DxmeJ3d0.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-WwjD-kQu.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
15
  import "./canonical-log-line-processor-C0Z_N4oL.cjs";
16
16
  import { i as defineEvent, n as DefinedEvent, r as SchemaLike, t as DefineEventOptions } from "./define-event-BNeuKUPv.cjs";
@@ -596,6 +596,10 @@ declare function defineAuditCatalog<const T extends Record<string, AuditCatalogE
596
596
  * AttributeValue. Returns undefined when the value cannot be represented -
597
597
  * which is how flattenToAttributes below learns it has an object to descend
598
598
  * into rather than a leaf to record.
599
+ *
600
+ * Total by construction: this runs on whatever an application hands an
601
+ * attribute setter, so a value that cannot be read is a marker in the
602
+ * telemetry, never an exception on the request path.
599
603
  */
600
604
  declare function toAttributeValue(value: unknown): AttributeValue$2 | undefined;
601
605
  /** A flat, dot-notation attribute bag: what a nested object flattens to. */
@@ -605,6 +609,11 @@ interface FlatAttributes {
605
609
  /**
606
610
  * Recursively flatten a nested object into dot-notation OTel attributes.
607
611
  * Includes circular reference protection via WeakSet.
612
+ *
613
+ * Every key is converted inside its own guard, so one value that cannot be read
614
+ * - a getter that throws, an exotic proxy, a `Map` whose key has no string form
615
+ * - costs that key alone and never the call. Keys are listed before their
616
+ * values are read, so a sibling of the bad value still lands.
608
617
  */
609
618
  declare function flattenToAttributes(fields: UnknownRecord, prefix?: string): FlatAttributes;
610
619
  //#endregion
@@ -672,4 +681,4 @@ declare function defineEnricher<TEvent extends UnknownRecord, TValue extends obj
672
681
  */
673
682
  declare function formatDuration(ms: number): string;
674
683
  //#endregion
675
- 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, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
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.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-CsoeCsGL.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-o_6YjZhV.js";
3
3
  import { t as UnknownRecord } from "./values-CeMH-mYG.js";
4
- import { n as TraceContext$1, r as defineBaggageSchema, t as AttributeValue$2 } from "./trace-context-f89xPJbK.js";
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
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-DBng4Foa.js";
8
- import { a as getActiveTraceContext, c as trace$2, d as withTracing, f as InstrumentOptions, i as ctx, l as withBaggage, n as WithBaggageOptions, o as instrument, p as SingleInstrumentOptions, r as WithNewContextOptions, s as span, t as SpanOptions, u as withNewContext } from "./functional-RFFpQzAV.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-DN_ztd9C.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
12
  import { n as FilteringSpanProcessorOptions, r as SpanFilterPredicate, t as FilteringSpanProcessor } from "./filtering-span-processor-BpDagWNa.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-BHV2gWsV.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-CKSMbJUG.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-CN1-8C76.js";
15
15
  import "./canonical-log-line-processor-Yq4cXcD5.js";
16
16
  import { i as defineEvent, n as DefinedEvent, r as SchemaLike, t as DefineEventOptions } from "./define-event-Bd8f8mST.js";
@@ -596,6 +596,10 @@ declare function defineAuditCatalog<const T extends Record<string, AuditCatalogE
596
596
  * AttributeValue. Returns undefined when the value cannot be represented -
597
597
  * which is how flattenToAttributes below learns it has an object to descend
598
598
  * into rather than a leaf to record.
599
+ *
600
+ * Total by construction: this runs on whatever an application hands an
601
+ * attribute setter, so a value that cannot be read is a marker in the
602
+ * telemetry, never an exception on the request path.
599
603
  */
600
604
  declare function toAttributeValue(value: unknown): AttributeValue$2 | undefined;
601
605
  /** A flat, dot-notation attribute bag: what a nested object flattens to. */
@@ -605,6 +609,11 @@ interface FlatAttributes {
605
609
  /**
606
610
  * Recursively flatten a nested object into dot-notation OTel attributes.
607
611
  * Includes circular reference protection via WeakSet.
612
+ *
613
+ * Every key is converted inside its own guard, so one value that cannot be read
614
+ * - a getter that throws, an exotic proxy, a `Map` whose key has no string form
615
+ * - costs that key alone and never the call. Keys are listed before their
616
+ * values are read, so a sibling of the bad value still lands.
608
617
  */
609
618
  declare function flattenToAttributes(fields: UnknownRecord, prefix?: string): FlatAttributes;
610
619
  //#endregion
@@ -672,4 +681,4 @@ declare function defineEnricher<TEvent extends UnknownRecord, TValue extends obj
672
681
  */
673
682
  declare function formatDuration(ms: number): string;
674
683
  //#endregion
675
- 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, 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, 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 };
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { g as nonEmptyString, i as asNumber, l as asString, r as asFunction, s as asRecord, x as toError } from "./values-xBtdXtjA.js";
2
2
  import { getAutotelTracer, getAutotelTracerProvider, setAutotelTracerProvider } from "./tracer-provider.js";
3
- import { a as flattenToAttributes, i as structuredErrorToJSON, n as getStructuredErrorAttributes, o as toAttributeValue, r as recordStructuredError, t as createStructuredError } from "./structured-error-XpBdwnmv.js";
4
- 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-Dwj1goyE.js";
3
+ 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";
4
+ 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-Dyq6WtsO.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 trace$2, c as withTracing, i as span, n as getActiveTraceContext, o as withBaggage, r as instrument, s as withNewContext, t as ctx } from "./functional-DzIFi7ml.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-S9IJNlBn.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, 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, 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 };
@@ -2,7 +2,7 @@ const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
2
2
  const require_values = require('./values-tm4bi0FF.cjs');
3
3
  const require_tracer_provider = require('./tracer-provider.cjs');
4
4
  const require_config = require('./config.cjs');
5
- const require_structured_error = require('./structured-error-BI9PFKZr.cjs');
5
+ const require_structured_error = require('./structured-error-BAXhglRE.cjs');
6
6
  const require_node_require = require('./node-require-B_IVapV3.cjs');
7
7
  const require_filtering_span_processor = require('./filtering-span-processor.cjs');
8
8
  const require_policy = require('./policy.cjs');
@@ -1005,8 +1005,17 @@ function createTraceContext(span) {
1005
1005
  traceId: spanContext.traceId,
1006
1006
  spanId: spanContext.spanId,
1007
1007
  correlationId: spanContext.traceId.slice(0, 16),
1008
- setAttribute: span.setAttribute.bind(span),
1009
- setAttributes: span.setAttributes.bind(span),
1008
+ setAttribute: (key, value) => {
1009
+ const attr = require_structured_error.toAttributeValue(value);
1010
+ if (attr === void 0) {
1011
+ span.setAttributes(require_structured_error.flattenToAttributes({ [key]: value }));
1012
+ return;
1013
+ }
1014
+ span.setAttribute(key, attr);
1015
+ },
1016
+ setAttributes: (attrs) => {
1017
+ span.setAttributes(require_structured_error.flattenToAttributes(attrs));
1018
+ },
1010
1019
  setStatus: (status) => {
1011
1020
  spansWithExplicitStatus.add(span);
1012
1021
  span.setStatus(status);
@@ -3785,6 +3794,44 @@ const INSTRUMENTATION_CLASS_TO_PACKAGE = new Map(Object.entries({
3785
3794
  MySQL2Instrumentation: "@opentelemetry/instrumentation-mysql2"
3786
3795
  }));
3787
3796
  /**
3797
+ * What autotel configures when the caller has not said otherwise.
3798
+ *
3799
+ * `instrumentation-express` opens a span per layer and runs the layer under it,
3800
+ * so whatever is active inside a middleware is that layer's span - one that
3801
+ * ends the moment `next()` fires. Request-wide attributes set there would land
3802
+ * on `middleware - anonymous` rather than on the request span every backend
3803
+ * shows as the resource. Ignoring the two leaf layer types puts them back on
3804
+ * the request span and drops a pile of noise spans with them; the route rename
3805
+ * (`GET /users/:id`) survives, because `rpcMetadata.route` is assigned before
3806
+ * the ignore check.
3807
+ *
3808
+ * Pass your own `ignoreLayersType` - `[]` for the upstream behaviour - to
3809
+ * override it, or `ignoreLayers` to silence only the noisy paths.
3810
+ */
3811
+ const AUTOTEL_DEFAULTS = { "@opentelemetry/instrumentation-express": { ignoreLayersType: ["middleware", "request_handler"] } };
3812
+ /** Apply {@link AUTOTEL_DEFAULTS} under whatever the caller already chose. */
3813
+ function withAutotelDefaults(config) {
3814
+ const merged = { ...config };
3815
+ for (const [packageName, defaults] of Object.entries(AUTOTEL_DEFAULTS)) {
3816
+ const options = merged[packageName];
3817
+ if (options?.enabled === false) continue;
3818
+ merged[packageName] = {
3819
+ ...defaults,
3820
+ ...options
3821
+ };
3822
+ }
3823
+ return merged;
3824
+ }
3825
+ /**
3826
+ * `express` and `@opentelemetry/instrumentation-express` name the same thing.
3827
+ * `getNodeAutoInstrumentations` only answers to the full name - it
3828
+ * `diag.error`s anything else and ignores the config - so the short form every
3829
+ * autotel example uses has to be expanded before it gets there.
3830
+ */
3831
+ function toPackageName(name) {
3832
+ return name.startsWith("@opentelemetry/instrumentation-") ? name : `@opentelemetry/instrumentation-${name}`;
3833
+ }
3834
+ /**
3788
3835
  * Detect if we're running in ESM mode
3789
3836
  */
3790
3837
  function isESMMode() {
@@ -3839,24 +3886,14 @@ function getAutoInstrumentations(integrations, manualInstrumentationNames = /* @
3839
3886
  const packageName = INSTRUMENTATION_CLASS_TO_PACKAGE.get(className);
3840
3887
  if (packageName) exclusionConfig[packageName] = { enabled: false };
3841
3888
  }
3842
- if (integrations === true) {
3843
- if (Object.keys(exclusionConfig).length > 0) return getNodeAutoInstrumentations(exclusionConfig);
3844
- return getNodeAutoInstrumentations();
3889
+ const config = { ...exclusionConfig };
3890
+ const requested = integrations === true ? [] : Array.isArray(integrations) ? integrations.map((name) => [name, { enabled: true }]) : Object.entries(integrations);
3891
+ for (const [name, options] of requested) {
3892
+ const packageName = toPackageName(name);
3893
+ if (packageName in exclusionConfig) continue;
3894
+ config[packageName] = options;
3845
3895
  }
3846
- if (Array.isArray(integrations)) {
3847
- const config = { ...exclusionConfig };
3848
- for (const name of integrations) {
3849
- const packageName = `@opentelemetry/instrumentation-${name}`;
3850
- if (!exclusionConfig[packageName]) config[packageName] = { enabled: true };
3851
- }
3852
- return getNodeAutoInstrumentations(config);
3853
- }
3854
- const config = {
3855
- ...exclusionConfig,
3856
- ...integrations
3857
- };
3858
- for (const packageName of Object.keys(exclusionConfig)) if (Object.keys(integrations).find((key) => packageName.includes(key))) config[packageName] = { enabled: false };
3859
- return getNodeAutoInstrumentations(config);
3896
+ return getNodeAutoInstrumentations(withAutotelDefaults(config));
3860
3897
  }
3861
3898
 
3862
3899
  //#endregion
@@ -468,6 +468,22 @@ interface AutotelConfig {
468
468
  * })
469
469
  * ```
470
470
  *
471
+ * @example Pass options to an instrumentation
472
+ * Anything beyond `enabled` goes to that instrumentation's constructor, and
473
+ * overrides what autotel defaults it to. Express defaults to
474
+ * `ignoreLayersType: ['middleware', 'request_handler']`, which keeps
475
+ * attributes set from a middleware on the request span; `[]` asks for the
476
+ * per-layer spans back.
477
+ * ```typescript
478
+ * init({
479
+ * service: 'my-app',
480
+ * autoInstrumentations: {
481
+ * http: { enabled: true },
482
+ * express: { ignoreLayersType: [] }
483
+ * }
484
+ * })
485
+ * ```
486
+ *
471
487
  * @example Manual config when you need custom settings
472
488
  * ```typescript
473
489
  * import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb'
@@ -485,7 +501,7 @@ interface AutotelConfig {
485
501
  */
486
502
  autoInstrumentations?: string[] | boolean | Record<string, {
487
503
  enabled?: boolean;
488
- }>;
504
+ } & Record<string, unknown>>;
489
505
  /**
490
506
  * OTLP endpoint for traces/metrics/logs
491
507
  * Single-destination shorthand. For multi-backend OTLP fan-out, use
@@ -1,7 +1,7 @@
1
1
  import { _ as readProperty, d as asStringRecord, f as describeValue, h as isFunction, i as asNumber, l as asString, r as asFunction, s as asRecord, t as asBoolean } from "./values-xBtdXtjA.js";
2
2
  import { getForceFlushableProvider } from "./tracer-provider.js";
3
3
  import { getConfig as getConfig$1 } from "./config.js";
4
- import { r as recordStructuredError } from "./structured-error-XpBdwnmv.js";
4
+ import { a as flattenToAttributes, o as toAttributeValue, r as recordStructuredError } from "./structured-error-Y9y-1Pae.js";
5
5
  import { n as safeRequire, t as requireModule } from "./node-require-CkK_xzL-.js";
6
6
  import { FilteringSpanProcessor } from "./filtering-span-processor.js";
7
7
  import { PolicyLogRecordProcessor, policySpanFilter, setPolicies, watchPolicyFile } from "./policy.js";
@@ -1001,8 +1001,17 @@ function createTraceContext(span) {
1001
1001
  traceId: spanContext.traceId,
1002
1002
  spanId: spanContext.spanId,
1003
1003
  correlationId: spanContext.traceId.slice(0, 16),
1004
- setAttribute: span.setAttribute.bind(span),
1005
- setAttributes: span.setAttributes.bind(span),
1004
+ setAttribute: (key, value) => {
1005
+ const attr = toAttributeValue(value);
1006
+ if (attr === void 0) {
1007
+ span.setAttributes(flattenToAttributes({ [key]: value }));
1008
+ return;
1009
+ }
1010
+ span.setAttribute(key, attr);
1011
+ },
1012
+ setAttributes: (attrs) => {
1013
+ span.setAttributes(flattenToAttributes(attrs));
1014
+ },
1006
1015
  setStatus: (status) => {
1007
1016
  spansWithExplicitStatus.add(span);
1008
1017
  span.setStatus(status);
@@ -3781,6 +3790,44 @@ const INSTRUMENTATION_CLASS_TO_PACKAGE = new Map(Object.entries({
3781
3790
  MySQL2Instrumentation: "@opentelemetry/instrumentation-mysql2"
3782
3791
  }));
3783
3792
  /**
3793
+ * What autotel configures when the caller has not said otherwise.
3794
+ *
3795
+ * `instrumentation-express` opens a span per layer and runs the layer under it,
3796
+ * so whatever is active inside a middleware is that layer's span - one that
3797
+ * ends the moment `next()` fires. Request-wide attributes set there would land
3798
+ * on `middleware - anonymous` rather than on the request span every backend
3799
+ * shows as the resource. Ignoring the two leaf layer types puts them back on
3800
+ * the request span and drops a pile of noise spans with them; the route rename
3801
+ * (`GET /users/:id`) survives, because `rpcMetadata.route` is assigned before
3802
+ * the ignore check.
3803
+ *
3804
+ * Pass your own `ignoreLayersType` - `[]` for the upstream behaviour - to
3805
+ * override it, or `ignoreLayers` to silence only the noisy paths.
3806
+ */
3807
+ const AUTOTEL_DEFAULTS = { "@opentelemetry/instrumentation-express": { ignoreLayersType: ["middleware", "request_handler"] } };
3808
+ /** Apply {@link AUTOTEL_DEFAULTS} under whatever the caller already chose. */
3809
+ function withAutotelDefaults(config) {
3810
+ const merged = { ...config };
3811
+ for (const [packageName, defaults] of Object.entries(AUTOTEL_DEFAULTS)) {
3812
+ const options = merged[packageName];
3813
+ if (options?.enabled === false) continue;
3814
+ merged[packageName] = {
3815
+ ...defaults,
3816
+ ...options
3817
+ };
3818
+ }
3819
+ return merged;
3820
+ }
3821
+ /**
3822
+ * `express` and `@opentelemetry/instrumentation-express` name the same thing.
3823
+ * `getNodeAutoInstrumentations` only answers to the full name - it
3824
+ * `diag.error`s anything else and ignores the config - so the short form every
3825
+ * autotel example uses has to be expanded before it gets there.
3826
+ */
3827
+ function toPackageName(name) {
3828
+ return name.startsWith("@opentelemetry/instrumentation-") ? name : `@opentelemetry/instrumentation-${name}`;
3829
+ }
3830
+ /**
3784
3831
  * Detect if we're running in ESM mode
3785
3832
  */
3786
3833
  function isESMMode() {
@@ -3835,24 +3882,14 @@ function getAutoInstrumentations(integrations, manualInstrumentationNames = /* @
3835
3882
  const packageName = INSTRUMENTATION_CLASS_TO_PACKAGE.get(className);
3836
3883
  if (packageName) exclusionConfig[packageName] = { enabled: false };
3837
3884
  }
3838
- if (integrations === true) {
3839
- if (Object.keys(exclusionConfig).length > 0) return getNodeAutoInstrumentations(exclusionConfig);
3840
- return getNodeAutoInstrumentations();
3885
+ const config = { ...exclusionConfig };
3886
+ const requested = integrations === true ? [] : Array.isArray(integrations) ? integrations.map((name) => [name, { enabled: true }]) : Object.entries(integrations);
3887
+ for (const [name, options] of requested) {
3888
+ const packageName = toPackageName(name);
3889
+ if (packageName in exclusionConfig) continue;
3890
+ config[packageName] = options;
3841
3891
  }
3842
- if (Array.isArray(integrations)) {
3843
- const config = { ...exclusionConfig };
3844
- for (const name of integrations) {
3845
- const packageName = `@opentelemetry/instrumentation-${name}`;
3846
- if (!exclusionConfig[packageName]) config[packageName] = { enabled: true };
3847
- }
3848
- return getNodeAutoInstrumentations(config);
3849
- }
3850
- const config = {
3851
- ...exclusionConfig,
3852
- ...integrations
3853
- };
3854
- for (const packageName of Object.keys(exclusionConfig)) if (Object.keys(integrations).find((key) => packageName.includes(key))) config[packageName] = { enabled: false };
3855
- return getNodeAutoInstrumentations(config);
3892
+ return getNodeAutoInstrumentations(withAutotelDefaults(config));
3856
3893
  }
3857
3894
 
3858
3895
  //#endregion
@@ -468,6 +468,22 @@ interface AutotelConfig {
468
468
  * })
469
469
  * ```
470
470
  *
471
+ * @example Pass options to an instrumentation
472
+ * Anything beyond `enabled` goes to that instrumentation's constructor, and
473
+ * overrides what autotel defaults it to. Express defaults to
474
+ * `ignoreLayersType: ['middleware', 'request_handler']`, which keeps
475
+ * attributes set from a middleware on the request span; `[]` asks for the
476
+ * per-layer spans back.
477
+ * ```typescript
478
+ * init({
479
+ * service: 'my-app',
480
+ * autoInstrumentations: {
481
+ * http: { enabled: true },
482
+ * express: { ignoreLayersType: [] }
483
+ * }
484
+ * })
485
+ * ```
486
+ *
471
487
  * @example Manual config when you need custom settings
472
488
  * ```typescript
473
489
  * import { MongoDBInstrumentation } from '@opentelemetry/instrumentation-mongodb'
@@ -485,7 +501,7 @@ interface AutotelConfig {
485
501
  */
486
502
  autoInstrumentations?: string[] | boolean | Record<string, {
487
503
  enabled?: boolean;
488
- }>;
504
+ } & Record<string, unknown>>;
489
505
  /**
490
506
  * OTLP endpoint for traces/metrics/logs
491
507
  * Single-destination shorthand. For multi-backend OTLP fan-out, use
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-zGVUHByM.cjs');
2
+ const require_init = require('./init-BYXDCfRL.cjs');
3
3
  const require_node_require = require('./node-require-B_IVapV3.cjs');
4
4
  let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
5
5
  let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
@@ -1,4 +1,4 @@
1
- import { r as getLogger, x as TailSamplingSpanProcessor } from "./init-Dwj1goyE.js";
1
+ import { r as getLogger, x as TailSamplingSpanProcessor } from "./init-Dyq6WtsO.js";
2
2
  import { n as safeRequire, t as requireModule } from "./node-require-CkK_xzL-.js";
3
3
  import { NodeSDK } from "@opentelemetry/sdk-node";
4
4
  import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-tm4bi0FF.cjs');
3
- const require_init = require('./init-zGVUHByM.cjs');
4
- const require_functional = require('./functional-uOagkiCk.cjs');
3
+ const require_init = require('./init-BYXDCfRL.cjs');
4
+ const require_functional = require('./functional-UIJ0CaTV.cjs');
5
5
  const require_correlated_events = require('./correlated-events-9RRdfyWR.cjs');
6
6
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
7
7
  let _opentelemetry_api = require("@opentelemetry/api");
@@ -1,4 +1,4 @@
1
- import { n as TraceContext } from "./trace-context-C1Cn1q0y.cjs";
1
+ import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
2
2
  import { Attributes, Link, SpanContext } from "@opentelemetry/api";
3
3
  //#region src/messaging.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { n as TraceContext } from "./trace-context-f89xPJbK.js";
1
+ import { n as TraceContext } from "./trace-context-CqCblIQE.js";
2
2
  import { Attributes, Link, SpanContext } from "@opentelemetry/api";
3
3
  //#region src/messaging.d.ts
4
4
  /**
package/dist/messaging.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as readProperty, b as toAttributeValue, c as asScalar, g as nonEmptyString, h as isFunction, s as asRecord, v as resolveValue, y as splitNameOrOptions } from "./values-xBtdXtjA.js";
2
- import { F as createLinkFromHeaders, L as extractLinksFromBatch } from "./init-Dwj1goyE.js";
3
- import { c as withTracing } from "./functional-DzIFi7ml.js";
2
+ import { F as createLinkFromHeaders, L as extractLinksFromBatch } from "./init-Dyq6WtsO.js";
3
+ import { l as withTracing } from "./functional-S9IJNlBn.js";
4
4
  import { t as emitCorrelatedEvent } from "./correlated-events-BfpH5uS-.js";
5
5
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
6
6
  import { SpanKind, context, propagation } from "@opentelemetry/api";
package/dist/sampling.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_init = require('./init-zGVUHByM.cjs');
2
+ const require_init = require('./init-BYXDCfRL.cjs');
3
3
 
4
4
  exports.AUTOTEL_DEBUG_BAGGAGE_KEY = require_init.AUTOTEL_DEBUG_BAGGAGE_KEY;
5
5
  exports.AUTOTEL_SAMPLING_RATE = require_init.AUTOTEL_SAMPLING_RATE;
package/dist/sampling.js CHANGED
@@ -1,3 +1,3 @@
1
- import { A as FeatureFlagSampler, B as markForceKept, C as AUTOTEL_SAMPLING_RATE, D as AlwaysSampler, E as AdaptiveSampler, F as createLinkFromHeaders, H as samplingPresets, I as debugCaptureRequested, L as extractLinksFromBatch, M as NeverSampler, N as RandomSampler, O as CompositeSampler, P as UserIdSampler, R as hashUnitInterval, S as AUTOTEL_DEBUG_BAGGAGE_KEY, T as AUTOTEL_SAMPLING_TAIL_KEEP, V as resolveSamplingPreset, j as KeyTargetRateSampler, k as DeterministicSampler, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, z as isForceKept } from "./init-Dwj1goyE.js";
1
+ import { A as FeatureFlagSampler, B as markForceKept, C as AUTOTEL_SAMPLING_RATE, D as AlwaysSampler, E as AdaptiveSampler, F as createLinkFromHeaders, H as samplingPresets, I as debugCaptureRequested, L as extractLinksFromBatch, M as NeverSampler, N as RandomSampler, O as CompositeSampler, P as UserIdSampler, R as hashUnitInterval, S as AUTOTEL_DEBUG_BAGGAGE_KEY, T as AUTOTEL_SAMPLING_TAIL_KEEP, V as resolveSamplingPreset, j as KeyTargetRateSampler, k as DeterministicSampler, w as AUTOTEL_SAMPLING_TAIL_EVALUATED, z as isForceKept } from "./init-Dyq6WtsO.js";
2
2
 
3
3
  export { AUTOTEL_DEBUG_BAGGAGE_KEY, AUTOTEL_SAMPLING_RATE, AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, CompositeSampler, DeterministicSampler, FeatureFlagSampler, KeyTargetRateSampler, NeverSampler, RandomSampler, UserIdSampler, createLinkFromHeaders, debugCaptureRequested, extractLinksFromBatch, hashUnitInterval, isForceKept, markForceKept, resolveSamplingPreset, samplingPresets };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_values = require('./values-tm4bi0FF.cjs');
3
- const require_functional = require('./functional-uOagkiCk.cjs');
3
+ const require_functional = require('./functional-UIJ0CaTV.cjs');
4
4
  const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
5
5
  let _opentelemetry_api = require("@opentelemetry/api");
6
6
 
@@ -1,4 +1,4 @@
1
- import { n as TraceContext } from "./trace-context-C1Cn1q0y.cjs";
1
+ import { n as TraceContext } from "./trace-context-f7Xq0Q2q.cjs";
2
2
  import { Attributes } from "@opentelemetry/api";
3
3
  //#region src/semantic-helpers.d.ts
4
4
  type SemanticHandler<TArgs extends unknown[], TReturn> = (...args: TArgs) => TReturn | Promise<TReturn>;
@@ -1,4 +1,4 @@
1
- import { n as TraceContext } from "./trace-context-f89xPJbK.js";
1
+ import { n as TraceContext } from "./trace-context-CqCblIQE.js";
2
2
  import { Attributes } from "@opentelemetry/api";
3
3
  //#region src/semantic-helpers.d.ts
4
4
  type SemanticHandler<TArgs extends unknown[], TReturn> = (...args: TArgs) => TReturn | Promise<TReturn>;
@@ -1,5 +1,5 @@
1
1
  import { b as toAttributeValue, g as nonEmptyString, s as asRecord } from "./values-xBtdXtjA.js";
2
- import { c as withTracing } from "./functional-DzIFi7ml.js";
2
+ import { l as withTracing } from "./functional-S9IJNlBn.js";
3
3
  import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
4
4
  import { SpanKind } from "@opentelemetry/api";
5
5