autotel 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto.cjs +5 -5
- package/dist/auto.js +3 -3
- package/dist/{chunk-BGAR6MCX.cjs → chunk-2GIBANLB.cjs} +4 -4
- package/dist/{chunk-BGAR6MCX.cjs.map → chunk-2GIBANLB.cjs.map} +1 -1
- package/dist/{chunk-ISEHXVMD.cjs → chunk-45B2GD4P.cjs} +16 -16
- package/dist/{chunk-ISEHXVMD.cjs.map → chunk-45B2GD4P.cjs.map} +1 -1
- package/dist/{chunk-5GQOWMEY.js → chunk-52ALHU7T.js} +3 -3
- package/dist/{chunk-5GQOWMEY.js.map → chunk-52ALHU7T.js.map} +1 -1
- package/dist/{chunk-7NDHLHZK.js → chunk-643PQG3Y.js} +3 -3
- package/dist/{chunk-7NDHLHZK.js.map → chunk-643PQG3Y.js.map} +1 -1
- package/dist/{chunk-TDJXVXM4.js → chunk-6TFJF7SS.js} +3 -3
- package/dist/{chunk-TDJXVXM4.js.map → chunk-6TFJF7SS.js.map} +1 -1
- package/dist/{chunk-ZUOASZED.cjs → chunk-6X2GG65S.cjs} +5 -5
- package/dist/{chunk-ZUOASZED.cjs.map → chunk-6X2GG65S.cjs.map} +1 -1
- package/dist/{chunk-BTEPYWDF.cjs → chunk-FEEVB2GV.cjs} +4 -4
- package/dist/{chunk-BTEPYWDF.cjs.map → chunk-FEEVB2GV.cjs.map} +1 -1
- package/dist/{chunk-IC4AZUGC.js → chunk-FTBBBPT6.js} +3 -3
- package/dist/{chunk-IC4AZUGC.js.map → chunk-FTBBBPT6.js.map} +1 -1
- package/dist/{chunk-MBEHEGQE.js → chunk-HLZ7H3VZ.js} +3 -3
- package/dist/{chunk-MBEHEGQE.js.map → chunk-HLZ7H3VZ.js.map} +1 -1
- package/dist/{chunk-EQIY6C3X.cjs → chunk-HR5YFXZW.cjs} +5 -3
- package/dist/chunk-HR5YFXZW.cjs.map +1 -0
- package/dist/{chunk-H5P4ZTCX.cjs → chunk-KPDIEVVV.cjs} +36 -36
- package/dist/{chunk-H5P4ZTCX.cjs.map → chunk-KPDIEVVV.cjs.map} +1 -1
- package/dist/{chunk-KPNV2GPW.js → chunk-KVDA4HX2.js} +5 -3
- package/dist/chunk-KVDA4HX2.js.map +1 -0
- package/dist/{chunk-KAELJC6T.cjs → chunk-LIYNUGML.cjs} +13 -13
- package/dist/{chunk-KAELJC6T.cjs.map → chunk-LIYNUGML.cjs.map} +1 -1
- package/dist/{chunk-MAITXZFR.js → chunk-MHPYLMQS.js} +4 -4
- package/dist/{chunk-MAITXZFR.js.map → chunk-MHPYLMQS.js.map} +1 -1
- package/dist/{chunk-A7VZ7CSC.cjs → chunk-MXO6LXV5.cjs} +11 -11
- package/dist/{chunk-A7VZ7CSC.cjs.map → chunk-MXO6LXV5.cjs.map} +1 -1
- package/dist/{chunk-SIMG4IGE.js → chunk-MYWQELNY.js} +4 -4
- package/dist/{chunk-SIMG4IGE.js.map → chunk-MYWQELNY.js.map} +1 -1
- package/dist/{chunk-BJDZXR3Y.js → chunk-PEEUMQ3R.js} +4 -4
- package/dist/{chunk-BJDZXR3Y.js.map → chunk-PEEUMQ3R.js.map} +1 -1
- package/dist/{chunk-D6ELKUMF.js → chunk-T7CPAGOI.js} +5 -5
- package/dist/{chunk-D6ELKUMF.js.map → chunk-T7CPAGOI.js.map} +1 -1
- package/dist/{chunk-I36M5IZD.cjs → chunk-YPQMAE6U.cjs} +7 -7
- package/dist/{chunk-I36M5IZD.cjs.map → chunk-YPQMAE6U.cjs.map} +1 -1
- package/dist/{chunk-ADZDAWNV.cjs → chunk-ZPERWNOP.cjs} +17 -17
- package/dist/{chunk-ADZDAWNV.cjs.map → chunk-ZPERWNOP.cjs.map} +1 -1
- package/dist/correlation-id.cjs +12 -12
- package/dist/correlation-id.js +4 -4
- package/dist/decorators.cjs +7 -7
- package/dist/decorators.js +6 -6
- package/dist/event.cjs +8 -8
- package/dist/event.js +5 -5
- package/dist/functional.cjs +14 -14
- package/dist/functional.js +6 -6
- package/dist/http.cjs +5 -5
- package/dist/http.js +4 -4
- package/dist/index.cjs +83 -83
- package/dist/index.js +14 -14
- package/dist/instrumentation.cjs +11 -11
- package/dist/instrumentation.js +3 -3
- package/dist/messaging.cjs +10 -10
- package/dist/messaging.js +7 -7
- package/dist/semantic-helpers.cjs +11 -11
- package/dist/semantic-helpers.js +7 -7
- package/dist/trace-helpers.cjs +14 -14
- package/dist/trace-helpers.js +2 -2
- package/dist/webhook.cjs +8 -8
- package/dist/webhook.js +6 -6
- package/dist/workflow-distributed.cjs +8 -8
- package/dist/workflow-distributed.js +6 -6
- package/dist/workflow.cjs +11 -11
- package/dist/workflow.js +7 -7
- package/dist/yaml-config.cjs +5 -5
- package/dist/yaml-config.js +2 -2
- package/package.json +1 -1
- package/src/node-require.ts +15 -7
- package/dist/chunk-EQIY6C3X.cjs.map +0 -1
- package/dist/chunk-KPNV2GPW.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk7EQ4G4SI_cjs = require('./chunk-7EQ4G4SI.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkMXO6LXV5_cjs = require('./chunk-MXO6LXV5.cjs');
|
|
5
5
|
var chunkDQ2SUROF_cjs = require('./chunk-DQ2SUROF.cjs');
|
|
6
6
|
var chunk2ZKEORFN_cjs = require('./chunk-2ZKEORFN.cjs');
|
|
7
7
|
var chunkESMHTKLJ_cjs = require('./chunk-ESMHTKLJ.cjs');
|
|
8
8
|
var chunkT4B5LB6E_cjs = require('./chunk-T4B5LB6E.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunk6X2GG65S_cjs = require('./chunk-6X2GG65S.cjs');
|
|
10
10
|
var chunk4P6ZOARG_cjs = require('./chunk-4P6ZOARG.cjs');
|
|
11
11
|
var chunkINJD3G4K_cjs = require('./chunk-INJD3G4K.cjs');
|
|
12
12
|
var chunkTC5ZPWM4_cjs = require('./chunk-TC5ZPWM4.cjs');
|
|
13
13
|
require('./chunk-YTXEZ4SD.cjs');
|
|
14
14
|
var chunkWJH6IYU2_cjs = require('./chunk-WJH6IYU2.cjs');
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
15
|
+
var chunkYPQMAE6U_cjs = require('./chunk-YPQMAE6U.cjs');
|
|
16
|
+
var chunkKPDIEVVV_cjs = require('./chunk-KPDIEVVV.cjs');
|
|
17
|
+
var chunk2GIBANLB_cjs = require('./chunk-2GIBANLB.cjs');
|
|
18
|
+
var chunkZPERWNOP_cjs = require('./chunk-ZPERWNOP.cjs');
|
|
19
19
|
require('./chunk-NZ72VDNY.cjs');
|
|
20
20
|
require('./chunk-UY3UYPBZ.cjs');
|
|
21
21
|
var chunkVQTCQKHQ_cjs = require('./chunk-VQTCQKHQ.cjs');
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
require('./chunk-
|
|
22
|
+
var chunkLIYNUGML_cjs = require('./chunk-LIYNUGML.cjs');
|
|
23
|
+
var chunk45B2GD4P_cjs = require('./chunk-45B2GD4P.cjs');
|
|
24
|
+
require('./chunk-FEEVB2GV.cjs');
|
|
25
25
|
require('./chunk-CEAQK2QY.cjs');
|
|
26
26
|
var chunkZNMBW67B_cjs = require('./chunk-ZNMBW67B.cjs');
|
|
27
27
|
var chunkIOYFAFHJ_cjs = require('./chunk-IOYFAFHJ.cjs');
|
|
28
28
|
var chunkNXLRY2CE_cjs = require('./chunk-NXLRY2CE.cjs');
|
|
29
29
|
require('./chunk-CU6IDACR.cjs');
|
|
30
30
|
var chunk6S5RUKU3_cjs = require('./chunk-6S5RUKU3.cjs');
|
|
31
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-HR5YFXZW.cjs');
|
|
32
32
|
var chunkVH77IPJN_cjs = require('./chunk-VH77IPJN.cjs');
|
|
33
33
|
require('./chunk-FU6R566Y.cjs');
|
|
34
34
|
require('./chunk-ESLWRGAG.cjs');
|
|
@@ -54,7 +54,7 @@ var otelMethods = {
|
|
|
54
54
|
setSpanContext: api.trace.setSpanContext
|
|
55
55
|
};
|
|
56
56
|
var trace2 = Object.assign(
|
|
57
|
-
|
|
57
|
+
chunkKPDIEVVV_cjs.trace,
|
|
58
58
|
otelMethods
|
|
59
59
|
);
|
|
60
60
|
|
|
@@ -63,7 +63,7 @@ async function flush(options) {
|
|
|
63
63
|
const timeout = options?.timeout ?? 2e3;
|
|
64
64
|
const forShutdown = options?.forShutdown ?? false;
|
|
65
65
|
const doFlush = async () => {
|
|
66
|
-
const eventsQueue =
|
|
66
|
+
const eventsQueue = chunkLIYNUGML_cjs.getEventQueue();
|
|
67
67
|
if (eventsQueue) {
|
|
68
68
|
if (forShutdown) {
|
|
69
69
|
await eventsQueue.shutdown();
|
|
@@ -71,7 +71,7 @@ async function flush(options) {
|
|
|
71
71
|
await eventsQueue.flush();
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const sdk =
|
|
74
|
+
const sdk = chunk45B2GD4P_cjs.getSdk();
|
|
75
75
|
if (sdk) {
|
|
76
76
|
try {
|
|
77
77
|
const sdkAny = sdk;
|
|
@@ -105,7 +105,7 @@ async function flush(options) {
|
|
|
105
105
|
if (timeoutHandle) {
|
|
106
106
|
clearTimeout(timeoutHandle);
|
|
107
107
|
}
|
|
108
|
-
const logger =
|
|
108
|
+
const logger = chunk45B2GD4P_cjs.getLogger();
|
|
109
109
|
logger.error(
|
|
110
110
|
{
|
|
111
111
|
err: error instanceof Error ? error : new Error(String(error))
|
|
@@ -116,7 +116,7 @@ async function flush(options) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
async function shutdown() {
|
|
119
|
-
const logger =
|
|
119
|
+
const logger = chunk45B2GD4P_cjs.getLogger();
|
|
120
120
|
let shutdownError = null;
|
|
121
121
|
try {
|
|
122
122
|
await flush({ forShutdown: true });
|
|
@@ -131,7 +131,7 @@ async function shutdown() {
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
try {
|
|
134
|
-
const sdk =
|
|
134
|
+
const sdk = chunk45B2GD4P_cjs.getSdk();
|
|
135
135
|
if (sdk) {
|
|
136
136
|
await sdk.shutdown();
|
|
137
137
|
}
|
|
@@ -145,14 +145,14 @@ async function shutdown() {
|
|
|
145
145
|
logger.error({ err }, "[autotel] SDK shutdown failed");
|
|
146
146
|
}
|
|
147
147
|
} finally {
|
|
148
|
-
await
|
|
149
|
-
const eventsQueue =
|
|
148
|
+
await chunk45B2GD4P_cjs._closeEmbeddedDevtools();
|
|
149
|
+
const eventsQueue = chunkLIYNUGML_cjs.getEventQueue();
|
|
150
150
|
if (eventsQueue && typeof eventsQueue.cleanup === "function") {
|
|
151
151
|
eventsQueue.cleanup();
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
chunkZPERWNOP_cjs.resetEvents();
|
|
154
154
|
chunkTC5ZPWM4_cjs.resetMetrics();
|
|
155
|
-
|
|
155
|
+
chunkLIYNUGML_cjs.resetEventQueue();
|
|
156
156
|
}
|
|
157
157
|
if (shutdownError) {
|
|
158
158
|
throw shutdownError;
|
|
@@ -167,7 +167,7 @@ function registerShutdownHooks() {
|
|
|
167
167
|
if (shuttingDown) return;
|
|
168
168
|
shuttingDown = true;
|
|
169
169
|
if (process.env.NODE_ENV !== "test") {
|
|
170
|
-
|
|
170
|
+
chunk45B2GD4P_cjs.getLogger().info(
|
|
171
171
|
{},
|
|
172
172
|
`[autotel] Received ${signal}, flushing telemetry...`
|
|
173
173
|
);
|
|
@@ -175,7 +175,7 @@ function registerShutdownHooks() {
|
|
|
175
175
|
try {
|
|
176
176
|
await shutdown();
|
|
177
177
|
} catch (error) {
|
|
178
|
-
|
|
178
|
+
chunk45B2GD4P_cjs.getLogger().error(
|
|
179
179
|
{
|
|
180
180
|
err: error instanceof Error ? error : void 0
|
|
181
181
|
},
|
|
@@ -225,7 +225,7 @@ function resolveContext(ctx2) {
|
|
|
225
225
|
"[autotel] getRequestLogger() requires an active span or runWithRequestContext(). Wrap your handler with trace() or use runWithRequestContext()."
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
|
-
return
|
|
228
|
+
return chunkLIYNUGML_cjs.createTraceContext(span2);
|
|
229
229
|
}
|
|
230
230
|
function getRequestLogger(ctx2, options) {
|
|
231
231
|
const activeContext = resolveContext(ctx2);
|
|
@@ -233,7 +233,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
233
233
|
let emitted = false;
|
|
234
234
|
let lastSnapshot = null;
|
|
235
235
|
const addLogEvent = (level, message, fields) => {
|
|
236
|
-
const attrs2 = fields ?
|
|
236
|
+
const attrs2 = fields ? chunkLIYNUGML_cjs.flattenToAttributes(fields) : void 0;
|
|
237
237
|
chunk4P6ZOARG_cjs.emitCorrelatedEvent(activeContext, `log.${level}`, {
|
|
238
238
|
message,
|
|
239
239
|
...attrs2 ?? {}
|
|
@@ -252,7 +252,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
252
252
|
sealCheck("log.set()", Object.keys(fields));
|
|
253
253
|
if (emitted) return;
|
|
254
254
|
mergeInto(contextState, fields);
|
|
255
|
-
activeContext.setAttributes(
|
|
255
|
+
activeContext.setAttributes(chunkLIYNUGML_cjs.flattenToAttributes(fields));
|
|
256
256
|
},
|
|
257
257
|
info(message, fields) {
|
|
258
258
|
const keys = fields ? ["message", ...Object.keys(fields).filter((k) => k !== "requestLogs")] : ["message"];
|
|
@@ -261,7 +261,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
261
261
|
addLogEvent("info", message, fields);
|
|
262
262
|
if (fields) {
|
|
263
263
|
mergeInto(contextState, fields);
|
|
264
|
-
activeContext.setAttributes(
|
|
264
|
+
activeContext.setAttributes(chunkLIYNUGML_cjs.flattenToAttributes(fields));
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
267
|
warn(message, fields) {
|
|
@@ -272,7 +272,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
272
272
|
activeContext.setAttribute("autotel.log.level", "warn");
|
|
273
273
|
if (fields) {
|
|
274
274
|
mergeInto(contextState, fields);
|
|
275
|
-
activeContext.setAttributes(
|
|
275
|
+
activeContext.setAttributes(chunkLIYNUGML_cjs.flattenToAttributes(fields));
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
error(error, fields) {
|
|
@@ -280,11 +280,11 @@ function getRequestLogger(ctx2, options) {
|
|
|
280
280
|
sealCheck("log.error()", keys);
|
|
281
281
|
if (emitted) return;
|
|
282
282
|
const err = typeof error === "string" ? new Error(error) : error;
|
|
283
|
-
|
|
283
|
+
chunkLIYNUGML_cjs.recordStructuredError(activeContext, err);
|
|
284
284
|
addLogEvent("error", err.message, fields);
|
|
285
285
|
if (fields) {
|
|
286
286
|
mergeInto(contextState, fields);
|
|
287
|
-
activeContext.setAttributes(
|
|
287
|
+
activeContext.setAttributes(chunkLIYNUGML_cjs.flattenToAttributes(fields));
|
|
288
288
|
}
|
|
289
289
|
activeContext.setAttribute("autotel.log.level", "error");
|
|
290
290
|
},
|
|
@@ -300,7 +300,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
300
300
|
...contextState,
|
|
301
301
|
...overrides ?? {}
|
|
302
302
|
};
|
|
303
|
-
const flattened =
|
|
303
|
+
const flattened = chunkLIYNUGML_cjs.flattenToAttributes(mergedContext);
|
|
304
304
|
activeContext.setAttributes(flattened);
|
|
305
305
|
const snapshot = {
|
|
306
306
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -332,7 +332,7 @@ function getRequestLogger(ctx2, options) {
|
|
|
332
332
|
const lifecycle = forkOptions?.lifecycle;
|
|
333
333
|
void tracer.startActiveSpan(`request.fork:${label}`, (childSpan) => {
|
|
334
334
|
const childContext = {
|
|
335
|
-
...
|
|
335
|
+
...chunkLIYNUGML_cjs.createTraceContext(childSpan),
|
|
336
336
|
correlationId: crypto.randomUUID()
|
|
337
337
|
};
|
|
338
338
|
requestContextStore.run(childContext, () => {
|
|
@@ -607,19 +607,19 @@ Object.defineProperty(exports, "createDrainPipeline", {
|
|
|
607
607
|
});
|
|
608
608
|
Object.defineProperty(exports, "getCurrentWorkflowContext", {
|
|
609
609
|
enumerable: true,
|
|
610
|
-
get: function () { return
|
|
610
|
+
get: function () { return chunkMXO6LXV5_cjs.getCurrentWorkflowContext; }
|
|
611
611
|
});
|
|
612
612
|
Object.defineProperty(exports, "isInWorkflow", {
|
|
613
613
|
enumerable: true,
|
|
614
|
-
get: function () { return
|
|
614
|
+
get: function () { return chunkMXO6LXV5_cjs.isInWorkflow; }
|
|
615
615
|
});
|
|
616
616
|
Object.defineProperty(exports, "traceStep", {
|
|
617
617
|
enumerable: true,
|
|
618
|
-
get: function () { return
|
|
618
|
+
get: function () { return chunkMXO6LXV5_cjs.traceStep; }
|
|
619
619
|
});
|
|
620
620
|
Object.defineProperty(exports, "traceWorkflow", {
|
|
621
621
|
enumerable: true,
|
|
622
|
-
get: function () { return
|
|
622
|
+
get: function () { return chunkMXO6LXV5_cjs.traceWorkflow; }
|
|
623
623
|
});
|
|
624
624
|
Object.defineProperty(exports, "attrs", {
|
|
625
625
|
enumerable: true,
|
|
@@ -711,11 +711,11 @@ Object.defineProperty(exports, "parseError", {
|
|
|
711
711
|
});
|
|
712
712
|
Object.defineProperty(exports, "traceConsumer", {
|
|
713
713
|
enumerable: true,
|
|
714
|
-
get: function () { return
|
|
714
|
+
get: function () { return chunk6X2GG65S_cjs.traceConsumer; }
|
|
715
715
|
});
|
|
716
716
|
Object.defineProperty(exports, "traceProducer", {
|
|
717
717
|
enumerable: true,
|
|
718
|
-
get: function () { return
|
|
718
|
+
get: function () { return chunk6X2GG65S_cjs.traceProducer; }
|
|
719
719
|
});
|
|
720
720
|
Object.defineProperty(exports, "BusinessBaggage", {
|
|
721
721
|
enumerable: true,
|
|
@@ -759,103 +759,103 @@ Object.defineProperty(exports, "getMeter", {
|
|
|
759
759
|
});
|
|
760
760
|
Object.defineProperty(exports, "traceDB", {
|
|
761
761
|
enumerable: true,
|
|
762
|
-
get: function () { return
|
|
762
|
+
get: function () { return chunkYPQMAE6U_cjs.traceDB; }
|
|
763
763
|
});
|
|
764
764
|
Object.defineProperty(exports, "traceHTTP", {
|
|
765
765
|
enumerable: true,
|
|
766
|
-
get: function () { return
|
|
766
|
+
get: function () { return chunkYPQMAE6U_cjs.traceHTTP; }
|
|
767
767
|
});
|
|
768
768
|
Object.defineProperty(exports, "traceLLM", {
|
|
769
769
|
enumerable: true,
|
|
770
|
-
get: function () { return
|
|
770
|
+
get: function () { return chunkYPQMAE6U_cjs.traceLLM; }
|
|
771
771
|
});
|
|
772
772
|
Object.defineProperty(exports, "traceMessaging", {
|
|
773
773
|
enumerable: true,
|
|
774
|
-
get: function () { return
|
|
774
|
+
get: function () { return chunkYPQMAE6U_cjs.traceMessaging; }
|
|
775
775
|
});
|
|
776
776
|
Object.defineProperty(exports, "ctx", {
|
|
777
777
|
enumerable: true,
|
|
778
|
-
get: function () { return
|
|
778
|
+
get: function () { return chunkKPDIEVVV_cjs.ctx; }
|
|
779
779
|
});
|
|
780
780
|
Object.defineProperty(exports, "instrument", {
|
|
781
781
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunkKPDIEVVV_cjs.instrument; }
|
|
783
783
|
});
|
|
784
784
|
Object.defineProperty(exports, "markAsImmediate", {
|
|
785
785
|
enumerable: true,
|
|
786
|
-
get: function () { return
|
|
786
|
+
get: function () { return chunkKPDIEVVV_cjs.markAsImmediate; }
|
|
787
787
|
});
|
|
788
788
|
Object.defineProperty(exports, "span", {
|
|
789
789
|
enumerable: true,
|
|
790
|
-
get: function () { return
|
|
790
|
+
get: function () { return chunkKPDIEVVV_cjs.span; }
|
|
791
791
|
});
|
|
792
792
|
Object.defineProperty(exports, "withBaggage", {
|
|
793
793
|
enumerable: true,
|
|
794
|
-
get: function () { return
|
|
794
|
+
get: function () { return chunkKPDIEVVV_cjs.withBaggage; }
|
|
795
795
|
});
|
|
796
796
|
Object.defineProperty(exports, "withNewContext", {
|
|
797
797
|
enumerable: true,
|
|
798
|
-
get: function () { return
|
|
798
|
+
get: function () { return chunkKPDIEVVV_cjs.withNewContext; }
|
|
799
799
|
});
|
|
800
800
|
Object.defineProperty(exports, "withTracing", {
|
|
801
801
|
enumerable: true,
|
|
802
|
-
get: function () { return
|
|
802
|
+
get: function () { return chunkKPDIEVVV_cjs.withTracing; }
|
|
803
803
|
});
|
|
804
804
|
Object.defineProperty(exports, "createDeterministicTraceId", {
|
|
805
805
|
enumerable: true,
|
|
806
|
-
get: function () { return
|
|
806
|
+
get: function () { return chunk2GIBANLB_cjs.createDeterministicTraceId; }
|
|
807
807
|
});
|
|
808
808
|
Object.defineProperty(exports, "enrichWithTraceContext", {
|
|
809
809
|
enumerable: true,
|
|
810
|
-
get: function () { return
|
|
810
|
+
get: function () { return chunk2GIBANLB_cjs.enrichWithTraceContext; }
|
|
811
811
|
});
|
|
812
812
|
Object.defineProperty(exports, "finalizeSpan", {
|
|
813
813
|
enumerable: true,
|
|
814
|
-
get: function () { return
|
|
814
|
+
get: function () { return chunk2GIBANLB_cjs.finalizeSpan; }
|
|
815
815
|
});
|
|
816
816
|
Object.defineProperty(exports, "flattenMetadata", {
|
|
817
817
|
enumerable: true,
|
|
818
|
-
get: function () { return
|
|
818
|
+
get: function () { return chunk2GIBANLB_cjs.flattenMetadata; }
|
|
819
819
|
});
|
|
820
820
|
Object.defineProperty(exports, "getActiveContext", {
|
|
821
821
|
enumerable: true,
|
|
822
|
-
get: function () { return
|
|
822
|
+
get: function () { return chunk2GIBANLB_cjs.getActiveContext; }
|
|
823
823
|
});
|
|
824
824
|
Object.defineProperty(exports, "getActiveSpan", {
|
|
825
825
|
enumerable: true,
|
|
826
|
-
get: function () { return
|
|
826
|
+
get: function () { return chunk2GIBANLB_cjs.getActiveSpan; }
|
|
827
827
|
});
|
|
828
828
|
Object.defineProperty(exports, "getTraceContext", {
|
|
829
829
|
enumerable: true,
|
|
830
|
-
get: function () { return
|
|
830
|
+
get: function () { return chunk2GIBANLB_cjs.getTraceContext; }
|
|
831
831
|
});
|
|
832
832
|
Object.defineProperty(exports, "getTracer", {
|
|
833
833
|
enumerable: true,
|
|
834
|
-
get: function () { return
|
|
834
|
+
get: function () { return chunk2GIBANLB_cjs.getTracer; }
|
|
835
835
|
});
|
|
836
836
|
Object.defineProperty(exports, "isTracing", {
|
|
837
837
|
enumerable: true,
|
|
838
|
-
get: function () { return
|
|
838
|
+
get: function () { return chunk2GIBANLB_cjs.isTracing; }
|
|
839
839
|
});
|
|
840
840
|
Object.defineProperty(exports, "resolveTraceUrl", {
|
|
841
841
|
enumerable: true,
|
|
842
|
-
get: function () { return
|
|
842
|
+
get: function () { return chunk2GIBANLB_cjs.resolveTraceUrl; }
|
|
843
843
|
});
|
|
844
844
|
Object.defineProperty(exports, "runWithSpan", {
|
|
845
845
|
enumerable: true,
|
|
846
|
-
get: function () { return
|
|
846
|
+
get: function () { return chunk2GIBANLB_cjs.runWithSpan; }
|
|
847
847
|
});
|
|
848
848
|
Object.defineProperty(exports, "Event", {
|
|
849
849
|
enumerable: true,
|
|
850
|
-
get: function () { return
|
|
850
|
+
get: function () { return chunkZPERWNOP_cjs.Event; }
|
|
851
851
|
});
|
|
852
852
|
Object.defineProperty(exports, "getEvents", {
|
|
853
853
|
enumerable: true,
|
|
854
|
-
get: function () { return
|
|
854
|
+
get: function () { return chunkZPERWNOP_cjs.getEvents; }
|
|
855
855
|
});
|
|
856
856
|
Object.defineProperty(exports, "resetEvents", {
|
|
857
857
|
enumerable: true,
|
|
858
|
-
get: function () { return
|
|
858
|
+
get: function () { return chunkZPERWNOP_cjs.resetEvents; }
|
|
859
859
|
});
|
|
860
860
|
Object.defineProperty(exports, "getOperationContext", {
|
|
861
861
|
enumerable: true,
|
|
@@ -867,87 +867,87 @@ Object.defineProperty(exports, "runInOperationContext", {
|
|
|
867
867
|
});
|
|
868
868
|
Object.defineProperty(exports, "CORRELATION_ID_BAGGAGE_KEY", {
|
|
869
869
|
enumerable: true,
|
|
870
|
-
get: function () { return
|
|
870
|
+
get: function () { return chunkLIYNUGML_cjs.CORRELATION_ID_BAGGAGE_KEY; }
|
|
871
871
|
});
|
|
872
872
|
Object.defineProperty(exports, "createStructuredError", {
|
|
873
873
|
enumerable: true,
|
|
874
|
-
get: function () { return
|
|
874
|
+
get: function () { return chunkLIYNUGML_cjs.createStructuredError; }
|
|
875
875
|
});
|
|
876
876
|
Object.defineProperty(exports, "defineBaggageSchema", {
|
|
877
877
|
enumerable: true,
|
|
878
|
-
get: function () { return
|
|
878
|
+
get: function () { return chunkLIYNUGML_cjs.defineBaggageSchema; }
|
|
879
879
|
});
|
|
880
880
|
Object.defineProperty(exports, "flattenToAttributes", {
|
|
881
881
|
enumerable: true,
|
|
882
|
-
get: function () { return
|
|
882
|
+
get: function () { return chunkLIYNUGML_cjs.flattenToAttributes; }
|
|
883
883
|
});
|
|
884
884
|
Object.defineProperty(exports, "generateCorrelationId", {
|
|
885
885
|
enumerable: true,
|
|
886
|
-
get: function () { return
|
|
886
|
+
get: function () { return chunkLIYNUGML_cjs.generateCorrelationId; }
|
|
887
887
|
});
|
|
888
888
|
Object.defineProperty(exports, "getCorrelationId", {
|
|
889
889
|
enumerable: true,
|
|
890
|
-
get: function () { return
|
|
890
|
+
get: function () { return chunkLIYNUGML_cjs.getCorrelationId; }
|
|
891
891
|
});
|
|
892
892
|
Object.defineProperty(exports, "getEventQueue", {
|
|
893
893
|
enumerable: true,
|
|
894
|
-
get: function () { return
|
|
894
|
+
get: function () { return chunkLIYNUGML_cjs.getEventQueue; }
|
|
895
895
|
});
|
|
896
896
|
Object.defineProperty(exports, "getOrCreateCorrelationId", {
|
|
897
897
|
enumerable: true,
|
|
898
|
-
get: function () { return
|
|
898
|
+
get: function () { return chunkLIYNUGML_cjs.getOrCreateCorrelationId; }
|
|
899
899
|
});
|
|
900
900
|
Object.defineProperty(exports, "getStructuredErrorAttributes", {
|
|
901
901
|
enumerable: true,
|
|
902
|
-
get: function () { return
|
|
902
|
+
get: function () { return chunkLIYNUGML_cjs.getStructuredErrorAttributes; }
|
|
903
903
|
});
|
|
904
904
|
Object.defineProperty(exports, "recordStructuredError", {
|
|
905
905
|
enumerable: true,
|
|
906
|
-
get: function () { return
|
|
906
|
+
get: function () { return chunkLIYNUGML_cjs.recordStructuredError; }
|
|
907
907
|
});
|
|
908
908
|
Object.defineProperty(exports, "runWithCorrelationId", {
|
|
909
909
|
enumerable: true,
|
|
910
|
-
get: function () { return
|
|
910
|
+
get: function () { return chunkLIYNUGML_cjs.runWithCorrelationId; }
|
|
911
911
|
});
|
|
912
912
|
Object.defineProperty(exports, "setCorrelationId", {
|
|
913
913
|
enumerable: true,
|
|
914
|
-
get: function () { return
|
|
914
|
+
get: function () { return chunkLIYNUGML_cjs.setCorrelationId; }
|
|
915
915
|
});
|
|
916
916
|
Object.defineProperty(exports, "setCorrelationIdInBaggage", {
|
|
917
917
|
enumerable: true,
|
|
918
|
-
get: function () { return
|
|
918
|
+
get: function () { return chunkLIYNUGML_cjs.setCorrelationIdInBaggage; }
|
|
919
919
|
});
|
|
920
920
|
Object.defineProperty(exports, "structuredErrorToJSON", {
|
|
921
921
|
enumerable: true,
|
|
922
|
-
get: function () { return
|
|
922
|
+
get: function () { return chunkLIYNUGML_cjs.structuredErrorToJSON; }
|
|
923
923
|
});
|
|
924
924
|
Object.defineProperty(exports, "toAttributeValue", {
|
|
925
925
|
enumerable: true,
|
|
926
|
-
get: function () { return
|
|
926
|
+
get: function () { return chunkLIYNUGML_cjs.toAttributeValue; }
|
|
927
927
|
});
|
|
928
928
|
Object.defineProperty(exports, "track", {
|
|
929
929
|
enumerable: true,
|
|
930
|
-
get: function () { return
|
|
930
|
+
get: function () { return chunkLIYNUGML_cjs.track; }
|
|
931
931
|
});
|
|
932
932
|
Object.defineProperty(exports, "BaggageSpanProcessor", {
|
|
933
933
|
enumerable: true,
|
|
934
|
-
get: function () { return
|
|
934
|
+
get: function () { return chunk45B2GD4P_cjs.BaggageSpanProcessor; }
|
|
935
935
|
});
|
|
936
936
|
Object.defineProperty(exports, "createStringRedactor", {
|
|
937
937
|
enumerable: true,
|
|
938
|
-
get: function () { return
|
|
938
|
+
get: function () { return chunk45B2GD4P_cjs.createStringRedactor; }
|
|
939
939
|
});
|
|
940
940
|
Object.defineProperty(exports, "init", {
|
|
941
941
|
enumerable: true,
|
|
942
|
-
get: function () { return
|
|
942
|
+
get: function () { return chunk45B2GD4P_cjs.init; }
|
|
943
943
|
});
|
|
944
944
|
Object.defineProperty(exports, "isLoggerLocked", {
|
|
945
945
|
enumerable: true,
|
|
946
|
-
get: function () { return
|
|
946
|
+
get: function () { return chunk45B2GD4P_cjs.isLoggerLocked; }
|
|
947
947
|
});
|
|
948
948
|
Object.defineProperty(exports, "lockLogger", {
|
|
949
949
|
enumerable: true,
|
|
950
|
-
get: function () { return
|
|
950
|
+
get: function () { return chunk45B2GD4P_cjs.lockLogger; }
|
|
951
951
|
});
|
|
952
952
|
Object.defineProperty(exports, "FilteringSpanProcessor", {
|
|
953
953
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
export { createDrainPipeline } from './chunk-KFOHQK7X.js';
|
|
2
|
-
export { getCurrentWorkflowContext, isInWorkflow, traceStep, traceWorkflow } from './chunk-
|
|
2
|
+
export { getCurrentWorkflowContext, isInWorkflow, traceStep, traceWorkflow } from './chunk-PEEUMQ3R.js';
|
|
3
3
|
export { attrs, autoRedactPII, dbClient, httpClient, httpServer, identify, mergeAttrs, mergeServiceResource, request, safeSetAttributes, setDevice, setError, setException, setSession, setUser, validateAttribute } from './chunk-DDXIUZEG.js';
|
|
4
4
|
export { httpRequestHeaderAttribute, httpResponseHeaderAttribute } from './chunk-7552UTQW.js';
|
|
5
5
|
export { HTTPAttributes, ServiceAttributes, URLAttributes } from './chunk-4A53YIAX.js';
|
|
6
6
|
export { parseError } from './chunk-J7VGRIAJ.js';
|
|
7
|
-
export { traceConsumer, traceProducer } from './chunk-
|
|
7
|
+
export { traceConsumer, traceProducer } from './chunk-6TFJF7SS.js';
|
|
8
8
|
import { emitCorrelatedEvent } from './chunk-KIL5CUN6.js';
|
|
9
9
|
export { BusinessBaggage, createSafeBaggageSchema } from './chunk-4IFSYQVX.js';
|
|
10
10
|
import { resetMetrics } from './chunk-7SAWIN74.js';
|
|
11
11
|
export { Metric, getMetrics, resetMetrics } from './chunk-7SAWIN74.js';
|
|
12
12
|
import './chunk-5ZN622AO.js';
|
|
13
13
|
export { createCounter, createHistogram, createObservableGauge, createUpDownCounter, getMeter } from './chunk-TQ5UWA7S.js';
|
|
14
|
-
export { traceDB, traceHTTP, traceLLM, traceMessaging } from './chunk-
|
|
15
|
-
import { trace as trace$1 } from './chunk-
|
|
16
|
-
export { ctx, instrument, markAsImmediate, span, withBaggage, withNewContext, withTracing } from './chunk-
|
|
17
|
-
export { createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan } from './chunk-
|
|
18
|
-
import { resetEvents } from './chunk-
|
|
19
|
-
export { Event, getEvents, resetEvents } from './chunk-
|
|
14
|
+
export { traceDB, traceHTTP, traceLLM, traceMessaging } from './chunk-52ALHU7T.js';
|
|
15
|
+
import { trace as trace$1 } from './chunk-T7CPAGOI.js';
|
|
16
|
+
export { ctx, instrument, markAsImmediate, span, withBaggage, withNewContext, withTracing } from './chunk-T7CPAGOI.js';
|
|
17
|
+
export { createDeterministicTraceId, enrichWithTraceContext, finalizeSpan, flattenMetadata, getActiveContext, getActiveSpan, getTraceContext, getTracer, isTracing, resolveTraceUrl, runWithSpan } from './chunk-HLZ7H3VZ.js';
|
|
18
|
+
import { resetEvents } from './chunk-MHPYLMQS.js';
|
|
19
|
+
export { Event, getEvents, resetEvents } from './chunk-MHPYLMQS.js';
|
|
20
20
|
import './chunk-LITNXTTT.js';
|
|
21
21
|
import './chunk-BZHG5IZ4.js';
|
|
22
22
|
export { getOperationContext, runInOperationContext } from './chunk-SEO6NAQT.js';
|
|
23
|
-
import { getEventQueue, resetEventQueue, createTraceContext, flattenToAttributes, recordStructuredError } from './chunk-
|
|
24
|
-
export { CORRELATION_ID_BAGGAGE_KEY, createStructuredError, defineBaggageSchema, flattenToAttributes, generateCorrelationId, getCorrelationId, getEventQueue, getOrCreateCorrelationId, getStructuredErrorAttributes, recordStructuredError, runWithCorrelationId, setCorrelationId, setCorrelationIdInBaggage, structuredErrorToJSON, toAttributeValue, track } from './chunk-
|
|
25
|
-
import { getLogger, getSdk, _closeEmbeddedDevtools } from './chunk-
|
|
26
|
-
export { BaggageSpanProcessor, createStringRedactor, init, isLoggerLocked, lockLogger } from './chunk-
|
|
27
|
-
import './chunk-
|
|
23
|
+
import { getEventQueue, resetEventQueue, createTraceContext, flattenToAttributes, recordStructuredError } from './chunk-FTBBBPT6.js';
|
|
24
|
+
export { CORRELATION_ID_BAGGAGE_KEY, createStructuredError, defineBaggageSchema, flattenToAttributes, generateCorrelationId, getCorrelationId, getEventQueue, getOrCreateCorrelationId, getStructuredErrorAttributes, recordStructuredError, runWithCorrelationId, setCorrelationId, setCorrelationIdInBaggage, structuredErrorToJSON, toAttributeValue, track } from './chunk-FTBBBPT6.js';
|
|
25
|
+
import { getLogger, getSdk, _closeEmbeddedDevtools } from './chunk-MYWQELNY.js';
|
|
26
|
+
export { BaggageSpanProcessor, createStringRedactor, init, isLoggerLocked, lockLogger } from './chunk-MYWQELNY.js';
|
|
27
|
+
import './chunk-643PQG3Y.js';
|
|
28
28
|
import './chunk-A4E5AQFK.js';
|
|
29
29
|
export { FilteringSpanProcessor } from './chunk-WGWSHJ2N.js';
|
|
30
30
|
export { NORMALIZER_PATTERNS, NORMALIZER_PRESETS, SpanNameNormalizingProcessor } from './chunk-GYR5K654.js';
|
|
31
31
|
export { AttributeRedactingProcessor, REDACTOR_PATTERNS, REDACTOR_PRESETS, builtinPatterns, createAttributeRedactor, createRedactedSpan, normalizeAttributeRedactorConfig } from './chunk-JVWJDHDB.js';
|
|
32
32
|
import './chunk-6UQRVUN3.js';
|
|
33
33
|
export { formatDuration } from './chunk-3QXBFGKP.js';
|
|
34
|
-
import './chunk-
|
|
34
|
+
import './chunk-KVDA4HX2.js';
|
|
35
35
|
export { AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP, AdaptiveSampler, AlwaysSampler, NeverSampler, RandomSampler, UserIdSampler, createLinkFromHeaders, extractLinksFromBatch, resolveSamplingPreset, samplingPresets } from './chunk-DPSA4QLA.js';
|
|
36
36
|
import './chunk-55ER2KD5.js';
|
|
37
37
|
import './chunk-J5QENANM.js';
|
package/dist/instrumentation.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk45B2GD4P_cjs = require('./chunk-45B2GD4P.cjs');
|
|
4
|
+
require('./chunk-FEEVB2GV.cjs');
|
|
5
5
|
var chunkCEAQK2QY_cjs = require('./chunk-CEAQK2QY.cjs');
|
|
6
6
|
require('./chunk-ZNMBW67B.cjs');
|
|
7
7
|
require('./chunk-IOYFAFHJ.cjs');
|
|
8
8
|
require('./chunk-NXLRY2CE.cjs');
|
|
9
9
|
require('./chunk-CU6IDACR.cjs');
|
|
10
10
|
require('./chunk-6S5RUKU3.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkHR5YFXZW_cjs = require('./chunk-HR5YFXZW.cjs');
|
|
12
12
|
require('./chunk-VH77IPJN.cjs');
|
|
13
13
|
require('./chunk-FU6R566Y.cjs');
|
|
14
14
|
require('./chunk-ESLWRGAG.cjs');
|
|
@@ -52,17 +52,17 @@ var shutdownHandlerRegistered = false;
|
|
|
52
52
|
async function shutdownInstrumentation(sdk) {
|
|
53
53
|
const sdkToShutdown = sdk || currentSDK;
|
|
54
54
|
if (!sdkToShutdown) {
|
|
55
|
-
|
|
55
|
+
chunk45B2GD4P_cjs.getLogger().warn({}, "No SDK to shutdown");
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
try {
|
|
59
59
|
await sdkToShutdown.shutdown();
|
|
60
|
-
|
|
60
|
+
chunk45B2GD4P_cjs.getLogger().info({}, "OpenTelemetry terminated successfully");
|
|
61
61
|
if (sdkToShutdown === currentSDK) {
|
|
62
62
|
currentSDK = null;
|
|
63
63
|
}
|
|
64
64
|
} catch (error) {
|
|
65
|
-
|
|
65
|
+
chunk45B2GD4P_cjs.getLogger().error(
|
|
66
66
|
{
|
|
67
67
|
err: error instanceof Error ? error : void 0
|
|
68
68
|
},
|
|
@@ -73,7 +73,7 @@ async function shutdownInstrumentation(sdk) {
|
|
|
73
73
|
}
|
|
74
74
|
async function initInstrumentation(config) {
|
|
75
75
|
if (currentSDK) {
|
|
76
|
-
|
|
76
|
+
chunk45B2GD4P_cjs.getLogger().info(
|
|
77
77
|
{},
|
|
78
78
|
"Shutting down existing OpenTelemetry SDK before reinitializing..."
|
|
79
79
|
);
|
|
@@ -128,7 +128,7 @@ async function initInstrumentation(config) {
|
|
|
128
128
|
}
|
|
129
129
|
let instrumentations = config.instrumentations || [];
|
|
130
130
|
if (config.selectiveInstrumentation === false) {
|
|
131
|
-
const mod =
|
|
131
|
+
const mod = chunkHR5YFXZW_cjs.requireModule("@opentelemetry/auto-instrumentations-node");
|
|
132
132
|
instrumentations = [mod.getNodeAutoInstrumentations()];
|
|
133
133
|
}
|
|
134
134
|
const traceExporter = new exporterTraceOtlpHttp.OTLPTraceExporter({
|
|
@@ -160,9 +160,9 @@ async function initInstrumentation(config) {
|
|
|
160
160
|
});
|
|
161
161
|
try {
|
|
162
162
|
await sdk.start();
|
|
163
|
-
|
|
163
|
+
chunk45B2GD4P_cjs.getLogger().info({}, "OpenTelemetry instrumentation started successfully");
|
|
164
164
|
} catch (error) {
|
|
165
|
-
|
|
165
|
+
chunk45B2GD4P_cjs.getLogger().error(
|
|
166
166
|
{
|
|
167
167
|
err: error instanceof Error ? error : void 0
|
|
168
168
|
},
|
|
@@ -177,7 +177,7 @@ async function initInstrumentation(config) {
|
|
|
177
177
|
shutdownInstrumentation().then(() => {
|
|
178
178
|
process.exit(0);
|
|
179
179
|
}).catch((error) => {
|
|
180
|
-
|
|
180
|
+
chunk45B2GD4P_cjs.getLogger().error(
|
|
181
181
|
{
|
|
182
182
|
err: error instanceof Error ? error : void 0
|
|
183
183
|
},
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getLogger } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { getLogger } from './chunk-MYWQELNY.js';
|
|
2
|
+
import './chunk-643PQG3Y.js';
|
|
3
3
|
import { TailSamplingSpanProcessor } from './chunk-A4E5AQFK.js';
|
|
4
4
|
import './chunk-WGWSHJ2N.js';
|
|
5
5
|
import './chunk-GYR5K654.js';
|
|
6
6
|
import './chunk-JVWJDHDB.js';
|
|
7
7
|
import './chunk-6UQRVUN3.js';
|
|
8
8
|
import './chunk-3QXBFGKP.js';
|
|
9
|
-
import { requireModule } from './chunk-
|
|
9
|
+
import { requireModule } from './chunk-KVDA4HX2.js';
|
|
10
10
|
import './chunk-DPSA4QLA.js';
|
|
11
11
|
import './chunk-55ER2KD5.js';
|
|
12
12
|
import './chunk-J5QENANM.js';
|