autotel 7.7.1 → 7.9.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.
- package/dist/analysis.cjs +0 -1
- package/dist/{attribute-redacting-processor-CvBE0z1p.d.ts → attribute-redacting-processor-rkV_WL-k.d.ts} +2 -2
- package/dist/attribute-redacting-processor.cjs +1 -1
- package/dist/attribute-redacting-processor.d.ts +1 -1
- package/dist/{attributes-De9Fx0b4.js → attributes-CuGx6cOI.js} +21 -11
- package/dist/{attributes-DkptT2Ck.cjs → attributes-Ii3jDPsW.cjs} +23 -13
- package/dist/attributes.cjs +1 -1
- package/dist/attributes.d.ts +1 -1
- package/dist/attributes.js +1 -1
- package/dist/auto.cjs +2 -2
- package/dist/auto.js +1 -1
- package/dist/business-baggage.cjs +1 -1
- package/dist/{canonical-log-line-processor-Bvgb1lE4.cjs → canonical-log-line-processor-BU03jJeA.cjs} +1 -1
- package/dist/{canonical-log-line-processor-Yq4cXcD5.d.ts → canonical-log-line-processor-Bwrt_L4c.d.ts} +1 -1
- package/dist/{correlated-events-9RRdfyWR.cjs → correlated-events-DE_4A3oD.cjs} +1 -1
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.js +1 -1
- package/dist/db.cjs +1 -1
- package/dist/decorators.cjs +2 -2
- package/dist/decorators.d.cts +1 -1
- package/dist/decorators.d.ts +1 -1
- package/dist/decorators.js +1 -1
- package/dist/diagnostics.cjs +3 -3
- package/dist/diagnostics.js +1 -1
- package/dist/drain-pipeline.cjs +0 -1
- package/dist/enrichers.cjs +0 -1
- package/dist/event-testing.cjs +0 -1
- package/dist/event.cjs +1 -1
- package/dist/event.js +1 -1
- package/dist/evidence.cjs +0 -1
- package/dist/exception-fingerprint.cjs +1 -1
- package/dist/{filtering-span-processor-BpDagWNa.d.ts → filtering-span-processor-vkewzbqB.d.ts} +2 -2
- package/dist/filtering-span-processor.cjs +0 -1
- package/dist/filtering-span-processor.d.ts +1 -1
- package/dist/{functional-S9IJNlBn.js → functional-6QPJDqUW.js} +27 -29
- package/dist/{functional-C4mjgtJb.d.cts → functional-DPZTpGh6.d.cts} +2 -2
- package/dist/{functional-UIJ0CaTV.cjs → functional-DxHvvWc_.cjs} +19 -21
- package/dist/{functional-DN_ztd9C.d.ts → functional-SeRUabkE.d.ts} +2 -2
- package/dist/functional.cjs +1 -1
- package/dist/functional.d.cts +1 -1
- package/dist/functional.d.ts +1 -1
- package/dist/functional.js +1 -1
- package/dist/http.cjs +2 -2
- package/dist/http.js +1 -1
- package/dist/{index-o_6YjZhV.d.ts → index-B9aRLp6c.d.ts} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3 -3
- package/dist/{init-Dyq6WtsO.js → init-C-qfxo_u.js} +262 -36
- package/dist/{init-WwjD-kQu.d.cts → init-COfMwKbc.d.cts} +38 -10
- package/dist/{init-CKSMbJUG.d.ts → init-CnoRlJqS.d.ts} +43 -15
- package/dist/{init-BYXDCfRL.cjs → init-W_klPrYk.cjs} +277 -39
- package/dist/instrumentation.cjs +9 -8
- package/dist/instrumentation.js +8 -7
- package/dist/{logger-CSdZkxbh.cjs → logger-DLjHQAus.cjs} +1 -1
- package/dist/logger.cjs +1 -1
- package/dist/messaging-adapters.cjs +1 -1
- package/dist/messaging-testing.cjs +0 -1
- package/dist/messaging.cjs +8 -7
- package/dist/messaging.js +5 -4
- package/dist/metric-testing.cjs +0 -1
- package/dist/{node-require-B_IVapV3.cjs → node-require-BPsB09eC.cjs} +2 -2
- package/dist/parse-error.cjs +1 -1
- package/dist/{policy-C4QcZnqv.d.ts → policy-DNw_0qUq.d.ts} +1 -1
- package/dist/policy.cjs +0 -0
- package/dist/policy.d.ts +1 -1
- package/dist/processors.cjs +1 -1
- package/dist/processors.d.ts +1 -1
- package/dist/register.cjs +1 -1
- package/dist/{registry-DIoklBz5.cjs → registry-B3ZJmUtU.cjs} +0 -1
- package/dist/{rolldown-runtime-C_NdSu1c.cjs → rolldown-runtime-C24Yb2bl.cjs} +1 -2
- package/dist/{sampling-DBng4Foa.d.ts → sampling-CZi7OM9u.d.ts} +13 -13
- package/dist/{sampling-Er217Mge.d.cts → sampling-DENUjT_8.d.cts} +13 -13
- package/dist/sampling.cjs +1 -1
- package/dist/sampling.d.cts +1 -1
- package/dist/sampling.d.ts +1 -1
- package/dist/sampling.js +1 -1
- package/dist/security-schema.cjs +0 -1
- package/dist/semantic-conventions.cjs +1 -1
- package/dist/semantic-helpers.cjs +3 -3
- package/dist/semantic-helpers.js +1 -1
- package/dist/{span-name-normalizer-CN1-8C76.d.ts → span-name-normalizer-DHcg1bSP.d.ts} +2 -2
- package/dist/span-name-normalizer.cjs +0 -1
- package/dist/span-name-normalizer.d.ts +1 -1
- package/dist/{stable-hash-C9F6xjzx.cjs → stable-hash-sLi1o4jj.cjs} +2 -2
- package/dist/{structured-error-BAXhglRE.cjs → structured-error-DynjWTTu.cjs} +1 -1
- package/dist/tail-sampling-processor.cjs +1 -1
- package/dist/tail-sampling-processor.d.ts +2 -2
- package/dist/tail-sampling-processor.js +1 -1
- package/dist/test-span-collector.cjs +1 -1
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/{trace-factory-validation-Dc8epn87.cjs → trace-factory-validation-CHU1WcjK.cjs} +0 -1
- package/dist/trace-helpers.cjs +2 -2
- package/dist/tracer-provider.cjs +1 -1
- package/dist/validate.cjs +3 -3
- package/dist/validation-attributes.cjs +0 -1
- package/dist/{values-tm4bi0FF.cjs → values-AxGpgYBA.cjs} +0 -1
- package/dist/webhook.cjs +16 -13
- package/dist/webhook.js +14 -11
- package/dist/workflow-distributed.cjs +4 -6
- package/dist/workflow-distributed.js +2 -4
- package/dist/workflow.cjs +7 -6
- package/dist/workflow.js +3 -2
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.d.cts +2 -2
- package/dist/yaml-config.d.ts +2 -2
- package/dist/yaml-config.js +1 -1
- package/package.json +2 -1
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('./rolldown-runtime-
|
|
2
|
-
const require_values = require('./values-
|
|
1
|
+
const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.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-
|
|
6
|
-
const require_node_require = require('./node-require-
|
|
5
|
+
const require_structured_error = require('./structured-error-DynjWTTu.cjs');
|
|
6
|
+
const require_node_require = require('./node-require-BPsB09eC.cjs');
|
|
7
7
|
const require_filtering_span_processor = require('./filtering-span-processor.cjs');
|
|
8
8
|
const require_policy = require('./policy.cjs');
|
|
9
9
|
const require_span_name_normalizer = require('./span-name-normalizer.cjs');
|
|
10
10
|
const require_attribute_redacting_processor = require('./attribute-redacting-processor.cjs');
|
|
11
11
|
const require_pretty_console_exporter = require('./pretty-console-exporter-CMzlrRNg.cjs');
|
|
12
|
-
const require_canonical_log_line_processor = require('./canonical-log-line-processor-
|
|
12
|
+
const require_canonical_log_line_processor = require('./canonical-log-line-processor-BU03jJeA.cjs');
|
|
13
13
|
const require_metric = require('./metric.cjs');
|
|
14
|
-
let
|
|
15
|
-
let
|
|
14
|
+
let _opentelemetry_api = require("@opentelemetry/api");
|
|
15
|
+
let _opentelemetry_api_logs = require("@opentelemetry/api-logs");
|
|
16
|
+
let _opentelemetry_context_async_hooks = require("@opentelemetry/context-async-hooks");
|
|
17
|
+
let _opentelemetry_core = require("@opentelemetry/core");
|
|
18
|
+
let _opentelemetry_instrumentation = require("@opentelemetry/instrumentation");
|
|
16
19
|
let _opentelemetry_resources = require("@opentelemetry/resources");
|
|
20
|
+
let _opentelemetry_exporter_logs_otlp_http = require("@opentelemetry/exporter-logs-otlp-http");
|
|
21
|
+
let _opentelemetry_sdk_logs = require("@opentelemetry/sdk-logs");
|
|
22
|
+
let _opentelemetry_sdk_metrics = require("@opentelemetry/sdk-metrics");
|
|
23
|
+
let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
17
24
|
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
18
|
-
let _opentelemetry_api = require("@opentelemetry/api");
|
|
19
25
|
let node_async_hooks = require("node:async_hooks");
|
|
20
26
|
node_async_hooks = require_rolldown_runtime.__toESM(node_async_hooks, 1);
|
|
21
|
-
let _opentelemetry_sdk_metrics = require("@opentelemetry/sdk-metrics");
|
|
22
|
-
let _opentelemetry_sdk_logs = require("@opentelemetry/sdk-logs");
|
|
23
27
|
let node_fs = require("node:fs");
|
|
24
28
|
node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
|
|
25
29
|
let node_path = require("node:path");
|
|
@@ -27,8 +31,153 @@ node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
|
27
31
|
let node_os = require("node:os");
|
|
28
32
|
let _opentelemetry_exporter_metrics_otlp_http = require("@opentelemetry/exporter-metrics-otlp-http");
|
|
29
33
|
let _opentelemetry_exporter_trace_otlp_http = require("@opentelemetry/exporter-trace-otlp-http");
|
|
30
|
-
let _opentelemetry_exporter_logs_otlp_http = require("@opentelemetry/exporter-logs-otlp-http");
|
|
31
34
|
|
|
35
|
+
//#region src/sdk.ts
|
|
36
|
+
/**
|
|
37
|
+
* The SDK behind `init()`: builds and registers the tracer, meter and logger
|
|
38
|
+
* providers from components autotel has already resolved.
|
|
39
|
+
*
|
|
40
|
+
* This replaces `@opentelemetry/sdk-node`'s `NodeSDK`. That class did the same
|
|
41
|
+
* registration, but it statically imports every exporter the `OTEL_*_EXPORTER`
|
|
42
|
+
* variables could name — OTLP over gRPC (`@grpc/grpc-js`, `protobufjs`),
|
|
43
|
+
* Prometheus, the YAML file-config loader — so any bundle that contained
|
|
44
|
+
* `init()` shipped ~1 MB of exporters it never used. autotel resolves its own
|
|
45
|
+
* exporters up front, so all it ever needed from `NodeSDK` was `start()`.
|
|
46
|
+
*
|
|
47
|
+
* Kept from `NodeSDK`, because code and tests rely on them:
|
|
48
|
+
* - `OTEL_SDK_DISABLED=true` makes `start()` a no-op.
|
|
49
|
+
* - `OTEL_LOG_LEVEL` installs the console diag logger.
|
|
50
|
+
* - Resource: `envDetector`, `processDetector` and `hostDetector` are merged
|
|
51
|
+
* in, then `serviceName` is applied last so the resolved autotel value
|
|
52
|
+
* wins (`OTEL_NODE_RESOURCE_DETECTORS=none` turns detection off).
|
|
53
|
+
* - Context manager: `AsyncLocalStorageContextManager`.
|
|
54
|
+
* - Propagator: W3C trace context + baggage, or `OTEL_PROPAGATORS`.
|
|
55
|
+
* - Providers are only registered when they have something to do; an empty
|
|
56
|
+
* `spanProcessors` list still registers a tracer provider, so context keeps
|
|
57
|
+
* propagating even when nothing is exported.
|
|
58
|
+
*
|
|
59
|
+
* Not kept: building an exporter from `OTEL_TRACES_EXPORTER` /
|
|
60
|
+
* `OTEL_LOGS_EXPORTER` / `OTEL_METRICS_EXPORTER`. autotel always passes its own
|
|
61
|
+
* processors, so the traces and metrics variables never reached `NodeSDK`
|
|
62
|
+
* anyway; `OTEL_LOGS_EXPORTER=none` still switches logs off, and `otlp` gets
|
|
63
|
+
* the OTLP/HTTP log exporter. gRPC and Prometheus are no longer reachable from
|
|
64
|
+
* the environment — pass an exporter through `init()` instead.
|
|
65
|
+
*/
|
|
66
|
+
const DIAG_LEVELS = {
|
|
67
|
+
ALL: _opentelemetry_api.DiagLogLevel.ALL,
|
|
68
|
+
VERBOSE: _opentelemetry_api.DiagLogLevel.VERBOSE,
|
|
69
|
+
DEBUG: _opentelemetry_api.DiagLogLevel.DEBUG,
|
|
70
|
+
INFO: _opentelemetry_api.DiagLogLevel.INFO,
|
|
71
|
+
WARN: _opentelemetry_api.DiagLogLevel.WARN,
|
|
72
|
+
ERROR: _opentelemetry_api.DiagLogLevel.ERROR,
|
|
73
|
+
NONE: _opentelemetry_api.DiagLogLevel.NONE
|
|
74
|
+
};
|
|
75
|
+
function envFlag(name) {
|
|
76
|
+
return (process.env[name] ?? "").trim().toLowerCase() === "true";
|
|
77
|
+
}
|
|
78
|
+
function propagatorFromEnv() {
|
|
79
|
+
const raw = process.env.OTEL_PROPAGATORS?.trim();
|
|
80
|
+
if (!raw) return void 0;
|
|
81
|
+
const names = raw.split(",").map((n) => n.trim().toLowerCase()).filter(Boolean);
|
|
82
|
+
if (names.includes("none")) return new _opentelemetry_core.CompositePropagator({ propagators: [] });
|
|
83
|
+
const propagators = [];
|
|
84
|
+
for (const name of names) if (name === "tracecontext") propagators.push(new _opentelemetry_core.W3CTraceContextPropagator());
|
|
85
|
+
else if (name === "baggage") propagators.push(new _opentelemetry_core.W3CBaggagePropagator());
|
|
86
|
+
else _opentelemetry_api.diag.warn(`[autotel] OTEL_PROPAGATORS names "${name}", which needs a propagator package autotel does not bundle; pass one via init({ propagator }).`);
|
|
87
|
+
return propagators.length > 0 ? new _opentelemetry_core.CompositePropagator({ propagators }) : void 0;
|
|
88
|
+
}
|
|
89
|
+
function defaultPropagator() {
|
|
90
|
+
return new _opentelemetry_core.CompositePropagator({ propagators: [new _opentelemetry_core.W3CTraceContextPropagator(), new _opentelemetry_core.W3CBaggagePropagator()] });
|
|
91
|
+
}
|
|
92
|
+
var AutotelSdk = class {
|
|
93
|
+
options;
|
|
94
|
+
disabled;
|
|
95
|
+
tracerProvider;
|
|
96
|
+
meterProvider;
|
|
97
|
+
loggerProvider;
|
|
98
|
+
constructor(options = {}) {
|
|
99
|
+
this.options = options;
|
|
100
|
+
this.disabled = envFlag("OTEL_SDK_DISABLED");
|
|
101
|
+
const level = process.env.OTEL_LOG_LEVEL?.trim().toUpperCase();
|
|
102
|
+
if (level && DIAG_LEVELS[level] !== void 0) _opentelemetry_api.diag.setLogger(new _opentelemetry_api.DiagConsoleLogger(), { logLevel: DIAG_LEVELS[level] });
|
|
103
|
+
}
|
|
104
|
+
start() {
|
|
105
|
+
if (this.disabled) return;
|
|
106
|
+
const o = this.options;
|
|
107
|
+
const instrumentations = (o.instrumentations ?? []).flat();
|
|
108
|
+
(0, _opentelemetry_instrumentation.registerInstrumentations)({ instrumentations });
|
|
109
|
+
_opentelemetry_api.context.setGlobalContextManager(new _opentelemetry_context_async_hooks.AsyncLocalStorageContextManager().enable());
|
|
110
|
+
if (o.textMapPropagator !== null) _opentelemetry_api.propagation.setGlobalPropagator(o.textMapPropagator ?? propagatorFromEnv() ?? defaultPropagator());
|
|
111
|
+
const resource = this.resolveResource();
|
|
112
|
+
if (o.metricReaders && o.metricReaders.length > 0) {
|
|
113
|
+
this.meterProvider = new _opentelemetry_sdk_metrics.MeterProvider({
|
|
114
|
+
resource,
|
|
115
|
+
readers: o.metricReaders
|
|
116
|
+
});
|
|
117
|
+
_opentelemetry_api.metrics.setGlobalMeterProvider(this.meterProvider);
|
|
118
|
+
for (const instrumentation of instrumentations) instrumentation.setMeterProvider(this.meterProvider);
|
|
119
|
+
}
|
|
120
|
+
this.tracerProvider = new _opentelemetry_sdk_trace_base.BasicTracerProvider({
|
|
121
|
+
resource,
|
|
122
|
+
spanProcessors: o.spanProcessors ?? [],
|
|
123
|
+
...o.sampler && { sampler: o.sampler }
|
|
124
|
+
});
|
|
125
|
+
_opentelemetry_api.trace.setGlobalTracerProvider(this.tracerProvider);
|
|
126
|
+
const logProcessors = this.resolveLogProcessors();
|
|
127
|
+
if (logProcessors) {
|
|
128
|
+
this.loggerProvider = new _opentelemetry_sdk_logs.LoggerProvider({
|
|
129
|
+
resource,
|
|
130
|
+
processors: logProcessors
|
|
131
|
+
});
|
|
132
|
+
_opentelemetry_api_logs.logs.setGlobalLoggerProvider(this.loggerProvider);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
getTracerProvider() {
|
|
136
|
+
return this.tracerProvider;
|
|
137
|
+
}
|
|
138
|
+
async shutdown() {
|
|
139
|
+
await Promise.allSettled([
|
|
140
|
+
this.tracerProvider?.forceFlush(),
|
|
141
|
+
this.loggerProvider?.forceFlush(),
|
|
142
|
+
this.meterProvider?.forceFlush()
|
|
143
|
+
]);
|
|
144
|
+
await Promise.all([
|
|
145
|
+
this.tracerProvider?.shutdown(),
|
|
146
|
+
this.loggerProvider?.shutdown(),
|
|
147
|
+
this.meterProvider?.shutdown()
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
resolveResource() {
|
|
151
|
+
const o = this.options;
|
|
152
|
+
let resource = o.resource ?? (0, _opentelemetry_resources.resourceFromAttributes)({});
|
|
153
|
+
const detectorsEnv = process.env.OTEL_NODE_RESOURCE_DETECTORS?.trim();
|
|
154
|
+
if (o.autoDetectResources ?? detectorsEnv?.toLowerCase() !== "none") {
|
|
155
|
+
const detectors = o.resourceDetectors ?? [
|
|
156
|
+
_opentelemetry_resources.envDetector,
|
|
157
|
+
_opentelemetry_resources.processDetector,
|
|
158
|
+
_opentelemetry_resources.hostDetector
|
|
159
|
+
];
|
|
160
|
+
resource = resource.merge((0, _opentelemetry_resources.detectResources)({ detectors }));
|
|
161
|
+
}
|
|
162
|
+
if (o.serviceName !== void 0) resource = resource.merge((0, _opentelemetry_resources.resourceFromAttributes)({ [_opentelemetry_semantic_conventions.ATTR_SERVICE_NAME]: o.serviceName }));
|
|
163
|
+
return resource;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* `init()` passes a list when it configured logs itself and `undefined` to
|
|
167
|
+
* defer to `OTEL_LOGS_EXPORTER`. Only `otlp` (over HTTP) and `none`/unset
|
|
168
|
+
* are honoured there; any other value is named in a warning.
|
|
169
|
+
*/
|
|
170
|
+
resolveLogProcessors() {
|
|
171
|
+
const configured = this.options.logRecordProcessors;
|
|
172
|
+
if (configured) return configured;
|
|
173
|
+
const fromEnv = process.env.OTEL_LOGS_EXPORTER?.trim().toLowerCase();
|
|
174
|
+
if (!fromEnv || fromEnv === "none") return void 0;
|
|
175
|
+
if (fromEnv === "otlp") return [new _opentelemetry_sdk_logs.BatchLogRecordProcessor({ exporter: new _opentelemetry_exporter_logs_otlp_http.OTLPLogExporter() })];
|
|
176
|
+
_opentelemetry_api.diag.warn(`[autotel] OTEL_LOGS_EXPORTER=${fromEnv} is not supported without sdk-node; pass a log exporter via init() instead.`);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
32
181
|
//#region src/rate-limiter.ts
|
|
33
182
|
/**
|
|
34
183
|
* Token bucket rate limiter
|
|
@@ -514,28 +663,30 @@ var EventQueue = class {
|
|
|
514
663
|
*/
|
|
515
664
|
async sendWithRetry(events, retriesLeft, subscribersByEventIndex) {
|
|
516
665
|
const failedDeliveries = await this.sendToSubscribers(events, subscribersByEventIndex);
|
|
517
|
-
if (failedDeliveries.length > 0)
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
|
|
666
|
+
if (failedDeliveries.length > 0) {
|
|
667
|
+
if (retriesLeft > 0) {
|
|
668
|
+
const failedEventIndicesOrdered = [...new Set(failedDeliveries.map((f) => f.eventIndex))].toSorted((a, b) => a - b);
|
|
669
|
+
const eventsToRetry = failedEventIndicesOrdered.map((i) => events[i]);
|
|
670
|
+
const failedSubscribersByRetryIndex = /* @__PURE__ */ new Map();
|
|
671
|
+
for (const [j, origIndex] of failedEventIndicesOrdered.entries()) {
|
|
672
|
+
const set = /* @__PURE__ */ new Set();
|
|
673
|
+
for (const { eventIndex, subscriberName } of failedDeliveries) if (eventIndex === origIndex) set.add(subscriberName);
|
|
674
|
+
failedSubscribersByRetryIndex.set(j, set);
|
|
675
|
+
}
|
|
676
|
+
const delay = Math.pow(2, this.config.maxRetries - retriesLeft) * 1e3;
|
|
677
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
678
|
+
return this.sendWithRetry(eventsToRetry, retriesLeft - 1, failedSubscribersByRetryIndex);
|
|
679
|
+
} else {
|
|
680
|
+
for (const { eventIndex, subscriberName, error } of failedDeliveries) {
|
|
681
|
+
const event = events[eventIndex];
|
|
682
|
+
if (event) this.recordFailed(event, subscriberName, error);
|
|
683
|
+
}
|
|
684
|
+
const failedSubscriberNames = [...new Set(failedDeliveries.map((f) => f.subscriberName))];
|
|
685
|
+
getLogger().error({
|
|
686
|
+
failedSubscribers: failedSubscriberNames,
|
|
687
|
+
retriesAttempted: this.config.maxRetries
|
|
688
|
+
}, "[autotel] Failed to send events after retries");
|
|
533
689
|
}
|
|
534
|
-
const failedSubscriberNames = [...new Set(failedDeliveries.map((f) => f.subscriberName))];
|
|
535
|
-
getLogger().error({
|
|
536
|
-
failedSubscribers: failedSubscriberNames,
|
|
537
|
-
retriesAttempted: this.config.maxRetries
|
|
538
|
-
}, "[autotel] Failed to send events after retries");
|
|
539
690
|
}
|
|
540
691
|
}
|
|
541
692
|
/**
|
|
@@ -892,7 +1043,8 @@ function getOrCreateQueue() {
|
|
|
892
1043
|
function track(event, data, options) {
|
|
893
1044
|
const queue = getOrCreateQueue();
|
|
894
1045
|
if (!queue) return;
|
|
895
|
-
const
|
|
1046
|
+
const validationConfig = getValidationConfig();
|
|
1047
|
+
const validated = validateEvent(event, data, validationConfig || void 0);
|
|
896
1048
|
const span = _opentelemetry_api.trace.getActiveSpan();
|
|
897
1049
|
const enrichedData = span ? {
|
|
898
1050
|
...validated.attributes,
|
|
@@ -1949,6 +2101,76 @@ var BaggageSpanProcessor = class {
|
|
|
1949
2101
|
async forceFlush() {}
|
|
1950
2102
|
};
|
|
1951
2103
|
|
|
2104
|
+
//#endregion
|
|
2105
|
+
//#region src/request-attributes.ts
|
|
2106
|
+
/**
|
|
2107
|
+
* Attributes set through `requestCtx` describe the whole request, so every
|
|
2108
|
+
* span started inside that request carries them too - not only the request
|
|
2109
|
+
* span. This stays in-process: nothing rides baggage, so a `user.email` set in
|
|
2110
|
+
* auth middleware never leaves in a `baggage` header on an outgoing call.
|
|
2111
|
+
*/
|
|
2112
|
+
/**
|
|
2113
|
+
* The key `@opentelemetry/core` publishes RPC metadata under. `createContextKey`
|
|
2114
|
+
* is `Symbol.for`, so this reads exactly what `instrumentation-http` (and every
|
|
2115
|
+
* framework instrumentation that renames the route) wrote, without taking a
|
|
2116
|
+
* dependency on core.
|
|
2117
|
+
*/
|
|
2118
|
+
const RPC_METADATA_KEY = (0, _opentelemetry_api.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
2119
|
+
/** The server span of the request `ctx` belongs to, if it belongs to one. */
|
|
2120
|
+
function getRequestSpanIn(ctx = _opentelemetry_api.context.active()) {
|
|
2121
|
+
const requestSpan = require_values.readProperty(ctx.getValue(RPC_METADATA_KEY), "span");
|
|
2122
|
+
return require_values.isFunction(require_values.readProperty(requestSpan, "spanContext")) ? requestSpan : void 0;
|
|
2123
|
+
}
|
|
2124
|
+
const scopes = /* @__PURE__ */ new WeakMap();
|
|
2125
|
+
function scopeFor(span) {
|
|
2126
|
+
let scope = scopes.get(span);
|
|
2127
|
+
if (!scope) {
|
|
2128
|
+
scope = { attributes: {} };
|
|
2129
|
+
scopes.set(span, scope);
|
|
2130
|
+
}
|
|
2131
|
+
return scope;
|
|
2132
|
+
}
|
|
2133
|
+
/**
|
|
2134
|
+
* The request span's attributes, or else every ancestor `requestCtx` wrote to,
|
|
2135
|
+
* merged so the nearer one wins a key: a job span tagging `job.id` under a
|
|
2136
|
+
* consumer that tagged `tenant` must not hide the tenant from its children.
|
|
2137
|
+
*/
|
|
2138
|
+
function sourceOf(parentContext) {
|
|
2139
|
+
const requestSpan = getRequestSpanIn(parentContext);
|
|
2140
|
+
if (requestSpan) return scopes.get(requestSpan)?.attributes;
|
|
2141
|
+
const nearestFirst = [];
|
|
2142
|
+
const parent = _opentelemetry_api.trace.getSpan(parentContext);
|
|
2143
|
+
for (let scope = parent && scopes.get(parent); scope; scope = scope.parent) nearestFirst.push(scope.attributes);
|
|
2144
|
+
return nearestFirst.length > 0 ? Object.assign({}, ...nearestFirst.toReversed()) : void 0;
|
|
2145
|
+
}
|
|
2146
|
+
/** Remember attributes set through `requestCtx`, for the spans started under it. */
|
|
2147
|
+
function rememberRequestAttributes(span, attrs) {
|
|
2148
|
+
Object.assign(scopeFor(span).attributes, attrs);
|
|
2149
|
+
}
|
|
2150
|
+
/**
|
|
2151
|
+
* Copies `requestCtx` attributes onto each span started inside the request -
|
|
2152
|
+
* or, outside one, under the span `requestCtx` fell back to. Only what was set
|
|
2153
|
+
* before the span started is copied, and a key the span already carries keeps
|
|
2154
|
+
* its own value.
|
|
2155
|
+
*/
|
|
2156
|
+
var RequestAttributesSpanProcessor = class {
|
|
2157
|
+
onStart(span, parentContext) {
|
|
2158
|
+
const parent = _opentelemetry_api.trace.getSpan(parentContext);
|
|
2159
|
+
if (parent) scopeFor(span).parent = scopeFor(parent);
|
|
2160
|
+
const attrs = sourceOf(parentContext);
|
|
2161
|
+
if (!attrs) return;
|
|
2162
|
+
const own = span.attributes;
|
|
2163
|
+
for (const [key, value] of Object.entries(attrs)) if (value !== void 0 && !(key in own)) span.setAttribute(key, value);
|
|
2164
|
+
}
|
|
2165
|
+
onEnd() {}
|
|
2166
|
+
forceFlush() {
|
|
2167
|
+
return Promise.resolve();
|
|
2168
|
+
}
|
|
2169
|
+
shutdown() {
|
|
2170
|
+
return Promise.resolve();
|
|
2171
|
+
}
|
|
2172
|
+
};
|
|
2173
|
+
|
|
1952
2174
|
//#endregion
|
|
1953
2175
|
//#region src/redact-values.ts
|
|
1954
2176
|
/** Standalone string redaction for use outside the span processor pipeline. */
|
|
@@ -2994,7 +3216,8 @@ var Event = class {
|
|
|
2994
3216
|
* ```
|
|
2995
3217
|
*/
|
|
2996
3218
|
trackEvent(eventName, attributes) {
|
|
2997
|
-
const
|
|
3219
|
+
const validationConfig = getValidationConfig();
|
|
3220
|
+
const validated = validateEvent(eventName, attributes, validationConfig || void 0);
|
|
2998
3221
|
const enrichedAttributes = this.enrichWithTelemetryContext(validated.attributes);
|
|
2999
3222
|
this.logger?.info({
|
|
3000
3223
|
event: validated.eventName,
|
|
@@ -4056,7 +4279,8 @@ function init(cfg) {
|
|
|
4056
4279
|
if (devtoolsConfig.enabled && mergedConfig.logs === void 0) mergedConfig.logs = true;
|
|
4057
4280
|
const silent = mergedConfig.silent ?? false;
|
|
4058
4281
|
const minLevel = mergedConfig.minLevel ?? "info";
|
|
4059
|
-
|
|
4282
|
+
const baseLogger = mergedConfig.logger || silentLogger;
|
|
4283
|
+
logger = wrapLogger(baseLogger, silent, minLevel);
|
|
4060
4284
|
if (initialized) logger.warn({}, "[autotel] init() called again - last config wins. This may cause unexpected behavior.");
|
|
4061
4285
|
config = mergedConfig;
|
|
4062
4286
|
validationConfig = mergedConfig.validation || null;
|
|
@@ -4148,6 +4372,7 @@ function init(cfg) {
|
|
|
4148
4372
|
mergedConfig.spanFilter = userSpanFilter ? (span) => userSpanFilter(span) && require_policy.policySpanFilter(span) : require_policy.policySpanFilter;
|
|
4149
4373
|
}
|
|
4150
4374
|
if (mergedConfig.spanFilter && spanProcessors.length > 0) spanProcessors = spanProcessors.map((processor) => new require_filtering_span_processor.FilteringSpanProcessor(processor, { filter: mergedConfig.spanFilter }));
|
|
4375
|
+
if (spanProcessors.length > 0) spanProcessors.unshift(new RequestAttributesSpanProcessor());
|
|
4151
4376
|
if (mergedConfig.spanEnrichers && mergedConfig.spanEnrichers.length > 0) spanProcessors.unshift(...mergedConfig.spanEnrichers);
|
|
4152
4377
|
const metricReaders = [];
|
|
4153
4378
|
if (configuredMetricReaders && configuredMetricReaders.length > 0) metricReaders.push(...configuredMetricReaders);
|
|
@@ -4169,10 +4394,11 @@ function init(cfg) {
|
|
|
4169
4394
|
if (logsEnabled) {
|
|
4170
4395
|
for (const destination of otlpDestinations) {
|
|
4171
4396
|
if (!destinationSupportsSignal(destination, "logs")) continue;
|
|
4172
|
-
|
|
4397
|
+
const logExporter = createLogExporter(destination.protocol, {
|
|
4173
4398
|
url: formatEndpointUrl(destination.endpoint, "logs", destination.protocol),
|
|
4174
4399
|
headers: destination.headers
|
|
4175
|
-
})
|
|
4400
|
+
});
|
|
4401
|
+
let processor = new _opentelemetry_sdk_logs.BatchLogRecordProcessor({ exporter: logExporter });
|
|
4176
4402
|
if (_stringRedactor) processor = new RedactingLogRecordProcessor(processor, _stringRedactor);
|
|
4177
4403
|
if (!logRecordProcessors) logRecordProcessors = [];
|
|
4178
4404
|
logRecordProcessors.push(processor);
|
|
@@ -4214,8 +4440,8 @@ function init(cfg) {
|
|
|
4214
4440
|
if (metricReaders.length > 0) sdkOptions.metricReaders = metricReaders;
|
|
4215
4441
|
if (logRecordProcessors && logRecordProcessors.length > 0) sdkOptions.logRecordProcessors = logRecordProcessors;
|
|
4216
4442
|
else if (!process.env.OTEL_LOGS_EXPORTER) sdkOptions.logRecordProcessors = [];
|
|
4217
|
-
sdk = mergedConfig.sdkFactory ? mergedConfig.sdkFactory(sdkOptions) : new
|
|
4218
|
-
if (!sdk) throw new Error("[autotel] sdkFactory must return
|
|
4443
|
+
sdk = mergedConfig.sdkFactory ? mergedConfig.sdkFactory(sdkOptions) : new AutotelSdk(sdkOptions);
|
|
4444
|
+
if (!sdk) throw new Error("[autotel] sdkFactory must return an SDK instance");
|
|
4219
4445
|
sdk.start();
|
|
4220
4446
|
if (mergedConfig.openllmetry?.enabled) {
|
|
4221
4447
|
const traceloop = _optionalRequire("@traceloop/node-server-sdk");
|
|
@@ -4527,6 +4753,12 @@ Object.defineProperty(exports, 'getOrCreateCorrelationId', {
|
|
|
4527
4753
|
return getOrCreateCorrelationId;
|
|
4528
4754
|
}
|
|
4529
4755
|
});
|
|
4756
|
+
Object.defineProperty(exports, 'getRequestSpanIn', {
|
|
4757
|
+
enumerable: true,
|
|
4758
|
+
get: function () {
|
|
4759
|
+
return getRequestSpanIn;
|
|
4760
|
+
}
|
|
4761
|
+
});
|
|
4530
4762
|
Object.defineProperty(exports, 'getSdk', {
|
|
4531
4763
|
enumerable: true,
|
|
4532
4764
|
get: function () {
|
|
@@ -4599,6 +4831,12 @@ Object.defineProperty(exports, 'markForceKept', {
|
|
|
4599
4831
|
return markForceKept;
|
|
4600
4832
|
}
|
|
4601
4833
|
});
|
|
4834
|
+
Object.defineProperty(exports, 'rememberRequestAttributes', {
|
|
4835
|
+
enumerable: true,
|
|
4836
|
+
get: function () {
|
|
4837
|
+
return rememberRequestAttributes;
|
|
4838
|
+
}
|
|
4839
|
+
});
|
|
4602
4840
|
Object.defineProperty(exports, 'resetEvents', {
|
|
4603
4841
|
enumerable: true,
|
|
4604
4842
|
get: function () {
|
package/dist/instrumentation.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_init = require('./init-
|
|
3
|
-
const require_node_require = require('./node-require-
|
|
4
|
-
let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
|
|
5
|
-
let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
2
|
+
const require_init = require('./init-W_klPrYk.cjs');
|
|
3
|
+
const require_node_require = require('./node-require-BPsB09eC.cjs');
|
|
6
4
|
let _opentelemetry_resources = require("@opentelemetry/resources");
|
|
7
|
-
let
|
|
5
|
+
let _opentelemetry_exporter_logs_otlp_http = require("@opentelemetry/exporter-logs-otlp-http");
|
|
8
6
|
let _opentelemetry_sdk_logs = require("@opentelemetry/sdk-logs");
|
|
7
|
+
let _opentelemetry_sdk_metrics = require("@opentelemetry/sdk-metrics");
|
|
8
|
+
let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
9
9
|
let _opentelemetry_exporter_metrics_otlp_http = require("@opentelemetry/exporter-metrics-otlp-http");
|
|
10
10
|
let _opentelemetry_exporter_trace_otlp_http = require("@opentelemetry/exporter-trace-otlp-http");
|
|
11
|
-
let
|
|
11
|
+
let _opentelemetry_sdk_node = require("@opentelemetry/sdk-node");
|
|
12
12
|
let _opentelemetry_semantic_conventions_incubating = require("@opentelemetry/semantic-conventions/incubating");
|
|
13
13
|
|
|
14
14
|
//#region src/instrumentation.ts
|
|
@@ -120,10 +120,11 @@ async function initInstrumentation(config) {
|
|
|
120
120
|
});
|
|
121
121
|
let instrumentations = config.instrumentations || [];
|
|
122
122
|
if (config.selectiveInstrumentation === false) instrumentations = [require_node_require.requireModule("@opentelemetry/auto-instrumentations-node").getNodeAutoInstrumentations()];
|
|
123
|
-
const
|
|
123
|
+
const traceExporter = new _opentelemetry_exporter_trace_otlp_http.OTLPTraceExporter({
|
|
124
124
|
url: `${config.otlpEndpoint || "http://localhost:4318"}/v1/traces`,
|
|
125
125
|
headers: otlpHeaders
|
|
126
|
-
})
|
|
126
|
+
});
|
|
127
|
+
const spanProcessor = new require_init.TailSamplingSpanProcessor(new _opentelemetry_sdk_trace_base.BatchSpanProcessor(traceExporter));
|
|
127
128
|
const sdk = new _opentelemetry_sdk_node.NodeSDK({
|
|
128
129
|
resource,
|
|
129
130
|
spanProcessor,
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as TailSamplingSpanProcessor, r as getLogger } from "./init-C-qfxo_u.js";
|
|
2
2
|
import { n as safeRequire, t as requireModule } from "./node-require-CkK_xzL-.js";
|
|
3
|
-
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
4
|
-
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
5
3
|
import { detectResources, hostDetector, processDetector, resourceFromAttributes } from "@opentelemetry/resources";
|
|
6
|
-
import {
|
|
4
|
+
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
|
|
7
5
|
import { BatchLogRecordProcessor } from "@opentelemetry/sdk-logs";
|
|
6
|
+
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
7
|
+
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
8
8
|
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
|
|
9
9
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
10
|
-
import {
|
|
10
|
+
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
11
11
|
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from "@opentelemetry/semantic-conventions/incubating";
|
|
12
12
|
|
|
13
13
|
//#region src/instrumentation.ts
|
|
@@ -119,10 +119,11 @@ async function initInstrumentation(config) {
|
|
|
119
119
|
});
|
|
120
120
|
let instrumentations = config.instrumentations || [];
|
|
121
121
|
if (config.selectiveInstrumentation === false) instrumentations = [requireModule("@opentelemetry/auto-instrumentations-node").getNodeAutoInstrumentations()];
|
|
122
|
-
const
|
|
122
|
+
const traceExporter = new OTLPTraceExporter({
|
|
123
123
|
url: `${config.otlpEndpoint || "http://localhost:4318"}/v1/traces`,
|
|
124
124
|
headers: otlpHeaders
|
|
125
|
-
})
|
|
125
|
+
});
|
|
126
|
+
const spanProcessor = new TailSamplingSpanProcessor(new BatchSpanProcessor(traceExporter));
|
|
126
127
|
const sdk = new NodeSDK({
|
|
127
128
|
resource,
|
|
128
129
|
spanProcessor,
|
package/dist/logger.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_logger = require('./logger-
|
|
2
|
+
const require_logger = require('./logger-DLjHQAus.cjs');
|
|
3
3
|
|
|
4
4
|
exports.LOG_LEVEL = require_logger.LOG_LEVEL;
|
|
5
5
|
exports.LoggedOperation = require_logger.LoggedOperation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
4
4
|
|
|
5
5
|
//#region src/messaging-adapters.ts
|
package/dist/messaging.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const require_functional = require('./functional-
|
|
5
|
-
const require_correlated_events = require('./correlated-events-
|
|
6
|
-
const require_trace_factory_validation = require('./trace-factory-validation-
|
|
2
|
+
const require_init = require('./init-W_klPrYk.cjs');
|
|
3
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
4
|
+
const require_functional = require('./functional-DxHvvWc_.cjs');
|
|
5
|
+
const require_correlated_events = require('./correlated-events-DE_4A3oD.cjs');
|
|
6
|
+
const require_trace_factory_validation = require('./trace-factory-validation-CHU1WcjK.cjs');
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
|
|
9
9
|
//#region src/messaging.ts
|
|
@@ -362,11 +362,12 @@ function extendContextForConsumer(baseCtx, config, linkStorage, orderingState, g
|
|
|
362
362
|
context: options.originalDLQSpanContext,
|
|
363
363
|
attributes: { "messaging.link.source": "dlq_replay" }
|
|
364
364
|
}]);
|
|
365
|
-
|
|
365
|
+
const eventAttrs = {
|
|
366
366
|
"messaging.replay": true,
|
|
367
367
|
...options?.replayAttempt !== void 0 && { "messaging.replay.attempt": options.replayAttempt },
|
|
368
368
|
...options?.dlqDwellTimeMs !== void 0 && { "messaging.replay.dwell_time_ms": options.dlqDwellTimeMs }
|
|
369
|
-
}
|
|
369
|
+
};
|
|
370
|
+
require_correlated_events.emitCorrelatedEvent(baseCtx, "dlq_replay", eventAttrs);
|
|
370
371
|
},
|
|
371
372
|
recordRetry(attemptNumber, maxAttempts) {
|
|
372
373
|
baseCtx.setAttribute("messaging.retry.count", attemptNumber);
|
package/dist/messaging.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { L as createLinkFromHeaders, z as extractLinksFromBatch } from "./init-C-qfxo_u.js";
|
|
1
2
|
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 {
|
|
3
|
-
import { l as withTracing } from "./functional-S9IJNlBn.js";
|
|
3
|
+
import { l as withTracing } from "./functional-6QPJDqUW.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";
|
|
@@ -361,11 +361,12 @@ function extendContextForConsumer(baseCtx, config, linkStorage, orderingState, g
|
|
|
361
361
|
context: options.originalDLQSpanContext,
|
|
362
362
|
attributes: { "messaging.link.source": "dlq_replay" }
|
|
363
363
|
}]);
|
|
364
|
-
|
|
364
|
+
const eventAttrs = {
|
|
365
365
|
"messaging.replay": true,
|
|
366
366
|
...options?.replayAttempt !== void 0 && { "messaging.replay.attempt": options.replayAttempt },
|
|
367
367
|
...options?.dlqDwellTimeMs !== void 0 && { "messaging.replay.dwell_time_ms": options.dlqDwellTimeMs }
|
|
368
|
-
}
|
|
368
|
+
};
|
|
369
|
+
emitCorrelatedEvent(baseCtx, "dlq_replay", eventAttrs);
|
|
369
370
|
},
|
|
370
371
|
recordRetry(attemptNumber, maxAttempts) {
|
|
371
372
|
baseCtx.setAttribute("messaging.retry.count", attemptNumber);
|
package/dist/metric-testing.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('./rolldown-runtime-
|
|
2
|
-
const require_values = require('./values-
|
|
1
|
+
const require_rolldown_runtime = require('./rolldown-runtime-C24Yb2bl.cjs');
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
node_module = require_rolldown_runtime.__toESM(node_module, 1);
|
|
5
5
|
|
package/dist/parse-error.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_values = require('./values-
|
|
2
|
+
const require_values = require('./values-AxGpgYBA.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/parse-error.ts
|
|
5
5
|
/** An HTTP-ish status, however the library that threw chose to spell it. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReadableSpan } from "@opentelemetry/sdk-trace-base";
|
|
2
1
|
import { Context } from "@opentelemetry/api";
|
|
3
2
|
import { LogRecordProcessor, SdkLogRecord } from "@opentelemetry/sdk-logs";
|
|
3
|
+
import { ReadableSpan } from "@opentelemetry/sdk-trace-base";
|
|
4
4
|
//#region src/policy.d.ts
|
|
5
5
|
/** A path into an attribute. `"ccn"` and `["ccn"]` are equivalent. */
|
|
6
6
|
type AttributePath = string | string[];
|
package/dist/policy.cjs
CHANGED
|
Binary file
|
package/dist/policy.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as watchPolicyFile, a as PolicyLogRecordProcessor, c as PolicyMatcher, d as getPolicies, f as hasLogPolicies, g as unsupportedReason, h as setPolicies, i as PolicyField, l as PolicyTraceTarget, m as policySpanFilter, n as MAX_MATCH_LENGTH, o as PolicyLogTarget, p as loadPolicies, r as Policy, s as PolicyLogTransform, t as AttributePath, u as clearPolicies } from "./policy-
|
|
1
|
+
import { _ as watchPolicyFile, a as PolicyLogRecordProcessor, c as PolicyMatcher, d as getPolicies, f as hasLogPolicies, g as unsupportedReason, h as setPolicies, i as PolicyField, l as PolicyTraceTarget, m as policySpanFilter, n as MAX_MATCH_LENGTH, o as PolicyLogTarget, p as loadPolicies, r as Policy, s as PolicyLogTransform, t as AttributePath, u as clearPolicies } from "./policy-DNw_0qUq.js";
|
|
2
2
|
export { AttributePath, MAX_MATCH_LENGTH, Policy, PolicyField, PolicyLogRecordProcessor, PolicyLogTarget, PolicyLogTransform, PolicyMatcher, PolicyTraceTarget, clearPolicies, getPolicies, hasLogPolicies, loadPolicies, policySpanFilter, setPolicies, unsupportedReason, watchPolicyFile };
|
package/dist/processors.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_canonical_log_line_processor = require('./canonical-log-line-processor-
|
|
2
|
+
const require_canonical_log_line_processor = require('./canonical-log-line-processor-BU03jJeA.cjs');
|
|
3
3
|
let _opentelemetry_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, 'BatchSpanProcessor', {
|
package/dist/processors.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-
|
|
1
|
+
import { n as CanonicalLogLineProcessor, t as CanonicalLogLineOptions } from "./canonical-log-line-processor-Bwrt_L4c.js";
|
|
2
2
|
import { BatchSpanProcessor, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
3
3
|
export { BatchSpanProcessor, type CanonicalLogLineOptions, CanonicalLogLineProcessor, SimpleSpanProcessor };
|
package/dist/register.cjs
CHANGED