autotel 6.5.0 → 7.0.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 +30 -23
- package/dist/{attribute-redacting-processor-Pk7lAzWd.d.cts → attribute-redacting-processor-CvBE0z1p.d.cts} +33 -1
- package/dist/{attribute-redacting-processor-Pk7lAzWd.d.ts → attribute-redacting-processor-CvBE0z1p.d.ts} +33 -1
- package/dist/attribute-redacting-processor.cjs +34 -32
- package/dist/attribute-redacting-processor.d.cts +1 -1
- package/dist/attribute-redacting-processor.d.ts +1 -1
- package/dist/attribute-redacting-processor.js +35 -32
- package/dist/{attributes-aDmJYral.cjs → attributes-Cxys8tgr.cjs} +34 -35
- package/dist/{attributes-B7wix2VG.js → attributes-Dt4YUYbP.js} +34 -35
- package/dist/attributes.cjs +1 -1
- package/dist/attributes.d.cts +1 -1
- package/dist/attributes.d.ts +1 -1
- package/dist/attributes.js +1 -1
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/business-baggage.cjs +19 -12
- package/dist/business-baggage.d.cts +8 -3
- package/dist/business-baggage.d.ts +8 -3
- package/dist/business-baggage.js +19 -12
- package/dist/{canonical-log-line-processor-DxtBGZIi.cjs → canonical-log-line-processor-DolzdawH.cjs} +43 -32
- package/dist/{canonical-log-line-processor-B4WgG-VS.d.cts → canonical-log-line-processor-cPB4Axk-.d.ts} +4 -3
- package/dist/{canonical-log-line-processor-B0vq_QR6.js → canonical-log-line-processor-hFUmS__K.js} +43 -32
- package/dist/{canonical-log-line-processor-CL_J7gb5.d.ts → canonical-log-line-processor-l0Aqe6yp.d.cts} +4 -3
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{correlated-events-kSwLo3mi.cjs → correlated-events-CcuknWnU.cjs} +2 -1
- package/dist/{correlated-events-Bzh5y-UB.js → correlated-events-DwMMbItg.js} +3 -1
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.js +1 -1
- package/dist/db.cjs +34 -19
- package/dist/db.js +34 -19
- package/dist/decorators.cjs +4 -2
- package/dist/decorators.d.cts +16 -11
- package/dist/decorators.d.ts +16 -11
- package/dist/decorators.js +4 -2
- package/dist/{define-event-CGG048HE.d.cts → define-event-BNeuKUPv.d.cts} +1 -1
- package/dist/{define-event-B2z1SBe7.d.ts → define-event-Bd8f8mST.d.ts} +1 -1
- package/dist/diagnostics.cjs +18 -16
- package/dist/diagnostics.d.cts +14 -10
- package/dist/diagnostics.d.ts +14 -10
- package/dist/diagnostics.js +18 -16
- package/dist/{event-subscriber-CWh8sTGh.d.cts → event-subscriber-DMACQA-1.d.cts} +19 -9
- package/dist/{event-subscriber-CWh8sTGh.d.ts → event-subscriber-DMACQA-1.d.ts} +19 -9
- package/dist/event-subscriber.d.cts +2 -2
- package/dist/event-subscriber.d.ts +2 -2
- package/dist/{event-testing-D0qWfqAy.d.cts → event-testing-CBtnJXE5.d.cts} +1 -1
- package/dist/{event-testing-CA2mIx1E.d.ts → event-testing-CkPgV3Ii.d.ts} +1 -1
- package/dist/event-testing.d.cts +1 -1
- package/dist/event-testing.d.ts +1 -1
- package/dist/event.cjs +1 -1
- package/dist/event.d.cts +5 -5
- package/dist/event.d.ts +5 -5
- package/dist/event.js +1 -1
- package/dist/exception-fingerprint.cjs +133 -0
- package/dist/exception-fingerprint.d.cts +51 -0
- package/dist/exception-fingerprint.d.ts +51 -0
- package/dist/exception-fingerprint.js +126 -0
- package/dist/{functional-e6jw5zQj.d.cts → functional-CJn2zY4o.d.cts} +96 -39
- package/dist/{functional-AT22vCw6.d.ts → functional-DXy1cHFF.d.ts} +96 -39
- package/dist/{functional-C0uAZq2X.cjs → functional-Da6Yv64r.cjs} +27 -15
- package/dist/{functional-DX7Zvag0.js → functional-uSbNnnxK.js} +27 -15
- package/dist/functional.cjs +1 -1
- package/dist/functional.d.cts +2 -2
- package/dist/functional.d.ts +2 -2
- package/dist/functional.js +1 -1
- package/dist/http.cjs +11 -8
- package/dist/http.js +11 -8
- package/dist/{index-DolOVX6F.d.ts → index-CwrNAsgk.d.ts} +22 -26
- package/dist/{index-BPcxVucm.d.cts → index-DQHf4cNl.d.cts} +22 -26
- package/dist/index.cjs +41 -35
- package/dist/index.d.cts +45 -30
- package/dist/index.d.ts +45 -30
- package/dist/index.js +41 -35
- package/dist/{init-pPI3JRRf.d.ts → init-BgnYi2sm.d.ts} +6 -6
- package/dist/{init-CTtHITlX.cjs → init-D4m5rCmD.cjs} +110 -84
- package/dist/{init-ncTMKZ-s.d.cts → init-DrlL1eis.d.cts} +6 -6
- package/dist/{init-WHYwyItd.js → init-JtX-KKz_.js} +105 -85
- package/dist/instrumentation.cjs +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{logger-D3Ej3DII.js → logger-DdPp__xW.js} +63 -54
- package/dist/{logger-CN4xpzMd.d.cts → logger-S1Fgl0g3.d.cts} +0 -20
- package/dist/{logger-CN4xpzMd.d.ts → logger-S1Fgl0g3.d.ts} +0 -20
- package/dist/{logger-thMPLpOG.cjs → logger-Sm66cjKl.cjs} +63 -54
- package/dist/logger.cjs +1 -1
- package/dist/logger.d.cts +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +1 -1
- package/dist/messaging-adapters.cjs +26 -12
- package/dist/messaging-adapters.d.cts +0 -30
- package/dist/messaging-adapters.d.ts +0 -30
- package/dist/messaging-adapters.js +26 -12
- package/dist/messaging.cjs +37 -34
- package/dist/messaging.d.cts +21 -62
- package/dist/messaging.d.ts +21 -62
- package/dist/messaging.js +37 -34
- package/dist/{metric-testing-CpvP3ZIa.d.cts → metric-testing-86WO1wan.d.cts} +1 -1
- package/dist/{metric-testing-CWm6UhaR.d.ts → metric-testing-CbCxdPBp.d.ts} +1 -1
- package/dist/metric-testing.d.cts +1 -1
- package/dist/metric-testing.d.ts +1 -1
- package/dist/metric.d.cts +3 -3
- package/dist/metric.d.ts +3 -3
- package/dist/{node-require-vROmTeJ8.js → node-require-DSPjaw_l.js} +3 -2
- package/dist/{node-require-PFqDihze.cjs → node-require-EifOMikz.cjs} +3 -2
- package/dist/parse-error.cjs +18 -12
- package/dist/parse-error.d.cts +2 -1
- package/dist/parse-error.d.ts +2 -1
- package/dist/parse-error.js +19 -12
- package/dist/policy.cjs +0 -0
- package/dist/policy.js +0 -0
- package/dist/processors.cjs +1 -1
- package/dist/processors.d.cts +1 -1
- package/dist/processors.d.ts +1 -1
- package/dist/processors.js +1 -1
- package/dist/{sampling-BR9fkSwx.d.cts → sampling-CM5S2Lp3.d.ts} +5 -6
- package/dist/{sampling-CP3e7-Yr.d.ts → sampling-CmRdnXUi.d.cts} +5 -6
- package/dist/sampling.cjs +3 -2
- package/dist/sampling.d.cts +1 -1
- package/dist/sampling.d.ts +1 -1
- package/dist/sampling.js +3 -2
- package/dist/semantic-helpers.cjs +9 -9
- package/dist/semantic-helpers.d.cts +1 -1
- package/dist/semantic-helpers.d.ts +1 -1
- package/dist/semantic-helpers.js +9 -9
- package/dist/{stable-hash-ChFBIhNt.js → stable-hash-BkoAYVks.js} +4 -3
- package/dist/{stable-hash-CS9BxvVQ.cjs → stable-hash-C0pOegH_.cjs} +4 -3
- package/dist/{structured-error-CHg7DoIQ.cjs → structured-error--_wXpd_C.cjs} +34 -25
- package/dist/{structured-error-9--cxBay.js → structured-error-YIuka-FE.js} +34 -25
- package/dist/test-span-collector.cjs +15 -8
- package/dist/test-span-collector.js +15 -8
- package/dist/testing.cjs +16 -18
- package/dist/testing.d.cts +7 -6
- package/dist/testing.d.ts +7 -6
- package/dist/testing.js +16 -18
- package/dist/{trace-context-IuyoPyNq.d.cts → trace-context-C1Cn1q0y.d.cts} +8 -7
- package/dist/{trace-context-IuyoPyNq.d.ts → trace-context-f89xPJbK.d.ts} +8 -7
- package/dist/trace-helpers.cjs +16 -13
- package/dist/trace-helpers.d.cts +9 -4
- package/dist/trace-helpers.d.ts +9 -4
- package/dist/trace-helpers.js +16 -13
- package/dist/tracer-provider.cjs +8 -12
- package/dist/tracer-provider.js +8 -12
- package/dist/validate.cjs +22 -20
- package/dist/validate.d.cts +3 -2
- package/dist/validate.d.ts +3 -2
- package/dist/validate.js +22 -20
- package/dist/values-BenyvWKz.js +141 -0
- package/dist/values-CeMH-mYG.d.cts +8 -0
- package/dist/values-CeMH-mYG.d.ts +8 -0
- package/dist/values-DApyq53y.cjs +267 -0
- package/dist/webhook.cjs +3 -3
- package/dist/webhook.d.cts +1 -1
- package/dist/webhook.d.ts +1 -1
- package/dist/webhook.js +3 -3
- package/dist/workflow-distributed.cjs +9 -7
- package/dist/workflow-distributed.d.cts +9 -8
- package/dist/workflow-distributed.d.ts +9 -8
- package/dist/workflow-distributed.js +9 -7
- package/dist/workflow.cjs +26 -17
- package/dist/workflow.d.cts +1 -28
- package/dist/workflow.d.ts +1 -28
- package/dist/workflow.js +26 -17
- package/dist/yaml-config.cjs +26 -11
- package/dist/yaml-config.d.cts +9 -3
- package/dist/yaml-config.d.ts +9 -3
- package/dist/yaml-config.js +26 -11
- package/package.json +6 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_values = require('./values-DApyq53y.cjs');
|
|
2
3
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
3
4
|
|
|
4
5
|
//#region src/test-span-collector.ts
|
|
@@ -66,17 +67,23 @@ var TestSpanCollector = class {
|
|
|
66
67
|
function hrTimeToMs(hr) {
|
|
67
68
|
return hr[0] * 1e3 + hr[1] / 1e6;
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
/**
|
|
71
|
+
* An attribute value in the form that survives a round trip through JSON: a
|
|
72
|
+
* scalar, or a list whose entries are all the same kind of scalar. Anything
|
|
73
|
+
* else - a mixed list, an empty one - is left out of the serialized span.
|
|
74
|
+
*/
|
|
75
|
+
function asSerializable(value) {
|
|
76
|
+
const scalar = require_values.asScalar(value);
|
|
77
|
+
if (scalar !== void 0) return scalar;
|
|
78
|
+
if (!Array.isArray(value) || value.length === 0) return void 0;
|
|
79
|
+
return require_values.asStringArray(value) ?? require_values.asNumberArray(value) ?? require_values.asBooleanArray(value);
|
|
76
80
|
}
|
|
77
81
|
function serializeSpan(span) {
|
|
78
82
|
const attrs = {};
|
|
79
|
-
for (const [k, v] of Object.entries(span.attributes))
|
|
83
|
+
for (const [k, v] of Object.entries(span.attributes)) {
|
|
84
|
+
const serializable = asSerializable(v);
|
|
85
|
+
if (serializable !== void 0) attrs[k] = serializable;
|
|
86
|
+
}
|
|
80
87
|
return {
|
|
81
88
|
spanId: span.spanContext().spanId,
|
|
82
89
|
parentSpanId: span.parentSpanContext?.spanId || void 0,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as asNumberArray, c as asScalar, n as asBooleanArray, u as asStringArray } from "./values-BenyvWKz.js";
|
|
1
2
|
import { SpanStatusCode } from "@opentelemetry/api";
|
|
2
3
|
|
|
3
4
|
//#region src/test-span-collector.ts
|
|
@@ -65,17 +66,23 @@ var TestSpanCollector = class {
|
|
|
65
66
|
function hrTimeToMs(hr) {
|
|
66
67
|
return hr[0] * 1e3 + hr[1] / 1e6;
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
/**
|
|
70
|
+
* An attribute value in the form that survives a round trip through JSON: a
|
|
71
|
+
* scalar, or a list whose entries are all the same kind of scalar. Anything
|
|
72
|
+
* else - a mixed list, an empty one - is left out of the serialized span.
|
|
73
|
+
*/
|
|
74
|
+
function asSerializable(value) {
|
|
75
|
+
const scalar = asScalar(value);
|
|
76
|
+
if (scalar !== void 0) return scalar;
|
|
77
|
+
if (!Array.isArray(value) || value.length === 0) return void 0;
|
|
78
|
+
return asStringArray(value) ?? asNumberArray(value) ?? asBooleanArray(value);
|
|
75
79
|
}
|
|
76
80
|
function serializeSpan(span) {
|
|
77
81
|
const attrs = {};
|
|
78
|
-
for (const [k, v] of Object.entries(span.attributes))
|
|
82
|
+
for (const [k, v] of Object.entries(span.attributes)) {
|
|
83
|
+
const serializable = asSerializable(v);
|
|
84
|
+
if (serializable !== void 0) attrs[k] = serializable;
|
|
85
|
+
}
|
|
79
86
|
return {
|
|
80
87
|
spanId: span.spanContext().spanId,
|
|
81
88
|
parentSpanId: span.parentSpanContext?.spanId || void 0,
|
package/dist/testing.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_rolldown_runtime = require('./rolldown-runtime-C_NdSu1c.cjs');
|
|
3
|
+
const require_values = require('./values-DApyq53y.cjs');
|
|
3
4
|
const require_config = require('./config.cjs');
|
|
4
5
|
const require_event_testing = require('./event-testing.cjs');
|
|
5
6
|
const require_test_span_collector = require('./test-span-collector.cjs');
|
|
@@ -100,7 +101,7 @@ function createTraceCollector() {
|
|
|
100
101
|
return this;
|
|
101
102
|
},
|
|
102
103
|
addEvent(name, attributesOrStartTime, startTime) {
|
|
103
|
-
const attributes =
|
|
104
|
+
const attributes = require_values.asRecord(attributesOrStartTime);
|
|
104
105
|
spanData.events.push({
|
|
105
106
|
name,
|
|
106
107
|
attributes
|
|
@@ -149,14 +150,10 @@ function createTraceCollector() {
|
|
|
149
150
|
return createMockSpan(name, startTime, parent, options);
|
|
150
151
|
},
|
|
151
152
|
startActiveSpan(name, optionsOrFn, contextOrFn, fn) {
|
|
152
|
-
const callback =
|
|
153
|
-
|
|
154
|
-
if (typeof contextOrFn === "function") return contextOrFn;
|
|
155
|
-
if (fn) return fn;
|
|
156
|
-
throw new Error("startActiveSpan requires a callback");
|
|
157
|
-
})();
|
|
153
|
+
const callback = typeof optionsOrFn === "function" ? optionsOrFn : typeof contextOrFn === "function" ? contextOrFn : fn;
|
|
154
|
+
if (!callback) throw new Error("startActiveSpan requires a callback");
|
|
158
155
|
const startTime = performance.now();
|
|
159
|
-
const suppliedContext = typeof optionsOrFn === "function"
|
|
156
|
+
const suppliedContext = typeof optionsOrFn === "function" || typeof contextOrFn === "function" || contextOrFn === void 0 ? _opentelemetry_api.context.active() : contextOrFn;
|
|
160
157
|
const parent = _opentelemetry_api.trace.getSpan(suppliedContext)?.spanContext() ?? activeMockSpanStorage.getStore()?.spanContext();
|
|
161
158
|
const mockSpan = createMockSpan(name, startTime, parent, typeof optionsOrFn === "function" ? void 0 : optionsOrFn);
|
|
162
159
|
const ctx = _opentelemetry_api.trace.setSpan(suppliedContext, mockSpan);
|
|
@@ -329,15 +326,15 @@ function createMockLogger() {
|
|
|
329
326
|
const logs = [];
|
|
330
327
|
const createLogMethod = (level) => {
|
|
331
328
|
return (objOrMsg, msg) => {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
message: objOrMsg,
|
|
335
|
-
extra: void 0
|
|
336
|
-
});
|
|
337
|
-
else logs.push({
|
|
329
|
+
const message = require_values.asString(objOrMsg);
|
|
330
|
+
logs.push(message === void 0 ? {
|
|
338
331
|
level,
|
|
339
332
|
message: msg || "",
|
|
340
|
-
extra: objOrMsg
|
|
333
|
+
extra: require_values.asRecord(objOrMsg)
|
|
334
|
+
} : {
|
|
335
|
+
level,
|
|
336
|
+
message,
|
|
337
|
+
extra: void 0
|
|
341
338
|
});
|
|
342
339
|
};
|
|
343
340
|
};
|
|
@@ -346,16 +343,17 @@ function createMockLogger() {
|
|
|
346
343
|
warn: createLogMethod("warn"),
|
|
347
344
|
debug: createLogMethod("debug"),
|
|
348
345
|
error(objOrMsg, msg) {
|
|
349
|
-
|
|
346
|
+
const message = require_values.asString(objOrMsg);
|
|
347
|
+
if (message !== void 0) {
|
|
350
348
|
logs.push({
|
|
351
349
|
level: "error",
|
|
352
|
-
message
|
|
350
|
+
message,
|
|
353
351
|
extra: void 0,
|
|
354
352
|
error: void 0
|
|
355
353
|
});
|
|
356
354
|
return;
|
|
357
355
|
}
|
|
358
|
-
const { err, ...rest } = objOrMsg;
|
|
356
|
+
const { err, ...rest } = require_values.asRecord(objOrMsg) ?? {};
|
|
359
357
|
logs.push({
|
|
360
358
|
level: "error",
|
|
361
359
|
message: msg || "",
|
package/dist/testing.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
|
|
2
|
+
import { s as Logger } from "./logger-S1Fgl0g3.cjs";
|
|
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";
|
|
3
4
|
import { SerializedSpan, TestSpanCollector, serializeSpan } from "./test-span-collector.cjs";
|
|
4
5
|
import { Attributes, Link, SpanKind, SpanStatus, SpanStatusCode } from "@opentelemetry/api";
|
|
5
6
|
//#region src/testing.d.ts
|
|
@@ -60,7 +61,7 @@ interface SpanMatch {
|
|
|
60
61
|
spanId?: string;
|
|
61
62
|
parentSpanId?: string;
|
|
62
63
|
kind?: SpanKind;
|
|
63
|
-
attributes?:
|
|
64
|
+
attributes?: Attributes;
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* In-memory trace collector for testing
|
|
@@ -71,7 +72,7 @@ interface TraceCollector {
|
|
|
71
72
|
/** Get spans matching a name */
|
|
72
73
|
getSpansByName(name: string): TestSpan[];
|
|
73
74
|
/** Get spans matching attributes */
|
|
74
|
-
getSpansByAttributes(attributes:
|
|
75
|
+
getSpansByAttributes(attributes: Attributes): TestSpan[];
|
|
75
76
|
/** Get spans belonging to a trace */
|
|
76
77
|
getSpansByTraceId(traceId: string): TestSpan[];
|
|
77
78
|
/** Get spans without a recorded parent */
|
|
@@ -135,7 +136,7 @@ declare function assertTraceCreated(collector: TraceCollector, operationName: st
|
|
|
135
136
|
minCount?: number;
|
|
136
137
|
maxCount?: number;
|
|
137
138
|
status?: SpanStatusCode;
|
|
138
|
-
attributes?:
|
|
139
|
+
attributes?: Attributes;
|
|
139
140
|
}): void;
|
|
140
141
|
/**
|
|
141
142
|
* Assert that no errors were logged
|
|
@@ -199,7 +200,7 @@ interface LogCollector {
|
|
|
199
200
|
interface LogEntry {
|
|
200
201
|
level: 'info' | 'warn' | 'error' | 'debug';
|
|
201
202
|
message: string;
|
|
202
|
-
extra?:
|
|
203
|
+
extra?: UnknownRecord;
|
|
203
204
|
error?: Error;
|
|
204
205
|
}
|
|
205
206
|
/**
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
2
|
+
import { s as Logger } from "./logger-S1Fgl0g3.js";
|
|
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";
|
|
3
4
|
import { SerializedSpan, TestSpanCollector, serializeSpan } from "./test-span-collector.js";
|
|
4
5
|
import { Attributes, Link, SpanKind, SpanStatus, SpanStatusCode } from "@opentelemetry/api";
|
|
5
6
|
//#region src/testing.d.ts
|
|
@@ -60,7 +61,7 @@ interface SpanMatch {
|
|
|
60
61
|
spanId?: string;
|
|
61
62
|
parentSpanId?: string;
|
|
62
63
|
kind?: SpanKind;
|
|
63
|
-
attributes?:
|
|
64
|
+
attributes?: Attributes;
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* In-memory trace collector for testing
|
|
@@ -71,7 +72,7 @@ interface TraceCollector {
|
|
|
71
72
|
/** Get spans matching a name */
|
|
72
73
|
getSpansByName(name: string): TestSpan[];
|
|
73
74
|
/** Get spans matching attributes */
|
|
74
|
-
getSpansByAttributes(attributes:
|
|
75
|
+
getSpansByAttributes(attributes: Attributes): TestSpan[];
|
|
75
76
|
/** Get spans belonging to a trace */
|
|
76
77
|
getSpansByTraceId(traceId: string): TestSpan[];
|
|
77
78
|
/** Get spans without a recorded parent */
|
|
@@ -135,7 +136,7 @@ declare function assertTraceCreated(collector: TraceCollector, operationName: st
|
|
|
135
136
|
minCount?: number;
|
|
136
137
|
maxCount?: number;
|
|
137
138
|
status?: SpanStatusCode;
|
|
138
|
-
attributes?:
|
|
139
|
+
attributes?: Attributes;
|
|
139
140
|
}): void;
|
|
140
141
|
/**
|
|
141
142
|
* Assert that no errors were logged
|
|
@@ -199,7 +200,7 @@ interface LogCollector {
|
|
|
199
200
|
interface LogEntry {
|
|
200
201
|
level: 'info' | 'warn' | 'error' | 'debug';
|
|
201
202
|
message: string;
|
|
202
|
-
extra?:
|
|
203
|
+
extra?: UnknownRecord;
|
|
203
204
|
error?: Error;
|
|
204
205
|
}
|
|
205
206
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { l as asString, s as asRecord } from "./values-BenyvWKz.js";
|
|
1
2
|
import { configure } from "./config.js";
|
|
2
3
|
import { assertEventTracked, assertOutcomeTracked, createEventCollector } from "./event-testing.js";
|
|
3
4
|
import { TestSpanCollector, serializeSpan } from "./test-span-collector.js";
|
|
@@ -97,7 +98,7 @@ function createTraceCollector() {
|
|
|
97
98
|
return this;
|
|
98
99
|
},
|
|
99
100
|
addEvent(name, attributesOrStartTime, startTime) {
|
|
100
|
-
const attributes =
|
|
101
|
+
const attributes = asRecord(attributesOrStartTime);
|
|
101
102
|
spanData.events.push({
|
|
102
103
|
name,
|
|
103
104
|
attributes
|
|
@@ -146,14 +147,10 @@ function createTraceCollector() {
|
|
|
146
147
|
return createMockSpan(name, startTime, parent, options);
|
|
147
148
|
},
|
|
148
149
|
startActiveSpan(name, optionsOrFn, contextOrFn, fn) {
|
|
149
|
-
const callback =
|
|
150
|
-
|
|
151
|
-
if (typeof contextOrFn === "function") return contextOrFn;
|
|
152
|
-
if (fn) return fn;
|
|
153
|
-
throw new Error("startActiveSpan requires a callback");
|
|
154
|
-
})();
|
|
150
|
+
const callback = typeof optionsOrFn === "function" ? optionsOrFn : typeof contextOrFn === "function" ? contextOrFn : fn;
|
|
151
|
+
if (!callback) throw new Error("startActiveSpan requires a callback");
|
|
155
152
|
const startTime = performance.now();
|
|
156
|
-
const suppliedContext = typeof optionsOrFn === "function"
|
|
153
|
+
const suppliedContext = typeof optionsOrFn === "function" || typeof contextOrFn === "function" || contextOrFn === void 0 ? context.active() : contextOrFn;
|
|
157
154
|
const parent = trace.getSpan(suppliedContext)?.spanContext() ?? activeMockSpanStorage.getStore()?.spanContext();
|
|
158
155
|
const mockSpan = createMockSpan(name, startTime, parent, typeof optionsOrFn === "function" ? void 0 : optionsOrFn);
|
|
159
156
|
const ctx = trace.setSpan(suppliedContext, mockSpan);
|
|
@@ -326,15 +323,15 @@ function createMockLogger() {
|
|
|
326
323
|
const logs = [];
|
|
327
324
|
const createLogMethod = (level) => {
|
|
328
325
|
return (objOrMsg, msg) => {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
message: objOrMsg,
|
|
332
|
-
extra: void 0
|
|
333
|
-
});
|
|
334
|
-
else logs.push({
|
|
326
|
+
const message = asString(objOrMsg);
|
|
327
|
+
logs.push(message === void 0 ? {
|
|
335
328
|
level,
|
|
336
329
|
message: msg || "",
|
|
337
|
-
extra: objOrMsg
|
|
330
|
+
extra: asRecord(objOrMsg)
|
|
331
|
+
} : {
|
|
332
|
+
level,
|
|
333
|
+
message,
|
|
334
|
+
extra: void 0
|
|
338
335
|
});
|
|
339
336
|
};
|
|
340
337
|
};
|
|
@@ -343,16 +340,17 @@ function createMockLogger() {
|
|
|
343
340
|
warn: createLogMethod("warn"),
|
|
344
341
|
debug: createLogMethod("debug"),
|
|
345
342
|
error(objOrMsg, msg) {
|
|
346
|
-
|
|
343
|
+
const message = asString(objOrMsg);
|
|
344
|
+
if (message !== void 0) {
|
|
347
345
|
logs.push({
|
|
348
346
|
level: "error",
|
|
349
|
-
message
|
|
347
|
+
message,
|
|
350
348
|
extra: void 0,
|
|
351
349
|
error: void 0
|
|
352
350
|
});
|
|
353
351
|
return;
|
|
354
352
|
}
|
|
355
|
-
const { err, ...rest } = objOrMsg;
|
|
353
|
+
const { err, ...rest } = asRecord(objOrMsg) ?? {};
|
|
356
354
|
logs.push({
|
|
357
355
|
level: "error",
|
|
358
356
|
message: msg || "",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
|
|
1
2
|
import { AttributeValue, Attributes, BaggageEntry, Context, Link, Span, SpanStatusCode } from "@opentelemetry/api";
|
|
2
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
4
|
//#region src/trace-context.d.ts
|
|
@@ -44,21 +45,21 @@ interface SpanMethods {
|
|
|
44
45
|
* Replaces the deprecated `recordException` (OTEP 4430). Accepts `unknown`
|
|
45
46
|
* so it can be called directly with the value caught from a `catch` block.
|
|
46
47
|
*/
|
|
47
|
-
recordError(
|
|
48
|
+
recordError(cause: unknown): void;
|
|
48
49
|
/**
|
|
49
50
|
* Emit a tracked event correlated to this span. Equivalent to the standalone
|
|
50
51
|
* `track(event, data)` but reads naturally on `ctx`. Replaces the deprecated
|
|
51
52
|
* `ctx.addEvent` (OTEP 4430) — events become correlated logs rather than
|
|
52
53
|
* span events.
|
|
53
54
|
*/
|
|
54
|
-
track<Events extends
|
|
55
|
+
track<Events extends UnknownRecord = UnknownRecord>(event: keyof Events & string, data?: Events[keyof Events & string]): void;
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Baggage methods available on trace context
|
|
58
59
|
*
|
|
59
60
|
* @template TBaggage - Optional type for typed baggage (defaults to undefined for untyped)
|
|
60
61
|
*/
|
|
61
|
-
interface BaggageMethods<TBaggage extends
|
|
62
|
+
interface BaggageMethods<TBaggage extends UnknownRecord | undefined = undefined> {
|
|
62
63
|
/**
|
|
63
64
|
* Get a baggage entry by key
|
|
64
65
|
* @param key - Baggage key
|
|
@@ -104,14 +105,14 @@ interface BaggageMethods<TBaggage extends Record<string, unknown> | undefined =
|
|
|
104
105
|
*
|
|
105
106
|
* @internal
|
|
106
107
|
*/
|
|
107
|
-
getTypedBaggage?: TBaggage extends
|
|
108
|
+
getTypedBaggage?: TBaggage extends UnknownRecord ? <T extends TBaggage>(namespace?: string) => Partial<T> | undefined : never;
|
|
108
109
|
/**
|
|
109
110
|
* Set typed baggage (only available when TBaggage is defined)
|
|
110
111
|
* This is used internally by defineBaggageSchema()
|
|
111
112
|
*
|
|
112
113
|
* @internal
|
|
113
114
|
*/
|
|
114
|
-
setTypedBaggage?: TBaggage extends
|
|
115
|
+
setTypedBaggage?: TBaggage extends UnknownRecord ? <T extends TBaggage>(namespace: string | undefined, value: Partial<T>) => void : never;
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* Complete trace context that merges base context, span methods, and baggage methods
|
|
@@ -140,7 +141,7 @@ interface BaggageMethods<TBaggage extends Record<string, unknown> | undefined =
|
|
|
140
141
|
* });
|
|
141
142
|
* ```
|
|
142
143
|
*/
|
|
143
|
-
type TraceContext<TBaggage extends
|
|
144
|
+
type TraceContext<TBaggage extends UnknownRecord | undefined = undefined> = TraceContextBase & SpanMethods & BaggageMethods<TBaggage>;
|
|
144
145
|
/**
|
|
145
146
|
* Define a typed baggage schema for type-safe baggage operations
|
|
146
147
|
*
|
|
@@ -179,7 +180,7 @@ type TraceContext<TBaggage extends Record<string, unknown> | undefined = undefin
|
|
|
179
180
|
* });
|
|
180
181
|
* ```
|
|
181
182
|
*/
|
|
182
|
-
declare function defineBaggageSchema<T extends
|
|
183
|
+
declare function defineBaggageSchema<T extends UnknownRecord>(namespace?: string): {
|
|
183
184
|
/**
|
|
184
185
|
* Get typed baggage from context
|
|
185
186
|
* @param ctx - Trace context
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
1
2
|
import { AttributeValue, Attributes, BaggageEntry, Context, Link, Span, SpanStatusCode } from "@opentelemetry/api";
|
|
2
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
4
|
//#region src/trace-context.d.ts
|
|
@@ -44,21 +45,21 @@ interface SpanMethods {
|
|
|
44
45
|
* Replaces the deprecated `recordException` (OTEP 4430). Accepts `unknown`
|
|
45
46
|
* so it can be called directly with the value caught from a `catch` block.
|
|
46
47
|
*/
|
|
47
|
-
recordError(
|
|
48
|
+
recordError(cause: unknown): void;
|
|
48
49
|
/**
|
|
49
50
|
* Emit a tracked event correlated to this span. Equivalent to the standalone
|
|
50
51
|
* `track(event, data)` but reads naturally on `ctx`. Replaces the deprecated
|
|
51
52
|
* `ctx.addEvent` (OTEP 4430) — events become correlated logs rather than
|
|
52
53
|
* span events.
|
|
53
54
|
*/
|
|
54
|
-
track<Events extends
|
|
55
|
+
track<Events extends UnknownRecord = UnknownRecord>(event: keyof Events & string, data?: Events[keyof Events & string]): void;
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Baggage methods available on trace context
|
|
58
59
|
*
|
|
59
60
|
* @template TBaggage - Optional type for typed baggage (defaults to undefined for untyped)
|
|
60
61
|
*/
|
|
61
|
-
interface BaggageMethods<TBaggage extends
|
|
62
|
+
interface BaggageMethods<TBaggage extends UnknownRecord | undefined = undefined> {
|
|
62
63
|
/**
|
|
63
64
|
* Get a baggage entry by key
|
|
64
65
|
* @param key - Baggage key
|
|
@@ -104,14 +105,14 @@ interface BaggageMethods<TBaggage extends Record<string, unknown> | undefined =
|
|
|
104
105
|
*
|
|
105
106
|
* @internal
|
|
106
107
|
*/
|
|
107
|
-
getTypedBaggage?: TBaggage extends
|
|
108
|
+
getTypedBaggage?: TBaggage extends UnknownRecord ? <T extends TBaggage>(namespace?: string) => Partial<T> | undefined : never;
|
|
108
109
|
/**
|
|
109
110
|
* Set typed baggage (only available when TBaggage is defined)
|
|
110
111
|
* This is used internally by defineBaggageSchema()
|
|
111
112
|
*
|
|
112
113
|
* @internal
|
|
113
114
|
*/
|
|
114
|
-
setTypedBaggage?: TBaggage extends
|
|
115
|
+
setTypedBaggage?: TBaggage extends UnknownRecord ? <T extends TBaggage>(namespace: string | undefined, value: Partial<T>) => void : never;
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* Complete trace context that merges base context, span methods, and baggage methods
|
|
@@ -140,7 +141,7 @@ interface BaggageMethods<TBaggage extends Record<string, unknown> | undefined =
|
|
|
140
141
|
* });
|
|
141
142
|
* ```
|
|
142
143
|
*/
|
|
143
|
-
type TraceContext<TBaggage extends
|
|
144
|
+
type TraceContext<TBaggage extends UnknownRecord | undefined = undefined> = TraceContextBase & SpanMethods & BaggageMethods<TBaggage>;
|
|
144
145
|
/**
|
|
145
146
|
* Define a typed baggage schema for type-safe baggage operations
|
|
146
147
|
*
|
|
@@ -179,7 +180,7 @@ type TraceContext<TBaggage extends Record<string, unknown> | undefined = undefin
|
|
|
179
180
|
* });
|
|
180
181
|
* ```
|
|
181
182
|
*/
|
|
182
|
-
declare function defineBaggageSchema<T extends
|
|
183
|
+
declare function defineBaggageSchema<T extends UnknownRecord>(namespace?: string): {
|
|
183
184
|
/**
|
|
184
185
|
* Get typed baggage from context
|
|
185
186
|
* @param ctx - Trace context
|
package/dist/trace-helpers.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_values = require('./values-DApyq53y.cjs');
|
|
3
|
+
const require_node_require = require('./node-require-EifOMikz.cjs');
|
|
3
4
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
4
5
|
|
|
5
6
|
//#region src/trace-helpers.ts
|
|
@@ -379,10 +380,9 @@ function runWithSpan(span, fn) {
|
|
|
379
380
|
* }
|
|
380
381
|
* ```
|
|
381
382
|
*/
|
|
382
|
-
function finalizeSpan(span,
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
-
else span.recordException(new Error(String(error)));
|
|
383
|
+
function finalizeSpan(span, cause) {
|
|
384
|
+
if (cause) {
|
|
385
|
+
span.recordException(require_values.toError(cause));
|
|
386
386
|
span.setStatus({ code: _opentelemetry_api.SpanStatusCode.ERROR });
|
|
387
387
|
} else span.setStatus({ code: _opentelemetry_api.SpanStatusCode.OK });
|
|
388
388
|
span.end();
|
|
@@ -593,21 +593,24 @@ function flattenMetadata(metadata, prefix = "metadata") {
|
|
|
593
593
|
for (const [key, value] of Object.entries(obj)) {
|
|
594
594
|
if (value == null) continue;
|
|
595
595
|
const attributeKey = `${currentPrefix}.${key}`;
|
|
596
|
-
|
|
597
|
-
|
|
596
|
+
const text = require_values.asString(value);
|
|
597
|
+
if (text !== void 0) {
|
|
598
|
+
flattened[attributeKey] = text;
|
|
598
599
|
continue;
|
|
599
600
|
}
|
|
600
|
-
|
|
601
|
-
|
|
601
|
+
const scalar = require_values.asNumber(value) ?? require_values.asBoolean(value);
|
|
602
|
+
if (scalar !== void 0) {
|
|
603
|
+
flattened[attributeKey] = String(scalar);
|
|
602
604
|
continue;
|
|
603
605
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
+
const nested = require_values.asPlainRecord(value);
|
|
607
|
+
if (nested !== void 0) {
|
|
608
|
+
if (seen.has(nested)) {
|
|
606
609
|
flattened[attributeKey] = "<circular-reference>";
|
|
607
610
|
continue;
|
|
608
611
|
}
|
|
609
|
-
seen.add(
|
|
610
|
-
flatten(
|
|
612
|
+
seen.add(nested);
|
|
613
|
+
flatten(nested, attributeKey);
|
|
611
614
|
continue;
|
|
612
615
|
}
|
|
613
616
|
try {
|
package/dist/trace-helpers.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.cjs";
|
|
1
2
|
import { Context, Span, Tracer } from "@opentelemetry/api";
|
|
2
3
|
//#region src/trace-helpers.d.ts
|
|
3
4
|
/**
|
|
@@ -78,7 +79,7 @@ declare function getTraceContext(): TraceContext | null;
|
|
|
78
79
|
* // { userId: '123' } - no trace fields added
|
|
79
80
|
* ```
|
|
80
81
|
*/
|
|
81
|
-
declare function enrichWithTraceContext<T extends
|
|
82
|
+
declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
82
83
|
/**
|
|
83
84
|
* Check if currently in a trace context
|
|
84
85
|
*
|
|
@@ -303,7 +304,7 @@ declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
|
303
304
|
* }
|
|
304
305
|
* ```
|
|
305
306
|
*/
|
|
306
|
-
declare function finalizeSpan(span: Span,
|
|
307
|
+
declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
307
308
|
/**
|
|
308
309
|
* Creates a deterministic trace ID from a seed string.
|
|
309
310
|
*
|
|
@@ -495,6 +496,10 @@ declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
|
495
496
|
* // => 'https://grafana.example.com/explore?traceId=abc123'
|
|
496
497
|
*/
|
|
497
498
|
declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
498
|
-
|
|
499
|
+
/** Flattened metadata: every leaf rendered as the string an attribute holds. */
|
|
500
|
+
interface FlatMetadata {
|
|
501
|
+
[key: string]: string;
|
|
502
|
+
}
|
|
503
|
+
declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
499
504
|
//#endregion
|
|
500
|
-
export { TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
|
505
|
+
export { FlatMetadata, TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
package/dist/trace-helpers.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as UnknownRecord } from "./values-CeMH-mYG.js";
|
|
1
2
|
import { Context, Span, Tracer } from "@opentelemetry/api";
|
|
2
3
|
//#region src/trace-helpers.d.ts
|
|
3
4
|
/**
|
|
@@ -78,7 +79,7 @@ declare function getTraceContext(): TraceContext | null;
|
|
|
78
79
|
* // { userId: '123' } - no trace fields added
|
|
79
80
|
* ```
|
|
80
81
|
*/
|
|
81
|
-
declare function enrichWithTraceContext<T extends
|
|
82
|
+
declare function enrichWithTraceContext<T extends UnknownRecord>(obj: T): T;
|
|
82
83
|
/**
|
|
83
84
|
* Check if currently in a trace context
|
|
84
85
|
*
|
|
@@ -303,7 +304,7 @@ declare function runWithSpan<T>(span: Span, fn: () => T): T;
|
|
|
303
304
|
* }
|
|
304
305
|
* ```
|
|
305
306
|
*/
|
|
306
|
-
declare function finalizeSpan(span: Span,
|
|
307
|
+
declare function finalizeSpan(span: Span, cause?: unknown): void;
|
|
307
308
|
/**
|
|
308
309
|
* Creates a deterministic trace ID from a seed string.
|
|
309
310
|
*
|
|
@@ -495,6 +496,10 @@ declare function createDeterministicTraceId(seed: string): Promise<string>;
|
|
|
495
496
|
* // => 'https://grafana.example.com/explore?traceId=abc123'
|
|
496
497
|
*/
|
|
497
498
|
declare function resolveTraceUrl(template: string | undefined, traceId: string): string | undefined;
|
|
498
|
-
|
|
499
|
+
/** Flattened metadata: every leaf rendered as the string an attribute holds. */
|
|
500
|
+
interface FlatMetadata {
|
|
501
|
+
[key: string]: string;
|
|
502
|
+
}
|
|
503
|
+
declare function flattenMetadata(metadata: UnknownRecord, prefix?: string): FlatMetadata;
|
|
499
504
|
//#endregion
|
|
500
|
-
export { TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
|
505
|
+
export { FlatMetadata, TraceContext, createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan, setSpanName };
|
package/dist/trace-helpers.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { i as asNumber, l as asString, o as asPlainRecord, t as asBoolean, x as toError } from "./values-BenyvWKz.js";
|
|
2
|
+
import { t as requireModule } from "./node-require-DSPjaw_l.js";
|
|
2
3
|
import { SpanStatusCode, context, trace } from "@opentelemetry/api";
|
|
3
4
|
|
|
4
5
|
//#region src/trace-helpers.ts
|
|
@@ -378,10 +379,9 @@ function runWithSpan(span, fn) {
|
|
|
378
379
|
* }
|
|
379
380
|
* ```
|
|
380
381
|
*/
|
|
381
|
-
function finalizeSpan(span,
|
|
382
|
-
if (
|
|
383
|
-
|
|
384
|
-
else span.recordException(new Error(String(error)));
|
|
382
|
+
function finalizeSpan(span, cause) {
|
|
383
|
+
if (cause) {
|
|
384
|
+
span.recordException(toError(cause));
|
|
385
385
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
386
386
|
} else span.setStatus({ code: SpanStatusCode.OK });
|
|
387
387
|
span.end();
|
|
@@ -592,21 +592,24 @@ function flattenMetadata(metadata, prefix = "metadata") {
|
|
|
592
592
|
for (const [key, value] of Object.entries(obj)) {
|
|
593
593
|
if (value == null) continue;
|
|
594
594
|
const attributeKey = `${currentPrefix}.${key}`;
|
|
595
|
-
|
|
596
|
-
|
|
595
|
+
const text = asString(value);
|
|
596
|
+
if (text !== void 0) {
|
|
597
|
+
flattened[attributeKey] = text;
|
|
597
598
|
continue;
|
|
598
599
|
}
|
|
599
|
-
|
|
600
|
-
|
|
600
|
+
const scalar = asNumber(value) ?? asBoolean(value);
|
|
601
|
+
if (scalar !== void 0) {
|
|
602
|
+
flattened[attributeKey] = String(scalar);
|
|
601
603
|
continue;
|
|
602
604
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
+
const nested = asPlainRecord(value);
|
|
606
|
+
if (nested !== void 0) {
|
|
607
|
+
if (seen.has(nested)) {
|
|
605
608
|
flattened[attributeKey] = "<circular-reference>";
|
|
606
609
|
continue;
|
|
607
610
|
}
|
|
608
|
-
seen.add(
|
|
609
|
-
flatten(
|
|
611
|
+
seen.add(nested);
|
|
612
|
+
flatten(nested, attributeKey);
|
|
610
613
|
continue;
|
|
611
614
|
}
|
|
612
615
|
try {
|