plutin 1.7.5 → 1.7.7
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/index.cjs +515 -771
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +397 -653
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -372,16 +372,16 @@ var require_src = __commonJS({
|
|
|
372
372
|
});
|
|
373
373
|
|
|
374
374
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
375
|
-
function
|
|
376
|
-
return context5.getValue(
|
|
375
|
+
function isTracingSuppressed(context5) {
|
|
376
|
+
return context5.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var import_api2, SUPPRESS_TRACING_KEY;
|
|
379
379
|
var init_suppress_tracing = __esm({
|
|
380
380
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
381
381
|
"use strict";
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
__name(
|
|
382
|
+
import_api2 = require("@opentelemetry/api");
|
|
383
|
+
SUPPRESS_TRACING_KEY = (0, import_api2.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
384
|
+
__name(isTracingSuppressed, "isTracingSuppressed");
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
|
|
@@ -431,7 +431,7 @@ function parsePairKeyValue(entry) {
|
|
|
431
431
|
var value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());
|
|
432
432
|
var metadata;
|
|
433
433
|
if (valueProps.length > 0) {
|
|
434
|
-
metadata = (0,
|
|
434
|
+
metadata = (0, import_api3.baggageEntryMetadataFromString)(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));
|
|
435
435
|
}
|
|
436
436
|
return {
|
|
437
437
|
key,
|
|
@@ -439,11 +439,11 @@ function parsePairKeyValue(entry) {
|
|
|
439
439
|
metadata
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
var
|
|
442
|
+
var import_api3, __read;
|
|
443
443
|
var init_utils = __esm({
|
|
444
444
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/baggage/utils.js"() {
|
|
445
445
|
"use strict";
|
|
446
|
-
|
|
446
|
+
import_api3 = require("@opentelemetry/api");
|
|
447
447
|
init_constants();
|
|
448
448
|
__read = function(o, n) {
|
|
449
449
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -475,11 +475,11 @@ var init_utils = __esm({
|
|
|
475
475
|
});
|
|
476
476
|
|
|
477
477
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js
|
|
478
|
-
var
|
|
478
|
+
var import_api4, W3CBaggagePropagator;
|
|
479
479
|
var init_W3CBaggagePropagator = __esm({
|
|
480
480
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js"() {
|
|
481
481
|
"use strict";
|
|
482
|
-
|
|
482
|
+
import_api4 = require("@opentelemetry/api");
|
|
483
483
|
init_suppress_tracing();
|
|
484
484
|
init_constants();
|
|
485
485
|
init_utils();
|
|
@@ -489,8 +489,8 @@ var init_W3CBaggagePropagator = __esm({
|
|
|
489
489
|
}
|
|
490
490
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
491
491
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
492
|
-
var baggage =
|
|
493
|
-
if (!baggage ||
|
|
492
|
+
var baggage = import_api4.propagation.getBaggage(context5);
|
|
493
|
+
if (!baggage || isTracingSuppressed(context5))
|
|
494
494
|
return;
|
|
495
495
|
var keyPairs = getKeyPairs(baggage).filter(function(pair) {
|
|
496
496
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
|
|
@@ -525,7 +525,7 @@ var init_W3CBaggagePropagator = __esm({
|
|
|
525
525
|
if (Object.entries(baggage).length === 0) {
|
|
526
526
|
return context5;
|
|
527
527
|
}
|
|
528
|
-
return
|
|
528
|
+
return import_api4.propagation.setBaggage(context5, import_api4.propagation.createBaggage(baggage));
|
|
529
529
|
};
|
|
530
530
|
W3CBaggagePropagator4.prototype.fields = function() {
|
|
531
531
|
return [
|
|
@@ -560,18 +560,18 @@ var init_anchored_clock = __esm({
|
|
|
560
560
|
});
|
|
561
561
|
|
|
562
562
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
563
|
-
var
|
|
563
|
+
var import_api5;
|
|
564
564
|
var init_attributes = __esm({
|
|
565
565
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
566
566
|
"use strict";
|
|
567
|
-
|
|
567
|
+
import_api5 = require("@opentelemetry/api");
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
570
|
|
|
571
571
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
572
572
|
function loggingErrorHandler() {
|
|
573
573
|
return function(ex) {
|
|
574
|
-
|
|
574
|
+
import_api6.diag.error(stringifyException(ex));
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
function stringifyException(ex) {
|
|
@@ -597,11 +597,11 @@ function flattenException(ex) {
|
|
|
597
597
|
}
|
|
598
598
|
return result;
|
|
599
599
|
}
|
|
600
|
-
var
|
|
600
|
+
var import_api6;
|
|
601
601
|
var init_logging_error_handler = __esm({
|
|
602
602
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js"() {
|
|
603
603
|
"use strict";
|
|
604
|
-
|
|
604
|
+
import_api6 = require("@opentelemetry/api");
|
|
605
605
|
__name(loggingErrorHandler, "loggingErrorHandler");
|
|
606
606
|
__name(stringifyException, "stringifyException");
|
|
607
607
|
__name(flattenException, "flattenException");
|
|
@@ -642,11 +642,11 @@ var init_sampling = __esm({
|
|
|
642
642
|
});
|
|
643
643
|
|
|
644
644
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/utils/environment.js
|
|
645
|
-
var
|
|
645
|
+
var import_api7, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, DEFAULT_ATTRIBUTE_COUNT_LIMIT, DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, DEFAULT_ENVIRONMENT, logLevelMap;
|
|
646
646
|
var init_environment = __esm({
|
|
647
647
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/utils/environment.js"() {
|
|
648
648
|
"use strict";
|
|
649
|
-
|
|
649
|
+
import_api7 = require("@opentelemetry/api");
|
|
650
650
|
init_sampling();
|
|
651
651
|
DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
|
|
652
652
|
DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
|
|
@@ -686,7 +686,7 @@ var init_environment = __esm({
|
|
|
686
686
|
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 1e4,
|
|
687
687
|
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 1e4,
|
|
688
688
|
OTEL_EXPORTER_ZIPKIN_ENDPOINT: "http://localhost:9411/api/v2/spans",
|
|
689
|
-
OTEL_LOG_LEVEL:
|
|
689
|
+
OTEL_LOG_LEVEL: import_api7.DiagLogLevel.INFO,
|
|
690
690
|
OTEL_NO_PATCH_MODULES: [],
|
|
691
691
|
OTEL_PROPAGATORS: [
|
|
692
692
|
"tracecontext",
|
|
@@ -735,13 +735,13 @@ var init_environment = __esm({
|
|
|
735
735
|
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "cumulative"
|
|
736
736
|
};
|
|
737
737
|
logLevelMap = {
|
|
738
|
-
ALL:
|
|
739
|
-
VERBOSE:
|
|
740
|
-
DEBUG:
|
|
741
|
-
INFO:
|
|
742
|
-
WARN:
|
|
743
|
-
ERROR:
|
|
744
|
-
NONE:
|
|
738
|
+
ALL: import_api7.DiagLogLevel.ALL,
|
|
739
|
+
VERBOSE: import_api7.DiagLogLevel.VERBOSE,
|
|
740
|
+
DEBUG: import_api7.DiagLogLevel.DEBUG,
|
|
741
|
+
INFO: import_api7.DiagLogLevel.INFO,
|
|
742
|
+
WARN: import_api7.DiagLogLevel.WARN,
|
|
743
|
+
ERROR: import_api7.DiagLogLevel.ERROR,
|
|
744
|
+
NONE: import_api7.DiagLogLevel.NONE
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
747
|
});
|
|
@@ -813,11 +813,11 @@ var init_performance = __esm({
|
|
|
813
813
|
});
|
|
814
814
|
|
|
815
815
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/version.js
|
|
816
|
-
var
|
|
816
|
+
var VERSION;
|
|
817
817
|
var init_version = __esm({
|
|
818
818
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/version.js"() {
|
|
819
819
|
"use strict";
|
|
820
|
-
|
|
820
|
+
VERSION = "1.24.1";
|
|
821
821
|
}
|
|
822
822
|
});
|
|
823
823
|
|
|
@@ -828,7 +828,7 @@ var init_sdk_info = __esm({
|
|
|
828
828
|
"use strict";
|
|
829
829
|
init_version();
|
|
830
830
|
import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
831
|
-
SDK_INFO = (_a = {}, _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a[import_semantic_conventions.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions.TelemetrySdkLanguageValues.NODEJS, _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] =
|
|
831
|
+
SDK_INFO = (_a = {}, _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a[import_semantic_conventions.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions.TelemetrySdkLanguageValues.NODEJS, _a[import_semantic_conventions.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION, _a);
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
|
|
@@ -892,12 +892,12 @@ var init_ExportResult = __esm({
|
|
|
892
892
|
});
|
|
893
893
|
|
|
894
894
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
895
|
-
var
|
|
895
|
+
var import_api8, __values, CompositePropagator;
|
|
896
896
|
var init_composite = __esm({
|
|
897
897
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
898
898
|
"use strict";
|
|
899
|
-
|
|
900
|
-
|
|
899
|
+
import_api8 = require("@opentelemetry/api");
|
|
900
|
+
__values = function(o) {
|
|
901
901
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
902
902
|
if (m)
|
|
903
903
|
return m.call(o);
|
|
@@ -914,9 +914,9 @@ var init_composite = __esm({
|
|
|
914
914
|
};
|
|
915
915
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
916
916
|
};
|
|
917
|
-
|
|
917
|
+
CompositePropagator = /** @class */
|
|
918
918
|
function() {
|
|
919
|
-
function
|
|
919
|
+
function CompositePropagator4(config) {
|
|
920
920
|
if (config === void 0) {
|
|
921
921
|
config = {};
|
|
922
922
|
}
|
|
@@ -928,16 +928,16 @@ var init_composite = __esm({
|
|
|
928
928
|
return x.concat(y);
|
|
929
929
|
}, [])));
|
|
930
930
|
}
|
|
931
|
-
__name(
|
|
932
|
-
|
|
931
|
+
__name(CompositePropagator4, "CompositePropagator");
|
|
932
|
+
CompositePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
933
933
|
var e_1, _a4;
|
|
934
934
|
try {
|
|
935
|
-
for (var _b =
|
|
935
|
+
for (var _b = __values(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
936
936
|
var propagator = _c.value;
|
|
937
937
|
try {
|
|
938
938
|
propagator.inject(context5, carrier, setter);
|
|
939
939
|
} catch (err) {
|
|
940
|
-
|
|
940
|
+
import_api8.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
941
941
|
}
|
|
942
942
|
}
|
|
943
943
|
} catch (e_1_1) {
|
|
@@ -954,65 +954,65 @@ var init_composite = __esm({
|
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
};
|
|
957
|
-
|
|
957
|
+
CompositePropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
958
958
|
return this._propagators.reduce(function(ctx, propagator) {
|
|
959
959
|
try {
|
|
960
960
|
return propagator.extract(ctx, carrier, getter);
|
|
961
961
|
} catch (err) {
|
|
962
|
-
|
|
962
|
+
import_api8.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
963
963
|
}
|
|
964
964
|
return ctx;
|
|
965
965
|
}, context5);
|
|
966
966
|
};
|
|
967
|
-
|
|
967
|
+
CompositePropagator4.prototype.fields = function() {
|
|
968
968
|
return this._fields.slice();
|
|
969
969
|
};
|
|
970
|
-
return
|
|
970
|
+
return CompositePropagator4;
|
|
971
971
|
}();
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
|
|
975
975
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
976
|
-
function
|
|
977
|
-
return
|
|
976
|
+
function validateKey(key) {
|
|
977
|
+
return VALID_KEY_REGEX.test(key);
|
|
978
978
|
}
|
|
979
|
-
function
|
|
980
|
-
return
|
|
979
|
+
function validateValue(value) {
|
|
980
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
981
981
|
}
|
|
982
|
-
var
|
|
982
|
+
var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
|
|
983
983
|
var init_validators = __esm({
|
|
984
984
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/internal/validators.js"() {
|
|
985
985
|
"use strict";
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
__name(
|
|
993
|
-
__name(
|
|
986
|
+
VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
987
|
+
VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
988
|
+
VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
989
|
+
VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
990
|
+
VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
991
|
+
INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
992
|
+
__name(validateKey, "validateKey");
|
|
993
|
+
__name(validateValue, "validateValue");
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
|
|
997
997
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
998
|
-
var
|
|
998
|
+
var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceState;
|
|
999
999
|
var init_TraceState = __esm({
|
|
1000
1000
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js"() {
|
|
1001
1001
|
"use strict";
|
|
1002
1002
|
init_validators();
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1003
|
+
MAX_TRACE_STATE_ITEMS = 32;
|
|
1004
|
+
MAX_TRACE_STATE_LEN = 512;
|
|
1005
|
+
LIST_MEMBERS_SEPARATOR = ",";
|
|
1006
|
+
LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
1007
|
+
TraceState = /** @class */
|
|
1008
1008
|
function() {
|
|
1009
|
-
function
|
|
1009
|
+
function TraceState4(rawTraceState) {
|
|
1010
1010
|
this._internalState = /* @__PURE__ */ new Map();
|
|
1011
1011
|
if (rawTraceState)
|
|
1012
1012
|
this._parse(rawTraceState);
|
|
1013
1013
|
}
|
|
1014
|
-
__name(
|
|
1015
|
-
|
|
1014
|
+
__name(TraceState4, "TraceState");
|
|
1015
|
+
TraceState4.prototype.set = function(key, value) {
|
|
1016
1016
|
var traceState = this._clone();
|
|
1017
1017
|
if (traceState._internalState.has(key)) {
|
|
1018
1018
|
traceState._internalState.delete(key);
|
|
@@ -1020,57 +1020,57 @@ var init_TraceState = __esm({
|
|
|
1020
1020
|
traceState._internalState.set(key, value);
|
|
1021
1021
|
return traceState;
|
|
1022
1022
|
};
|
|
1023
|
-
|
|
1023
|
+
TraceState4.prototype.unset = function(key) {
|
|
1024
1024
|
var traceState = this._clone();
|
|
1025
1025
|
traceState._internalState.delete(key);
|
|
1026
1026
|
return traceState;
|
|
1027
1027
|
};
|
|
1028
|
-
|
|
1028
|
+
TraceState4.prototype.get = function(key) {
|
|
1029
1029
|
return this._internalState.get(key);
|
|
1030
1030
|
};
|
|
1031
|
-
|
|
1031
|
+
TraceState4.prototype.serialize = function() {
|
|
1032
1032
|
var _this = this;
|
|
1033
1033
|
return this._keys().reduce(function(agg, key) {
|
|
1034
|
-
agg.push(key +
|
|
1034
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
1035
1035
|
return agg;
|
|
1036
|
-
}, []).join(
|
|
1036
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
1037
1037
|
};
|
|
1038
|
-
|
|
1039
|
-
if (rawTraceState.length >
|
|
1038
|
+
TraceState4.prototype._parse = function(rawTraceState) {
|
|
1039
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
1040
1040
|
return;
|
|
1041
|
-
this._internalState = rawTraceState.split(
|
|
1041
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) {
|
|
1042
1042
|
var listMember = part.trim();
|
|
1043
|
-
var i = listMember.indexOf(
|
|
1043
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
1044
1044
|
if (i !== -1) {
|
|
1045
1045
|
var key = listMember.slice(0, i);
|
|
1046
1046
|
var value = listMember.slice(i + 1, part.length);
|
|
1047
|
-
if (
|
|
1047
|
+
if (validateKey(key) && validateValue(value)) {
|
|
1048
1048
|
agg.set(key, value);
|
|
1049
1049
|
} else {
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
return agg;
|
|
1053
1053
|
}, /* @__PURE__ */ new Map());
|
|
1054
|
-
if (this._internalState.size >
|
|
1055
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0,
|
|
1054
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
1055
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
1056
1056
|
}
|
|
1057
1057
|
};
|
|
1058
|
-
|
|
1058
|
+
TraceState4.prototype._keys = function() {
|
|
1059
1059
|
return Array.from(this._internalState.keys()).reverse();
|
|
1060
1060
|
};
|
|
1061
|
-
|
|
1062
|
-
var traceState = new
|
|
1061
|
+
TraceState4.prototype._clone = function() {
|
|
1062
|
+
var traceState = new TraceState4();
|
|
1063
1063
|
traceState._internalState = new Map(this._internalState);
|
|
1064
1064
|
return traceState;
|
|
1065
1065
|
};
|
|
1066
|
-
return
|
|
1066
|
+
return TraceState4;
|
|
1067
1067
|
}();
|
|
1068
1068
|
}
|
|
1069
1069
|
});
|
|
1070
1070
|
|
|
1071
1071
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
1072
|
-
function
|
|
1073
|
-
var match =
|
|
1072
|
+
function parseTraceParent(traceParent) {
|
|
1073
|
+
var match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
1074
1074
|
if (!match)
|
|
1075
1075
|
return null;
|
|
1076
1076
|
if (match[1] === "00" && match[5])
|
|
@@ -1081,62 +1081,62 @@ function parseTraceParent2(traceParent) {
|
|
|
1081
1081
|
traceFlags: parseInt(match[4], 16)
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
var
|
|
1084
|
+
var import_api9, TRACE_PARENT_HEADER, TRACE_STATE_HEADER, VERSION2, VERSION_PART, TRACE_ID_PART, PARENT_ID_PART, FLAGS_PART, TRACE_PARENT_REGEX, W3CTraceContextPropagator;
|
|
1085
1085
|
var init_W3CTraceContextPropagator = __esm({
|
|
1086
1086
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
1087
1087
|
"use strict";
|
|
1088
|
-
|
|
1088
|
+
import_api9 = require("@opentelemetry/api");
|
|
1089
1089
|
init_suppress_tracing();
|
|
1090
1090
|
init_TraceState();
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
__name(
|
|
1100
|
-
|
|
1091
|
+
TRACE_PARENT_HEADER = "traceparent";
|
|
1092
|
+
TRACE_STATE_HEADER = "tracestate";
|
|
1093
|
+
VERSION2 = "00";
|
|
1094
|
+
VERSION_PART = "(?!ff)[\\da-f]{2}";
|
|
1095
|
+
TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
|
|
1096
|
+
PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
|
|
1097
|
+
FLAGS_PART = "[\\da-f]{2}";
|
|
1098
|
+
TRACE_PARENT_REGEX = new RegExp("^\\s?(" + VERSION_PART + ")-(" + TRACE_ID_PART + ")-(" + PARENT_ID_PART + ")-(" + FLAGS_PART + ")(-.*)?\\s?$");
|
|
1099
|
+
__name(parseTraceParent, "parseTraceParent");
|
|
1100
|
+
W3CTraceContextPropagator = /** @class */
|
|
1101
1101
|
function() {
|
|
1102
|
-
function
|
|
1102
|
+
function W3CTraceContextPropagator4() {
|
|
1103
1103
|
}
|
|
1104
|
-
__name(
|
|
1105
|
-
|
|
1106
|
-
var spanContext =
|
|
1107
|
-
if (!spanContext ||
|
|
1104
|
+
__name(W3CTraceContextPropagator4, "W3CTraceContextPropagator");
|
|
1105
|
+
W3CTraceContextPropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
1106
|
+
var spanContext = import_api9.trace.getSpanContext(context5);
|
|
1107
|
+
if (!spanContext || isTracingSuppressed(context5) || !(0, import_api9.isSpanContextValid)(spanContext))
|
|
1108
1108
|
return;
|
|
1109
|
-
var traceParent =
|
|
1110
|
-
setter.set(carrier,
|
|
1109
|
+
var traceParent = VERSION2 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || import_api9.TraceFlags.NONE).toString(16);
|
|
1110
|
+
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
1111
1111
|
if (spanContext.traceState) {
|
|
1112
|
-
setter.set(carrier,
|
|
1112
|
+
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
1113
1113
|
}
|
|
1114
1114
|
};
|
|
1115
|
-
|
|
1116
|
-
var traceParentHeader = getter.get(carrier,
|
|
1115
|
+
W3CTraceContextPropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
1116
|
+
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
1117
1117
|
if (!traceParentHeader)
|
|
1118
1118
|
return context5;
|
|
1119
1119
|
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
1120
1120
|
if (typeof traceParent !== "string")
|
|
1121
1121
|
return context5;
|
|
1122
|
-
var spanContext =
|
|
1122
|
+
var spanContext = parseTraceParent(traceParent);
|
|
1123
1123
|
if (!spanContext)
|
|
1124
1124
|
return context5;
|
|
1125
1125
|
spanContext.isRemote = true;
|
|
1126
|
-
var traceStateHeader = getter.get(carrier,
|
|
1126
|
+
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
1127
1127
|
if (traceStateHeader) {
|
|
1128
1128
|
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
1129
|
-
spanContext.traceState = new
|
|
1129
|
+
spanContext.traceState = new TraceState(typeof state === "string" ? state : void 0);
|
|
1130
1130
|
}
|
|
1131
|
-
return
|
|
1131
|
+
return import_api9.trace.setSpanContext(context5, spanContext);
|
|
1132
1132
|
};
|
|
1133
|
-
|
|
1133
|
+
W3CTraceContextPropagator4.prototype.fields = function() {
|
|
1134
1134
|
return [
|
|
1135
|
-
|
|
1136
|
-
|
|
1135
|
+
TRACE_PARENT_HEADER,
|
|
1136
|
+
TRACE_STATE_HEADER
|
|
1137
1137
|
];
|
|
1138
1138
|
};
|
|
1139
|
-
return
|
|
1139
|
+
return W3CTraceContextPropagator4;
|
|
1140
1140
|
}();
|
|
1141
1141
|
}
|
|
1142
1142
|
});
|
|
@@ -1149,12 +1149,12 @@ var init_IdGenerator = __esm({
|
|
|
1149
1149
|
});
|
|
1150
1150
|
|
|
1151
1151
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js
|
|
1152
|
-
var
|
|
1152
|
+
var import_api10, RPC_METADATA_KEY, RPCType;
|
|
1153
1153
|
var init_rpc_metadata = __esm({
|
|
1154
1154
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
1155
1155
|
"use strict";
|
|
1156
|
-
|
|
1157
|
-
RPC_METADATA_KEY = (0,
|
|
1156
|
+
import_api10 = require("@opentelemetry/api");
|
|
1157
|
+
RPC_METADATA_KEY = (0, import_api10.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
1158
1158
|
(function(RPCType4) {
|
|
1159
1159
|
RPCType4["HTTP"] = "http";
|
|
1160
1160
|
})(RPCType || (RPCType = {}));
|
|
@@ -1162,11 +1162,11 @@ var init_rpc_metadata = __esm({
|
|
|
1162
1162
|
});
|
|
1163
1163
|
|
|
1164
1164
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js
|
|
1165
|
-
var
|
|
1165
|
+
var import_api11, AlwaysOffSampler;
|
|
1166
1166
|
var init_AlwaysOffSampler = __esm({
|
|
1167
1167
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js"() {
|
|
1168
1168
|
"use strict";
|
|
1169
|
-
|
|
1169
|
+
import_api11 = require("@opentelemetry/api");
|
|
1170
1170
|
AlwaysOffSampler = /** @class */
|
|
1171
1171
|
function() {
|
|
1172
1172
|
function AlwaysOffSampler5() {
|
|
@@ -1174,7 +1174,7 @@ var init_AlwaysOffSampler = __esm({
|
|
|
1174
1174
|
__name(AlwaysOffSampler5, "AlwaysOffSampler");
|
|
1175
1175
|
AlwaysOffSampler5.prototype.shouldSample = function() {
|
|
1176
1176
|
return {
|
|
1177
|
-
decision:
|
|
1177
|
+
decision: import_api11.SamplingDecision.NOT_RECORD
|
|
1178
1178
|
};
|
|
1179
1179
|
};
|
|
1180
1180
|
AlwaysOffSampler5.prototype.toString = function() {
|
|
@@ -1186,11 +1186,11 @@ var init_AlwaysOffSampler = __esm({
|
|
|
1186
1186
|
});
|
|
1187
1187
|
|
|
1188
1188
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js
|
|
1189
|
-
var
|
|
1189
|
+
var import_api12, AlwaysOnSampler;
|
|
1190
1190
|
var init_AlwaysOnSampler = __esm({
|
|
1191
1191
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js"() {
|
|
1192
1192
|
"use strict";
|
|
1193
|
-
|
|
1193
|
+
import_api12 = require("@opentelemetry/api");
|
|
1194
1194
|
AlwaysOnSampler = /** @class */
|
|
1195
1195
|
function() {
|
|
1196
1196
|
function AlwaysOnSampler5() {
|
|
@@ -1198,7 +1198,7 @@ var init_AlwaysOnSampler = __esm({
|
|
|
1198
1198
|
__name(AlwaysOnSampler5, "AlwaysOnSampler");
|
|
1199
1199
|
AlwaysOnSampler5.prototype.shouldSample = function() {
|
|
1200
1200
|
return {
|
|
1201
|
-
decision:
|
|
1201
|
+
decision: import_api12.SamplingDecision.RECORD_AND_SAMPLED
|
|
1202
1202
|
};
|
|
1203
1203
|
};
|
|
1204
1204
|
AlwaysOnSampler5.prototype.toString = function() {
|
|
@@ -1210,11 +1210,11 @@ var init_AlwaysOnSampler = __esm({
|
|
|
1210
1210
|
});
|
|
1211
1211
|
|
|
1212
1212
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js
|
|
1213
|
-
var
|
|
1213
|
+
var import_api13, ParentBasedSampler;
|
|
1214
1214
|
var init_ParentBasedSampler = __esm({
|
|
1215
1215
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
1216
1216
|
"use strict";
|
|
1217
|
-
|
|
1217
|
+
import_api13 = require("@opentelemetry/api");
|
|
1218
1218
|
init_global_error_handler();
|
|
1219
1219
|
init_AlwaysOffSampler();
|
|
1220
1220
|
init_AlwaysOnSampler();
|
|
@@ -1234,17 +1234,17 @@ var init_ParentBasedSampler = __esm({
|
|
|
1234
1234
|
}
|
|
1235
1235
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
1236
1236
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
1237
|
-
var parentContext =
|
|
1238
|
-
if (!parentContext || !(0,
|
|
1237
|
+
var parentContext = import_api13.trace.getSpanContext(context5);
|
|
1238
|
+
if (!parentContext || !(0, import_api13.isSpanContextValid)(parentContext)) {
|
|
1239
1239
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1240
1240
|
}
|
|
1241
1241
|
if (parentContext.isRemote) {
|
|
1242
|
-
if (parentContext.traceFlags &
|
|
1242
|
+
if (parentContext.traceFlags & import_api13.TraceFlags.SAMPLED) {
|
|
1243
1243
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1244
1244
|
}
|
|
1245
1245
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1246
1246
|
}
|
|
1247
|
-
if (parentContext.traceFlags &
|
|
1247
|
+
if (parentContext.traceFlags & import_api13.TraceFlags.SAMPLED) {
|
|
1248
1248
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1249
1249
|
}
|
|
1250
1250
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -1258,11 +1258,11 @@ var init_ParentBasedSampler = __esm({
|
|
|
1258
1258
|
});
|
|
1259
1259
|
|
|
1260
1260
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js
|
|
1261
|
-
var
|
|
1261
|
+
var import_api14, TraceIdRatioBasedSampler;
|
|
1262
1262
|
var init_TraceIdRatioBasedSampler = __esm({
|
|
1263
1263
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js"() {
|
|
1264
1264
|
"use strict";
|
|
1265
|
-
|
|
1265
|
+
import_api14 = require("@opentelemetry/api");
|
|
1266
1266
|
TraceIdRatioBasedSampler = /** @class */
|
|
1267
1267
|
function() {
|
|
1268
1268
|
function TraceIdRatioBasedSampler5(_ratio) {
|
|
@@ -1276,7 +1276,7 @@ var init_TraceIdRatioBasedSampler = __esm({
|
|
|
1276
1276
|
__name(TraceIdRatioBasedSampler5, "TraceIdRatioBasedSampler");
|
|
1277
1277
|
TraceIdRatioBasedSampler5.prototype.shouldSample = function(context5, traceId) {
|
|
1278
1278
|
return {
|
|
1279
|
-
decision: (0,
|
|
1279
|
+
decision: (0, import_api14.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? import_api14.SamplingDecision.RECORD_AND_SAMPLED : import_api14.SamplingDecision.NOT_RECORD
|
|
1280
1280
|
};
|
|
1281
1281
|
};
|
|
1282
1282
|
TraceIdRatioBasedSampler5.prototype.toString = function() {
|
|
@@ -1525,12 +1525,12 @@ var init_esm = __esm({
|
|
|
1525
1525
|
});
|
|
1526
1526
|
|
|
1527
1527
|
// node_modules/@opentelemetry/propagator-b3/build/esm/common.js
|
|
1528
|
-
var
|
|
1528
|
+
var import_api15, B3_DEBUG_FLAG_KEY;
|
|
1529
1529
|
var init_common = __esm({
|
|
1530
1530
|
"node_modules/@opentelemetry/propagator-b3/build/esm/common.js"() {
|
|
1531
1531
|
"use strict";
|
|
1532
|
-
|
|
1533
|
-
B3_DEBUG_FLAG_KEY = (0,
|
|
1532
|
+
import_api15 = require("@opentelemetry/api");
|
|
1533
|
+
B3_DEBUG_FLAG_KEY = (0, import_api15.createContextKey)("OpenTelemetry Context Key B3 Debug Flag");
|
|
1534
1534
|
}
|
|
1535
1535
|
});
|
|
1536
1536
|
|
|
@@ -1550,7 +1550,7 @@ var init_constants2 = __esm({
|
|
|
1550
1550
|
|
|
1551
1551
|
// node_modules/@opentelemetry/propagator-b3/build/esm/B3MultiPropagator.js
|
|
1552
1552
|
function isValidSampledValue(sampled) {
|
|
1553
|
-
return sampled ===
|
|
1553
|
+
return sampled === import_api16.TraceFlags.SAMPLED || sampled === import_api16.TraceFlags.NONE;
|
|
1554
1554
|
}
|
|
1555
1555
|
function parseHeader(header) {
|
|
1556
1556
|
return Array.isArray(header) ? header[0] : header;
|
|
@@ -1581,18 +1581,18 @@ function getTraceFlags(carrier, getter) {
|
|
|
1581
1581
|
var traceFlags = getHeaderValue(carrier, getter, X_B3_SAMPLED);
|
|
1582
1582
|
var debug = getDebug(carrier, getter);
|
|
1583
1583
|
if (debug === "1" || VALID_SAMPLED_VALUES.has(traceFlags)) {
|
|
1584
|
-
return
|
|
1584
|
+
return import_api16.TraceFlags.SAMPLED;
|
|
1585
1585
|
}
|
|
1586
1586
|
if (traceFlags === void 0 || VALID_UNSAMPLED_VALUES.has(traceFlags)) {
|
|
1587
|
-
return
|
|
1587
|
+
return import_api16.TraceFlags.NONE;
|
|
1588
1588
|
}
|
|
1589
1589
|
return;
|
|
1590
1590
|
}
|
|
1591
|
-
var
|
|
1591
|
+
var import_api16, VALID_SAMPLED_VALUES, VALID_UNSAMPLED_VALUES, B3MultiPropagator;
|
|
1592
1592
|
var init_B3MultiPropagator = __esm({
|
|
1593
1593
|
"node_modules/@opentelemetry/propagator-b3/build/esm/B3MultiPropagator.js"() {
|
|
1594
1594
|
"use strict";
|
|
1595
|
-
|
|
1595
|
+
import_api16 = require("@opentelemetry/api");
|
|
1596
1596
|
init_esm();
|
|
1597
1597
|
init_common();
|
|
1598
1598
|
init_constants2();
|
|
@@ -1623,8 +1623,8 @@ var init_B3MultiPropagator = __esm({
|
|
|
1623
1623
|
}
|
|
1624
1624
|
__name(B3MultiPropagator2, "B3MultiPropagator");
|
|
1625
1625
|
B3MultiPropagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1626
|
-
var spanContext =
|
|
1627
|
-
if (!spanContext || !(0,
|
|
1626
|
+
var spanContext = import_api16.trace.getSpanContext(context5);
|
|
1627
|
+
if (!spanContext || !(0, import_api16.isSpanContextValid)(spanContext) || isTracingSuppressed(context5))
|
|
1628
1628
|
return;
|
|
1629
1629
|
var debug = context5.getValue(B3_DEBUG_FLAG_KEY);
|
|
1630
1630
|
setter.set(carrier, X_B3_TRACE_ID, spanContext.traceId);
|
|
@@ -1632,7 +1632,7 @@ var init_B3MultiPropagator = __esm({
|
|
|
1632
1632
|
if (debug === "1") {
|
|
1633
1633
|
setter.set(carrier, X_B3_FLAGS, debug);
|
|
1634
1634
|
} else if (spanContext.traceFlags !== void 0) {
|
|
1635
|
-
setter.set(carrier, X_B3_SAMPLED, (
|
|
1635
|
+
setter.set(carrier, X_B3_SAMPLED, (import_api16.TraceFlags.SAMPLED & spanContext.traceFlags) === import_api16.TraceFlags.SAMPLED ? "1" : "0");
|
|
1636
1636
|
}
|
|
1637
1637
|
};
|
|
1638
1638
|
B3MultiPropagator2.prototype.extract = function(context5, carrier, getter) {
|
|
@@ -1640,9 +1640,9 @@ var init_B3MultiPropagator = __esm({
|
|
|
1640
1640
|
var spanId = getSpanId(carrier, getter);
|
|
1641
1641
|
var traceFlags = getTraceFlags(carrier, getter);
|
|
1642
1642
|
var debug = getDebug(carrier, getter);
|
|
1643
|
-
if ((0,
|
|
1643
|
+
if ((0, import_api16.isValidTraceId)(traceId) && (0, import_api16.isValidSpanId)(spanId) && isValidSampledValue(traceFlags)) {
|
|
1644
1644
|
context5 = context5.setValue(B3_DEBUG_FLAG_KEY, debug);
|
|
1645
|
-
return
|
|
1645
|
+
return import_api16.trace.setSpanContext(context5, {
|
|
1646
1646
|
traceId,
|
|
1647
1647
|
spanId,
|
|
1648
1648
|
isRemote: true,
|
|
@@ -1671,15 +1671,15 @@ function convertToTraceId128(traceId) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
function convertToTraceFlags(samplingState) {
|
|
1673
1673
|
if (samplingState && SAMPLED_VALUES.has(samplingState)) {
|
|
1674
|
-
return
|
|
1674
|
+
return import_api17.TraceFlags.SAMPLED;
|
|
1675
1675
|
}
|
|
1676
|
-
return
|
|
1676
|
+
return import_api17.TraceFlags.NONE;
|
|
1677
1677
|
}
|
|
1678
|
-
var
|
|
1678
|
+
var import_api17, __read3, B3_CONTEXT_REGEX, PADDING, SAMPLED_VALUES, DEBUG_STATE, B3SinglePropagator;
|
|
1679
1679
|
var init_B3SinglePropagator = __esm({
|
|
1680
1680
|
"node_modules/@opentelemetry/propagator-b3/build/esm/B3SinglePropagator.js"() {
|
|
1681
1681
|
"use strict";
|
|
1682
|
-
|
|
1682
|
+
import_api17 = require("@opentelemetry/api");
|
|
1683
1683
|
init_esm();
|
|
1684
1684
|
init_common();
|
|
1685
1685
|
init_constants2();
|
|
@@ -1721,8 +1721,8 @@ var init_B3SinglePropagator = __esm({
|
|
|
1721
1721
|
}
|
|
1722
1722
|
__name(B3SinglePropagator2, "B3SinglePropagator");
|
|
1723
1723
|
B3SinglePropagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1724
|
-
var spanContext =
|
|
1725
|
-
if (!spanContext || !(0,
|
|
1724
|
+
var spanContext = import_api17.trace.getSpanContext(context5);
|
|
1725
|
+
if (!spanContext || !(0, import_api17.isSpanContextValid)(spanContext) || isTracingSuppressed(context5))
|
|
1726
1726
|
return;
|
|
1727
1727
|
var samplingState = context5.getValue(B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
|
|
1728
1728
|
var value = spanContext.traceId + "-" + spanContext.spanId + "-" + samplingState;
|
|
@@ -1738,13 +1738,13 @@ var init_B3SinglePropagator = __esm({
|
|
|
1738
1738
|
return context5;
|
|
1739
1739
|
var _a4 = __read3(match, 4), extractedTraceId = _a4[1], spanId = _a4[2], samplingState = _a4[3];
|
|
1740
1740
|
var traceId = convertToTraceId128(extractedTraceId);
|
|
1741
|
-
if (!(0,
|
|
1741
|
+
if (!(0, import_api17.isValidTraceId)(traceId) || !(0, import_api17.isValidSpanId)(spanId))
|
|
1742
1742
|
return context5;
|
|
1743
1743
|
var traceFlags = convertToTraceFlags(samplingState);
|
|
1744
1744
|
if (samplingState === DEBUG_STATE) {
|
|
1745
1745
|
context5 = context5.setValue(B3_DEBUG_FLAG_KEY, samplingState);
|
|
1746
1746
|
}
|
|
1747
|
-
return
|
|
1747
|
+
return import_api17.trace.setSpanContext(context5, {
|
|
1748
1748
|
traceId,
|
|
1749
1749
|
spanId,
|
|
1750
1750
|
isRemote: true,
|
|
@@ -1801,7 +1801,7 @@ var init_B3Propagator = __esm({
|
|
|
1801
1801
|
}
|
|
1802
1802
|
__name(B3Propagator2, "B3Propagator");
|
|
1803
1803
|
B3Propagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1804
|
-
if (
|
|
1804
|
+
if (isTracingSuppressed(context5)) {
|
|
1805
1805
|
return;
|
|
1806
1806
|
}
|
|
1807
1807
|
this._inject(context5, carrier, setter);
|
|
@@ -1846,19 +1846,19 @@ var init_esm2 = __esm({
|
|
|
1846
1846
|
|
|
1847
1847
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
1848
1848
|
function suppressTracing(context5) {
|
|
1849
|
-
return context5.setValue(
|
|
1849
|
+
return context5.setValue(SUPPRESS_TRACING_KEY2, true);
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return context5.getValue(
|
|
1851
|
+
function isTracingSuppressed2(context5) {
|
|
1852
|
+
return context5.getValue(SUPPRESS_TRACING_KEY2) === true;
|
|
1853
1853
|
}
|
|
1854
|
-
var
|
|
1854
|
+
var import_api18, SUPPRESS_TRACING_KEY2;
|
|
1855
1855
|
var init_suppress_tracing2 = __esm({
|
|
1856
1856
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
1857
1857
|
"use strict";
|
|
1858
|
-
|
|
1859
|
-
|
|
1858
|
+
import_api18 = require("@opentelemetry/api");
|
|
1859
|
+
SUPPRESS_TRACING_KEY2 = (0, import_api18.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
1860
1860
|
__name(suppressTracing, "suppressTracing");
|
|
1861
|
-
__name(
|
|
1861
|
+
__name(isTracingSuppressed2, "isTracingSuppressed");
|
|
1862
1862
|
}
|
|
1863
1863
|
});
|
|
1864
1864
|
|
|
@@ -1908,7 +1908,7 @@ function parsePairKeyValue2(entry) {
|
|
|
1908
1908
|
var value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());
|
|
1909
1909
|
var metadata;
|
|
1910
1910
|
if (valueProps.length > 0) {
|
|
1911
|
-
metadata = (0,
|
|
1911
|
+
metadata = (0, import_api19.baggageEntryMetadataFromString)(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR2));
|
|
1912
1912
|
}
|
|
1913
1913
|
return {
|
|
1914
1914
|
key,
|
|
@@ -1916,11 +1916,11 @@ function parsePairKeyValue2(entry) {
|
|
|
1916
1916
|
metadata
|
|
1917
1917
|
};
|
|
1918
1918
|
}
|
|
1919
|
-
var
|
|
1919
|
+
var import_api19, __read4;
|
|
1920
1920
|
var init_utils2 = __esm({
|
|
1921
1921
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/baggage/utils.js"() {
|
|
1922
1922
|
"use strict";
|
|
1923
|
-
|
|
1923
|
+
import_api19 = require("@opentelemetry/api");
|
|
1924
1924
|
init_constants3();
|
|
1925
1925
|
__read4 = function(o, n) {
|
|
1926
1926
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -1952,11 +1952,11 @@ var init_utils2 = __esm({
|
|
|
1952
1952
|
});
|
|
1953
1953
|
|
|
1954
1954
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js
|
|
1955
|
-
var
|
|
1955
|
+
var import_api20, W3CBaggagePropagator2;
|
|
1956
1956
|
var init_W3CBaggagePropagator2 = __esm({
|
|
1957
1957
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js"() {
|
|
1958
1958
|
"use strict";
|
|
1959
|
-
|
|
1959
|
+
import_api20 = require("@opentelemetry/api");
|
|
1960
1960
|
init_suppress_tracing2();
|
|
1961
1961
|
init_constants3();
|
|
1962
1962
|
init_utils2();
|
|
@@ -1966,8 +1966,8 @@ var init_W3CBaggagePropagator2 = __esm({
|
|
|
1966
1966
|
}
|
|
1967
1967
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
1968
1968
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
1969
|
-
var baggage =
|
|
1970
|
-
if (!baggage ||
|
|
1969
|
+
var baggage = import_api20.propagation.getBaggage(context5);
|
|
1970
|
+
if (!baggage || isTracingSuppressed2(context5))
|
|
1971
1971
|
return;
|
|
1972
1972
|
var keyPairs = getKeyPairs2(baggage).filter(function(pair) {
|
|
1973
1973
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS2;
|
|
@@ -2002,7 +2002,7 @@ var init_W3CBaggagePropagator2 = __esm({
|
|
|
2002
2002
|
if (Object.entries(baggage).length === 0) {
|
|
2003
2003
|
return context5;
|
|
2004
2004
|
}
|
|
2005
|
-
return
|
|
2005
|
+
return import_api20.propagation.setBaggage(context5, import_api20.propagation.createBaggage(baggage));
|
|
2006
2006
|
};
|
|
2007
2007
|
W3CBaggagePropagator4.prototype.fields = function() {
|
|
2008
2008
|
return [
|
|
@@ -2044,14 +2044,14 @@ function sanitizeAttributes(attributes) {
|
|
|
2044
2044
|
return out;
|
|
2045
2045
|
}
|
|
2046
2046
|
try {
|
|
2047
|
-
for (var _b =
|
|
2047
|
+
for (var _b = __values2(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2048
2048
|
var _d = __read5(_c.value, 2), key = _d[0], val = _d[1];
|
|
2049
2049
|
if (!isAttributeKey(key)) {
|
|
2050
|
-
|
|
2050
|
+
import_api21.diag.warn("Invalid attribute key: " + key);
|
|
2051
2051
|
continue;
|
|
2052
2052
|
}
|
|
2053
2053
|
if (!isAttributeValue(val)) {
|
|
2054
|
-
|
|
2054
|
+
import_api21.diag.warn("Invalid attribute value set for key: " + key);
|
|
2055
2055
|
continue;
|
|
2056
2056
|
}
|
|
2057
2057
|
if (Array.isArray(val)) {
|
|
@@ -2091,7 +2091,7 @@ function isHomogeneousAttributeValueArray(arr) {
|
|
|
2091
2091
|
var e_2, _a4;
|
|
2092
2092
|
var type;
|
|
2093
2093
|
try {
|
|
2094
|
-
for (var arr_1 =
|
|
2094
|
+
for (var arr_1 = __values2(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) {
|
|
2095
2095
|
var element = arr_1_1.value;
|
|
2096
2096
|
if (element == null)
|
|
2097
2097
|
continue;
|
|
@@ -2131,12 +2131,12 @@ function isValidPrimitiveAttributeValue(val) {
|
|
|
2131
2131
|
}
|
|
2132
2132
|
return false;
|
|
2133
2133
|
}
|
|
2134
|
-
var
|
|
2134
|
+
var import_api21, __values2, __read5;
|
|
2135
2135
|
var init_attributes2 = __esm({
|
|
2136
2136
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
2137
2137
|
"use strict";
|
|
2138
|
-
|
|
2139
|
-
|
|
2138
|
+
import_api21 = require("@opentelemetry/api");
|
|
2139
|
+
__values2 = function(o) {
|
|
2140
2140
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2141
2141
|
if (m)
|
|
2142
2142
|
return m.call(o);
|
|
@@ -2187,7 +2187,7 @@ var init_attributes2 = __esm({
|
|
|
2187
2187
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
2188
2188
|
function loggingErrorHandler2() {
|
|
2189
2189
|
return function(ex) {
|
|
2190
|
-
|
|
2190
|
+
import_api22.diag.error(stringifyException2(ex));
|
|
2191
2191
|
};
|
|
2192
2192
|
}
|
|
2193
2193
|
function stringifyException2(ex) {
|
|
@@ -2213,11 +2213,11 @@ function flattenException2(ex) {
|
|
|
2213
2213
|
}
|
|
2214
2214
|
return result;
|
|
2215
2215
|
}
|
|
2216
|
-
var
|
|
2216
|
+
var import_api22;
|
|
2217
2217
|
var init_logging_error_handler2 = __esm({
|
|
2218
2218
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js"() {
|
|
2219
2219
|
"use strict";
|
|
2220
|
-
|
|
2220
|
+
import_api22 = require("@opentelemetry/api");
|
|
2221
2221
|
__name(loggingErrorHandler2, "loggingErrorHandler");
|
|
2222
2222
|
__name(stringifyException2, "stringifyException");
|
|
2223
2223
|
__name(flattenException2, "flattenException");
|
|
@@ -2339,11 +2339,11 @@ function parseEnvironment(values) {
|
|
|
2339
2339
|
}
|
|
2340
2340
|
return environment;
|
|
2341
2341
|
}
|
|
2342
|
-
var
|
|
2342
|
+
var import_api23, DEFAULT_LIST_SEPARATOR, ENVIRONMENT_BOOLEAN_KEYS, ENVIRONMENT_NUMBERS_KEYS, ENVIRONMENT_LISTS_KEYS, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT2, DEFAULT_ATTRIBUTE_COUNT_LIMIT2, DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT2, DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT2, DEFAULT_ENVIRONMENT2, logLevelMap2;
|
|
2343
2343
|
var init_environment2 = __esm({
|
|
2344
2344
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/utils/environment.js"() {
|
|
2345
2345
|
"use strict";
|
|
2346
|
-
|
|
2346
|
+
import_api23 = require("@opentelemetry/api");
|
|
2347
2347
|
init_sampling2();
|
|
2348
2348
|
DEFAULT_LIST_SEPARATOR = ",";
|
|
2349
2349
|
ENVIRONMENT_BOOLEAN_KEYS = [
|
|
@@ -2419,7 +2419,7 @@ var init_environment2 = __esm({
|
|
|
2419
2419
|
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 1e4,
|
|
2420
2420
|
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 1e4,
|
|
2421
2421
|
OTEL_EXPORTER_ZIPKIN_ENDPOINT: "http://localhost:9411/api/v2/spans",
|
|
2422
|
-
OTEL_LOG_LEVEL:
|
|
2422
|
+
OTEL_LOG_LEVEL: import_api23.DiagLogLevel.INFO,
|
|
2423
2423
|
OTEL_NO_PATCH_MODULES: [],
|
|
2424
2424
|
OTEL_PROPAGATORS: [
|
|
2425
2425
|
"tracecontext",
|
|
@@ -2471,13 +2471,13 @@ var init_environment2 = __esm({
|
|
|
2471
2471
|
__name(parseNumber, "parseNumber");
|
|
2472
2472
|
__name(parseStringList, "parseStringList");
|
|
2473
2473
|
logLevelMap2 = {
|
|
2474
|
-
ALL:
|
|
2475
|
-
VERBOSE:
|
|
2476
|
-
DEBUG:
|
|
2477
|
-
INFO:
|
|
2478
|
-
WARN:
|
|
2479
|
-
ERROR:
|
|
2480
|
-
NONE:
|
|
2474
|
+
ALL: import_api23.DiagLogLevel.ALL,
|
|
2475
|
+
VERBOSE: import_api23.DiagLogLevel.VERBOSE,
|
|
2476
|
+
DEBUG: import_api23.DiagLogLevel.DEBUG,
|
|
2477
|
+
INFO: import_api23.DiagLogLevel.INFO,
|
|
2478
|
+
WARN: import_api23.DiagLogLevel.WARN,
|
|
2479
|
+
ERROR: import_api23.DiagLogLevel.ERROR,
|
|
2480
|
+
NONE: import_api23.DiagLogLevel.NONE
|
|
2481
2481
|
};
|
|
2482
2482
|
__name(setLogLevelFromEnv, "setLogLevelFromEnv");
|
|
2483
2483
|
__name(parseEnvironment, "parseEnvironment");
|
|
@@ -2571,11 +2571,11 @@ var init_performance2 = __esm({
|
|
|
2571
2571
|
});
|
|
2572
2572
|
|
|
2573
2573
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/version.js
|
|
2574
|
-
var
|
|
2574
|
+
var VERSION3;
|
|
2575
2575
|
var init_version2 = __esm({
|
|
2576
2576
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/version.js"() {
|
|
2577
2577
|
"use strict";
|
|
2578
|
-
|
|
2578
|
+
VERSION3 = "1.24.1";
|
|
2579
2579
|
}
|
|
2580
2580
|
});
|
|
2581
2581
|
|
|
@@ -2586,7 +2586,7 @@ var init_sdk_info2 = __esm({
|
|
|
2586
2586
|
"use strict";
|
|
2587
2587
|
init_version2();
|
|
2588
2588
|
import_semantic_conventions2 = require("@opentelemetry/semantic-conventions");
|
|
2589
|
-
SDK_INFO2 = (_a2 = {}, _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a2[import_semantic_conventions2.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions2.TelemetrySdkLanguageValues.NODEJS, _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] =
|
|
2589
|
+
SDK_INFO2 = (_a2 = {}, _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a2[import_semantic_conventions2.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions2.TelemetrySdkLanguageValues.NODEJS, _a2[import_semantic_conventions2.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION3, _a2);
|
|
2590
2590
|
}
|
|
2591
2591
|
});
|
|
2592
2592
|
|
|
@@ -2718,12 +2718,12 @@ var init_ExportResult2 = __esm({
|
|
|
2718
2718
|
});
|
|
2719
2719
|
|
|
2720
2720
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
2721
|
-
var
|
|
2721
|
+
var import_api24, __values3, CompositePropagator2;
|
|
2722
2722
|
var init_composite2 = __esm({
|
|
2723
2723
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
2724
2724
|
"use strict";
|
|
2725
|
-
|
|
2726
|
-
|
|
2725
|
+
import_api24 = require("@opentelemetry/api");
|
|
2726
|
+
__values3 = function(o) {
|
|
2727
2727
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2728
2728
|
if (m)
|
|
2729
2729
|
return m.call(o);
|
|
@@ -2740,9 +2740,9 @@ var init_composite2 = __esm({
|
|
|
2740
2740
|
};
|
|
2741
2741
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2742
2742
|
};
|
|
2743
|
-
|
|
2743
|
+
CompositePropagator2 = /** @class */
|
|
2744
2744
|
function() {
|
|
2745
|
-
function
|
|
2745
|
+
function CompositePropagator4(config) {
|
|
2746
2746
|
if (config === void 0) {
|
|
2747
2747
|
config = {};
|
|
2748
2748
|
}
|
|
@@ -2754,16 +2754,16 @@ var init_composite2 = __esm({
|
|
|
2754
2754
|
return x.concat(y);
|
|
2755
2755
|
}, [])));
|
|
2756
2756
|
}
|
|
2757
|
-
__name(
|
|
2758
|
-
|
|
2757
|
+
__name(CompositePropagator4, "CompositePropagator");
|
|
2758
|
+
CompositePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
2759
2759
|
var e_1, _a4;
|
|
2760
2760
|
try {
|
|
2761
|
-
for (var _b =
|
|
2761
|
+
for (var _b = __values3(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2762
2762
|
var propagator = _c.value;
|
|
2763
2763
|
try {
|
|
2764
2764
|
propagator.inject(context5, carrier, setter);
|
|
2765
2765
|
} catch (err) {
|
|
2766
|
-
|
|
2766
|
+
import_api24.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
2767
2767
|
}
|
|
2768
2768
|
}
|
|
2769
2769
|
} catch (e_1_1) {
|
|
@@ -2780,65 +2780,65 @@ var init_composite2 = __esm({
|
|
|
2780
2780
|
}
|
|
2781
2781
|
}
|
|
2782
2782
|
};
|
|
2783
|
-
|
|
2783
|
+
CompositePropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
2784
2784
|
return this._propagators.reduce(function(ctx, propagator) {
|
|
2785
2785
|
try {
|
|
2786
2786
|
return propagator.extract(ctx, carrier, getter);
|
|
2787
2787
|
} catch (err) {
|
|
2788
|
-
|
|
2788
|
+
import_api24.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
2789
2789
|
}
|
|
2790
2790
|
return ctx;
|
|
2791
2791
|
}, context5);
|
|
2792
2792
|
};
|
|
2793
|
-
|
|
2793
|
+
CompositePropagator4.prototype.fields = function() {
|
|
2794
2794
|
return this._fields.slice();
|
|
2795
2795
|
};
|
|
2796
|
-
return
|
|
2796
|
+
return CompositePropagator4;
|
|
2797
2797
|
}();
|
|
2798
2798
|
}
|
|
2799
2799
|
});
|
|
2800
2800
|
|
|
2801
2801
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
2802
|
-
function
|
|
2803
|
-
return
|
|
2802
|
+
function validateKey2(key) {
|
|
2803
|
+
return VALID_KEY_REGEX2.test(key);
|
|
2804
2804
|
}
|
|
2805
|
-
function
|
|
2806
|
-
return
|
|
2805
|
+
function validateValue2(value) {
|
|
2806
|
+
return VALID_VALUE_BASE_REGEX2.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX2.test(value);
|
|
2807
2807
|
}
|
|
2808
|
-
var
|
|
2808
|
+
var VALID_KEY_CHAR_RANGE2, VALID_KEY2, VALID_VENDOR_KEY2, VALID_KEY_REGEX2, VALID_VALUE_BASE_REGEX2, INVALID_VALUE_COMMA_EQUAL_REGEX2;
|
|
2809
2809
|
var init_validators2 = __esm({
|
|
2810
2810
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/validators.js"() {
|
|
2811
2811
|
"use strict";
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
__name(
|
|
2819
|
-
__name(
|
|
2812
|
+
VALID_KEY_CHAR_RANGE2 = "[_0-9a-z-*/]";
|
|
2813
|
+
VALID_KEY2 = "[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,255}";
|
|
2814
|
+
VALID_VENDOR_KEY2 = "[a-z0-9]" + VALID_KEY_CHAR_RANGE2 + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,13}";
|
|
2815
|
+
VALID_KEY_REGEX2 = new RegExp("^(?:" + VALID_KEY2 + "|" + VALID_VENDOR_KEY2 + ")$");
|
|
2816
|
+
VALID_VALUE_BASE_REGEX2 = /^[ -~]{0,255}[!-~]$/;
|
|
2817
|
+
INVALID_VALUE_COMMA_EQUAL_REGEX2 = /,|=/;
|
|
2818
|
+
__name(validateKey2, "validateKey");
|
|
2819
|
+
__name(validateValue2, "validateValue");
|
|
2820
2820
|
}
|
|
2821
2821
|
});
|
|
2822
2822
|
|
|
2823
2823
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
2824
|
-
var
|
|
2824
|
+
var MAX_TRACE_STATE_ITEMS2, MAX_TRACE_STATE_LEN2, LIST_MEMBERS_SEPARATOR2, LIST_MEMBER_KEY_VALUE_SPLITTER2, TraceState2;
|
|
2825
2825
|
var init_TraceState2 = __esm({
|
|
2826
2826
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js"() {
|
|
2827
2827
|
"use strict";
|
|
2828
2828
|
init_validators2();
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2829
|
+
MAX_TRACE_STATE_ITEMS2 = 32;
|
|
2830
|
+
MAX_TRACE_STATE_LEN2 = 512;
|
|
2831
|
+
LIST_MEMBERS_SEPARATOR2 = ",";
|
|
2832
|
+
LIST_MEMBER_KEY_VALUE_SPLITTER2 = "=";
|
|
2833
|
+
TraceState2 = /** @class */
|
|
2834
2834
|
function() {
|
|
2835
|
-
function
|
|
2835
|
+
function TraceState4(rawTraceState) {
|
|
2836
2836
|
this._internalState = /* @__PURE__ */ new Map();
|
|
2837
2837
|
if (rawTraceState)
|
|
2838
2838
|
this._parse(rawTraceState);
|
|
2839
2839
|
}
|
|
2840
|
-
__name(
|
|
2841
|
-
|
|
2840
|
+
__name(TraceState4, "TraceState");
|
|
2841
|
+
TraceState4.prototype.set = function(key, value) {
|
|
2842
2842
|
var traceState = this._clone();
|
|
2843
2843
|
if (traceState._internalState.has(key)) {
|
|
2844
2844
|
traceState._internalState.delete(key);
|
|
@@ -2846,57 +2846,57 @@ var init_TraceState2 = __esm({
|
|
|
2846
2846
|
traceState._internalState.set(key, value);
|
|
2847
2847
|
return traceState;
|
|
2848
2848
|
};
|
|
2849
|
-
|
|
2849
|
+
TraceState4.prototype.unset = function(key) {
|
|
2850
2850
|
var traceState = this._clone();
|
|
2851
2851
|
traceState._internalState.delete(key);
|
|
2852
2852
|
return traceState;
|
|
2853
2853
|
};
|
|
2854
|
-
|
|
2854
|
+
TraceState4.prototype.get = function(key) {
|
|
2855
2855
|
return this._internalState.get(key);
|
|
2856
2856
|
};
|
|
2857
|
-
|
|
2857
|
+
TraceState4.prototype.serialize = function() {
|
|
2858
2858
|
var _this = this;
|
|
2859
2859
|
return this._keys().reduce(function(agg, key) {
|
|
2860
|
-
agg.push(key +
|
|
2860
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + _this.get(key));
|
|
2861
2861
|
return agg;
|
|
2862
|
-
}, []).join(
|
|
2862
|
+
}, []).join(LIST_MEMBERS_SEPARATOR2);
|
|
2863
2863
|
};
|
|
2864
|
-
|
|
2865
|
-
if (rawTraceState.length >
|
|
2864
|
+
TraceState4.prototype._parse = function(rawTraceState) {
|
|
2865
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN2)
|
|
2866
2866
|
return;
|
|
2867
|
-
this._internalState = rawTraceState.split(
|
|
2867
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reverse().reduce(function(agg, part) {
|
|
2868
2868
|
var listMember = part.trim();
|
|
2869
|
-
var i = listMember.indexOf(
|
|
2869
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2);
|
|
2870
2870
|
if (i !== -1) {
|
|
2871
2871
|
var key = listMember.slice(0, i);
|
|
2872
2872
|
var value = listMember.slice(i + 1, part.length);
|
|
2873
|
-
if (
|
|
2873
|
+
if (validateKey2(key) && validateValue2(value)) {
|
|
2874
2874
|
agg.set(key, value);
|
|
2875
2875
|
} else {
|
|
2876
2876
|
}
|
|
2877
2877
|
}
|
|
2878
2878
|
return agg;
|
|
2879
2879
|
}, /* @__PURE__ */ new Map());
|
|
2880
|
-
if (this._internalState.size >
|
|
2881
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0,
|
|
2880
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS2) {
|
|
2881
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS2));
|
|
2882
2882
|
}
|
|
2883
2883
|
};
|
|
2884
|
-
|
|
2884
|
+
TraceState4.prototype._keys = function() {
|
|
2885
2885
|
return Array.from(this._internalState.keys()).reverse();
|
|
2886
2886
|
};
|
|
2887
|
-
|
|
2888
|
-
var traceState = new
|
|
2887
|
+
TraceState4.prototype._clone = function() {
|
|
2888
|
+
var traceState = new TraceState4();
|
|
2889
2889
|
traceState._internalState = new Map(this._internalState);
|
|
2890
2890
|
return traceState;
|
|
2891
2891
|
};
|
|
2892
|
-
return
|
|
2892
|
+
return TraceState4;
|
|
2893
2893
|
}();
|
|
2894
2894
|
}
|
|
2895
2895
|
});
|
|
2896
2896
|
|
|
2897
2897
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
2898
|
-
function
|
|
2899
|
-
var match =
|
|
2898
|
+
function parseTraceParent2(traceParent) {
|
|
2899
|
+
var match = TRACE_PARENT_REGEX2.exec(traceParent);
|
|
2900
2900
|
if (!match)
|
|
2901
2901
|
return null;
|
|
2902
2902
|
if (match[1] === "00" && match[5])
|
|
@@ -2907,62 +2907,62 @@ function parseTraceParent3(traceParent) {
|
|
|
2907
2907
|
traceFlags: parseInt(match[4], 16)
|
|
2908
2908
|
};
|
|
2909
2909
|
}
|
|
2910
|
-
var
|
|
2910
|
+
var import_api25, TRACE_PARENT_HEADER2, TRACE_STATE_HEADER2, VERSION4, VERSION_PART2, TRACE_ID_PART2, PARENT_ID_PART2, FLAGS_PART2, TRACE_PARENT_REGEX2, W3CTraceContextPropagator2;
|
|
2911
2911
|
var init_W3CTraceContextPropagator2 = __esm({
|
|
2912
2912
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
2913
2913
|
"use strict";
|
|
2914
|
-
|
|
2914
|
+
import_api25 = require("@opentelemetry/api");
|
|
2915
2915
|
init_suppress_tracing2();
|
|
2916
2916
|
init_TraceState2();
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
__name(
|
|
2926
|
-
|
|
2917
|
+
TRACE_PARENT_HEADER2 = "traceparent";
|
|
2918
|
+
TRACE_STATE_HEADER2 = "tracestate";
|
|
2919
|
+
VERSION4 = "00";
|
|
2920
|
+
VERSION_PART2 = "(?!ff)[\\da-f]{2}";
|
|
2921
|
+
TRACE_ID_PART2 = "(?![0]{32})[\\da-f]{32}";
|
|
2922
|
+
PARENT_ID_PART2 = "(?![0]{16})[\\da-f]{16}";
|
|
2923
|
+
FLAGS_PART2 = "[\\da-f]{2}";
|
|
2924
|
+
TRACE_PARENT_REGEX2 = new RegExp("^\\s?(" + VERSION_PART2 + ")-(" + TRACE_ID_PART2 + ")-(" + PARENT_ID_PART2 + ")-(" + FLAGS_PART2 + ")(-.*)?\\s?$");
|
|
2925
|
+
__name(parseTraceParent2, "parseTraceParent");
|
|
2926
|
+
W3CTraceContextPropagator2 = /** @class */
|
|
2927
2927
|
function() {
|
|
2928
|
-
function
|
|
2928
|
+
function W3CTraceContextPropagator4() {
|
|
2929
2929
|
}
|
|
2930
|
-
__name(
|
|
2931
|
-
|
|
2932
|
-
var spanContext =
|
|
2933
|
-
if (!spanContext ||
|
|
2930
|
+
__name(W3CTraceContextPropagator4, "W3CTraceContextPropagator");
|
|
2931
|
+
W3CTraceContextPropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
2932
|
+
var spanContext = import_api25.trace.getSpanContext(context5);
|
|
2933
|
+
if (!spanContext || isTracingSuppressed2(context5) || !(0, import_api25.isSpanContextValid)(spanContext))
|
|
2934
2934
|
return;
|
|
2935
|
-
var traceParent =
|
|
2936
|
-
setter.set(carrier,
|
|
2935
|
+
var traceParent = VERSION4 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || import_api25.TraceFlags.NONE).toString(16);
|
|
2936
|
+
setter.set(carrier, TRACE_PARENT_HEADER2, traceParent);
|
|
2937
2937
|
if (spanContext.traceState) {
|
|
2938
|
-
setter.set(carrier,
|
|
2938
|
+
setter.set(carrier, TRACE_STATE_HEADER2, spanContext.traceState.serialize());
|
|
2939
2939
|
}
|
|
2940
2940
|
};
|
|
2941
|
-
|
|
2942
|
-
var traceParentHeader = getter.get(carrier,
|
|
2941
|
+
W3CTraceContextPropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
2942
|
+
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER2);
|
|
2943
2943
|
if (!traceParentHeader)
|
|
2944
2944
|
return context5;
|
|
2945
2945
|
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
2946
2946
|
if (typeof traceParent !== "string")
|
|
2947
2947
|
return context5;
|
|
2948
|
-
var spanContext =
|
|
2948
|
+
var spanContext = parseTraceParent2(traceParent);
|
|
2949
2949
|
if (!spanContext)
|
|
2950
2950
|
return context5;
|
|
2951
2951
|
spanContext.isRemote = true;
|
|
2952
|
-
var traceStateHeader = getter.get(carrier,
|
|
2952
|
+
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER2);
|
|
2953
2953
|
if (traceStateHeader) {
|
|
2954
2954
|
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
2955
|
-
spanContext.traceState = new
|
|
2955
|
+
spanContext.traceState = new TraceState2(typeof state === "string" ? state : void 0);
|
|
2956
2956
|
}
|
|
2957
|
-
return
|
|
2957
|
+
return import_api25.trace.setSpanContext(context5, spanContext);
|
|
2958
2958
|
};
|
|
2959
|
-
|
|
2959
|
+
W3CTraceContextPropagator4.prototype.fields = function() {
|
|
2960
2960
|
return [
|
|
2961
|
-
|
|
2962
|
-
|
|
2961
|
+
TRACE_PARENT_HEADER2,
|
|
2962
|
+
TRACE_STATE_HEADER2
|
|
2963
2963
|
];
|
|
2964
2964
|
};
|
|
2965
|
-
return
|
|
2965
|
+
return W3CTraceContextPropagator4;
|
|
2966
2966
|
}();
|
|
2967
2967
|
}
|
|
2968
2968
|
});
|
|
@@ -2975,12 +2975,12 @@ var init_IdGenerator2 = __esm({
|
|
|
2975
2975
|
});
|
|
2976
2976
|
|
|
2977
2977
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js
|
|
2978
|
-
var
|
|
2978
|
+
var import_api26, RPC_METADATA_KEY2, RPCType2;
|
|
2979
2979
|
var init_rpc_metadata2 = __esm({
|
|
2980
2980
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
2981
2981
|
"use strict";
|
|
2982
|
-
|
|
2983
|
-
RPC_METADATA_KEY2 = (0,
|
|
2982
|
+
import_api26 = require("@opentelemetry/api");
|
|
2983
|
+
RPC_METADATA_KEY2 = (0, import_api26.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
2984
2984
|
(function(RPCType4) {
|
|
2985
2985
|
RPCType4["HTTP"] = "http";
|
|
2986
2986
|
})(RPCType2 || (RPCType2 = {}));
|
|
@@ -2988,11 +2988,11 @@ var init_rpc_metadata2 = __esm({
|
|
|
2988
2988
|
});
|
|
2989
2989
|
|
|
2990
2990
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js
|
|
2991
|
-
var
|
|
2991
|
+
var import_api27, AlwaysOffSampler2;
|
|
2992
2992
|
var init_AlwaysOffSampler2 = __esm({
|
|
2993
2993
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js"() {
|
|
2994
2994
|
"use strict";
|
|
2995
|
-
|
|
2995
|
+
import_api27 = require("@opentelemetry/api");
|
|
2996
2996
|
AlwaysOffSampler2 = /** @class */
|
|
2997
2997
|
function() {
|
|
2998
2998
|
function AlwaysOffSampler5() {
|
|
@@ -3000,7 +3000,7 @@ var init_AlwaysOffSampler2 = __esm({
|
|
|
3000
3000
|
__name(AlwaysOffSampler5, "AlwaysOffSampler");
|
|
3001
3001
|
AlwaysOffSampler5.prototype.shouldSample = function() {
|
|
3002
3002
|
return {
|
|
3003
|
-
decision:
|
|
3003
|
+
decision: import_api27.SamplingDecision.NOT_RECORD
|
|
3004
3004
|
};
|
|
3005
3005
|
};
|
|
3006
3006
|
AlwaysOffSampler5.prototype.toString = function() {
|
|
@@ -3012,11 +3012,11 @@ var init_AlwaysOffSampler2 = __esm({
|
|
|
3012
3012
|
});
|
|
3013
3013
|
|
|
3014
3014
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js
|
|
3015
|
-
var
|
|
3015
|
+
var import_api28, AlwaysOnSampler2;
|
|
3016
3016
|
var init_AlwaysOnSampler2 = __esm({
|
|
3017
3017
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js"() {
|
|
3018
3018
|
"use strict";
|
|
3019
|
-
|
|
3019
|
+
import_api28 = require("@opentelemetry/api");
|
|
3020
3020
|
AlwaysOnSampler2 = /** @class */
|
|
3021
3021
|
function() {
|
|
3022
3022
|
function AlwaysOnSampler5() {
|
|
@@ -3024,7 +3024,7 @@ var init_AlwaysOnSampler2 = __esm({
|
|
|
3024
3024
|
__name(AlwaysOnSampler5, "AlwaysOnSampler");
|
|
3025
3025
|
AlwaysOnSampler5.prototype.shouldSample = function() {
|
|
3026
3026
|
return {
|
|
3027
|
-
decision:
|
|
3027
|
+
decision: import_api28.SamplingDecision.RECORD_AND_SAMPLED
|
|
3028
3028
|
};
|
|
3029
3029
|
};
|
|
3030
3030
|
AlwaysOnSampler5.prototype.toString = function() {
|
|
@@ -3036,11 +3036,11 @@ var init_AlwaysOnSampler2 = __esm({
|
|
|
3036
3036
|
});
|
|
3037
3037
|
|
|
3038
3038
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js
|
|
3039
|
-
var
|
|
3039
|
+
var import_api29, ParentBasedSampler2;
|
|
3040
3040
|
var init_ParentBasedSampler2 = __esm({
|
|
3041
3041
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
3042
3042
|
"use strict";
|
|
3043
|
-
|
|
3043
|
+
import_api29 = require("@opentelemetry/api");
|
|
3044
3044
|
init_global_error_handler2();
|
|
3045
3045
|
init_AlwaysOffSampler2();
|
|
3046
3046
|
init_AlwaysOnSampler2();
|
|
@@ -3060,17 +3060,17 @@ var init_ParentBasedSampler2 = __esm({
|
|
|
3060
3060
|
}
|
|
3061
3061
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
3062
3062
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
3063
|
-
var parentContext =
|
|
3064
|
-
if (!parentContext || !(0,
|
|
3063
|
+
var parentContext = import_api29.trace.getSpanContext(context5);
|
|
3064
|
+
if (!parentContext || !(0, import_api29.isSpanContextValid)(parentContext)) {
|
|
3065
3065
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3066
3066
|
}
|
|
3067
3067
|
if (parentContext.isRemote) {
|
|
3068
|
-
if (parentContext.traceFlags &
|
|
3068
|
+
if (parentContext.traceFlags & import_api29.TraceFlags.SAMPLED) {
|
|
3069
3069
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3070
3070
|
}
|
|
3071
3071
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3072
3072
|
}
|
|
3073
|
-
if (parentContext.traceFlags &
|
|
3073
|
+
if (parentContext.traceFlags & import_api29.TraceFlags.SAMPLED) {
|
|
3074
3074
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3075
3075
|
}
|
|
3076
3076
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -3084,11 +3084,11 @@ var init_ParentBasedSampler2 = __esm({
|
|
|
3084
3084
|
});
|
|
3085
3085
|
|
|
3086
3086
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js
|
|
3087
|
-
var
|
|
3087
|
+
var import_api30, TraceIdRatioBasedSampler2;
|
|
3088
3088
|
var init_TraceIdRatioBasedSampler2 = __esm({
|
|
3089
3089
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js"() {
|
|
3090
3090
|
"use strict";
|
|
3091
|
-
|
|
3091
|
+
import_api30 = require("@opentelemetry/api");
|
|
3092
3092
|
TraceIdRatioBasedSampler2 = /** @class */
|
|
3093
3093
|
function() {
|
|
3094
3094
|
function TraceIdRatioBasedSampler5(_ratio) {
|
|
@@ -3102,7 +3102,7 @@ var init_TraceIdRatioBasedSampler2 = __esm({
|
|
|
3102
3102
|
__name(TraceIdRatioBasedSampler5, "TraceIdRatioBasedSampler");
|
|
3103
3103
|
TraceIdRatioBasedSampler5.prototype.shouldSample = function(context5, traceId) {
|
|
3104
3104
|
return {
|
|
3105
|
-
decision: (0,
|
|
3105
|
+
decision: (0, import_api30.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? import_api30.SamplingDecision.RECORD_AND_SAMPLED : import_api30.SamplingDecision.NOT_RECORD
|
|
3106
3106
|
};
|
|
3107
3107
|
};
|
|
3108
3108
|
TraceIdRatioBasedSampler5.prototype.toString = function() {
|
|
@@ -3517,18 +3517,18 @@ var init_callback2 = __esm({
|
|
|
3517
3517
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/exporter.js
|
|
3518
3518
|
function _export(exporter, arg) {
|
|
3519
3519
|
return new Promise(function(resolve) {
|
|
3520
|
-
|
|
3520
|
+
import_api31.context.with(suppressTracing(import_api31.context.active()), function() {
|
|
3521
3521
|
exporter.export(arg, function(result) {
|
|
3522
3522
|
resolve(result);
|
|
3523
3523
|
});
|
|
3524
3524
|
});
|
|
3525
3525
|
});
|
|
3526
3526
|
}
|
|
3527
|
-
var
|
|
3527
|
+
var import_api31;
|
|
3528
3528
|
var init_exporter = __esm({
|
|
3529
3529
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/exporter.js"() {
|
|
3530
3530
|
"use strict";
|
|
3531
|
-
|
|
3531
|
+
import_api31 = require("@opentelemetry/api");
|
|
3532
3532
|
init_suppress_tracing2();
|
|
3533
3533
|
__name(_export, "_export");
|
|
3534
3534
|
}
|
|
@@ -3584,15 +3584,15 @@ var init_enums = __esm({
|
|
|
3584
3584
|
});
|
|
3585
3585
|
|
|
3586
3586
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js
|
|
3587
|
-
var
|
|
3587
|
+
var import_api32, import_semantic_conventions3, __values4, __read7, Span;
|
|
3588
3588
|
var init_Span = __esm({
|
|
3589
3589
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js"() {
|
|
3590
3590
|
"use strict";
|
|
3591
|
-
|
|
3591
|
+
import_api32 = require("@opentelemetry/api");
|
|
3592
3592
|
init_esm3();
|
|
3593
3593
|
import_semantic_conventions3 = require("@opentelemetry/semantic-conventions");
|
|
3594
3594
|
init_enums();
|
|
3595
|
-
|
|
3595
|
+
__values4 = function(o) {
|
|
3596
3596
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3597
3597
|
if (m)
|
|
3598
3598
|
return m.call(o);
|
|
@@ -3645,7 +3645,7 @@ var init_Span = __esm({
|
|
|
3645
3645
|
this._droppedEventsCount = 0;
|
|
3646
3646
|
this._droppedLinksCount = 0;
|
|
3647
3647
|
this.status = {
|
|
3648
|
-
code:
|
|
3648
|
+
code: import_api32.SpanStatusCode.UNSET
|
|
3649
3649
|
};
|
|
3650
3650
|
this.endTime = [
|
|
3651
3651
|
0,
|
|
@@ -3684,11 +3684,11 @@ var init_Span = __esm({
|
|
|
3684
3684
|
if (value == null || this._isSpanEnded())
|
|
3685
3685
|
return this;
|
|
3686
3686
|
if (key.length === 0) {
|
|
3687
|
-
|
|
3687
|
+
import_api32.diag.warn("Invalid attribute key: " + key);
|
|
3688
3688
|
return this;
|
|
3689
3689
|
}
|
|
3690
3690
|
if (!isAttributeValue(value)) {
|
|
3691
|
-
|
|
3691
|
+
import_api32.diag.warn("Invalid attribute value set for key: " + key);
|
|
3692
3692
|
return this;
|
|
3693
3693
|
}
|
|
3694
3694
|
if (Object.keys(this.attributes).length >= this._spanLimits.attributeCountLimit && !Object.prototype.hasOwnProperty.call(this.attributes, key)) {
|
|
@@ -3701,7 +3701,7 @@ var init_Span = __esm({
|
|
|
3701
3701
|
Span3.prototype.setAttributes = function(attributes) {
|
|
3702
3702
|
var e_1, _a4;
|
|
3703
3703
|
try {
|
|
3704
|
-
for (var _b =
|
|
3704
|
+
for (var _b = __values4(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3705
3705
|
var _d = __read7(_c.value, 2), k = _d[0], v = _d[1];
|
|
3706
3706
|
this.setAttribute(k, v);
|
|
3707
3707
|
}
|
|
@@ -3724,13 +3724,13 @@ var init_Span = __esm({
|
|
|
3724
3724
|
if (this._isSpanEnded())
|
|
3725
3725
|
return this;
|
|
3726
3726
|
if (this._spanLimits.eventCountLimit === 0) {
|
|
3727
|
-
|
|
3727
|
+
import_api32.diag.warn("No events allowed.");
|
|
3728
3728
|
this._droppedEventsCount++;
|
|
3729
3729
|
return this;
|
|
3730
3730
|
}
|
|
3731
3731
|
if (this.events.length >= this._spanLimits.eventCountLimit) {
|
|
3732
3732
|
if (this._droppedEventsCount === 0) {
|
|
3733
|
-
|
|
3733
|
+
import_api32.diag.debug("Dropping extra events.");
|
|
3734
3734
|
}
|
|
3735
3735
|
this.events.shift();
|
|
3736
3736
|
this._droppedEventsCount++;
|
|
@@ -3764,14 +3764,14 @@ var init_Span = __esm({
|
|
|
3764
3764
|
};
|
|
3765
3765
|
Span3.prototype.end = function(endTime) {
|
|
3766
3766
|
if (this._isSpanEnded()) {
|
|
3767
|
-
|
|
3767
|
+
import_api32.diag.error(this.name + " " + this._spanContext.traceId + "-" + this._spanContext.spanId + " - You can only call end() on a span once.");
|
|
3768
3768
|
return;
|
|
3769
3769
|
}
|
|
3770
3770
|
this._ended = true;
|
|
3771
3771
|
this.endTime = this._getTime(endTime);
|
|
3772
3772
|
this._duration = hrTimeDuration(this.startTime, this.endTime);
|
|
3773
3773
|
if (this._duration[0] < 0) {
|
|
3774
|
-
|
|
3774
|
+
import_api32.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.", this.startTime, this.endTime);
|
|
3775
3775
|
this.endTime = this.startTime.slice();
|
|
3776
3776
|
this._duration = [
|
|
3777
3777
|
0,
|
|
@@ -3779,7 +3779,7 @@ var init_Span = __esm({
|
|
|
3779
3779
|
];
|
|
3780
3780
|
}
|
|
3781
3781
|
if (this._droppedEventsCount > 0) {
|
|
3782
|
-
|
|
3782
|
+
import_api32.diag.warn("Dropped " + this._droppedEventsCount + " events because eventCountLimit reached");
|
|
3783
3783
|
}
|
|
3784
3784
|
this._spanProcessor.onEnd(this);
|
|
3785
3785
|
};
|
|
@@ -3825,7 +3825,7 @@ var init_Span = __esm({
|
|
|
3825
3825
|
if (attributes[import_semantic_conventions3.SemanticAttributes.EXCEPTION_TYPE] || attributes[import_semantic_conventions3.SemanticAttributes.EXCEPTION_MESSAGE]) {
|
|
3826
3826
|
this.addEvent(ExceptionEventName, attributes, time);
|
|
3827
3827
|
} else {
|
|
3828
|
-
|
|
3828
|
+
import_api32.diag.warn("Failed to record an exception " + exception);
|
|
3829
3829
|
}
|
|
3830
3830
|
};
|
|
3831
3831
|
Object.defineProperty(Span3.prototype, "duration", {
|
|
@@ -3865,7 +3865,7 @@ var init_Span = __esm({
|
|
|
3865
3865
|
});
|
|
3866
3866
|
Span3.prototype._isSpanEnded = function() {
|
|
3867
3867
|
if (this._ended) {
|
|
3868
|
-
|
|
3868
|
+
import_api32.diag.warn("Can not execute the operation on ended Span {traceId: " + this._spanContext.traceId + ", spanId: " + this._spanContext.spanId + "}");
|
|
3869
3869
|
}
|
|
3870
3870
|
return this._ended;
|
|
3871
3871
|
};
|
|
@@ -3879,7 +3879,7 @@ var init_Span = __esm({
|
|
|
3879
3879
|
var _this = this;
|
|
3880
3880
|
var limit = this._attributeValueLengthLimit;
|
|
3881
3881
|
if (limit <= 0) {
|
|
3882
|
-
|
|
3882
|
+
import_api32.diag.warn("Attribute value limit must be positive, got " + limit);
|
|
3883
3883
|
return value;
|
|
3884
3884
|
}
|
|
3885
3885
|
if (typeof value === "string") {
|
|
@@ -3959,11 +3959,11 @@ var init_AlwaysOnSampler3 = __esm({
|
|
|
3959
3959
|
});
|
|
3960
3960
|
|
|
3961
3961
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js
|
|
3962
|
-
var
|
|
3962
|
+
var import_api33, ParentBasedSampler3;
|
|
3963
3963
|
var init_ParentBasedSampler3 = __esm({
|
|
3964
3964
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js"() {
|
|
3965
3965
|
"use strict";
|
|
3966
|
-
|
|
3966
|
+
import_api33 = require("@opentelemetry/api");
|
|
3967
3967
|
init_esm3();
|
|
3968
3968
|
init_AlwaysOffSampler3();
|
|
3969
3969
|
init_AlwaysOnSampler3();
|
|
@@ -3983,17 +3983,17 @@ var init_ParentBasedSampler3 = __esm({
|
|
|
3983
3983
|
}
|
|
3984
3984
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
3985
3985
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
3986
|
-
var parentContext =
|
|
3987
|
-
if (!parentContext || !(0,
|
|
3986
|
+
var parentContext = import_api33.trace.getSpanContext(context5);
|
|
3987
|
+
if (!parentContext || !(0, import_api33.isSpanContextValid)(parentContext)) {
|
|
3988
3988
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3989
3989
|
}
|
|
3990
3990
|
if (parentContext.isRemote) {
|
|
3991
|
-
if (parentContext.traceFlags &
|
|
3991
|
+
if (parentContext.traceFlags & import_api33.TraceFlags.SAMPLED) {
|
|
3992
3992
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3993
3993
|
}
|
|
3994
3994
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3995
3995
|
}
|
|
3996
|
-
if (parentContext.traceFlags &
|
|
3996
|
+
if (parentContext.traceFlags & import_api33.TraceFlags.SAMPLED) {
|
|
3997
3997
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3998
3998
|
}
|
|
3999
3999
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -4007,11 +4007,11 @@ var init_ParentBasedSampler3 = __esm({
|
|
|
4007
4007
|
});
|
|
4008
4008
|
|
|
4009
4009
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js
|
|
4010
|
-
var
|
|
4010
|
+
var import_api34, TraceIdRatioBasedSampler3;
|
|
4011
4011
|
var init_TraceIdRatioBasedSampler3 = __esm({
|
|
4012
4012
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js"() {
|
|
4013
4013
|
"use strict";
|
|
4014
|
-
|
|
4014
|
+
import_api34 = require("@opentelemetry/api");
|
|
4015
4015
|
init_Sampler();
|
|
4016
4016
|
TraceIdRatioBasedSampler3 = /** @class */
|
|
4017
4017
|
function() {
|
|
@@ -4026,7 +4026,7 @@ var init_TraceIdRatioBasedSampler3 = __esm({
|
|
|
4026
4026
|
__name(TraceIdRatioBasedSampler5, "TraceIdRatioBasedSampler");
|
|
4027
4027
|
TraceIdRatioBasedSampler5.prototype.shouldSample = function(context5, traceId) {
|
|
4028
4028
|
return {
|
|
4029
|
-
decision: (0,
|
|
4029
|
+
decision: (0, import_api34.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? SamplingDecision7.RECORD_AND_SAMPLED : SamplingDecision7.NOT_RECORD
|
|
4030
4030
|
};
|
|
4031
4031
|
};
|
|
4032
4032
|
TraceIdRatioBasedSampler5.prototype.toString = function() {
|
|
@@ -4094,31 +4094,31 @@ function buildSamplerFromEnv(environment) {
|
|
|
4094
4094
|
root: new TraceIdRatioBasedSampler3(getSamplerProbabilityFromEnv(environment))
|
|
4095
4095
|
});
|
|
4096
4096
|
default:
|
|
4097
|
-
|
|
4097
|
+
import_api35.diag.error('OTEL_TRACES_SAMPLER value "' + environment.OTEL_TRACES_SAMPLER + " invalid, defaulting to " + FALLBACK_OTEL_TRACES_SAMPLER + '".');
|
|
4098
4098
|
return new AlwaysOnSampler3();
|
|
4099
4099
|
}
|
|
4100
4100
|
}
|
|
4101
4101
|
function getSamplerProbabilityFromEnv(environment) {
|
|
4102
4102
|
if (environment.OTEL_TRACES_SAMPLER_ARG === void 0 || environment.OTEL_TRACES_SAMPLER_ARG === "") {
|
|
4103
|
-
|
|
4103
|
+
import_api35.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to " + DEFAULT_RATIO + ".");
|
|
4104
4104
|
return DEFAULT_RATIO;
|
|
4105
4105
|
}
|
|
4106
4106
|
var probability = Number(environment.OTEL_TRACES_SAMPLER_ARG);
|
|
4107
4107
|
if (isNaN(probability)) {
|
|
4108
|
-
|
|
4108
|
+
import_api35.diag.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is invalid, defaulting to " + DEFAULT_RATIO + ".");
|
|
4109
4109
|
return DEFAULT_RATIO;
|
|
4110
4110
|
}
|
|
4111
4111
|
if (probability < 0 || probability > 1) {
|
|
4112
|
-
|
|
4112
|
+
import_api35.diag.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is out of range ([0..1]), defaulting to " + DEFAULT_RATIO + ".");
|
|
4113
4113
|
return DEFAULT_RATIO;
|
|
4114
4114
|
}
|
|
4115
4115
|
return probability;
|
|
4116
4116
|
}
|
|
4117
|
-
var
|
|
4117
|
+
var import_api35, env, FALLBACK_OTEL_TRACES_SAMPLER, DEFAULT_RATIO;
|
|
4118
4118
|
var init_config = __esm({
|
|
4119
4119
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js"() {
|
|
4120
4120
|
"use strict";
|
|
4121
|
-
|
|
4121
|
+
import_api35 = require("@opentelemetry/api");
|
|
4122
4122
|
init_esm3();
|
|
4123
4123
|
init_AlwaysOffSampler3();
|
|
4124
4124
|
init_AlwaysOnSampler3();
|
|
@@ -4165,11 +4165,11 @@ var init_utility = __esm({
|
|
|
4165
4165
|
});
|
|
4166
4166
|
|
|
4167
4167
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js
|
|
4168
|
-
var
|
|
4168
|
+
var import_api36, BatchSpanProcessorBase;
|
|
4169
4169
|
var init_BatchSpanProcessorBase = __esm({
|
|
4170
4170
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js"() {
|
|
4171
4171
|
"use strict";
|
|
4172
|
-
|
|
4172
|
+
import_api36 = require("@opentelemetry/api");
|
|
4173
4173
|
init_esm3();
|
|
4174
4174
|
BatchSpanProcessorBase = /** @class */
|
|
4175
4175
|
function() {
|
|
@@ -4185,7 +4185,7 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4185
4185
|
this._exportTimeoutMillis = typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === "number" ? config.exportTimeoutMillis : env2.OTEL_BSP_EXPORT_TIMEOUT;
|
|
4186
4186
|
this._shutdownOnce = new BindOnceFuture2(this._shutdown, this);
|
|
4187
4187
|
if (this._maxExportBatchSize > this._maxQueueSize) {
|
|
4188
|
-
|
|
4188
|
+
import_api36.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize");
|
|
4189
4189
|
this._maxExportBatchSize = this._maxQueueSize;
|
|
4190
4190
|
}
|
|
4191
4191
|
}
|
|
@@ -4202,7 +4202,7 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4202
4202
|
if (this._shutdownOnce.isCalled) {
|
|
4203
4203
|
return;
|
|
4204
4204
|
}
|
|
4205
|
-
if ((span.spanContext().traceFlags &
|
|
4205
|
+
if ((span.spanContext().traceFlags & import_api36.TraceFlags.SAMPLED) === 0) {
|
|
4206
4206
|
return;
|
|
4207
4207
|
}
|
|
4208
4208
|
this._addToBuffer(span);
|
|
@@ -4223,13 +4223,13 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4223
4223
|
BatchSpanProcessorBase2.prototype._addToBuffer = function(span) {
|
|
4224
4224
|
if (this._finishedSpans.length >= this._maxQueueSize) {
|
|
4225
4225
|
if (this._droppedSpansCount === 0) {
|
|
4226
|
-
|
|
4226
|
+
import_api36.diag.debug("maxQueueSize reached, dropping spans");
|
|
4227
4227
|
}
|
|
4228
4228
|
this._droppedSpansCount++;
|
|
4229
4229
|
return;
|
|
4230
4230
|
}
|
|
4231
4231
|
if (this._droppedSpansCount > 0) {
|
|
4232
|
-
|
|
4232
|
+
import_api36.diag.warn("Dropped " + this._droppedSpansCount + " spans because maxQueueSize reached");
|
|
4233
4233
|
this._droppedSpansCount = 0;
|
|
4234
4234
|
}
|
|
4235
4235
|
this._finishedSpans.push(span);
|
|
@@ -4258,7 +4258,7 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4258
4258
|
var timer = setTimeout(function() {
|
|
4259
4259
|
reject(new Error("Timeout"));
|
|
4260
4260
|
}, _this._exportTimeoutMillis);
|
|
4261
|
-
|
|
4261
|
+
import_api36.context.with(suppressTracing(import_api36.context.active()), function() {
|
|
4262
4262
|
var spans;
|
|
4263
4263
|
if (_this._finishedSpans.length <= _this._maxExportBatchSize) {
|
|
4264
4264
|
spans = _this._finishedSpans;
|
|
@@ -4466,7 +4466,7 @@ var init_Tracer = __esm({
|
|
|
4466
4466
|
context5 = api.trace.deleteSpan(context5);
|
|
4467
4467
|
}
|
|
4468
4468
|
var parentSpan = api.trace.getSpan(context5);
|
|
4469
|
-
if (
|
|
4469
|
+
if (isTracingSuppressed2(context5)) {
|
|
4470
4470
|
api.diag.debug("Instrumentation suppressed, returning Noop Span");
|
|
4471
4471
|
var nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
|
|
4472
4472
|
return nonRecordingSpan;
|
|
@@ -4545,12 +4545,12 @@ var init_Tracer = __esm({
|
|
|
4545
4545
|
});
|
|
4546
4546
|
|
|
4547
4547
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js
|
|
4548
|
-
var
|
|
4548
|
+
var __values5, MultiSpanProcessor;
|
|
4549
4549
|
var init_MultiSpanProcessor = __esm({
|
|
4550
4550
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js"() {
|
|
4551
4551
|
"use strict";
|
|
4552
4552
|
init_esm3();
|
|
4553
|
-
|
|
4553
|
+
__values5 = function(o) {
|
|
4554
4554
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4555
4555
|
if (m)
|
|
4556
4556
|
return m.call(o);
|
|
@@ -4577,7 +4577,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4577
4577
|
var e_1, _a4;
|
|
4578
4578
|
var promises = [];
|
|
4579
4579
|
try {
|
|
4580
|
-
for (var _b =
|
|
4580
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4581
4581
|
var spanProcessor = _c.value;
|
|
4582
4582
|
promises.push(spanProcessor.forceFlush());
|
|
4583
4583
|
}
|
|
@@ -4606,7 +4606,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4606
4606
|
MultiSpanProcessor2.prototype.onStart = function(span, context5) {
|
|
4607
4607
|
var e_2, _a4;
|
|
4608
4608
|
try {
|
|
4609
|
-
for (var _b =
|
|
4609
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4610
4610
|
var spanProcessor = _c.value;
|
|
4611
4611
|
spanProcessor.onStart(span, context5);
|
|
4612
4612
|
}
|
|
@@ -4627,7 +4627,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4627
4627
|
MultiSpanProcessor2.prototype.onEnd = function(span) {
|
|
4628
4628
|
var e_3, _a4;
|
|
4629
4629
|
try {
|
|
4630
|
-
for (var _b =
|
|
4630
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4631
4631
|
var spanProcessor = _c.value;
|
|
4632
4632
|
spanProcessor.onEnd(span);
|
|
4633
4633
|
}
|
|
@@ -4649,7 +4649,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4649
4649
|
var e_4, _a4;
|
|
4650
4650
|
var promises = [];
|
|
4651
4651
|
try {
|
|
4652
|
-
for (var _b =
|
|
4652
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4653
4653
|
var spanProcessor = _c.value;
|
|
4654
4654
|
promises.push(spanProcessor.shutdown());
|
|
4655
4655
|
}
|
|
@@ -4703,11 +4703,11 @@ var init_NoopSpanProcessor = __esm({
|
|
|
4703
4703
|
});
|
|
4704
4704
|
|
|
4705
4705
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js
|
|
4706
|
-
var
|
|
4706
|
+
var import_api37, import_resources, ForceFlushState, BasicTracerProvider;
|
|
4707
4707
|
var init_BasicTracerProvider = __esm({
|
|
4708
4708
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js"() {
|
|
4709
4709
|
"use strict";
|
|
4710
|
-
|
|
4710
|
+
import_api37 = require("@opentelemetry/api");
|
|
4711
4711
|
init_esm3();
|
|
4712
4712
|
import_resources = require("@opentelemetry/resources");
|
|
4713
4713
|
init_esm4();
|
|
@@ -4760,7 +4760,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4760
4760
|
BasicTracerProvider2.prototype.addSpanProcessor = function(spanProcessor) {
|
|
4761
4761
|
if (this._registeredSpanProcessors.length === 0) {
|
|
4762
4762
|
this.activeSpanProcessor.shutdown().catch(function(err) {
|
|
4763
|
-
return
|
|
4763
|
+
return import_api37.diag.error("Error while trying to shutdown current span processor", err);
|
|
4764
4764
|
});
|
|
4765
4765
|
}
|
|
4766
4766
|
this._registeredSpanProcessors.push(spanProcessor);
|
|
@@ -4773,15 +4773,15 @@ var init_BasicTracerProvider = __esm({
|
|
|
4773
4773
|
if (config === void 0) {
|
|
4774
4774
|
config = {};
|
|
4775
4775
|
}
|
|
4776
|
-
|
|
4776
|
+
import_api37.trace.setGlobalTracerProvider(this);
|
|
4777
4777
|
if (config.propagator === void 0) {
|
|
4778
4778
|
config.propagator = this._buildPropagatorFromEnv();
|
|
4779
4779
|
}
|
|
4780
4780
|
if (config.contextManager) {
|
|
4781
|
-
|
|
4781
|
+
import_api37.context.setGlobalContextManager(config.contextManager);
|
|
4782
4782
|
}
|
|
4783
4783
|
if (config.propagator) {
|
|
4784
|
-
|
|
4784
|
+
import_api37.propagation.setGlobalPropagator(config.propagator);
|
|
4785
4785
|
}
|
|
4786
4786
|
};
|
|
4787
4787
|
BasicTracerProvider2.prototype.forceFlush = function() {
|
|
@@ -4840,7 +4840,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4840
4840
|
var propagators = uniquePropagatorNames.map(function(name) {
|
|
4841
4841
|
var propagator = _this._getPropagator(name);
|
|
4842
4842
|
if (!propagator) {
|
|
4843
|
-
|
|
4843
|
+
import_api37.diag.warn('Propagator "' + name + '" requested through environment variable is unavailable.');
|
|
4844
4844
|
}
|
|
4845
4845
|
return propagator;
|
|
4846
4846
|
});
|
|
@@ -4855,7 +4855,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4855
4855
|
} else if (uniquePropagatorNames.length === 1) {
|
|
4856
4856
|
return validPropagators[0];
|
|
4857
4857
|
} else {
|
|
4858
|
-
return new
|
|
4858
|
+
return new CompositePropagator2({
|
|
4859
4859
|
propagators: validPropagators
|
|
4860
4860
|
});
|
|
4861
4861
|
}
|
|
@@ -4866,7 +4866,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4866
4866
|
return;
|
|
4867
4867
|
var exporter = this._getSpanExporter(exporterName);
|
|
4868
4868
|
if (!exporter) {
|
|
4869
|
-
|
|
4869
|
+
import_api37.diag.error('Exporter "' + exporterName + '" requested through environment variable is unavailable.');
|
|
4870
4870
|
}
|
|
4871
4871
|
return exporter;
|
|
4872
4872
|
};
|
|
@@ -4874,7 +4874,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4874
4874
|
[
|
|
4875
4875
|
"tracecontext",
|
|
4876
4876
|
function() {
|
|
4877
|
-
return new
|
|
4877
|
+
return new W3CTraceContextPropagator2();
|
|
4878
4878
|
}
|
|
4879
4879
|
],
|
|
4880
4880
|
[
|
|
@@ -4891,12 +4891,12 @@ var init_BasicTracerProvider = __esm({
|
|
|
4891
4891
|
});
|
|
4892
4892
|
|
|
4893
4893
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/ConsoleSpanExporter.js
|
|
4894
|
-
var
|
|
4894
|
+
var __values6, ConsoleSpanExporter;
|
|
4895
4895
|
var init_ConsoleSpanExporter = __esm({
|
|
4896
4896
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/ConsoleSpanExporter.js"() {
|
|
4897
4897
|
"use strict";
|
|
4898
4898
|
init_esm3();
|
|
4899
|
-
|
|
4899
|
+
__values6 = function(o) {
|
|
4900
4900
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4901
4901
|
if (m)
|
|
4902
4902
|
return m.call(o);
|
|
@@ -4951,7 +4951,7 @@ var init_ConsoleSpanExporter = __esm({
|
|
|
4951
4951
|
ConsoleSpanExporter2.prototype._sendSpans = function(spans, done) {
|
|
4952
4952
|
var e_1, _a4;
|
|
4953
4953
|
try {
|
|
4954
|
-
for (var spans_1 =
|
|
4954
|
+
for (var spans_1 = __values6(spans), spans_1_1 = spans_1.next(); !spans_1_1.done; spans_1_1 = spans_1.next()) {
|
|
4955
4955
|
var span = spans_1_1.value;
|
|
4956
4956
|
console.dir(this._exportInfo(span), {
|
|
4957
4957
|
depth: 3
|
|
@@ -5069,11 +5069,11 @@ var init_ReadableSpan = __esm({
|
|
|
5069
5069
|
});
|
|
5070
5070
|
|
|
5071
5071
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/SimpleSpanProcessor.js
|
|
5072
|
-
var
|
|
5072
|
+
var import_api38, __awaiter, __generator, SimpleSpanProcessor;
|
|
5073
5073
|
var init_SimpleSpanProcessor = __esm({
|
|
5074
5074
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/SimpleSpanProcessor.js"() {
|
|
5075
5075
|
"use strict";
|
|
5076
|
-
|
|
5076
|
+
import_api38 = require("@opentelemetry/api");
|
|
5077
5077
|
init_esm3();
|
|
5078
5078
|
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
5079
5079
|
function adopt(value) {
|
|
@@ -5258,7 +5258,7 @@ var init_SimpleSpanProcessor = __esm({
|
|
|
5258
5258
|
if (this._shutdownOnce.isCalled) {
|
|
5259
5259
|
return;
|
|
5260
5260
|
}
|
|
5261
|
-
if ((span.spanContext().traceFlags &
|
|
5261
|
+
if ((span.spanContext().traceFlags & import_api38.TraceFlags.SAMPLED) === 0) {
|
|
5262
5262
|
return;
|
|
5263
5263
|
}
|
|
5264
5264
|
var doExport = /* @__PURE__ */ __name(function() {
|
|
@@ -7321,16 +7321,16 @@ var require_semver2 = __commonJS({
|
|
|
7321
7321
|
});
|
|
7322
7322
|
|
|
7323
7323
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
7324
|
-
function
|
|
7325
|
-
return context5.getValue(
|
|
7324
|
+
function isTracingSuppressed3(context5) {
|
|
7325
|
+
return context5.getValue(SUPPRESS_TRACING_KEY3) === true;
|
|
7326
7326
|
}
|
|
7327
|
-
var
|
|
7327
|
+
var import_api39, SUPPRESS_TRACING_KEY3;
|
|
7328
7328
|
var init_suppress_tracing3 = __esm({
|
|
7329
7329
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
7330
7330
|
"use strict";
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
__name(
|
|
7331
|
+
import_api39 = require("@opentelemetry/api");
|
|
7332
|
+
SUPPRESS_TRACING_KEY3 = (0, import_api39.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
7333
|
+
__name(isTracingSuppressed3, "isTracingSuppressed");
|
|
7334
7334
|
}
|
|
7335
7335
|
});
|
|
7336
7336
|
|
|
@@ -7380,7 +7380,7 @@ function parsePairKeyValue3(entry) {
|
|
|
7380
7380
|
var value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());
|
|
7381
7381
|
var metadata;
|
|
7382
7382
|
if (valueProps.length > 0) {
|
|
7383
|
-
metadata = (0,
|
|
7383
|
+
metadata = (0, import_api40.baggageEntryMetadataFromString)(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR3));
|
|
7384
7384
|
}
|
|
7385
7385
|
return {
|
|
7386
7386
|
key,
|
|
@@ -7388,11 +7388,11 @@ function parsePairKeyValue3(entry) {
|
|
|
7388
7388
|
metadata
|
|
7389
7389
|
};
|
|
7390
7390
|
}
|
|
7391
|
-
var
|
|
7391
|
+
var import_api40, __read9;
|
|
7392
7392
|
var init_utils3 = __esm({
|
|
7393
7393
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/baggage/utils.js"() {
|
|
7394
7394
|
"use strict";
|
|
7395
|
-
|
|
7395
|
+
import_api40 = require("@opentelemetry/api");
|
|
7396
7396
|
init_constants4();
|
|
7397
7397
|
__read9 = function(o, n) {
|
|
7398
7398
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -7424,11 +7424,11 @@ var init_utils3 = __esm({
|
|
|
7424
7424
|
});
|
|
7425
7425
|
|
|
7426
7426
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js
|
|
7427
|
-
var
|
|
7427
|
+
var import_api41, W3CBaggagePropagator3;
|
|
7428
7428
|
var init_W3CBaggagePropagator3 = __esm({
|
|
7429
7429
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js"() {
|
|
7430
7430
|
"use strict";
|
|
7431
|
-
|
|
7431
|
+
import_api41 = require("@opentelemetry/api");
|
|
7432
7432
|
init_suppress_tracing3();
|
|
7433
7433
|
init_constants4();
|
|
7434
7434
|
init_utils3();
|
|
@@ -7438,8 +7438,8 @@ var init_W3CBaggagePropagator3 = __esm({
|
|
|
7438
7438
|
}
|
|
7439
7439
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
7440
7440
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
7441
|
-
var baggage =
|
|
7442
|
-
if (!baggage ||
|
|
7441
|
+
var baggage = import_api41.propagation.getBaggage(context5);
|
|
7442
|
+
if (!baggage || isTracingSuppressed3(context5))
|
|
7443
7443
|
return;
|
|
7444
7444
|
var keyPairs = getKeyPairs3(baggage).filter(function(pair) {
|
|
7445
7445
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS3;
|
|
@@ -7474,7 +7474,7 @@ var init_W3CBaggagePropagator3 = __esm({
|
|
|
7474
7474
|
if (Object.entries(baggage).length === 0) {
|
|
7475
7475
|
return context5;
|
|
7476
7476
|
}
|
|
7477
|
-
return
|
|
7477
|
+
return import_api41.propagation.setBaggage(context5, import_api41.propagation.createBaggage(baggage));
|
|
7478
7478
|
};
|
|
7479
7479
|
W3CBaggagePropagator4.prototype.fields = function() {
|
|
7480
7480
|
return [
|
|
@@ -7509,18 +7509,18 @@ var init_anchored_clock3 = __esm({
|
|
|
7509
7509
|
});
|
|
7510
7510
|
|
|
7511
7511
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
7512
|
-
var
|
|
7512
|
+
var import_api42;
|
|
7513
7513
|
var init_attributes3 = __esm({
|
|
7514
7514
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
7515
7515
|
"use strict";
|
|
7516
|
-
|
|
7516
|
+
import_api42 = require("@opentelemetry/api");
|
|
7517
7517
|
}
|
|
7518
7518
|
});
|
|
7519
7519
|
|
|
7520
7520
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
7521
7521
|
function loggingErrorHandler3() {
|
|
7522
7522
|
return function(ex) {
|
|
7523
|
-
|
|
7523
|
+
import_api43.diag.error(stringifyException3(ex));
|
|
7524
7524
|
};
|
|
7525
7525
|
}
|
|
7526
7526
|
function stringifyException3(ex) {
|
|
@@ -7546,11 +7546,11 @@ function flattenException3(ex) {
|
|
|
7546
7546
|
}
|
|
7547
7547
|
return result;
|
|
7548
7548
|
}
|
|
7549
|
-
var
|
|
7549
|
+
var import_api43;
|
|
7550
7550
|
var init_logging_error_handler3 = __esm({
|
|
7551
7551
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js"() {
|
|
7552
7552
|
"use strict";
|
|
7553
|
-
|
|
7553
|
+
import_api43 = require("@opentelemetry/api");
|
|
7554
7554
|
__name(loggingErrorHandler3, "loggingErrorHandler");
|
|
7555
7555
|
__name(stringifyException3, "stringifyException");
|
|
7556
7556
|
__name(flattenException3, "flattenException");
|
|
@@ -7591,11 +7591,11 @@ var init_sampling3 = __esm({
|
|
|
7591
7591
|
});
|
|
7592
7592
|
|
|
7593
7593
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/utils/environment.js
|
|
7594
|
-
var
|
|
7594
|
+
var import_api44, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT3, DEFAULT_ATTRIBUTE_COUNT_LIMIT3, DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT3, DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT3, DEFAULT_ENVIRONMENT3, logLevelMap3;
|
|
7595
7595
|
var init_environment4 = __esm({
|
|
7596
7596
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/utils/environment.js"() {
|
|
7597
7597
|
"use strict";
|
|
7598
|
-
|
|
7598
|
+
import_api44 = require("@opentelemetry/api");
|
|
7599
7599
|
init_sampling3();
|
|
7600
7600
|
DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT3 = Infinity;
|
|
7601
7601
|
DEFAULT_ATTRIBUTE_COUNT_LIMIT3 = 128;
|
|
@@ -7635,7 +7635,7 @@ var init_environment4 = __esm({
|
|
|
7635
7635
|
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 1e4,
|
|
7636
7636
|
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 1e4,
|
|
7637
7637
|
OTEL_EXPORTER_ZIPKIN_ENDPOINT: "http://localhost:9411/api/v2/spans",
|
|
7638
|
-
OTEL_LOG_LEVEL:
|
|
7638
|
+
OTEL_LOG_LEVEL: import_api44.DiagLogLevel.INFO,
|
|
7639
7639
|
OTEL_NO_PATCH_MODULES: [],
|
|
7640
7640
|
OTEL_PROPAGATORS: [
|
|
7641
7641
|
"tracecontext",
|
|
@@ -7684,13 +7684,13 @@ var init_environment4 = __esm({
|
|
|
7684
7684
|
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "cumulative"
|
|
7685
7685
|
};
|
|
7686
7686
|
logLevelMap3 = {
|
|
7687
|
-
ALL:
|
|
7688
|
-
VERBOSE:
|
|
7689
|
-
DEBUG:
|
|
7690
|
-
INFO:
|
|
7691
|
-
WARN:
|
|
7692
|
-
ERROR:
|
|
7693
|
-
NONE:
|
|
7687
|
+
ALL: import_api44.DiagLogLevel.ALL,
|
|
7688
|
+
VERBOSE: import_api44.DiagLogLevel.VERBOSE,
|
|
7689
|
+
DEBUG: import_api44.DiagLogLevel.DEBUG,
|
|
7690
|
+
INFO: import_api44.DiagLogLevel.INFO,
|
|
7691
|
+
WARN: import_api44.DiagLogLevel.WARN,
|
|
7692
|
+
ERROR: import_api44.DiagLogLevel.ERROR,
|
|
7693
|
+
NONE: import_api44.DiagLogLevel.NONE
|
|
7694
7694
|
};
|
|
7695
7695
|
}
|
|
7696
7696
|
});
|
|
@@ -7762,11 +7762,11 @@ var init_performance3 = __esm({
|
|
|
7762
7762
|
});
|
|
7763
7763
|
|
|
7764
7764
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/version.js
|
|
7765
|
-
var
|
|
7765
|
+
var VERSION5;
|
|
7766
7766
|
var init_version3 = __esm({
|
|
7767
7767
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/version.js"() {
|
|
7768
7768
|
"use strict";
|
|
7769
|
-
|
|
7769
|
+
VERSION5 = "1.24.1";
|
|
7770
7770
|
}
|
|
7771
7771
|
});
|
|
7772
7772
|
|
|
@@ -7777,7 +7777,7 @@ var init_sdk_info3 = __esm({
|
|
|
7777
7777
|
"use strict";
|
|
7778
7778
|
init_version3();
|
|
7779
7779
|
import_semantic_conventions4 = require("@opentelemetry/semantic-conventions");
|
|
7780
|
-
SDK_INFO3 = (_a3 = {}, _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a3[import_semantic_conventions4.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions4.TelemetrySdkLanguageValues.NODEJS, _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] =
|
|
7780
|
+
SDK_INFO3 = (_a3 = {}, _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a3[import_semantic_conventions4.SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = import_semantic_conventions4.TelemetrySdkLanguageValues.NODEJS, _a3[import_semantic_conventions4.SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION5, _a3);
|
|
7781
7781
|
}
|
|
7782
7782
|
});
|
|
7783
7783
|
|
|
@@ -7841,12 +7841,12 @@ var init_ExportResult3 = __esm({
|
|
|
7841
7841
|
});
|
|
7842
7842
|
|
|
7843
7843
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
7844
|
-
var
|
|
7844
|
+
var import_api45, __values7, CompositePropagator3;
|
|
7845
7845
|
var init_composite3 = __esm({
|
|
7846
7846
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
7847
7847
|
"use strict";
|
|
7848
|
-
|
|
7849
|
-
|
|
7848
|
+
import_api45 = require("@opentelemetry/api");
|
|
7849
|
+
__values7 = function(o) {
|
|
7850
7850
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
7851
7851
|
if (m)
|
|
7852
7852
|
return m.call(o);
|
|
@@ -7863,9 +7863,9 @@ var init_composite3 = __esm({
|
|
|
7863
7863
|
};
|
|
7864
7864
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
7865
7865
|
};
|
|
7866
|
-
|
|
7866
|
+
CompositePropagator3 = /** @class */
|
|
7867
7867
|
function() {
|
|
7868
|
-
function
|
|
7868
|
+
function CompositePropagator4(config) {
|
|
7869
7869
|
if (config === void 0) {
|
|
7870
7870
|
config = {};
|
|
7871
7871
|
}
|
|
@@ -7877,16 +7877,16 @@ var init_composite3 = __esm({
|
|
|
7877
7877
|
return x.concat(y);
|
|
7878
7878
|
}, [])));
|
|
7879
7879
|
}
|
|
7880
|
-
__name(
|
|
7881
|
-
|
|
7880
|
+
__name(CompositePropagator4, "CompositePropagator");
|
|
7881
|
+
CompositePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
7882
7882
|
var e_1, _a4;
|
|
7883
7883
|
try {
|
|
7884
|
-
for (var _b =
|
|
7884
|
+
for (var _b = __values7(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7885
7885
|
var propagator = _c.value;
|
|
7886
7886
|
try {
|
|
7887
7887
|
propagator.inject(context5, carrier, setter);
|
|
7888
7888
|
} catch (err) {
|
|
7889
|
-
|
|
7889
|
+
import_api45.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
7890
7890
|
}
|
|
7891
7891
|
}
|
|
7892
7892
|
} catch (e_1_1) {
|
|
@@ -7903,65 +7903,65 @@ var init_composite3 = __esm({
|
|
|
7903
7903
|
}
|
|
7904
7904
|
}
|
|
7905
7905
|
};
|
|
7906
|
-
|
|
7906
|
+
CompositePropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
7907
7907
|
return this._propagators.reduce(function(ctx, propagator) {
|
|
7908
7908
|
try {
|
|
7909
7909
|
return propagator.extract(ctx, carrier, getter);
|
|
7910
7910
|
} catch (err) {
|
|
7911
|
-
|
|
7911
|
+
import_api45.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
7912
7912
|
}
|
|
7913
7913
|
return ctx;
|
|
7914
7914
|
}, context5);
|
|
7915
7915
|
};
|
|
7916
|
-
|
|
7916
|
+
CompositePropagator4.prototype.fields = function() {
|
|
7917
7917
|
return this._fields.slice();
|
|
7918
7918
|
};
|
|
7919
|
-
return
|
|
7919
|
+
return CompositePropagator4;
|
|
7920
7920
|
}();
|
|
7921
7921
|
}
|
|
7922
7922
|
});
|
|
7923
7923
|
|
|
7924
7924
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
7925
|
-
function
|
|
7926
|
-
return
|
|
7925
|
+
function validateKey3(key) {
|
|
7926
|
+
return VALID_KEY_REGEX3.test(key);
|
|
7927
7927
|
}
|
|
7928
|
-
function
|
|
7929
|
-
return
|
|
7928
|
+
function validateValue3(value) {
|
|
7929
|
+
return VALID_VALUE_BASE_REGEX3.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX3.test(value);
|
|
7930
7930
|
}
|
|
7931
|
-
var
|
|
7931
|
+
var VALID_KEY_CHAR_RANGE3, VALID_KEY3, VALID_VENDOR_KEY3, VALID_KEY_REGEX3, VALID_VALUE_BASE_REGEX3, INVALID_VALUE_COMMA_EQUAL_REGEX3;
|
|
7932
7932
|
var init_validators3 = __esm({
|
|
7933
7933
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/internal/validators.js"() {
|
|
7934
7934
|
"use strict";
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
__name(
|
|
7942
|
-
__name(
|
|
7935
|
+
VALID_KEY_CHAR_RANGE3 = "[_0-9a-z-*/]";
|
|
7936
|
+
VALID_KEY3 = "[a-z]" + VALID_KEY_CHAR_RANGE3 + "{0,255}";
|
|
7937
|
+
VALID_VENDOR_KEY3 = "[a-z0-9]" + VALID_KEY_CHAR_RANGE3 + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE3 + "{0,13}";
|
|
7938
|
+
VALID_KEY_REGEX3 = new RegExp("^(?:" + VALID_KEY3 + "|" + VALID_VENDOR_KEY3 + ")$");
|
|
7939
|
+
VALID_VALUE_BASE_REGEX3 = /^[ -~]{0,255}[!-~]$/;
|
|
7940
|
+
INVALID_VALUE_COMMA_EQUAL_REGEX3 = /,|=/;
|
|
7941
|
+
__name(validateKey3, "validateKey");
|
|
7942
|
+
__name(validateValue3, "validateValue");
|
|
7943
7943
|
}
|
|
7944
7944
|
});
|
|
7945
7945
|
|
|
7946
7946
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
7947
|
-
var
|
|
7947
|
+
var MAX_TRACE_STATE_ITEMS3, MAX_TRACE_STATE_LEN3, LIST_MEMBERS_SEPARATOR3, LIST_MEMBER_KEY_VALUE_SPLITTER3, TraceState3;
|
|
7948
7948
|
var init_TraceState3 = __esm({
|
|
7949
7949
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js"() {
|
|
7950
7950
|
"use strict";
|
|
7951
7951
|
init_validators3();
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7952
|
+
MAX_TRACE_STATE_ITEMS3 = 32;
|
|
7953
|
+
MAX_TRACE_STATE_LEN3 = 512;
|
|
7954
|
+
LIST_MEMBERS_SEPARATOR3 = ",";
|
|
7955
|
+
LIST_MEMBER_KEY_VALUE_SPLITTER3 = "=";
|
|
7956
|
+
TraceState3 = /** @class */
|
|
7957
7957
|
function() {
|
|
7958
|
-
function
|
|
7958
|
+
function TraceState4(rawTraceState) {
|
|
7959
7959
|
this._internalState = /* @__PURE__ */ new Map();
|
|
7960
7960
|
if (rawTraceState)
|
|
7961
7961
|
this._parse(rawTraceState);
|
|
7962
7962
|
}
|
|
7963
|
-
__name(
|
|
7964
|
-
|
|
7963
|
+
__name(TraceState4, "TraceState");
|
|
7964
|
+
TraceState4.prototype.set = function(key, value) {
|
|
7965
7965
|
var traceState = this._clone();
|
|
7966
7966
|
if (traceState._internalState.has(key)) {
|
|
7967
7967
|
traceState._internalState.delete(key);
|
|
@@ -7969,57 +7969,57 @@ var init_TraceState3 = __esm({
|
|
|
7969
7969
|
traceState._internalState.set(key, value);
|
|
7970
7970
|
return traceState;
|
|
7971
7971
|
};
|
|
7972
|
-
|
|
7972
|
+
TraceState4.prototype.unset = function(key) {
|
|
7973
7973
|
var traceState = this._clone();
|
|
7974
7974
|
traceState._internalState.delete(key);
|
|
7975
7975
|
return traceState;
|
|
7976
7976
|
};
|
|
7977
|
-
|
|
7977
|
+
TraceState4.prototype.get = function(key) {
|
|
7978
7978
|
return this._internalState.get(key);
|
|
7979
7979
|
};
|
|
7980
|
-
|
|
7980
|
+
TraceState4.prototype.serialize = function() {
|
|
7981
7981
|
var _this = this;
|
|
7982
7982
|
return this._keys().reduce(function(agg, key) {
|
|
7983
|
-
agg.push(key +
|
|
7983
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER3 + _this.get(key));
|
|
7984
7984
|
return agg;
|
|
7985
|
-
}, []).join(
|
|
7985
|
+
}, []).join(LIST_MEMBERS_SEPARATOR3);
|
|
7986
7986
|
};
|
|
7987
|
-
|
|
7988
|
-
if (rawTraceState.length >
|
|
7987
|
+
TraceState4.prototype._parse = function(rawTraceState) {
|
|
7988
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN3)
|
|
7989
7989
|
return;
|
|
7990
|
-
this._internalState = rawTraceState.split(
|
|
7990
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR3).reverse().reduce(function(agg, part) {
|
|
7991
7991
|
var listMember = part.trim();
|
|
7992
|
-
var i = listMember.indexOf(
|
|
7992
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER3);
|
|
7993
7993
|
if (i !== -1) {
|
|
7994
7994
|
var key = listMember.slice(0, i);
|
|
7995
7995
|
var value = listMember.slice(i + 1, part.length);
|
|
7996
|
-
if (
|
|
7996
|
+
if (validateKey3(key) && validateValue3(value)) {
|
|
7997
7997
|
agg.set(key, value);
|
|
7998
7998
|
} else {
|
|
7999
7999
|
}
|
|
8000
8000
|
}
|
|
8001
8001
|
return agg;
|
|
8002
8002
|
}, /* @__PURE__ */ new Map());
|
|
8003
|
-
if (this._internalState.size >
|
|
8004
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0,
|
|
8003
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS3) {
|
|
8004
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS3));
|
|
8005
8005
|
}
|
|
8006
8006
|
};
|
|
8007
|
-
|
|
8007
|
+
TraceState4.prototype._keys = function() {
|
|
8008
8008
|
return Array.from(this._internalState.keys()).reverse();
|
|
8009
8009
|
};
|
|
8010
|
-
|
|
8011
|
-
var traceState = new
|
|
8010
|
+
TraceState4.prototype._clone = function() {
|
|
8011
|
+
var traceState = new TraceState4();
|
|
8012
8012
|
traceState._internalState = new Map(this._internalState);
|
|
8013
8013
|
return traceState;
|
|
8014
8014
|
};
|
|
8015
|
-
return
|
|
8015
|
+
return TraceState4;
|
|
8016
8016
|
}();
|
|
8017
8017
|
}
|
|
8018
8018
|
});
|
|
8019
8019
|
|
|
8020
8020
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
8021
|
-
function
|
|
8022
|
-
var match =
|
|
8021
|
+
function parseTraceParent3(traceParent) {
|
|
8022
|
+
var match = TRACE_PARENT_REGEX3.exec(traceParent);
|
|
8023
8023
|
if (!match)
|
|
8024
8024
|
return null;
|
|
8025
8025
|
if (match[1] === "00" && match[5])
|
|
@@ -8030,62 +8030,62 @@ function parseTraceParent4(traceParent) {
|
|
|
8030
8030
|
traceFlags: parseInt(match[4], 16)
|
|
8031
8031
|
};
|
|
8032
8032
|
}
|
|
8033
|
-
var
|
|
8033
|
+
var import_api46, TRACE_PARENT_HEADER3, TRACE_STATE_HEADER3, VERSION6, VERSION_PART3, TRACE_ID_PART3, PARENT_ID_PART3, FLAGS_PART3, TRACE_PARENT_REGEX3, W3CTraceContextPropagator3;
|
|
8034
8034
|
var init_W3CTraceContextPropagator3 = __esm({
|
|
8035
8035
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
8036
8036
|
"use strict";
|
|
8037
|
-
|
|
8037
|
+
import_api46 = require("@opentelemetry/api");
|
|
8038
8038
|
init_suppress_tracing3();
|
|
8039
8039
|
init_TraceState3();
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
__name(
|
|
8049
|
-
|
|
8040
|
+
TRACE_PARENT_HEADER3 = "traceparent";
|
|
8041
|
+
TRACE_STATE_HEADER3 = "tracestate";
|
|
8042
|
+
VERSION6 = "00";
|
|
8043
|
+
VERSION_PART3 = "(?!ff)[\\da-f]{2}";
|
|
8044
|
+
TRACE_ID_PART3 = "(?![0]{32})[\\da-f]{32}";
|
|
8045
|
+
PARENT_ID_PART3 = "(?![0]{16})[\\da-f]{16}";
|
|
8046
|
+
FLAGS_PART3 = "[\\da-f]{2}";
|
|
8047
|
+
TRACE_PARENT_REGEX3 = new RegExp("^\\s?(" + VERSION_PART3 + ")-(" + TRACE_ID_PART3 + ")-(" + PARENT_ID_PART3 + ")-(" + FLAGS_PART3 + ")(-.*)?\\s?$");
|
|
8048
|
+
__name(parseTraceParent3, "parseTraceParent");
|
|
8049
|
+
W3CTraceContextPropagator3 = /** @class */
|
|
8050
8050
|
function() {
|
|
8051
|
-
function
|
|
8051
|
+
function W3CTraceContextPropagator4() {
|
|
8052
8052
|
}
|
|
8053
|
-
__name(
|
|
8054
|
-
|
|
8055
|
-
var spanContext =
|
|
8056
|
-
if (!spanContext ||
|
|
8053
|
+
__name(W3CTraceContextPropagator4, "W3CTraceContextPropagator");
|
|
8054
|
+
W3CTraceContextPropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
8055
|
+
var spanContext = import_api46.trace.getSpanContext(context5);
|
|
8056
|
+
if (!spanContext || isTracingSuppressed3(context5) || !(0, import_api46.isSpanContextValid)(spanContext))
|
|
8057
8057
|
return;
|
|
8058
|
-
var traceParent =
|
|
8059
|
-
setter.set(carrier,
|
|
8058
|
+
var traceParent = VERSION6 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || import_api46.TraceFlags.NONE).toString(16);
|
|
8059
|
+
setter.set(carrier, TRACE_PARENT_HEADER3, traceParent);
|
|
8060
8060
|
if (spanContext.traceState) {
|
|
8061
|
-
setter.set(carrier,
|
|
8061
|
+
setter.set(carrier, TRACE_STATE_HEADER3, spanContext.traceState.serialize());
|
|
8062
8062
|
}
|
|
8063
8063
|
};
|
|
8064
|
-
|
|
8065
|
-
var traceParentHeader = getter.get(carrier,
|
|
8064
|
+
W3CTraceContextPropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
8065
|
+
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER3);
|
|
8066
8066
|
if (!traceParentHeader)
|
|
8067
8067
|
return context5;
|
|
8068
8068
|
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
8069
8069
|
if (typeof traceParent !== "string")
|
|
8070
8070
|
return context5;
|
|
8071
|
-
var spanContext =
|
|
8071
|
+
var spanContext = parseTraceParent3(traceParent);
|
|
8072
8072
|
if (!spanContext)
|
|
8073
8073
|
return context5;
|
|
8074
8074
|
spanContext.isRemote = true;
|
|
8075
|
-
var traceStateHeader = getter.get(carrier,
|
|
8075
|
+
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER3);
|
|
8076
8076
|
if (traceStateHeader) {
|
|
8077
8077
|
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
8078
|
-
spanContext.traceState = new
|
|
8078
|
+
spanContext.traceState = new TraceState3(typeof state === "string" ? state : void 0);
|
|
8079
8079
|
}
|
|
8080
|
-
return
|
|
8080
|
+
return import_api46.trace.setSpanContext(context5, spanContext);
|
|
8081
8081
|
};
|
|
8082
|
-
|
|
8082
|
+
W3CTraceContextPropagator4.prototype.fields = function() {
|
|
8083
8083
|
return [
|
|
8084
|
-
|
|
8085
|
-
|
|
8084
|
+
TRACE_PARENT_HEADER3,
|
|
8085
|
+
TRACE_STATE_HEADER3
|
|
8086
8086
|
];
|
|
8087
8087
|
};
|
|
8088
|
-
return
|
|
8088
|
+
return W3CTraceContextPropagator4;
|
|
8089
8089
|
}();
|
|
8090
8090
|
}
|
|
8091
8091
|
});
|
|
@@ -8098,12 +8098,12 @@ var init_IdGenerator4 = __esm({
|
|
|
8098
8098
|
});
|
|
8099
8099
|
|
|
8100
8100
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js
|
|
8101
|
-
var
|
|
8101
|
+
var import_api47, RPC_METADATA_KEY3, RPCType3;
|
|
8102
8102
|
var init_rpc_metadata3 = __esm({
|
|
8103
8103
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
8104
8104
|
"use strict";
|
|
8105
|
-
|
|
8106
|
-
RPC_METADATA_KEY3 = (0,
|
|
8105
|
+
import_api47 = require("@opentelemetry/api");
|
|
8106
|
+
RPC_METADATA_KEY3 = (0, import_api47.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
8107
8107
|
(function(RPCType4) {
|
|
8108
8108
|
RPCType4["HTTP"] = "http";
|
|
8109
8109
|
})(RPCType3 || (RPCType3 = {}));
|
|
@@ -8111,11 +8111,11 @@ var init_rpc_metadata3 = __esm({
|
|
|
8111
8111
|
});
|
|
8112
8112
|
|
|
8113
8113
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js
|
|
8114
|
-
var
|
|
8114
|
+
var import_api48, AlwaysOffSampler4;
|
|
8115
8115
|
var init_AlwaysOffSampler4 = __esm({
|
|
8116
8116
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOffSampler.js"() {
|
|
8117
8117
|
"use strict";
|
|
8118
|
-
|
|
8118
|
+
import_api48 = require("@opentelemetry/api");
|
|
8119
8119
|
AlwaysOffSampler4 = /** @class */
|
|
8120
8120
|
function() {
|
|
8121
8121
|
function AlwaysOffSampler5() {
|
|
@@ -8123,7 +8123,7 @@ var init_AlwaysOffSampler4 = __esm({
|
|
|
8123
8123
|
__name(AlwaysOffSampler5, "AlwaysOffSampler");
|
|
8124
8124
|
AlwaysOffSampler5.prototype.shouldSample = function() {
|
|
8125
8125
|
return {
|
|
8126
|
-
decision:
|
|
8126
|
+
decision: import_api48.SamplingDecision.NOT_RECORD
|
|
8127
8127
|
};
|
|
8128
8128
|
};
|
|
8129
8129
|
AlwaysOffSampler5.prototype.toString = function() {
|
|
@@ -8135,11 +8135,11 @@ var init_AlwaysOffSampler4 = __esm({
|
|
|
8135
8135
|
});
|
|
8136
8136
|
|
|
8137
8137
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js
|
|
8138
|
-
var
|
|
8138
|
+
var import_api49, AlwaysOnSampler4;
|
|
8139
8139
|
var init_AlwaysOnSampler4 = __esm({
|
|
8140
8140
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/AlwaysOnSampler.js"() {
|
|
8141
8141
|
"use strict";
|
|
8142
|
-
|
|
8142
|
+
import_api49 = require("@opentelemetry/api");
|
|
8143
8143
|
AlwaysOnSampler4 = /** @class */
|
|
8144
8144
|
function() {
|
|
8145
8145
|
function AlwaysOnSampler5() {
|
|
@@ -8147,7 +8147,7 @@ var init_AlwaysOnSampler4 = __esm({
|
|
|
8147
8147
|
__name(AlwaysOnSampler5, "AlwaysOnSampler");
|
|
8148
8148
|
AlwaysOnSampler5.prototype.shouldSample = function() {
|
|
8149
8149
|
return {
|
|
8150
|
-
decision:
|
|
8150
|
+
decision: import_api49.SamplingDecision.RECORD_AND_SAMPLED
|
|
8151
8151
|
};
|
|
8152
8152
|
};
|
|
8153
8153
|
AlwaysOnSampler5.prototype.toString = function() {
|
|
@@ -8159,11 +8159,11 @@ var init_AlwaysOnSampler4 = __esm({
|
|
|
8159
8159
|
});
|
|
8160
8160
|
|
|
8161
8161
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js
|
|
8162
|
-
var
|
|
8162
|
+
var import_api50, ParentBasedSampler4;
|
|
8163
8163
|
var init_ParentBasedSampler4 = __esm({
|
|
8164
8164
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
8165
8165
|
"use strict";
|
|
8166
|
-
|
|
8166
|
+
import_api50 = require("@opentelemetry/api");
|
|
8167
8167
|
init_global_error_handler3();
|
|
8168
8168
|
init_AlwaysOffSampler4();
|
|
8169
8169
|
init_AlwaysOnSampler4();
|
|
@@ -8183,17 +8183,17 @@ var init_ParentBasedSampler4 = __esm({
|
|
|
8183
8183
|
}
|
|
8184
8184
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
8185
8185
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
8186
|
-
var parentContext =
|
|
8187
|
-
if (!parentContext || !(0,
|
|
8186
|
+
var parentContext = import_api50.trace.getSpanContext(context5);
|
|
8187
|
+
if (!parentContext || !(0, import_api50.isSpanContextValid)(parentContext)) {
|
|
8188
8188
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
8189
8189
|
}
|
|
8190
8190
|
if (parentContext.isRemote) {
|
|
8191
|
-
if (parentContext.traceFlags &
|
|
8191
|
+
if (parentContext.traceFlags & import_api50.TraceFlags.SAMPLED) {
|
|
8192
8192
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
8193
8193
|
}
|
|
8194
8194
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
8195
8195
|
}
|
|
8196
|
-
if (parentContext.traceFlags &
|
|
8196
|
+
if (parentContext.traceFlags & import_api50.TraceFlags.SAMPLED) {
|
|
8197
8197
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
8198
8198
|
}
|
|
8199
8199
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -8207,11 +8207,11 @@ var init_ParentBasedSampler4 = __esm({
|
|
|
8207
8207
|
});
|
|
8208
8208
|
|
|
8209
8209
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js
|
|
8210
|
-
var
|
|
8210
|
+
var import_api51, TraceIdRatioBasedSampler4;
|
|
8211
8211
|
var init_TraceIdRatioBasedSampler4 = __esm({
|
|
8212
8212
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/TraceIdRatioBasedSampler.js"() {
|
|
8213
8213
|
"use strict";
|
|
8214
|
-
|
|
8214
|
+
import_api51 = require("@opentelemetry/api");
|
|
8215
8215
|
TraceIdRatioBasedSampler4 = /** @class */
|
|
8216
8216
|
function() {
|
|
8217
8217
|
function TraceIdRatioBasedSampler5(_ratio) {
|
|
@@ -8225,7 +8225,7 @@ var init_TraceIdRatioBasedSampler4 = __esm({
|
|
|
8225
8225
|
__name(TraceIdRatioBasedSampler5, "TraceIdRatioBasedSampler");
|
|
8226
8226
|
TraceIdRatioBasedSampler5.prototype.shouldSample = function(context5, traceId) {
|
|
8227
8227
|
return {
|
|
8228
|
-
decision: (0,
|
|
8228
|
+
decision: (0, import_api51.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? import_api51.SamplingDecision.RECORD_AND_SAMPLED : import_api51.SamplingDecision.NOT_RECORD
|
|
8229
8229
|
};
|
|
8230
8230
|
};
|
|
8231
8231
|
TraceIdRatioBasedSampler5.prototype.toString = function() {
|
|
@@ -8490,13 +8490,13 @@ function deserializeSpanContext(serializedString) {
|
|
|
8490
8490
|
traceFlags
|
|
8491
8491
|
};
|
|
8492
8492
|
}
|
|
8493
|
-
var
|
|
8493
|
+
var import_api52, __values8, __read11, UBER_TRACE_ID_HEADER, UBER_BAGGAGE_HEADER_PREFIX, JaegerPropagator, VALID_HEX_RE;
|
|
8494
8494
|
var init_JaegerPropagator = __esm({
|
|
8495
8495
|
"node_modules/@opentelemetry/propagator-jaeger/build/esm/JaegerPropagator.js"() {
|
|
8496
8496
|
"use strict";
|
|
8497
|
-
|
|
8497
|
+
import_api52 = require("@opentelemetry/api");
|
|
8498
8498
|
init_esm5();
|
|
8499
|
-
|
|
8499
|
+
__values8 = function(o) {
|
|
8500
8500
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
8501
8501
|
if (m)
|
|
8502
8502
|
return m.call(o);
|
|
@@ -8552,15 +8552,15 @@ var init_JaegerPropagator = __esm({
|
|
|
8552
8552
|
__name(JaegerPropagator2, "JaegerPropagator");
|
|
8553
8553
|
JaegerPropagator2.prototype.inject = function(context5, carrier, setter) {
|
|
8554
8554
|
var e_1, _a4;
|
|
8555
|
-
var spanContext =
|
|
8556
|
-
var baggage =
|
|
8557
|
-
if (spanContext &&
|
|
8558
|
-
var traceFlags = "0" + (spanContext.traceFlags ||
|
|
8555
|
+
var spanContext = import_api52.trace.getSpanContext(context5);
|
|
8556
|
+
var baggage = import_api52.propagation.getBaggage(context5);
|
|
8557
|
+
if (spanContext && isTracingSuppressed3(context5) === false) {
|
|
8558
|
+
var traceFlags = "0" + (spanContext.traceFlags || import_api52.TraceFlags.NONE).toString(16);
|
|
8559
8559
|
setter.set(carrier, this._jaegerTraceHeader, spanContext.traceId + ":" + spanContext.spanId + ":0:" + traceFlags);
|
|
8560
8560
|
}
|
|
8561
8561
|
if (baggage) {
|
|
8562
8562
|
try {
|
|
8563
|
-
for (var _b =
|
|
8563
|
+
for (var _b = __values8(baggage.getAllEntries()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
8564
8564
|
var _d = __read11(_c.value, 2), key = _d[0], entry = _d[1];
|
|
8565
8565
|
setter.set(carrier, this._jaegerBaggageHeaderPrefix + "-" + key, encodeURIComponent(entry.value));
|
|
8566
8566
|
}
|
|
@@ -8598,14 +8598,14 @@ var init_JaegerPropagator = __esm({
|
|
|
8598
8598
|
if (typeof uberTraceId === "string") {
|
|
8599
8599
|
var spanContext = deserializeSpanContext(uberTraceId);
|
|
8600
8600
|
if (spanContext) {
|
|
8601
|
-
newContext =
|
|
8601
|
+
newContext = import_api52.trace.setSpanContext(newContext, spanContext);
|
|
8602
8602
|
}
|
|
8603
8603
|
}
|
|
8604
8604
|
if (baggageValues.length === 0)
|
|
8605
8605
|
return newContext;
|
|
8606
|
-
var currentBaggage = (_b =
|
|
8606
|
+
var currentBaggage = (_b = import_api52.propagation.getBaggage(context5)) !== null && _b !== void 0 ? _b : import_api52.propagation.createBaggage();
|
|
8607
8607
|
try {
|
|
8608
|
-
for (var baggageValues_1 =
|
|
8608
|
+
for (var baggageValues_1 = __values8(baggageValues), baggageValues_1_1 = baggageValues_1.next(); !baggageValues_1_1.done; baggageValues_1_1 = baggageValues_1.next()) {
|
|
8609
8609
|
var baggageEntry = baggageValues_1_1.value;
|
|
8610
8610
|
if (baggageEntry.value === void 0)
|
|
8611
8611
|
continue;
|
|
@@ -8626,7 +8626,7 @@ var init_JaegerPropagator = __esm({
|
|
|
8626
8626
|
throw e_2.error;
|
|
8627
8627
|
}
|
|
8628
8628
|
}
|
|
8629
|
-
newContext =
|
|
8629
|
+
newContext = import_api52.propagation.setBaggage(newContext, currentBaggage);
|
|
8630
8630
|
return newContext;
|
|
8631
8631
|
};
|
|
8632
8632
|
JaegerPropagator2.prototype.fields = function() {
|
|
@@ -9831,7 +9831,7 @@ var ExpressAdapter = class {
|
|
|
9831
9831
|
async startServer(port) {
|
|
9832
9832
|
return new Promise((resolve) => {
|
|
9833
9833
|
this.server = this.instance.listen(port, () => {
|
|
9834
|
-
this.logger
|
|
9834
|
+
this.logger?.info(`Server is running on PORT ${port}`);
|
|
9835
9835
|
resolve();
|
|
9836
9836
|
});
|
|
9837
9837
|
});
|
|
@@ -9868,7 +9868,7 @@ var FastifyAdapter = class {
|
|
|
9868
9868
|
this.instance = (0, import_fastify.default)({
|
|
9869
9869
|
bodyLimit: 10 * 1024 * 1024,
|
|
9870
9870
|
querystringParser: (str) => import_qs.default.parse(str),
|
|
9871
|
-
loggerInstance: env2.ENVIRONMENT !== "test" ? logger : false
|
|
9871
|
+
loggerInstance: env2.ENVIRONMENT !== "test" && logger ? logger : false
|
|
9872
9872
|
});
|
|
9873
9873
|
this.instance.register(import_cors2.default);
|
|
9874
9874
|
}
|
|
@@ -9909,7 +9909,7 @@ var FastifyAdapter = class {
|
|
|
9909
9909
|
port
|
|
9910
9910
|
});
|
|
9911
9911
|
if (this.env.NODE_ENV !== "test") {
|
|
9912
|
-
this.logger
|
|
9912
|
+
this.logger?.info(`Server is running on PORT ${port}`);
|
|
9913
9913
|
}
|
|
9914
9914
|
}
|
|
9915
9915
|
async closeServer() {
|
|
@@ -10302,245 +10302,6 @@ var WinstonOtelFastify = class WinstonOtelFastify2 {
|
|
|
10302
10302
|
}
|
|
10303
10303
|
};
|
|
10304
10304
|
|
|
10305
|
-
// node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
10306
|
-
var import_api2 = require("@opentelemetry/api");
|
|
10307
|
-
var SUPPRESS_TRACING_KEY = (0, import_api2.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
10308
|
-
function isTracingSuppressed(context5) {
|
|
10309
|
-
return context5.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
10310
|
-
}
|
|
10311
|
-
__name(isTracingSuppressed, "isTracingSuppressed");
|
|
10312
|
-
|
|
10313
|
-
// node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
10314
|
-
var import_api3 = require("@opentelemetry/api");
|
|
10315
|
-
var __values = function(o) {
|
|
10316
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
10317
|
-
if (m)
|
|
10318
|
-
return m.call(o);
|
|
10319
|
-
if (o && typeof o.length === "number")
|
|
10320
|
-
return {
|
|
10321
|
-
next: function() {
|
|
10322
|
-
if (o && i >= o.length)
|
|
10323
|
-
o = void 0;
|
|
10324
|
-
return {
|
|
10325
|
-
value: o && o[i++],
|
|
10326
|
-
done: !o
|
|
10327
|
-
};
|
|
10328
|
-
}
|
|
10329
|
-
};
|
|
10330
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
10331
|
-
};
|
|
10332
|
-
var CompositePropagator = (
|
|
10333
|
-
/** @class */
|
|
10334
|
-
function() {
|
|
10335
|
-
function CompositePropagator5(config) {
|
|
10336
|
-
if (config === void 0) {
|
|
10337
|
-
config = {};
|
|
10338
|
-
}
|
|
10339
|
-
var _a4;
|
|
10340
|
-
this._propagators = (_a4 = config.propagators) !== null && _a4 !== void 0 ? _a4 : [];
|
|
10341
|
-
this._fields = Array.from(new Set(this._propagators.map(function(p) {
|
|
10342
|
-
return typeof p.fields === "function" ? p.fields() : [];
|
|
10343
|
-
}).reduce(function(x, y) {
|
|
10344
|
-
return x.concat(y);
|
|
10345
|
-
}, [])));
|
|
10346
|
-
}
|
|
10347
|
-
__name(CompositePropagator5, "CompositePropagator");
|
|
10348
|
-
CompositePropagator5.prototype.inject = function(context5, carrier, setter) {
|
|
10349
|
-
var e_1, _a4;
|
|
10350
|
-
try {
|
|
10351
|
-
for (var _b = __values(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
10352
|
-
var propagator = _c.value;
|
|
10353
|
-
try {
|
|
10354
|
-
propagator.inject(context5, carrier, setter);
|
|
10355
|
-
} catch (err) {
|
|
10356
|
-
import_api3.diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
10357
|
-
}
|
|
10358
|
-
}
|
|
10359
|
-
} catch (e_1_1) {
|
|
10360
|
-
e_1 = {
|
|
10361
|
-
error: e_1_1
|
|
10362
|
-
};
|
|
10363
|
-
} finally {
|
|
10364
|
-
try {
|
|
10365
|
-
if (_c && !_c.done && (_a4 = _b.return))
|
|
10366
|
-
_a4.call(_b);
|
|
10367
|
-
} finally {
|
|
10368
|
-
if (e_1)
|
|
10369
|
-
throw e_1.error;
|
|
10370
|
-
}
|
|
10371
|
-
}
|
|
10372
|
-
};
|
|
10373
|
-
CompositePropagator5.prototype.extract = function(context5, carrier, getter) {
|
|
10374
|
-
return this._propagators.reduce(function(ctx, propagator) {
|
|
10375
|
-
try {
|
|
10376
|
-
return propagator.extract(ctx, carrier, getter);
|
|
10377
|
-
} catch (err) {
|
|
10378
|
-
import_api3.diag.warn("Failed to extract with " + propagator.constructor.name + ". Err: " + err.message);
|
|
10379
|
-
}
|
|
10380
|
-
return ctx;
|
|
10381
|
-
}, context5);
|
|
10382
|
-
};
|
|
10383
|
-
CompositePropagator5.prototype.fields = function() {
|
|
10384
|
-
return this._fields.slice();
|
|
10385
|
-
};
|
|
10386
|
-
return CompositePropagator5;
|
|
10387
|
-
}()
|
|
10388
|
-
);
|
|
10389
|
-
|
|
10390
|
-
// node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
10391
|
-
var import_api4 = require("@opentelemetry/api");
|
|
10392
|
-
|
|
10393
|
-
// node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
10394
|
-
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
10395
|
-
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
10396
|
-
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
10397
|
-
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
10398
|
-
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
10399
|
-
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
10400
|
-
function validateKey(key) {
|
|
10401
|
-
return VALID_KEY_REGEX.test(key);
|
|
10402
|
-
}
|
|
10403
|
-
__name(validateKey, "validateKey");
|
|
10404
|
-
function validateValue(value) {
|
|
10405
|
-
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
10406
|
-
}
|
|
10407
|
-
__name(validateValue, "validateValue");
|
|
10408
|
-
|
|
10409
|
-
// node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
10410
|
-
var MAX_TRACE_STATE_ITEMS = 32;
|
|
10411
|
-
var MAX_TRACE_STATE_LEN = 512;
|
|
10412
|
-
var LIST_MEMBERS_SEPARATOR = ",";
|
|
10413
|
-
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
10414
|
-
var TraceState = (
|
|
10415
|
-
/** @class */
|
|
10416
|
-
function() {
|
|
10417
|
-
function TraceState5(rawTraceState) {
|
|
10418
|
-
this._internalState = /* @__PURE__ */ new Map();
|
|
10419
|
-
if (rawTraceState)
|
|
10420
|
-
this._parse(rawTraceState);
|
|
10421
|
-
}
|
|
10422
|
-
__name(TraceState5, "TraceState");
|
|
10423
|
-
TraceState5.prototype.set = function(key, value) {
|
|
10424
|
-
var traceState = this._clone();
|
|
10425
|
-
if (traceState._internalState.has(key)) {
|
|
10426
|
-
traceState._internalState.delete(key);
|
|
10427
|
-
}
|
|
10428
|
-
traceState._internalState.set(key, value);
|
|
10429
|
-
return traceState;
|
|
10430
|
-
};
|
|
10431
|
-
TraceState5.prototype.unset = function(key) {
|
|
10432
|
-
var traceState = this._clone();
|
|
10433
|
-
traceState._internalState.delete(key);
|
|
10434
|
-
return traceState;
|
|
10435
|
-
};
|
|
10436
|
-
TraceState5.prototype.get = function(key) {
|
|
10437
|
-
return this._internalState.get(key);
|
|
10438
|
-
};
|
|
10439
|
-
TraceState5.prototype.serialize = function() {
|
|
10440
|
-
var _this = this;
|
|
10441
|
-
return this._keys().reduce(function(agg, key) {
|
|
10442
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
10443
|
-
return agg;
|
|
10444
|
-
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
10445
|
-
};
|
|
10446
|
-
TraceState5.prototype._parse = function(rawTraceState) {
|
|
10447
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
10448
|
-
return;
|
|
10449
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) {
|
|
10450
|
-
var listMember = part.trim();
|
|
10451
|
-
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
10452
|
-
if (i !== -1) {
|
|
10453
|
-
var key = listMember.slice(0, i);
|
|
10454
|
-
var value = listMember.slice(i + 1, part.length);
|
|
10455
|
-
if (validateKey(key) && validateValue(value)) {
|
|
10456
|
-
agg.set(key, value);
|
|
10457
|
-
} else {
|
|
10458
|
-
}
|
|
10459
|
-
}
|
|
10460
|
-
return agg;
|
|
10461
|
-
}, /* @__PURE__ */ new Map());
|
|
10462
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
10463
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
10464
|
-
}
|
|
10465
|
-
};
|
|
10466
|
-
TraceState5.prototype._keys = function() {
|
|
10467
|
-
return Array.from(this._internalState.keys()).reverse();
|
|
10468
|
-
};
|
|
10469
|
-
TraceState5.prototype._clone = function() {
|
|
10470
|
-
var traceState = new TraceState5();
|
|
10471
|
-
traceState._internalState = new Map(this._internalState);
|
|
10472
|
-
return traceState;
|
|
10473
|
-
};
|
|
10474
|
-
return TraceState5;
|
|
10475
|
-
}()
|
|
10476
|
-
);
|
|
10477
|
-
|
|
10478
|
-
// node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
10479
|
-
var TRACE_PARENT_HEADER = "traceparent";
|
|
10480
|
-
var TRACE_STATE_HEADER = "tracestate";
|
|
10481
|
-
var VERSION = "00";
|
|
10482
|
-
var VERSION_PART = "(?!ff)[\\da-f]{2}";
|
|
10483
|
-
var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
|
|
10484
|
-
var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
|
|
10485
|
-
var FLAGS_PART = "[\\da-f]{2}";
|
|
10486
|
-
var TRACE_PARENT_REGEX = new RegExp("^\\s?(" + VERSION_PART + ")-(" + TRACE_ID_PART + ")-(" + PARENT_ID_PART + ")-(" + FLAGS_PART + ")(-.*)?\\s?$");
|
|
10487
|
-
function parseTraceParent(traceParent) {
|
|
10488
|
-
var match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
10489
|
-
if (!match)
|
|
10490
|
-
return null;
|
|
10491
|
-
if (match[1] === "00" && match[5])
|
|
10492
|
-
return null;
|
|
10493
|
-
return {
|
|
10494
|
-
traceId: match[2],
|
|
10495
|
-
spanId: match[3],
|
|
10496
|
-
traceFlags: parseInt(match[4], 16)
|
|
10497
|
-
};
|
|
10498
|
-
}
|
|
10499
|
-
__name(parseTraceParent, "parseTraceParent");
|
|
10500
|
-
var W3CTraceContextPropagator = (
|
|
10501
|
-
/** @class */
|
|
10502
|
-
function() {
|
|
10503
|
-
function W3CTraceContextPropagator5() {
|
|
10504
|
-
}
|
|
10505
|
-
__name(W3CTraceContextPropagator5, "W3CTraceContextPropagator");
|
|
10506
|
-
W3CTraceContextPropagator5.prototype.inject = function(context5, carrier, setter) {
|
|
10507
|
-
var spanContext = import_api4.trace.getSpanContext(context5);
|
|
10508
|
-
if (!spanContext || isTracingSuppressed(context5) || !(0, import_api4.isSpanContextValid)(spanContext))
|
|
10509
|
-
return;
|
|
10510
|
-
var traceParent = VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || import_api4.TraceFlags.NONE).toString(16);
|
|
10511
|
-
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
10512
|
-
if (spanContext.traceState) {
|
|
10513
|
-
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
10514
|
-
}
|
|
10515
|
-
};
|
|
10516
|
-
W3CTraceContextPropagator5.prototype.extract = function(context5, carrier, getter) {
|
|
10517
|
-
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
10518
|
-
if (!traceParentHeader)
|
|
10519
|
-
return context5;
|
|
10520
|
-
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
10521
|
-
if (typeof traceParent !== "string")
|
|
10522
|
-
return context5;
|
|
10523
|
-
var spanContext = parseTraceParent(traceParent);
|
|
10524
|
-
if (!spanContext)
|
|
10525
|
-
return context5;
|
|
10526
|
-
spanContext.isRemote = true;
|
|
10527
|
-
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
10528
|
-
if (traceStateHeader) {
|
|
10529
|
-
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
10530
|
-
spanContext.traceState = new TraceState(typeof state === "string" ? state : void 0);
|
|
10531
|
-
}
|
|
10532
|
-
return import_api4.trace.setSpanContext(context5, spanContext);
|
|
10533
|
-
};
|
|
10534
|
-
W3CTraceContextPropagator5.prototype.fields = function() {
|
|
10535
|
-
return [
|
|
10536
|
-
TRACE_PARENT_HEADER,
|
|
10537
|
-
TRACE_STATE_HEADER
|
|
10538
|
-
];
|
|
10539
|
-
};
|
|
10540
|
-
return W3CTraceContextPropagator5;
|
|
10541
|
-
}()
|
|
10542
|
-
);
|
|
10543
|
-
|
|
10544
10305
|
// src/infra/adapters/observability/otel/opentelemetry.ts
|
|
10545
10306
|
var import_exporter_logs_otlp_proto = require("@opentelemetry/exporter-logs-otlp-proto");
|
|
10546
10307
|
var import_exporter_metrics_otlp_proto = require("@opentelemetry/exporter-metrics-otlp-proto");
|
|
@@ -10562,7 +10323,7 @@ var OpenTelemetry = class OpenTelemetry2 {
|
|
|
10562
10323
|
const resource = new import_resources2.Resource({
|
|
10563
10324
|
[import_semantic_conventions5.SEMRESATTRS_SERVICE_NAME]: this.env.OTEL_SERVICE_NAME,
|
|
10564
10325
|
[import_semantic_conventions5.SEMRESATTRS_SERVICE_VERSION]: this.env.OTEL_SERVICE_VERSION || "1.0.0",
|
|
10565
|
-
[import_semantic_conventions5.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: this.env.ENVIRONMENT || "
|
|
10326
|
+
[import_semantic_conventions5.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: this.env.ENVIRONMENT || "production"
|
|
10566
10327
|
});
|
|
10567
10328
|
const traceExporter = new import_exporter_trace_otlp_proto.OTLPTraceExporter({
|
|
10568
10329
|
url: this.env.OTEL_OTLP_TRACES_EXPORTER_URL,
|
|
@@ -10579,27 +10340,10 @@ var OpenTelemetry = class OpenTelemetry2 {
|
|
|
10579
10340
|
this.sdk = new import_sdk_node.NodeSDK({
|
|
10580
10341
|
resource,
|
|
10581
10342
|
traceExporter,
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
new W3CTraceContextPropagator()
|
|
10585
|
-
]
|
|
10586
|
-
}),
|
|
10587
|
-
spanProcessor: new import_sdk_trace_node.BatchSpanProcessor(traceExporter, {
|
|
10588
|
-
maxQueueSize: 2048,
|
|
10589
|
-
maxExportBatchSize: 512,
|
|
10590
|
-
scheduledDelayMillis: 5e3,
|
|
10591
|
-
exportTimeoutMillis: 3e4
|
|
10592
|
-
}),
|
|
10593
|
-
logRecordProcessor: new import_sdk_logs.BatchLogRecordProcessor(logExporter, {
|
|
10594
|
-
maxQueueSize: 2048,
|
|
10595
|
-
maxExportBatchSize: 512,
|
|
10596
|
-
scheduledDelayMillis: 1e3,
|
|
10597
|
-
exportTimeoutMillis: 3e4
|
|
10598
|
-
}),
|
|
10343
|
+
spanProcessor: new import_sdk_trace_node.BatchSpanProcessor(traceExporter),
|
|
10344
|
+
logRecordProcessor: new import_sdk_logs.BatchLogRecordProcessor(logExporter),
|
|
10599
10345
|
metricReader: new import_sdk_metrics.PeriodicExportingMetricReader({
|
|
10600
|
-
exporter: metricExporter
|
|
10601
|
-
exportIntervalMillis: 1e4,
|
|
10602
|
-
exportTimeoutMillis: 3e4
|
|
10346
|
+
exporter: metricExporter
|
|
10603
10347
|
})
|
|
10604
10348
|
});
|
|
10605
10349
|
}
|
|
@@ -10624,7 +10368,7 @@ var OpenTelemetry = class OpenTelemetry2 {
|
|
|
10624
10368
|
};
|
|
10625
10369
|
|
|
10626
10370
|
// src/infra/adapters/observability/otel/span-decorator.ts
|
|
10627
|
-
var
|
|
10371
|
+
var import_api53 = __toESM(require("@opentelemetry/api"), 1);
|
|
10628
10372
|
var import_reflect_metadata4 = require("reflect-metadata");
|
|
10629
10373
|
function Span2() {
|
|
10630
10374
|
return function(target, propertyKey, descriptor) {
|
|
@@ -10633,7 +10377,7 @@ function Span2() {
|
|
|
10633
10377
|
}
|
|
10634
10378
|
const originalMethod = descriptor.value;
|
|
10635
10379
|
descriptor.value = function(...args) {
|
|
10636
|
-
const tracer =
|
|
10380
|
+
const tracer = import_api53.default.trace.getTracer(process.env.OTEL_SERVICE_NAME, process.env.OTEL_SERVICE_VERSION);
|
|
10637
10381
|
const className = target.constructor?.name || "UnknownClass";
|
|
10638
10382
|
const methodName = String(propertyKey);
|
|
10639
10383
|
const spanName = `${className}.${methodName}`;
|
|
@@ -10673,7 +10417,7 @@ function handleSpanError(span, error) {
|
|
|
10673
10417
|
span.recordException(new Error(String(error)));
|
|
10674
10418
|
}
|
|
10675
10419
|
span.setStatus({
|
|
10676
|
-
code:
|
|
10420
|
+
code: import_api53.SpanStatusCode.ERROR,
|
|
10677
10421
|
message: errorMessage
|
|
10678
10422
|
});
|
|
10679
10423
|
span.end();
|
|
@@ -10681,7 +10425,7 @@ function handleSpanError(span, error) {
|
|
|
10681
10425
|
__name(handleSpanError, "handleSpanError");
|
|
10682
10426
|
|
|
10683
10427
|
// src/infra/adapters/observability/otel/tracer-gateway-opentelemetry.ts
|
|
10684
|
-
var
|
|
10428
|
+
var import_api54 = __toESM(require("@opentelemetry/api"), 1);
|
|
10685
10429
|
var TracerGatewayOpentelemetry = class {
|
|
10686
10430
|
static {
|
|
10687
10431
|
__name(this, "TracerGatewayOpentelemetry");
|
|
@@ -10690,7 +10434,7 @@ var TracerGatewayOpentelemetry = class {
|
|
|
10690
10434
|
if (!process.env.OTEL_ENABLE) {
|
|
10691
10435
|
return;
|
|
10692
10436
|
}
|
|
10693
|
-
const span =
|
|
10437
|
+
const span = import_api54.default.trace.getActiveSpan();
|
|
10694
10438
|
if (span && attributes) {
|
|
10695
10439
|
span.addEvent(name, attributes);
|
|
10696
10440
|
} else if (span) {
|
|
@@ -10701,7 +10445,7 @@ var TracerGatewayOpentelemetry = class {
|
|
|
10701
10445
|
if (!process.env.OTEL_ENABLE) {
|
|
10702
10446
|
return;
|
|
10703
10447
|
}
|
|
10704
|
-
const span =
|
|
10448
|
+
const span = import_api54.default.trace.getActiveSpan();
|
|
10705
10449
|
if (span) {
|
|
10706
10450
|
span.setAttribute(key, value);
|
|
10707
10451
|
}
|