autotel 7.2.0 → 7.4.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 +16 -14
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.js +1 -1
- package/dist/decorators.cjs +1 -1
- package/dist/decorators.js +1 -1
- package/dist/event.cjs +1 -1
- package/dist/event.js +1 -1
- package/dist/feature-flags.cjs +204 -0
- package/dist/feature-flags.d.cts +175 -0
- package/dist/feature-flags.d.ts +175 -0
- package/dist/feature-flags.js +198 -0
- package/dist/{functional-Doi0hFm3.js → functional-C4js2vTM.js} +5 -2
- package/dist/{functional-C925G95W.cjs → functional-DHlD7V0x.cjs} +5 -2
- package/dist/functional.cjs +1 -1
- package/dist/functional.js +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/{init-DzAdgcFM.js → init-CsKK9vZO.js} +22 -2
- package/dist/{init-aTZKsAwy.cjs → init-DmM7dprX.cjs} +27 -1
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.js +1 -1
- package/dist/messaging.cjs +2 -2
- package/dist/messaging.js +2 -2
- package/dist/sampling.cjs +1 -1
- package/dist/sampling.js +1 -1
- package/dist/semantic-helpers.cjs +1 -1
- package/dist/semantic-helpers.js +1 -1
- package/dist/tail-sampling-processor.cjs +1 -1
- package/dist/tail-sampling-processor.js +1 -1
- package/dist/testing.cjs +32 -0
- package/dist/testing.d.cts +26 -1
- package/dist/testing.d.ts +26 -1
- package/dist/testing.js +32 -1
- package/dist/webhook.cjs +1 -1
- package/dist/webhook.js +1 -1
- package/dist/workflow-distributed.cjs +1 -1
- package/dist/workflow-distributed.js +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.js +1 -1
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.js +1 -1
- package/package.json +6 -1
package/dist/testing.d.ts
CHANGED
|
@@ -2,7 +2,32 @@ import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
|
2
2
|
import { s as Logger } from "./logger-S1Fgl0g3.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
|
+
import { SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
5
6
|
import { Attributes, Link, SpanKind, SpanStatus, SpanStatusCode } from "@opentelemetry/api";
|
|
7
|
+
//#region src/memory-exporter.d.ts
|
|
8
|
+
/** One finished span, flattened to the fields an assertion usually wants. */
|
|
9
|
+
interface RecordedSpan {
|
|
10
|
+
name: string;
|
|
11
|
+
traceId: string;
|
|
12
|
+
spanId: string;
|
|
13
|
+
parentSpanId: string | undefined;
|
|
14
|
+
/** Wall-clock duration of the span, in milliseconds. */
|
|
15
|
+
durationMs: number;
|
|
16
|
+
attributes: Attributes;
|
|
17
|
+
status: SpanStatus;
|
|
18
|
+
}
|
|
19
|
+
interface MemoryExporter extends SpanExporter {
|
|
20
|
+
/** Every span exported so far, in the order it finished. */
|
|
21
|
+
spans(): RecordedSpan[];
|
|
22
|
+
/** The first span with this name, or undefined. */
|
|
23
|
+
findSpan(name: string): RecordedSpan | undefined;
|
|
24
|
+
/** Every span with this name. */
|
|
25
|
+
findSpans(name: string): RecordedSpan[];
|
|
26
|
+
/** Discard what has been collected. */
|
|
27
|
+
reset(): void;
|
|
28
|
+
}
|
|
29
|
+
declare function createMemoryExporter(): MemoryExporter;
|
|
30
|
+
//#endregion
|
|
6
31
|
//#region src/testing.d.ts
|
|
7
32
|
/**
|
|
8
33
|
* Note: OpenTelemetry exporters and processors have moved to dedicated modules
|
|
@@ -290,4 +315,4 @@ declare function getTraceDuration(collector: TraceCollector, operationName: stri
|
|
|
290
315
|
*/
|
|
291
316
|
declare function assertTraceDuration(collector: TraceCollector, operationName: string, maxDurationMs: number): void;
|
|
292
317
|
//#endregion
|
|
293
|
-
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, LogCollector, LogEntry, type SerializedSpan, SpanMatch, TestSpan, TestSpanCollector, TraceCollector, assertEventTracked, assertNoErrors, assertNoErrorsLogged, assertOutcomeTracked, assertTraceCreated, assertTraceDuration, assertTraceFailed, assertTraceSucceeded, createEventCollector, createMockLogger, createTraceCollector, getTraceDuration, serializeSpan, waitForTrace };
|
|
318
|
+
export { type EventCollector, type EventData, type EventsFunnelStep, type EventsOutcome, type EventsValue, LogCollector, LogEntry, type MemoryExporter, type RecordedSpan, type SerializedSpan, SpanMatch, TestSpan, TestSpanCollector, TraceCollector, assertEventTracked, assertNoErrors, assertNoErrorsLogged, assertOutcomeTracked, assertTraceCreated, assertTraceDuration, assertTraceFailed, assertTraceSucceeded, createEventCollector, createMemoryExporter, createMockLogger, createTraceCollector, getTraceDuration, serializeSpan, waitForTrace };
|
package/dist/testing.js
CHANGED
|
@@ -5,6 +5,37 @@ import { TestSpanCollector, serializeSpan } from "./test-span-collector.js";
|
|
|
5
5
|
import { SpanStatusCode, context, trace } from "@opentelemetry/api";
|
|
6
6
|
import * as nodeAsyncHooks from "node:async_hooks";
|
|
7
7
|
|
|
8
|
+
//#region src/memory-exporter.ts
|
|
9
|
+
function toRecordedSpan(span) {
|
|
10
|
+
return {
|
|
11
|
+
name: span.name,
|
|
12
|
+
traceId: span.spanContext().traceId,
|
|
13
|
+
spanId: span.spanContext().spanId,
|
|
14
|
+
parentSpanId: span.parentSpanContext?.spanId,
|
|
15
|
+
durationMs: span.duration[0] * 1e3 + span.duration[1] / 1e6,
|
|
16
|
+
attributes: { ...span.attributes },
|
|
17
|
+
status: span.status
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function createMemoryExporter() {
|
|
21
|
+
const collected = [];
|
|
22
|
+
return {
|
|
23
|
+
export(spans, resultCallback) {
|
|
24
|
+
for (const span of spans) collected.push(toRecordedSpan(span));
|
|
25
|
+
resultCallback({ code: 0 });
|
|
26
|
+
},
|
|
27
|
+
async shutdown() {},
|
|
28
|
+
async forceFlush() {},
|
|
29
|
+
spans: () => [...collected],
|
|
30
|
+
findSpan: (name) => collected.find((span) => span.name === name),
|
|
31
|
+
findSpans: (name) => collected.filter((span) => span.name === name),
|
|
32
|
+
reset: () => {
|
|
33
|
+
collected.length = 0;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
8
39
|
//#region src/testing.ts
|
|
9
40
|
/**
|
|
10
41
|
* Testing Utilities
|
|
@@ -466,4 +497,4 @@ function assertTraceDuration(collector, operationName, maxDurationMs) {
|
|
|
466
497
|
}
|
|
467
498
|
|
|
468
499
|
//#endregion
|
|
469
|
-
export { TestSpanCollector, assertEventTracked, assertNoErrors, assertNoErrorsLogged, assertOutcomeTracked, assertTraceCreated, assertTraceDuration, assertTraceFailed, assertTraceSucceeded, createEventCollector, createMockLogger, createTraceCollector, getTraceDuration, serializeSpan, waitForTrace };
|
|
500
|
+
export { TestSpanCollector, assertEventTracked, assertNoErrors, assertNoErrorsLogged, assertOutcomeTracked, assertTraceCreated, assertTraceDuration, assertTraceFailed, assertTraceSucceeded, createEventCollector, createMemoryExporter, createMockLogger, createTraceCollector, getTraceDuration, serializeSpan, waitForTrace };
|
package/dist/webhook.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_structured_error = require('./structured-error--_wXpd_C.cjs');
|
|
3
|
-
const require_functional = require('./functional-
|
|
3
|
+
const require_functional = require('./functional-DHlD7V0x.cjs');
|
|
4
4
|
const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
|
|
5
5
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
6
6
|
|
package/dist/webhook.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as recordStructuredError } from "./structured-error-YIuka-FE.js";
|
|
2
|
-
import { c as withTracing } from "./functional-
|
|
2
|
+
import { c as withTracing } from "./functional-C4js2vTM.js";
|
|
3
3
|
import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
|
|
4
4
|
import { SpanKind, trace } from "@opentelemetry/api";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_values = require('./values-DApyq53y.cjs');
|
|
3
|
-
const require_functional = require('./functional-
|
|
3
|
+
const require_functional = require('./functional-DHlD7V0x.cjs');
|
|
4
4
|
const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
|
|
5
5
|
const require_business_baggage = require('./business-baggage.cjs');
|
|
6
6
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as isFunction, x as toError } from "./values-BenyvWKz.js";
|
|
2
|
-
import { c as withTracing } from "./functional-
|
|
2
|
+
import { c as withTracing } from "./functional-C4js2vTM.js";
|
|
3
3
|
import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
|
|
4
4
|
import { createSafeBaggageSchema } from "./business-baggage.js";
|
|
5
5
|
import { SpanKind, context, propagation } from "@opentelemetry/api";
|
package/dist/workflow.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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-DApyq53y.cjs');
|
|
4
|
-
const require_functional = require('./functional-
|
|
4
|
+
const require_functional = require('./functional-DHlD7V0x.cjs');
|
|
5
5
|
const require_trace_helpers = require('./trace-helpers.cjs');
|
|
6
6
|
const require_correlated_events = require('./correlated-events-CcuknWnU.cjs');
|
|
7
7
|
const require_trace_factory_validation = require('./trace-factory-validation-Dc8epn87.cjs');
|
package/dist/workflow.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as toAttributeValue, g as nonEmptyString, h as isFunction, l as asString, s as asRecord, x as toError } from "./values-BenyvWKz.js";
|
|
2
|
-
import { c as withTracing } from "./functional-
|
|
2
|
+
import { c as withTracing } from "./functional-C4js2vTM.js";
|
|
3
3
|
import { getActiveSpan } from "./trace-helpers.js";
|
|
4
4
|
import { t as emitCorrelatedEvent } from "./correlated-events-DwMMbItg.js";
|
|
5
5
|
import { t as assertTraceFactory } from "./trace-factory-validation-BjVAinz6.js";
|
package/dist/yaml-config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_init = require('./init-
|
|
2
|
+
const require_init = require('./init-DmM7dprX.cjs');
|
|
3
3
|
|
|
4
4
|
exports.hasYamlConfig = require_init.hasYamlConfig;
|
|
5
5
|
exports.loadYamlConfig = require_init.loadYamlConfig;
|
package/dist/yaml-config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as loadYamlConfig, g as hasYamlConfig, v as loadYamlConfigFromFile } from "./init-CsKK9vZO.js";
|
|
2
2
|
|
|
3
3
|
export { hasYamlConfig, loadYamlConfig, loadYamlConfigFromFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Write Once, Observe Anywhere",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -258,6 +258,11 @@
|
|
|
258
258
|
"import": "./dist/drain-pipeline.js",
|
|
259
259
|
"require": "./dist/drain-pipeline.cjs"
|
|
260
260
|
},
|
|
261
|
+
"./feature-flags": {
|
|
262
|
+
"types": "./dist/feature-flags.d.ts",
|
|
263
|
+
"import": "./dist/feature-flags.js",
|
|
264
|
+
"require": "./dist/feature-flags.cjs"
|
|
265
|
+
},
|
|
261
266
|
"./evidence": {
|
|
262
267
|
"types": "./dist/evidence.d.ts",
|
|
263
268
|
"import": "./dist/evidence.js",
|