autotel 3.4.0 → 3.4.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-23BO5PKU.cjs +39 -0
- package/dist/chunk-23BO5PKU.cjs.map +1 -0
- package/dist/{chunk-TEXCI2S6.js → chunk-63ABFG2Q.js} +4 -4
- package/dist/{chunk-TEXCI2S6.js.map → chunk-63ABFG2Q.js.map} +1 -1
- package/dist/{chunk-HLZ7H3VZ.js → chunk-AEVI4EYC.js} +3 -3
- package/dist/{chunk-HLZ7H3VZ.js.map → chunk-AEVI4EYC.js.map} +1 -1
- package/dist/{chunk-PWOECUNT.cjs → chunk-BCD3ANVQ.cjs} +17 -17
- package/dist/{chunk-PWOECUNT.cjs.map → chunk-BCD3ANVQ.cjs.map} +1 -1
- package/dist/{chunk-6WWXA6IK.cjs → chunk-BCXQOCZX.cjs} +5 -5
- package/dist/{chunk-6WWXA6IK.cjs.map → chunk-BCXQOCZX.cjs.map} +1 -1
- package/dist/chunk-DUCUF6VK.js +35 -0
- package/dist/chunk-DUCUF6VK.js.map +1 -0
- package/dist/{chunk-NMEYVL4L.js → chunk-DXFLHZH2.js} +3 -3
- package/dist/{chunk-NMEYVL4L.js.map → chunk-DXFLHZH2.js.map} +1 -1
- package/dist/{chunk-643PQG3Y.js → chunk-FSV7ANUE.js} +3 -3
- package/dist/{chunk-643PQG3Y.js.map → chunk-FSV7ANUE.js.map} +1 -1
- package/dist/{chunk-2GIBANLB.cjs → chunk-JTJV2S4R.cjs} +4 -4
- package/dist/{chunk-2GIBANLB.cjs.map → chunk-JTJV2S4R.cjs.map} +1 -1
- package/dist/{chunk-DMSD5AF3.js → chunk-LTI7LSBY.js} +3 -3
- package/dist/{chunk-DMSD5AF3.js.map → chunk-LTI7LSBY.js.map} +1 -1
- package/dist/{chunk-AIX6BVNN.js → chunk-MEY6VAC3.js} +5 -5
- package/dist/{chunk-AIX6BVNN.js.map → chunk-MEY6VAC3.js.map} +1 -1
- package/dist/{chunk-BGO7TZID.cjs → chunk-MG6AZNVT.cjs} +7 -7
- package/dist/{chunk-BGO7TZID.cjs.map → chunk-MG6AZNVT.cjs.map} +1 -1
- package/dist/{chunk-LCXOOJIP.js → chunk-MHCCHVMJ.js} +3 -3
- package/dist/{chunk-LCXOOJIP.js.map → chunk-MHCCHVMJ.js.map} +1 -1
- package/dist/{chunk-Z3VD3UQZ.cjs → chunk-N2YZ4INO.cjs} +11 -11
- package/dist/{chunk-Z3VD3UQZ.cjs.map → chunk-N2YZ4INO.cjs.map} +1 -1
- package/dist/{chunk-JAX4LFGG.cjs → chunk-Q73BZ3JR.cjs} +13 -13
- package/dist/{chunk-JAX4LFGG.cjs.map → chunk-Q73BZ3JR.cjs.map} +1 -1
- package/dist/{chunk-B4CGFDZQ.js → chunk-T3VKOAUG.js} +4 -4
- package/dist/{chunk-B4CGFDZQ.js.map → chunk-T3VKOAUG.js.map} +1 -1
- package/dist/{chunk-LKASEUWE.js → chunk-U4IPC2D3.js} +4 -4
- package/dist/{chunk-LKASEUWE.js.map → chunk-U4IPC2D3.js.map} +1 -1
- package/dist/{chunk-FEEVB2GV.cjs → chunk-UBN2TONI.cjs} +4 -4
- package/dist/{chunk-FEEVB2GV.cjs.map → chunk-UBN2TONI.cjs.map} +1 -1
- package/dist/{chunk-RYVFCHSO.cjs → chunk-UTGGVEA5.cjs} +16 -16
- package/dist/{chunk-RYVFCHSO.cjs.map → chunk-UTGGVEA5.cjs.map} +1 -1
- package/dist/{chunk-FOFBFQES.cjs → chunk-WTLNZPM2.cjs} +36 -36
- package/dist/{chunk-FOFBFQES.cjs.map → chunk-WTLNZPM2.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 +85 -85
- 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 +44 -6
- package/dist/chunk-HR5YFXZW.cjs +0 -27
- package/dist/chunk-HR5YFXZW.cjs.map +0 -1
- package/dist/chunk-KVDA4HX2.js +0 -23
- package/dist/chunk-KVDA4HX2.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJTJV2S4R_cjs = require('./chunk-JTJV2S4R.cjs');
|
|
4
4
|
var chunkVQTCQKHQ_cjs = require('./chunk-VQTCQKHQ.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkQ73BZ3JR_cjs = require('./chunk-Q73BZ3JR.cjs');
|
|
6
|
+
var chunkUTGGVEA5_cjs = require('./chunk-UTGGVEA5.cjs');
|
|
7
7
|
var chunkVH77IPJN_cjs = require('./chunk-VH77IPJN.cjs');
|
|
8
8
|
var chunkESLWRGAG_cjs = require('./chunk-ESLWRGAG.cjs');
|
|
9
9
|
var api = require('@opentelemetry/api');
|
|
@@ -378,7 +378,7 @@ function shouldSkip(key, fn, skip) {
|
|
|
378
378
|
function getCtxValue() {
|
|
379
379
|
const activeSpan = api.trace.getActiveSpan();
|
|
380
380
|
if (!activeSpan) return null;
|
|
381
|
-
return
|
|
381
|
+
return chunkQ73BZ3JR_cjs.createTraceContext(activeSpan);
|
|
382
382
|
}
|
|
383
383
|
var ctx = new Proxy(
|
|
384
384
|
{},
|
|
@@ -443,17 +443,17 @@ function wrapWithTracing(fnFactory, options, variableName) {
|
|
|
443
443
|
}
|
|
444
444
|
const startTime = performance.now();
|
|
445
445
|
const isRootSpan = options.startNewRoot || api.trace.getActiveSpan() === void 0;
|
|
446
|
-
const shouldAutoFlush = options.flushOnRootSpanEnd ??
|
|
447
|
-
const shouldAutoFlushSpans =
|
|
446
|
+
const shouldAutoFlush = options.flushOnRootSpanEnd ?? chunkUTGGVEA5_cjs.getConfig()?.flushOnRootSpanEnd ?? true;
|
|
447
|
+
const shouldAutoFlushSpans = chunkUTGGVEA5_cjs.getConfig()?.forceFlushOnShutdown ?? false;
|
|
448
448
|
const flushIfNeeded = async () => {
|
|
449
449
|
if (!shouldAutoFlush || !isRootSpan) return;
|
|
450
450
|
try {
|
|
451
|
-
const queue =
|
|
451
|
+
const queue = chunkQ73BZ3JR_cjs.getEventQueue();
|
|
452
452
|
if (queue && queue.size() > 0) {
|
|
453
453
|
await queue.flush();
|
|
454
454
|
}
|
|
455
455
|
if (shouldAutoFlushSpans) {
|
|
456
|
-
const sdk =
|
|
456
|
+
const sdk = chunkUTGGVEA5_cjs.getSdk();
|
|
457
457
|
if (sdk) {
|
|
458
458
|
try {
|
|
459
459
|
const sdkAny = sdk;
|
|
@@ -468,7 +468,7 @@ function wrapWithTracing(fnFactory, options, variableName) {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
} catch (error) {
|
|
471
|
-
const initConfig =
|
|
471
|
+
const initConfig = chunkUTGGVEA5_cjs.getConfig();
|
|
472
472
|
const logger = initConfig?.logger;
|
|
473
473
|
if (logger?.error) {
|
|
474
474
|
logger.error(
|
|
@@ -487,7 +487,7 @@ function wrapWithTracing(fnFactory, options, variableName) {
|
|
|
487
487
|
if (options.spanKind !== void 0) {
|
|
488
488
|
spanOptions.kind = options.spanKind;
|
|
489
489
|
}
|
|
490
|
-
const parentContext =
|
|
490
|
+
const parentContext = chunkQ73BZ3JR_cjs.getActiveContextWithBaggage();
|
|
491
491
|
return tracer.startActiveSpan(
|
|
492
492
|
spanName,
|
|
493
493
|
spanOptions,
|
|
@@ -495,13 +495,13 @@ function wrapWithTracing(fnFactory, options, variableName) {
|
|
|
495
495
|
async (span2) => {
|
|
496
496
|
return chunkVQTCQKHQ_cjs.runInOperationContext(spanName, async () => {
|
|
497
497
|
let shouldKeepSpan = true;
|
|
498
|
-
|
|
498
|
+
chunkJTJV2S4R_cjs.setSpanName(span2, spanName);
|
|
499
499
|
const initialContext = api.context.active();
|
|
500
|
-
const contextStorage =
|
|
500
|
+
const contextStorage = chunkQ73BZ3JR_cjs.getContextStorage();
|
|
501
501
|
if (!contextStorage.getStore()) {
|
|
502
|
-
|
|
502
|
+
chunkQ73BZ3JR_cjs.enterOrRun(contextStorage, initialContext);
|
|
503
503
|
}
|
|
504
|
-
const ctxValue =
|
|
504
|
+
const ctxValue = chunkQ73BZ3JR_cjs.createTraceContext(span2);
|
|
505
505
|
const fn = fnFactory(ctxValue);
|
|
506
506
|
const argsAttributes = {
|
|
507
507
|
...captureInputAttrs(args, options.captureInput),
|
|
@@ -592,7 +592,7 @@ function wrapWithTracing(fnFactory, options, variableName) {
|
|
|
592
592
|
status: "started"
|
|
593
593
|
});
|
|
594
594
|
const executeWithContext = async () => {
|
|
595
|
-
const currentContext =
|
|
595
|
+
const currentContext = chunkQ73BZ3JR_cjs.getActiveContextWithBaggage();
|
|
596
596
|
return api.context.with(currentContext, async () => {
|
|
597
597
|
return fn.call(this, ...args);
|
|
598
598
|
});
|
|
@@ -644,14 +644,14 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
644
644
|
}
|
|
645
645
|
const startTime = performance.now();
|
|
646
646
|
const isRootSpan = options.startNewRoot || api.trace.getActiveSpan() === void 0;
|
|
647
|
-
const shouldAutoFlush = options.flushOnRootSpanEnd ??
|
|
648
|
-
const shouldAutoFlushSpans =
|
|
647
|
+
const shouldAutoFlush = options.flushOnRootSpanEnd ?? chunkUTGGVEA5_cjs.getConfig()?.flushOnRootSpanEnd ?? true;
|
|
648
|
+
const shouldAutoFlushSpans = chunkUTGGVEA5_cjs.getConfig()?.forceFlushOnShutdown ?? false;
|
|
649
649
|
const flushIfNeeded = () => {
|
|
650
650
|
if (!shouldAutoFlush || !isRootSpan) return;
|
|
651
|
-
const queue =
|
|
651
|
+
const queue = chunkQ73BZ3JR_cjs.getEventQueue();
|
|
652
652
|
if (queue && queue.size() > 0) {
|
|
653
653
|
void queue.flush().catch((error) => {
|
|
654
|
-
const initConfig =
|
|
654
|
+
const initConfig = chunkUTGGVEA5_cjs.getConfig();
|
|
655
655
|
const logger = initConfig?.logger;
|
|
656
656
|
if (logger?.error) {
|
|
657
657
|
logger.error(
|
|
@@ -664,7 +664,7 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
666
|
if (shouldAutoFlushSpans) {
|
|
667
|
-
const sdk =
|
|
667
|
+
const sdk = chunkUTGGVEA5_cjs.getSdk();
|
|
668
668
|
if (sdk) {
|
|
669
669
|
try {
|
|
670
670
|
const sdkAny = sdk;
|
|
@@ -672,7 +672,7 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
672
672
|
const tracerProvider = sdkAny.getTracerProvider();
|
|
673
673
|
if (tracerProvider && typeof tracerProvider.forceFlush === "function") {
|
|
674
674
|
void tracerProvider.forceFlush().catch((error) => {
|
|
675
|
-
const initConfig =
|
|
675
|
+
const initConfig = chunkUTGGVEA5_cjs.getConfig();
|
|
676
676
|
const logger = initConfig?.logger;
|
|
677
677
|
if (logger?.error) {
|
|
678
678
|
logger.error(
|
|
@@ -697,7 +697,7 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
697
697
|
if (options.spanKind !== void 0) {
|
|
698
698
|
spanOptions.kind = options.spanKind;
|
|
699
699
|
}
|
|
700
|
-
const parentContext =
|
|
700
|
+
const parentContext = chunkQ73BZ3JR_cjs.getActiveContextWithBaggage();
|
|
701
701
|
return tracer.startActiveSpan(
|
|
702
702
|
spanName,
|
|
703
703
|
spanOptions,
|
|
@@ -705,8 +705,8 @@ function wrapWithTracingSync(fnFactory, options, variableName) {
|
|
|
705
705
|
(span2) => {
|
|
706
706
|
return chunkVQTCQKHQ_cjs.runInOperationContext(spanName, () => {
|
|
707
707
|
let shouldKeepSpan = true;
|
|
708
|
-
|
|
709
|
-
const ctxValue =
|
|
708
|
+
chunkJTJV2S4R_cjs.setSpanName(span2, spanName);
|
|
709
|
+
const ctxValue = chunkQ73BZ3JR_cjs.createTraceContext(span2);
|
|
710
710
|
const fn = fnFactory(ctxValue);
|
|
711
711
|
const argsAttributes = {
|
|
712
712
|
...captureInputAttrs(args, options.captureInput),
|
|
@@ -827,8 +827,8 @@ function executeImmediately(fn, options) {
|
|
|
827
827
|
}
|
|
828
828
|
const startTime = performance.now();
|
|
829
829
|
const isRootSpan = options.startNewRoot || api.trace.getActiveSpan() === void 0;
|
|
830
|
-
const shouldAutoFlush = options.flushOnRootSpanEnd ??
|
|
831
|
-
const shouldAutoFlushSpans =
|
|
830
|
+
const shouldAutoFlush = options.flushOnRootSpanEnd ?? chunkUTGGVEA5_cjs.getConfig()?.flushOnRootSpanEnd ?? true;
|
|
831
|
+
const shouldAutoFlushSpans = chunkUTGGVEA5_cjs.getConfig()?.forceFlushOnShutdown ?? false;
|
|
832
832
|
const callCounter = options.withMetrics ? meter.createCounter(`${spanName}.calls`, {
|
|
833
833
|
description: `Call count for ${spanName}`,
|
|
834
834
|
unit: "1"
|
|
@@ -840,12 +840,12 @@ function executeImmediately(fn, options) {
|
|
|
840
840
|
const flushIfNeeded = async () => {
|
|
841
841
|
if (!shouldAutoFlush || !isRootSpan) return;
|
|
842
842
|
try {
|
|
843
|
-
const queue =
|
|
843
|
+
const queue = chunkQ73BZ3JR_cjs.getEventQueue();
|
|
844
844
|
if (queue && queue.size() > 0) {
|
|
845
845
|
await queue.flush();
|
|
846
846
|
}
|
|
847
847
|
if (shouldAutoFlushSpans) {
|
|
848
|
-
const sdk =
|
|
848
|
+
const sdk = chunkUTGGVEA5_cjs.getSdk();
|
|
849
849
|
if (sdk) {
|
|
850
850
|
try {
|
|
851
851
|
const sdkAny = sdk;
|
|
@@ -860,7 +860,7 @@ function executeImmediately(fn, options) {
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
} catch (error) {
|
|
863
|
-
const initConfig =
|
|
863
|
+
const initConfig = chunkUTGGVEA5_cjs.getConfig();
|
|
864
864
|
const logger = initConfig?.logger;
|
|
865
865
|
if (logger?.error) {
|
|
866
866
|
logger.error(
|
|
@@ -879,7 +879,7 @@ function executeImmediately(fn, options) {
|
|
|
879
879
|
if (options.spanKind !== void 0) {
|
|
880
880
|
spanOptions.kind = options.spanKind;
|
|
881
881
|
}
|
|
882
|
-
const parentContext =
|
|
882
|
+
const parentContext = chunkQ73BZ3JR_cjs.getActiveContextWithBaggage();
|
|
883
883
|
return tracer.startActiveSpan(
|
|
884
884
|
spanName,
|
|
885
885
|
spanOptions,
|
|
@@ -887,8 +887,8 @@ function executeImmediately(fn, options) {
|
|
|
887
887
|
(span2) => {
|
|
888
888
|
return chunkVQTCQKHQ_cjs.runInOperationContext(spanName, () => {
|
|
889
889
|
let shouldKeepSpan = true;
|
|
890
|
-
|
|
891
|
-
const ctxValue =
|
|
890
|
+
chunkJTJV2S4R_cjs.setSpanName(span2, spanName);
|
|
891
|
+
const ctxValue = chunkQ73BZ3JR_cjs.createTraceContext(span2);
|
|
892
892
|
const handleTailSampling = (success, duration, error) => {
|
|
893
893
|
if (needsTailSampling && "shouldKeepTrace" in sampler && typeof sampler.shouldKeepTrace === "function") {
|
|
894
894
|
shouldKeepSpan = sampler.shouldKeepTrace(samplingContext, {
|
|
@@ -1170,7 +1170,7 @@ function span(nameOrOptions, fn) {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
});
|
|
1172
1172
|
};
|
|
1173
|
-
const parentContext =
|
|
1173
|
+
const parentContext = chunkQ73BZ3JR_cjs.getActiveContextWithBaggage();
|
|
1174
1174
|
const result = tracer.startActiveSpan(name, {}, parentContext, executeSpan);
|
|
1175
1175
|
if (result instanceof Promise) {
|
|
1176
1176
|
return result;
|
|
@@ -1205,7 +1205,7 @@ function withBaggage(options) {
|
|
|
1205
1205
|
updatedBaggage = updatedBaggage.setEntry(key, { value });
|
|
1206
1206
|
}
|
|
1207
1207
|
const newContext = api.propagation.setBaggage(currentContext, updatedBaggage);
|
|
1208
|
-
const ctxStorage =
|
|
1208
|
+
const ctxStorage = chunkQ73BZ3JR_cjs.getContextStorage();
|
|
1209
1209
|
const previousStored = ctxStorage.getStore();
|
|
1210
1210
|
const baggageEnrichedStored = previousStored ? { value: api.propagation.setBaggage(previousStored.value, updatedBaggage) } : { value: newContext };
|
|
1211
1211
|
const result = previousStored ? ctxStorage.run(baggageEnrichedStored, () => api.context.with(newContext, fn)) : api.context.with(newContext, fn);
|
|
@@ -1238,5 +1238,5 @@ exports.trace = trace;
|
|
|
1238
1238
|
exports.withBaggage = withBaggage;
|
|
1239
1239
|
exports.withNewContext = withNewContext;
|
|
1240
1240
|
exports.withTracing = withTracing;
|
|
1241
|
-
//# sourceMappingURL=chunk-
|
|
1242
|
-
//# sourceMappingURL=chunk-
|
|
1241
|
+
//# sourceMappingURL=chunk-WTLNZPM2.cjs.map
|
|
1242
|
+
//# sourceMappingURL=chunk-WTLNZPM2.cjs.map
|