autotel 7.9.0 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/analysis.cjs +1 -1
- package/dist/analysis.d.cts +6 -7
- package/dist/analysis.d.ts +6 -7
- package/dist/analysis.js +1 -1
- package/dist/attributes.d.cts +1 -1
- package/dist/attributes.d.ts +1 -1
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/business-baggage.d.cts +12 -13
- package/dist/business-baggage.d.ts +12 -13
- package/dist/{canonical-log-line-processor-Bwrt_L4c.d.ts → canonical-log-line-processor-DDGzm-wi.d.ts} +1 -1
- package/dist/{canonical-log-line-processor-C0Z_N4oL.d.cts → canonical-log-line-processor-DLeAQjgb.d.cts} +1 -1
- package/dist/channel-BobQKsZd.js +64 -0
- package/dist/channel-D0eaVqn3.cjs +81 -0
- package/dist/config.d.cts +7 -7
- package/dist/config.d.ts +7 -7
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.d.cts +9 -10
- package/dist/correlation-id.d.ts +9 -10
- package/dist/correlation-id.js +1 -1
- package/dist/db.d.cts +18 -19
- package/dist/db.d.ts +18 -19
- package/dist/decorators.cjs +1 -1
- package/dist/decorators.d.cts +7 -7
- package/dist/decorators.d.ts +7 -7
- package/dist/decorators.js +1 -1
- package/dist/diagnostics.cjs +10 -70
- package/dist/diagnostics.d.cts +6 -6
- package/dist/diagnostics.d.ts +6 -6
- package/dist/diagnostics.js +1 -61
- package/dist/drain-pipeline.d.cts +4 -5
- package/dist/drain-pipeline.d.ts +4 -5
- package/dist/enrichers.d.cts +7 -8
- package/dist/enrichers.d.ts +7 -8
- package/dist/event.cjs +1 -1
- package/dist/event.d.cts +6 -6
- package/dist/event.d.ts +6 -6
- package/dist/event.js +1 -1
- package/dist/evidence.d.cts +13 -14
- package/dist/evidence.d.ts +13 -14
- package/dist/exception-fingerprint.d.cts +10 -11
- package/dist/exception-fingerprint.d.ts +10 -11
- package/dist/exporters.d.cts +2 -2
- package/dist/exporters.d.ts +2 -2
- package/dist/feature-flags.d.cts +23 -24
- package/dist/feature-flags.d.ts +23 -24
- package/dist/{filtering-span-processor-vkewzbqB.d.ts → filtering-span-processor-BDGe1myy.d.ts} +1 -1
- package/dist/{filtering-span-processor-BpDagWNa.d.cts → filtering-span-processor-BYvLMiNz.d.cts} +1 -1
- package/dist/filtering-span-processor.cjs +3 -3
- package/dist/filtering-span-processor.d.cts +1 -1
- package/dist/filtering-span-processor.d.ts +1 -1
- package/dist/filtering-span-processor.js +3 -3
- package/dist/{functional-SeRUabkE.d.ts → functional-CbcInXMJ.d.ts} +1 -1
- package/dist/{functional-DxHvvWc_.cjs → functional-CjZT7Jur.cjs} +3 -3
- package/dist/{functional-6QPJDqUW.js → functional-DHn-xGtR.js} +3 -3
- package/dist/{functional-DPZTpGh6.d.cts → functional-j8Joyrwd.d.cts} +1 -1
- 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 +1 -1
- package/dist/http.d.cts +6 -7
- package/dist/http.d.ts +6 -7
- package/dist/http.js +1 -1
- package/dist/{index-B9aRLp6c.d.ts → index-DAH41w0W.d.ts} +4 -4
- package/dist/{index-8bFU4kmd.d.cts → index-DVPsz3DK.d.cts} +4 -4
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +38 -38
- package/dist/index.d.ts +38 -38
- package/dist/index.js +4 -4
- package/dist/{init-COfMwKbc.d.cts → init-BtYaU5n9.d.cts} +18 -4
- package/dist/{init-CnoRlJqS.d.ts → init-DUIFqRRS.d.ts} +18 -4
- package/dist/{init-C-qfxo_u.js → init-rVPOUqng.js} +98 -8
- package/dist/{init-W_klPrYk.cjs → init-zb68UvOW.cjs} +97 -6
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.d.cts +4 -5
- package/dist/instrumentation.d.ts +4 -5
- package/dist/instrumentation.js +1 -1
- package/dist/{logger-S1Fgl0g3.d.cts → logger-C9UT1aZ_.d.cts} +4 -4
- package/dist/{logger-S1Fgl0g3.d.ts → logger-C9UT1aZ_.d.ts} +4 -4
- package/dist/logger.d.cts +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/messaging-adapters.d.cts +10 -11
- package/dist/messaging-adapters.d.ts +10 -11
- package/dist/messaging-testing.d.cts +19 -20
- package/dist/messaging-testing.d.ts +19 -20
- package/dist/messaging.cjs +2 -2
- package/dist/messaging.d.cts +23 -24
- package/dist/messaging.d.ts +23 -24
- package/dist/messaging.js +2 -2
- package/dist/metric-helpers.d.cts +6 -7
- package/dist/metric-helpers.d.ts +6 -7
- package/dist/metric.d.cts +7 -7
- package/dist/metric.d.ts +7 -7
- package/dist/parse-error.d.cts +3 -4
- package/dist/parse-error.d.ts +3 -4
- package/dist/policy.cjs +0 -0
- package/dist/policy.js +0 -0
- package/dist/processors.d.cts +1 -1
- package/dist/processors.d.ts +1 -1
- package/dist/{sampling-CZi7OM9u.d.ts → sampling-B_8orhSB.d.ts} +1 -1
- package/dist/{sampling-DENUjT_8.d.cts → sampling-Dud4XU2m.d.cts} +1 -1
- 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.d.cts +30 -31
- package/dist/security-schema.d.ts +30 -31
- package/dist/semantic-conventions-yG0X2AsN.d.cts +31 -0
- package/dist/semantic-conventions-yG0X2AsN.d.ts +31 -0
- package/dist/semantic-conventions.d.cts +1 -1
- package/dist/semantic-conventions.d.ts +1 -1
- package/dist/semantic-helpers.cjs +1 -1
- package/dist/semantic-helpers.d.cts +10 -11
- package/dist/semantic-helpers.d.ts +10 -11
- package/dist/semantic-helpers.js +1 -1
- package/dist/slo.d.cts +12 -13
- package/dist/slo.d.ts +12 -13
- package/dist/tail-sampling-processor.cjs +1 -1
- package/dist/tail-sampling-processor.d.cts +2 -3
- package/dist/tail-sampling-processor.d.ts +2 -3
- package/dist/tail-sampling-processor.js +1 -1
- package/dist/test-span-collector.d.cts +4 -5
- package/dist/test-span-collector.d.ts +4 -5
- package/dist/testing.d.cts +18 -18
- package/dist/testing.d.ts +18 -18
- package/dist/trace-helpers.d.cts +15 -16
- package/dist/trace-helpers.d.ts +15 -16
- package/dist/tracer-provider.cjs +21 -1
- package/dist/tracer-provider.d.cts +16 -6
- package/dist/tracer-provider.d.ts +16 -6
- package/dist/tracer-provider.js +22 -3
- package/dist/validate.cjs +8 -7
- package/dist/validate.d.cts +12 -12
- package/dist/validate.d.ts +12 -12
- package/dist/validate.js +8 -7
- package/dist/validation-attributes.d.cts +14 -15
- package/dist/validation-attributes.d.ts +14 -15
- package/dist/webhook.cjs +1 -1
- package/dist/webhook.d.cts +11 -12
- package/dist/webhook.d.ts +11 -12
- package/dist/webhook.js +1 -1
- package/dist/workflow-distributed.cjs +1 -1
- package/dist/workflow-distributed.d.cts +26 -27
- package/dist/workflow-distributed.d.ts +26 -27
- package/dist/workflow-distributed.js +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.d.cts +11 -12
- package/dist/workflow.d.ts +11 -12
- package/dist/workflow.js +1 -1
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.d.cts +9 -10
- package/dist/yaml-config.d.ts +9 -10
- package/dist/yaml-config.js +1 -1
- package/package.json +15 -21
- package/dist/semantic-conventions-FhSxv-bK.d.cts +0 -31
- package/dist/semantic-conventions-FhSxv-bK.d.ts +0 -31
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReadableSpan, Span, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
2
2
|
import { Context } from "@opentelemetry/api";
|
|
3
3
|
//#region src/tail-sampling-processor.d.ts
|
|
4
|
-
declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
4
|
+
export declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
5
5
|
private wrappedProcessor;
|
|
6
6
|
constructor(wrappedProcessor: SpanProcessor);
|
|
7
7
|
onStart(span: Span, parentContext: Context): void;
|
|
@@ -9,5 +9,4 @@ declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
|
9
9
|
forceFlush(): Promise<void>;
|
|
10
10
|
shutdown(): Promise<void>;
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TailSamplingSpanProcessor };
|
|
12
|
+
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context } from "@opentelemetry/api";
|
|
2
2
|
import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
3
3
|
//#region src/tail-sampling-processor.d.ts
|
|
4
|
-
declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
4
|
+
export declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
5
5
|
private wrappedProcessor;
|
|
6
6
|
constructor(wrappedProcessor: SpanProcessor);
|
|
7
7
|
onStart(span: Span$1, parentContext: Context): void;
|
|
@@ -9,5 +9,4 @@ declare class TailSamplingSpanProcessor implements SpanProcessor {
|
|
|
9
9
|
forceFlush(): Promise<void>;
|
|
10
10
|
shutdown(): Promise<void>;
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TailSamplingSpanProcessor };
|
|
12
|
+
//#endregion
|
|
@@ -9,7 +9,7 @@ type SerializableValue = string | number | boolean | string[] | number[] | boole
|
|
|
9
9
|
* Defined as a `type` (not `interface`) so it is assignable to
|
|
10
10
|
* `Record<string, unknown>` in TypeScript 6+ strict mode.
|
|
11
11
|
*/
|
|
12
|
-
type SerializedSpan = {
|
|
12
|
+
export type SerializedSpan = {
|
|
13
13
|
spanId: string;
|
|
14
14
|
parentSpanId?: string;
|
|
15
15
|
name: string;
|
|
@@ -19,7 +19,7 @@ type SerializedSpan = {
|
|
|
19
19
|
statusMessage?: string;
|
|
20
20
|
attributes?: Record<string, SerializableValue>;
|
|
21
21
|
};
|
|
22
|
-
declare class TestSpanCollector implements SpanExporter {
|
|
22
|
+
export declare class TestSpanCollector implements SpanExporter {
|
|
23
23
|
private traces;
|
|
24
24
|
export(spans: ReadableSpan[], callback: (result: {
|
|
25
25
|
code: number;
|
|
@@ -41,6 +41,5 @@ declare class TestSpanCollector implements SpanExporter {
|
|
|
41
41
|
shutdown(): Promise<void>;
|
|
42
42
|
forceFlush(): Promise<void>;
|
|
43
43
|
}
|
|
44
|
-
declare function serializeSpan(span: ReadableSpan): SerializedSpan;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SerializedSpan, TestSpanCollector, serializeSpan };
|
|
44
|
+
export declare function serializeSpan(span: ReadableSpan): SerializedSpan;
|
|
45
|
+
//#endregion
|
|
@@ -9,7 +9,7 @@ type SerializableValue = string | number | boolean | string[] | number[] | boole
|
|
|
9
9
|
* Defined as a `type` (not `interface`) so it is assignable to
|
|
10
10
|
* `Record<string, unknown>` in TypeScript 6+ strict mode.
|
|
11
11
|
*/
|
|
12
|
-
type SerializedSpan = {
|
|
12
|
+
export type SerializedSpan = {
|
|
13
13
|
spanId: string;
|
|
14
14
|
parentSpanId?: string;
|
|
15
15
|
name: string;
|
|
@@ -19,7 +19,7 @@ type SerializedSpan = {
|
|
|
19
19
|
statusMessage?: string;
|
|
20
20
|
attributes?: Record<string, SerializableValue>;
|
|
21
21
|
};
|
|
22
|
-
declare class TestSpanCollector implements SpanExporter {
|
|
22
|
+
export declare class TestSpanCollector implements SpanExporter {
|
|
23
23
|
private traces;
|
|
24
24
|
export(spans: ReadableSpan[], callback: (result: {
|
|
25
25
|
code: number;
|
|
@@ -41,6 +41,5 @@ declare class TestSpanCollector implements SpanExporter {
|
|
|
41
41
|
shutdown(): Promise<void>;
|
|
42
42
|
forceFlush(): Promise<void>;
|
|
43
43
|
}
|
|
44
|
-
declare function serializeSpan(span: ReadableSpan): SerializedSpan;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { SerializedSpan, TestSpanCollector, serializeSpan };
|
|
44
|
+
export declare function serializeSpan(span: ReadableSpan): SerializedSpan;
|
|
45
|
+
//#endregion
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
|
|
2
|
-
import { s as Logger } from "./logger-
|
|
2
|
+
import { s as Logger } from "./logger-C9UT1aZ_.cjs";
|
|
3
3
|
import { a as EventsValue, c as createEventCollector, i as EventsOutcome, n as EventData, o as assertEventTracked, r as EventsFunnelStep, s as assertOutcomeTracked, t as EventCollector } from "./event-testing-CBtnJXE5.cjs";
|
|
4
4
|
import { SerializedSpan, TestSpanCollector, serializeSpan } from "./test-span-collector.cjs";
|
|
5
5
|
import { SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
@@ -26,7 +26,7 @@ interface MemoryExporter extends SpanExporter {
|
|
|
26
26
|
/** Discard what has been collected. */
|
|
27
27
|
reset(): void;
|
|
28
28
|
}
|
|
29
|
-
declare function createMemoryExporter(): MemoryExporter;
|
|
29
|
+
export declare function createMemoryExporter(): MemoryExporter;
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/testing.d.ts
|
|
32
32
|
/**
|
|
@@ -63,7 +63,7 @@ declare function createMemoryExporter(): MemoryExporter;
|
|
|
63
63
|
/**
|
|
64
64
|
* Simplified span representation for testing
|
|
65
65
|
*/
|
|
66
|
-
interface TestSpan {
|
|
66
|
+
export interface TestSpan {
|
|
67
67
|
traceId: string;
|
|
68
68
|
spanId: string;
|
|
69
69
|
parentSpanId?: string;
|
|
@@ -80,7 +80,7 @@ interface TestSpan {
|
|
|
80
80
|
endTime: number;
|
|
81
81
|
duration: number;
|
|
82
82
|
}
|
|
83
|
-
interface SpanMatch {
|
|
83
|
+
export interface SpanMatch {
|
|
84
84
|
name?: string;
|
|
85
85
|
traceId?: string;
|
|
86
86
|
spanId?: string;
|
|
@@ -91,7 +91,7 @@ interface SpanMatch {
|
|
|
91
91
|
/**
|
|
92
92
|
* In-memory trace collector for testing
|
|
93
93
|
*/
|
|
94
|
-
interface TraceCollector {
|
|
94
|
+
export interface TraceCollector {
|
|
95
95
|
/** Get all collected spans */
|
|
96
96
|
getSpans(): TestSpan[];
|
|
97
97
|
/** Get spans matching a name */
|
|
@@ -137,7 +137,7 @@ interface TraceCollector {
|
|
|
137
137
|
* })
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
declare function createTraceCollector(): TraceCollector;
|
|
140
|
+
export declare function createTraceCollector(): TraceCollector;
|
|
141
141
|
/**
|
|
142
142
|
* Assert that a trace was created for an operation
|
|
143
143
|
*
|
|
@@ -157,7 +157,7 @@ declare function createTraceCollector(): TraceCollector;
|
|
|
157
157
|
* })
|
|
158
158
|
* ```
|
|
159
159
|
*/
|
|
160
|
-
declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
|
|
160
|
+
export declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
|
|
161
161
|
minCount?: number;
|
|
162
162
|
maxCount?: number;
|
|
163
163
|
status?: SpanStatusCode;
|
|
@@ -180,7 +180,7 @@ declare function assertTraceCreated(collector: TraceCollector, operationName: st
|
|
|
180
180
|
* assertNoErrors(collector)
|
|
181
181
|
* ```
|
|
182
182
|
*/
|
|
183
|
-
declare function assertNoErrors(collector: TraceCollector): void;
|
|
183
|
+
export declare function assertNoErrors(collector: TraceCollector): void;
|
|
184
184
|
/**
|
|
185
185
|
* Assert that a trace was created and succeeded
|
|
186
186
|
*
|
|
@@ -192,7 +192,7 @@ declare function assertNoErrors(collector: TraceCollector): void;
|
|
|
192
192
|
* assertTraceSucceeded(collector, 'user.createUser')
|
|
193
193
|
* ```
|
|
194
194
|
*/
|
|
195
|
-
declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
|
|
195
|
+
export declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
|
|
196
196
|
/**
|
|
197
197
|
* Assert that a trace was created and failed
|
|
198
198
|
*
|
|
@@ -205,11 +205,11 @@ declare function assertTraceSucceeded(collector: TraceCollector, operationName:
|
|
|
205
205
|
* assertTraceFailed(collector, 'user.createUser', 'Invalid email')
|
|
206
206
|
* ```
|
|
207
207
|
*/
|
|
208
|
-
declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
|
|
208
|
+
export declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
|
|
209
209
|
/**
|
|
210
210
|
* In-memory log collector for testing
|
|
211
211
|
*/
|
|
212
|
-
interface LogCollector {
|
|
212
|
+
export interface LogCollector {
|
|
213
213
|
/** Get all collected logs */
|
|
214
214
|
getLogs(): LogEntry[];
|
|
215
215
|
/** Get logs by level */
|
|
@@ -222,7 +222,7 @@ interface LogCollector {
|
|
|
222
222
|
/**
|
|
223
223
|
* Log entry
|
|
224
224
|
*/
|
|
225
|
-
interface LogEntry {
|
|
225
|
+
export interface LogEntry {
|
|
226
226
|
level: 'info' | 'warn' | 'error' | 'debug';
|
|
227
227
|
message: string;
|
|
228
228
|
extra?: UnknownRecord;
|
|
@@ -245,7 +245,7 @@ interface LogEntry {
|
|
|
245
245
|
* expect(logs[0].message).toBe('Operation started')
|
|
246
246
|
* ```
|
|
247
247
|
*/
|
|
248
|
-
declare function createMockLogger(): Logger & LogCollector;
|
|
248
|
+
export declare function createMockLogger(): Logger & LogCollector;
|
|
249
249
|
/**
|
|
250
250
|
* Assert that no error logs were created
|
|
251
251
|
*
|
|
@@ -257,7 +257,7 @@ declare function createMockLogger(): Logger & LogCollector;
|
|
|
257
257
|
* assertNoErrorsLogged(logger)
|
|
258
258
|
* ```
|
|
259
259
|
*/
|
|
260
|
-
declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
260
|
+
export declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
261
261
|
/**
|
|
262
262
|
* Wait for a specific trace to be created
|
|
263
263
|
*
|
|
@@ -281,7 +281,7 @@ declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
|
281
281
|
* assertTraceSucceeded(collector, 'service.doAsyncWork')
|
|
282
282
|
* ```
|
|
283
283
|
*/
|
|
284
|
-
declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
|
|
284
|
+
export declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
|
|
285
285
|
/**
|
|
286
286
|
* Get trace duration in milliseconds
|
|
287
287
|
*
|
|
@@ -295,7 +295,7 @@ declare function waitForTrace(collector: TraceCollector, operationName: string,
|
|
|
295
295
|
* expect(duration).toBeLessThan(1000) // Should be < 1s
|
|
296
296
|
* ```
|
|
297
297
|
*/
|
|
298
|
-
declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
|
|
298
|
+
export declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
|
|
299
299
|
/**
|
|
300
300
|
* Assert that an operation completed within a time threshold
|
|
301
301
|
*
|
|
@@ -313,6 +313,6 @@ declare function getTraceDuration(collector: TraceCollector, operationName: stri
|
|
|
313
313
|
* assertTraceDuration(collector, 'user.createUser', 500) // Must be < 500ms
|
|
314
314
|
* ```
|
|
315
315
|
*/
|
|
316
|
-
declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
|
|
316
|
+
export declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
|
|
317
317
|
//#endregion
|
|
318
|
-
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue,
|
|
318
|
+
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, type MemoryExporter, type RecordedSpan, type SerializedSpan, TestSpanCollector, assertEventTracked, assertOutcomeTracked, createEventCollector, serializeSpan };
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
2
|
-
import { s as Logger } from "./logger-
|
|
2
|
+
import { s as Logger } from "./logger-C9UT1aZ_.js";
|
|
3
3
|
import { a as EventsValue, c as createEventCollector, i as EventsOutcome, n as EventData, o as assertEventTracked, r as EventsFunnelStep, s as assertOutcomeTracked, t as EventCollector } from "./event-testing-CkPgV3Ii.js";
|
|
4
4
|
import { SerializedSpan, TestSpanCollector, serializeSpan } from "./test-span-collector.js";
|
|
5
5
|
import { Attributes, Link, SpanKind, SpanStatus, SpanStatusCode } from "@opentelemetry/api";
|
|
@@ -26,7 +26,7 @@ interface MemoryExporter extends SpanExporter {
|
|
|
26
26
|
/** Discard what has been collected. */
|
|
27
27
|
reset(): void;
|
|
28
28
|
}
|
|
29
|
-
declare function createMemoryExporter(): MemoryExporter;
|
|
29
|
+
export declare function createMemoryExporter(): MemoryExporter;
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/testing.d.ts
|
|
32
32
|
/**
|
|
@@ -63,7 +63,7 @@ declare function createMemoryExporter(): MemoryExporter;
|
|
|
63
63
|
/**
|
|
64
64
|
* Simplified span representation for testing
|
|
65
65
|
*/
|
|
66
|
-
interface TestSpan {
|
|
66
|
+
export interface TestSpan {
|
|
67
67
|
traceId: string;
|
|
68
68
|
spanId: string;
|
|
69
69
|
parentSpanId?: string;
|
|
@@ -80,7 +80,7 @@ interface TestSpan {
|
|
|
80
80
|
endTime: number;
|
|
81
81
|
duration: number;
|
|
82
82
|
}
|
|
83
|
-
interface SpanMatch {
|
|
83
|
+
export interface SpanMatch {
|
|
84
84
|
name?: string;
|
|
85
85
|
traceId?: string;
|
|
86
86
|
spanId?: string;
|
|
@@ -91,7 +91,7 @@ interface SpanMatch {
|
|
|
91
91
|
/**
|
|
92
92
|
* In-memory trace collector for testing
|
|
93
93
|
*/
|
|
94
|
-
interface TraceCollector {
|
|
94
|
+
export interface TraceCollector {
|
|
95
95
|
/** Get all collected spans */
|
|
96
96
|
getSpans(): TestSpan[];
|
|
97
97
|
/** Get spans matching a name */
|
|
@@ -137,7 +137,7 @@ interface TraceCollector {
|
|
|
137
137
|
* })
|
|
138
138
|
* ```
|
|
139
139
|
*/
|
|
140
|
-
declare function createTraceCollector(): TraceCollector;
|
|
140
|
+
export declare function createTraceCollector(): TraceCollector;
|
|
141
141
|
/**
|
|
142
142
|
* Assert that a trace was created for an operation
|
|
143
143
|
*
|
|
@@ -157,7 +157,7 @@ declare function createTraceCollector(): TraceCollector;
|
|
|
157
157
|
* })
|
|
158
158
|
* ```
|
|
159
159
|
*/
|
|
160
|
-
declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
|
|
160
|
+
export declare function assertTraceCreated(collector: TraceCollector, operationName: string, options?: {
|
|
161
161
|
minCount?: number;
|
|
162
162
|
maxCount?: number;
|
|
163
163
|
status?: SpanStatusCode;
|
|
@@ -180,7 +180,7 @@ declare function assertTraceCreated(collector: TraceCollector, operationName: st
|
|
|
180
180
|
* assertNoErrors(collector)
|
|
181
181
|
* ```
|
|
182
182
|
*/
|
|
183
|
-
declare function assertNoErrors(collector: TraceCollector): void;
|
|
183
|
+
export declare function assertNoErrors(collector: TraceCollector): void;
|
|
184
184
|
/**
|
|
185
185
|
* Assert that a trace was created and succeeded
|
|
186
186
|
*
|
|
@@ -192,7 +192,7 @@ declare function assertNoErrors(collector: TraceCollector): void;
|
|
|
192
192
|
* assertTraceSucceeded(collector, 'user.createUser')
|
|
193
193
|
* ```
|
|
194
194
|
*/
|
|
195
|
-
declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
|
|
195
|
+
export declare function assertTraceSucceeded(collector: TraceCollector, operationName: string): void;
|
|
196
196
|
/**
|
|
197
197
|
* Assert that a trace was created and failed
|
|
198
198
|
*
|
|
@@ -205,11 +205,11 @@ declare function assertTraceSucceeded(collector: TraceCollector, operationName:
|
|
|
205
205
|
* assertTraceFailed(collector, 'user.createUser', 'Invalid email')
|
|
206
206
|
* ```
|
|
207
207
|
*/
|
|
208
|
-
declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
|
|
208
|
+
export declare function assertTraceFailed(collector: TraceCollector, operationName: string, errorMessage?: string): void;
|
|
209
209
|
/**
|
|
210
210
|
* In-memory log collector for testing
|
|
211
211
|
*/
|
|
212
|
-
interface LogCollector {
|
|
212
|
+
export interface LogCollector {
|
|
213
213
|
/** Get all collected logs */
|
|
214
214
|
getLogs(): LogEntry[];
|
|
215
215
|
/** Get logs by level */
|
|
@@ -222,7 +222,7 @@ interface LogCollector {
|
|
|
222
222
|
/**
|
|
223
223
|
* Log entry
|
|
224
224
|
*/
|
|
225
|
-
interface LogEntry {
|
|
225
|
+
export interface LogEntry {
|
|
226
226
|
level: 'info' | 'warn' | 'error' | 'debug';
|
|
227
227
|
message: string;
|
|
228
228
|
extra?: UnknownRecord;
|
|
@@ -245,7 +245,7 @@ interface LogEntry {
|
|
|
245
245
|
* expect(logs[0].message).toBe('Operation started')
|
|
246
246
|
* ```
|
|
247
247
|
*/
|
|
248
|
-
declare function createMockLogger(): Logger & LogCollector;
|
|
248
|
+
export declare function createMockLogger(): Logger & LogCollector;
|
|
249
249
|
/**
|
|
250
250
|
* Assert that no error logs were created
|
|
251
251
|
*
|
|
@@ -257,7 +257,7 @@ declare function createMockLogger(): Logger & LogCollector;
|
|
|
257
257
|
* assertNoErrorsLogged(logger)
|
|
258
258
|
* ```
|
|
259
259
|
*/
|
|
260
|
-
declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
260
|
+
export declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
261
261
|
/**
|
|
262
262
|
* Wait for a specific trace to be created
|
|
263
263
|
*
|
|
@@ -281,7 +281,7 @@ declare function assertNoErrorsLogged(logger: LogCollector): void;
|
|
|
281
281
|
* assertTraceSucceeded(collector, 'service.doAsyncWork')
|
|
282
282
|
* ```
|
|
283
283
|
*/
|
|
284
|
-
declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
|
|
284
|
+
export declare function waitForTrace(collector: TraceCollector, operationName: string, timeoutMs?: number): Promise<void>;
|
|
285
285
|
/**
|
|
286
286
|
* Get trace duration in milliseconds
|
|
287
287
|
*
|
|
@@ -295,7 +295,7 @@ declare function waitForTrace(collector: TraceCollector, operationName: string,
|
|
|
295
295
|
* expect(duration).toBeLessThan(1000) // Should be < 1s
|
|
296
296
|
* ```
|
|
297
297
|
*/
|
|
298
|
-
declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
|
|
298
|
+
export declare function getTraceDuration(collector: TraceCollector, operationName: string): number | undefined;
|
|
299
299
|
/**
|
|
300
300
|
* Assert that an operation completed within a time threshold
|
|
301
301
|
*
|
|
@@ -313,6 +313,6 @@ declare function getTraceDuration(collector: TraceCollector, operationName: stri
|
|
|
313
313
|
* assertTraceDuration(collector, 'user.createUser', 500) // Must be < 500ms
|
|
314
314
|
* ```
|
|
315
315
|
*/
|
|
316
|
-
declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
|
|
316
|
+
export declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
|
|
317
317
|
//#endregion
|
|
318
|
-
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue,
|
|
318
|
+
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, type MemoryExporter, type RecordedSpan, type SerializedSpan, TestSpanCollector, assertEventTracked, assertOutcomeTracked, createEventCollector, serializeSpan };
|
package/dist/trace-helpers.d.cts
CHANGED
|
@@ -5,11 +5,11 @@ import { Context, Span, Tracer } from "@opentelemetry/api";
|
|
|
5
5
|
* Store span name for a given span
|
|
6
6
|
* Called internally when spans are created
|
|
7
7
|
*/
|
|
8
|
-
declare function setSpanName(span: Span, name: string): void;
|
|
8
|
+
export declare function setSpanName(span: Span, name: string): void;
|
|
9
9
|
/**
|
|
10
10
|
* Trace context extracted from active span
|
|
11
11
|
*/
|
|
12
|
-
interface TraceContext {
|
|
12
|
+
export interface TraceContext {
|
|
13
13
|
/** Full 32-character hex trace ID */
|
|
14
14
|
traceId: string;
|
|
15
15
|
/** 16-character hex span ID */
|
|
@@ -46,7 +46,7 @@ interface TraceContext {
|
|
|
46
46
|
* }
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
declare function getTraceContext(): TraceContext | null;
|
|
49
|
+
export declare function getTraceContext(): TraceContext | null;
|
|
50
50
|
/**
|
|
51
51
|
* Enrich object with trace context (traceId, spanId, correlationId, and Datadog fields)
|
|
52
52
|
*
|
|
@@ -79,7 +79,7 @@ declare function getTraceContext(): TraceContext | null;
|
|
|
79
79
|
* // { userId: '123' } - no trace fields added
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
|
-
declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
82
|
+
export declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
83
83
|
/**
|
|
84
84
|
* Check if currently in a trace context
|
|
85
85
|
*
|
|
@@ -97,7 +97,7 @@ declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
|
97
97
|
* }
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
declare function isTracing(): boolean;
|
|
100
|
+
export declare function isTracing(): boolean;
|
|
101
101
|
/**
|
|
102
102
|
* Get a tracer instance for creating custom spans
|
|
103
103
|
*
|
|
@@ -138,7 +138,7 @@ declare function isTracing(): boolean;
|
|
|
138
138
|
* });
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
|
-
declare function getTracer(name: string, version?: string): Tracer;
|
|
141
|
+
export declare function getTracer(name: string, version?: string): Tracer;
|
|
142
142
|
/**
|
|
143
143
|
* Get the currently active span
|
|
144
144
|
*
|
|
@@ -168,7 +168,7 @@ declare function getTracer(name: string, version?: string): Tracer;
|
|
|
168
168
|
* }
|
|
169
169
|
* ```
|
|
170
170
|
*/
|
|
171
|
-
declare function getActiveSpan(): Span | undefined;
|
|
171
|
+
export declare function getActiveSpan(): Span | undefined;
|
|
172
172
|
/**
|
|
173
173
|
* Get the currently active OpenTelemetry context
|
|
174
174
|
*
|
|
@@ -194,7 +194,7 @@ declare function getActiveSpan(): Span | undefined;
|
|
|
194
194
|
* // Headers now contain trace propagation data
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
|
-
declare function getActiveContext(): Context;
|
|
197
|
+
export declare function getActiveContext(): Context;
|
|
198
198
|
/**
|
|
199
199
|
* Run a function with a specific span set as active
|
|
200
200
|
*
|
|
@@ -239,7 +239,7 @@ declare function getActiveContext(): Context;
|
|
|
239
239
|
* span.end();
|
|
240
240
|
* ```
|
|
241
241
|
*/
|
|
242
|
-
declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
242
|
+
export declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
243
243
|
/**
|
|
244
244
|
* Finalize a span with appropriate status and optional error recording
|
|
245
245
|
*
|
|
@@ -304,7 +304,7 @@ declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
|
304
304
|
* }
|
|
305
305
|
* ```
|
|
306
306
|
*/
|
|
307
|
-
declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
307
|
+
export declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
308
308
|
/**
|
|
309
309
|
* Creates a deterministic trace ID from a seed string.
|
|
310
310
|
*
|
|
@@ -374,7 +374,7 @@ declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
|
374
374
|
*
|
|
375
375
|
* @public
|
|
376
376
|
*/
|
|
377
|
-
declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
377
|
+
export declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
378
378
|
/**
|
|
379
379
|
* Flattens nested metadata objects into dot-notation span attributes.
|
|
380
380
|
*
|
|
@@ -495,11 +495,10 @@ declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
|
495
495
|
* resolveTraceUrl('https://grafana.example.com/explore?traceId={traceId}', 'abc123')
|
|
496
496
|
* // => 'https://grafana.example.com/explore?traceId=abc123'
|
|
497
497
|
*/
|
|
498
|
-
declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
498
|
+
export declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
499
499
|
/** Flattened metadata: every leaf rendered as the string an attribute holds. */
|
|
500
|
-
interface FlatMetadata {
|
|
500
|
+
export interface FlatMetadata {
|
|
501
501
|
[key: string]: string;
|
|
502
502
|
}
|
|
503
|
-
declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
504
|
-
//#endregion
|
|
505
|
-
export { FlatMetadata, TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
|
503
|
+
export declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
504
|
+
//#endregion
|
package/dist/trace-helpers.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import { Context, Span, Tracer } from "@opentelemetry/api";
|
|
|
5
5
|
* Store span name for a given span
|
|
6
6
|
* Called internally when spans are created
|
|
7
7
|
*/
|
|
8
|
-
declare function setSpanName(span: Span, name: string): void;
|
|
8
|
+
export declare function setSpanName(span: Span, name: string): void;
|
|
9
9
|
/**
|
|
10
10
|
* Trace context extracted from active span
|
|
11
11
|
*/
|
|
12
|
-
interface TraceContext {
|
|
12
|
+
export interface TraceContext {
|
|
13
13
|
/** Full 32-character hex trace ID */
|
|
14
14
|
traceId: string;
|
|
15
15
|
/** 16-character hex span ID */
|
|
@@ -46,7 +46,7 @@ interface TraceContext {
|
|
|
46
46
|
* }
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
declare function getTraceContext(): TraceContext | null;
|
|
49
|
+
export declare function getTraceContext(): TraceContext | null;
|
|
50
50
|
/**
|
|
51
51
|
* Enrich object with trace context (traceId, spanId, correlationId, and Datadog fields)
|
|
52
52
|
*
|
|
@@ -79,7 +79,7 @@ declare function getTraceContext(): TraceContext | null;
|
|
|
79
79
|
* // { userId: '123' } - no trace fields added
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
|
-
declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
82
|
+
export declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
83
83
|
/**
|
|
84
84
|
* Check if currently in a trace context
|
|
85
85
|
*
|
|
@@ -97,7 +97,7 @@ declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
|
97
97
|
* }
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
declare function isTracing(): boolean;
|
|
100
|
+
export declare function isTracing(): boolean;
|
|
101
101
|
/**
|
|
102
102
|
* Get a tracer instance for creating custom spans
|
|
103
103
|
*
|
|
@@ -138,7 +138,7 @@ declare function isTracing(): boolean;
|
|
|
138
138
|
* });
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
|
-
declare function getTracer(name: string, version?: string): Tracer;
|
|
141
|
+
export declare function getTracer(name: string, version?: string): Tracer;
|
|
142
142
|
/**
|
|
143
143
|
* Get the currently active span
|
|
144
144
|
*
|
|
@@ -168,7 +168,7 @@ declare function getTracer(name: string, version?: string): Tracer;
|
|
|
168
168
|
* }
|
|
169
169
|
* ```
|
|
170
170
|
*/
|
|
171
|
-
declare function getActiveSpan(): Span | undefined;
|
|
171
|
+
export declare function getActiveSpan(): Span | undefined;
|
|
172
172
|
/**
|
|
173
173
|
* Get the currently active OpenTelemetry context
|
|
174
174
|
*
|
|
@@ -194,7 +194,7 @@ declare function getActiveSpan(): Span | undefined;
|
|
|
194
194
|
* // Headers now contain trace propagation data
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
|
-
declare function getActiveContext(): Context;
|
|
197
|
+
export declare function getActiveContext(): Context;
|
|
198
198
|
/**
|
|
199
199
|
* Run a function with a specific span set as active
|
|
200
200
|
*
|
|
@@ -239,7 +239,7 @@ declare function getActiveContext(): Context;
|
|
|
239
239
|
* span.end();
|
|
240
240
|
* ```
|
|
241
241
|
*/
|
|
242
|
-
declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
242
|
+
export declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
243
243
|
/**
|
|
244
244
|
* Finalize a span with appropriate status and optional error recording
|
|
245
245
|
*
|
|
@@ -304,7 +304,7 @@ declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
|
304
304
|
* }
|
|
305
305
|
* ```
|
|
306
306
|
*/
|
|
307
|
-
declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
307
|
+
export declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
308
308
|
/**
|
|
309
309
|
* Creates a deterministic trace ID from a seed string.
|
|
310
310
|
*
|
|
@@ -374,7 +374,7 @@ declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
|
374
374
|
*
|
|
375
375
|
* @public
|
|
376
376
|
*/
|
|
377
|
-
declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
377
|
+
export declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
378
378
|
/**
|
|
379
379
|
* Flattens nested metadata objects into dot-notation span attributes.
|
|
380
380
|
*
|
|
@@ -495,11 +495,10 @@ declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
|
495
495
|
* resolveTraceUrl('https://grafana.example.com/explore?traceId={traceId}', 'abc123')
|
|
496
496
|
* // => 'https://grafana.example.com/explore?traceId=abc123'
|
|
497
497
|
*/
|
|
498
|
-
declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
498
|
+
export declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
499
499
|
/** Flattened metadata: every leaf rendered as the string an attribute holds. */
|
|
500
|
-
interface FlatMetadata {
|
|
500
|
+
export interface FlatMetadata {
|
|
501
501
|
[key: string]: string;
|
|
502
502
|
}
|
|
503
|
-
declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
504
|
-
//#endregion
|
|
505
|
-
export { FlatMetadata, TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
|
503
|
+
export declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
504
|
+
//#endregion
|
package/dist/tracer-provider.cjs
CHANGED
|
@@ -185,6 +185,25 @@ function getAutotelTracerProvider() {
|
|
|
185
185
|
if (isolatedTracerProvider) return isolatedTracerProvider;
|
|
186
186
|
return _opentelemetry_api.trace.getTracerProvider();
|
|
187
187
|
}
|
|
188
|
+
/** The API's no-op provider: what an empty proxy delegates to. */
|
|
189
|
+
const NOOP_TRACER_PROVIDER = new _opentelemetry_api.ProxyTracerProvider().getDelegate();
|
|
190
|
+
/**
|
|
191
|
+
* True when something could record a span: an isolated provider set via
|
|
192
|
+
* setAutotelTracerProvider(), or a real provider registered globally (by
|
|
193
|
+
* autotel's init() or plain OpenTelemetry).
|
|
194
|
+
*
|
|
195
|
+
* The global provider is always a ProxyTracerProvider; it delegates to the
|
|
196
|
+
* API's no-op singleton until a provider is registered, so compare by identity
|
|
197
|
+
* (minifier-safe, unlike constructor names). A proxy from another copy of
|
|
198
|
+
* @opentelemetry/api only appears once something registered, so it counts.
|
|
199
|
+
*/
|
|
200
|
+
function hasTracerProvider() {
|
|
201
|
+
if (getGlobalState().isolatedTracerProvider) return true;
|
|
202
|
+
const provider = _opentelemetry_api.trace.getTracerProvider();
|
|
203
|
+
const getDelegate = require_values.asFunction(require_values.readProperty(provider, "getDelegate"));
|
|
204
|
+
if (!getDelegate) return true;
|
|
205
|
+
return getDelegate.call(provider) !== NOOP_TRACER_PROVIDER;
|
|
206
|
+
}
|
|
188
207
|
/** The candidate if it can be force-flushed, or undefined. */
|
|
189
208
|
function asForceFlushable(value) {
|
|
190
209
|
return require_values.isFunction(require_values.readProperty(value, "forceFlush")) ? value : void 0;
|
|
@@ -208,7 +227,7 @@ function getForceFlushableProvider(sdk) {
|
|
|
208
227
|
candidates.push(globalProvider);
|
|
209
228
|
const getDelegate = require_values.asFunction(require_values.readProperty(globalProvider, "getDelegate"));
|
|
210
229
|
if (getDelegate) candidates.push(getDelegate.call(globalProvider));
|
|
211
|
-
return candidates.map(asForceFlushable).find((found) => found !== void 0);
|
|
230
|
+
return candidates.map((candidate) => asForceFlushable(candidate)).find((found) => found !== void 0);
|
|
212
231
|
}
|
|
213
232
|
/**
|
|
214
233
|
* Gets the OpenTelemetry tracer instance for Autotel.
|
|
@@ -250,4 +269,5 @@ function getAutotelTracer(name = "autotel", version) {
|
|
|
250
269
|
exports.getAutotelTracer = getAutotelTracer;
|
|
251
270
|
exports.getAutotelTracerProvider = getAutotelTracerProvider;
|
|
252
271
|
exports.getForceFlushableProvider = getForceFlushableProvider;
|
|
272
|
+
exports.hasTracerProvider = hasTracerProvider;
|
|
253
273
|
exports.setAutotelTracerProvider = setAutotelTracerProvider;
|