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.mjs
CHANGED
|
@@ -378,16 +378,16 @@ var require_src = __commonJS({
|
|
|
378
378
|
});
|
|
379
379
|
|
|
380
380
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
381
|
-
import { createContextKey
|
|
382
|
-
function
|
|
383
|
-
return context5.getValue(
|
|
381
|
+
import { createContextKey } from "@opentelemetry/api";
|
|
382
|
+
function isTracingSuppressed(context5) {
|
|
383
|
+
return context5.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
384
384
|
}
|
|
385
|
-
var
|
|
385
|
+
var SUPPRESS_TRACING_KEY;
|
|
386
386
|
var init_suppress_tracing = __esm({
|
|
387
387
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
388
388
|
"use strict";
|
|
389
|
-
|
|
390
|
-
__name(
|
|
389
|
+
SUPPRESS_TRACING_KEY = createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
390
|
+
__name(isTracingSuppressed, "isTracingSuppressed");
|
|
391
391
|
}
|
|
392
392
|
});
|
|
393
393
|
|
|
@@ -496,7 +496,7 @@ var init_W3CBaggagePropagator = __esm({
|
|
|
496
496
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
497
497
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
498
498
|
var baggage = propagation.getBaggage(context5);
|
|
499
|
-
if (!baggage ||
|
|
499
|
+
if (!baggage || isTracingSuppressed(context5))
|
|
500
500
|
return;
|
|
501
501
|
var keyPairs = getKeyPairs(baggage).filter(function(pair) {
|
|
502
502
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
|
|
@@ -566,7 +566,7 @@ var init_anchored_clock = __esm({
|
|
|
566
566
|
});
|
|
567
567
|
|
|
568
568
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
569
|
-
import { diag
|
|
569
|
+
import { diag } from "@opentelemetry/api";
|
|
570
570
|
var init_attributes = __esm({
|
|
571
571
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
572
572
|
"use strict";
|
|
@@ -574,10 +574,10 @@ var init_attributes = __esm({
|
|
|
574
574
|
});
|
|
575
575
|
|
|
576
576
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
577
|
-
import { diag as
|
|
577
|
+
import { diag as diag2 } from "@opentelemetry/api";
|
|
578
578
|
function loggingErrorHandler() {
|
|
579
579
|
return function(ex) {
|
|
580
|
-
|
|
580
|
+
diag2.error(stringifyException(ex));
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
583
|
function stringifyException(ex) {
|
|
@@ -817,11 +817,11 @@ var init_performance = __esm({
|
|
|
817
817
|
});
|
|
818
818
|
|
|
819
819
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/version.js
|
|
820
|
-
var
|
|
820
|
+
var VERSION;
|
|
821
821
|
var init_version = __esm({
|
|
822
822
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/version.js"() {
|
|
823
823
|
"use strict";
|
|
824
|
-
|
|
824
|
+
VERSION = "1.24.1";
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
|
|
@@ -832,7 +832,7 @@ var init_sdk_info = __esm({
|
|
|
832
832
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js"() {
|
|
833
833
|
"use strict";
|
|
834
834
|
init_version();
|
|
835
|
-
SDK_INFO = (_a = {}, _a[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues.NODEJS, _a[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] =
|
|
835
|
+
SDK_INFO = (_a = {}, _a[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = "opentelemetry", _a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = "node", _a[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues.NODEJS, _a[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION, _a);
|
|
836
836
|
}
|
|
837
837
|
});
|
|
838
838
|
|
|
@@ -896,12 +896,12 @@ var init_ExportResult = __esm({
|
|
|
896
896
|
});
|
|
897
897
|
|
|
898
898
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
899
|
-
import { diag as
|
|
900
|
-
var
|
|
899
|
+
import { diag as diag3 } from "@opentelemetry/api";
|
|
900
|
+
var __values, CompositePropagator;
|
|
901
901
|
var init_composite = __esm({
|
|
902
902
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
903
903
|
"use strict";
|
|
904
|
-
|
|
904
|
+
__values = function(o) {
|
|
905
905
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
906
906
|
if (m)
|
|
907
907
|
return m.call(o);
|
|
@@ -918,9 +918,9 @@ var init_composite = __esm({
|
|
|
918
918
|
};
|
|
919
919
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
920
920
|
};
|
|
921
|
-
|
|
921
|
+
CompositePropagator = /** @class */
|
|
922
922
|
function() {
|
|
923
|
-
function
|
|
923
|
+
function CompositePropagator4(config) {
|
|
924
924
|
if (config === void 0) {
|
|
925
925
|
config = {};
|
|
926
926
|
}
|
|
@@ -932,16 +932,16 @@ var init_composite = __esm({
|
|
|
932
932
|
return x.concat(y);
|
|
933
933
|
}, [])));
|
|
934
934
|
}
|
|
935
|
-
__name(
|
|
936
|
-
|
|
935
|
+
__name(CompositePropagator4, "CompositePropagator");
|
|
936
|
+
CompositePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
937
937
|
var e_1, _a4;
|
|
938
938
|
try {
|
|
939
|
-
for (var _b =
|
|
939
|
+
for (var _b = __values(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
940
940
|
var propagator = _c.value;
|
|
941
941
|
try {
|
|
942
942
|
propagator.inject(context5, carrier, setter);
|
|
943
943
|
} catch (err) {
|
|
944
|
-
|
|
944
|
+
diag3.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
} catch (e_1_1) {
|
|
@@ -958,65 +958,65 @@ var init_composite = __esm({
|
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
960
|
};
|
|
961
|
-
|
|
961
|
+
CompositePropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
962
962
|
return this._propagators.reduce(function(ctx, propagator) {
|
|
963
963
|
try {
|
|
964
964
|
return propagator.extract(ctx, carrier, getter);
|
|
965
965
|
} catch (err) {
|
|
966
|
-
|
|
966
|
+
diag3.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
967
967
|
}
|
|
968
968
|
return ctx;
|
|
969
969
|
}, context5);
|
|
970
970
|
};
|
|
971
|
-
|
|
971
|
+
CompositePropagator4.prototype.fields = function() {
|
|
972
972
|
return this._fields.slice();
|
|
973
973
|
};
|
|
974
|
-
return
|
|
974
|
+
return CompositePropagator4;
|
|
975
975
|
}();
|
|
976
976
|
}
|
|
977
977
|
});
|
|
978
978
|
|
|
979
979
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
980
|
-
function
|
|
981
|
-
return
|
|
980
|
+
function validateKey(key) {
|
|
981
|
+
return VALID_KEY_REGEX.test(key);
|
|
982
982
|
}
|
|
983
|
-
function
|
|
984
|
-
return
|
|
983
|
+
function validateValue(value) {
|
|
984
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
985
985
|
}
|
|
986
|
-
var
|
|
986
|
+
var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
|
|
987
987
|
var init_validators = __esm({
|
|
988
988
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/internal/validators.js"() {
|
|
989
989
|
"use strict";
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
__name(
|
|
997
|
-
__name(
|
|
990
|
+
VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
991
|
+
VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
992
|
+
VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
993
|
+
VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
994
|
+
VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
995
|
+
INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
996
|
+
__name(validateKey, "validateKey");
|
|
997
|
+
__name(validateValue, "validateValue");
|
|
998
998
|
}
|
|
999
999
|
});
|
|
1000
1000
|
|
|
1001
1001
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
1002
|
-
var
|
|
1002
|
+
var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceState;
|
|
1003
1003
|
var init_TraceState = __esm({
|
|
1004
1004
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js"() {
|
|
1005
1005
|
"use strict";
|
|
1006
1006
|
init_validators();
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1007
|
+
MAX_TRACE_STATE_ITEMS = 32;
|
|
1008
|
+
MAX_TRACE_STATE_LEN = 512;
|
|
1009
|
+
LIST_MEMBERS_SEPARATOR = ",";
|
|
1010
|
+
LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
1011
|
+
TraceState = /** @class */
|
|
1012
1012
|
function() {
|
|
1013
|
-
function
|
|
1013
|
+
function TraceState4(rawTraceState) {
|
|
1014
1014
|
this._internalState = /* @__PURE__ */ new Map();
|
|
1015
1015
|
if (rawTraceState)
|
|
1016
1016
|
this._parse(rawTraceState);
|
|
1017
1017
|
}
|
|
1018
|
-
__name(
|
|
1019
|
-
|
|
1018
|
+
__name(TraceState4, "TraceState");
|
|
1019
|
+
TraceState4.prototype.set = function(key, value) {
|
|
1020
1020
|
var traceState = this._clone();
|
|
1021
1021
|
if (traceState._internalState.has(key)) {
|
|
1022
1022
|
traceState._internalState.delete(key);
|
|
@@ -1024,58 +1024,58 @@ var init_TraceState = __esm({
|
|
|
1024
1024
|
traceState._internalState.set(key, value);
|
|
1025
1025
|
return traceState;
|
|
1026
1026
|
};
|
|
1027
|
-
|
|
1027
|
+
TraceState4.prototype.unset = function(key) {
|
|
1028
1028
|
var traceState = this._clone();
|
|
1029
1029
|
traceState._internalState.delete(key);
|
|
1030
1030
|
return traceState;
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1032
|
+
TraceState4.prototype.get = function(key) {
|
|
1033
1033
|
return this._internalState.get(key);
|
|
1034
1034
|
};
|
|
1035
|
-
|
|
1035
|
+
TraceState4.prototype.serialize = function() {
|
|
1036
1036
|
var _this = this;
|
|
1037
1037
|
return this._keys().reduce(function(agg, key) {
|
|
1038
|
-
agg.push(key +
|
|
1038
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
1039
1039
|
return agg;
|
|
1040
|
-
}, []).join(
|
|
1040
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
1041
1041
|
};
|
|
1042
|
-
|
|
1043
|
-
if (rawTraceState.length >
|
|
1042
|
+
TraceState4.prototype._parse = function(rawTraceState) {
|
|
1043
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
1044
1044
|
return;
|
|
1045
|
-
this._internalState = rawTraceState.split(
|
|
1045
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) {
|
|
1046
1046
|
var listMember = part.trim();
|
|
1047
|
-
var i = listMember.indexOf(
|
|
1047
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
1048
1048
|
if (i !== -1) {
|
|
1049
1049
|
var key = listMember.slice(0, i);
|
|
1050
1050
|
var value = listMember.slice(i + 1, part.length);
|
|
1051
|
-
if (
|
|
1051
|
+
if (validateKey(key) && validateValue(value)) {
|
|
1052
1052
|
agg.set(key, value);
|
|
1053
1053
|
} else {
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
return agg;
|
|
1057
1057
|
}, /* @__PURE__ */ new Map());
|
|
1058
|
-
if (this._internalState.size >
|
|
1059
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0,
|
|
1058
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
1059
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
1060
1060
|
}
|
|
1061
1061
|
};
|
|
1062
|
-
|
|
1062
|
+
TraceState4.prototype._keys = function() {
|
|
1063
1063
|
return Array.from(this._internalState.keys()).reverse();
|
|
1064
1064
|
};
|
|
1065
|
-
|
|
1066
|
-
var traceState = new
|
|
1065
|
+
TraceState4.prototype._clone = function() {
|
|
1066
|
+
var traceState = new TraceState4();
|
|
1067
1067
|
traceState._internalState = new Map(this._internalState);
|
|
1068
1068
|
return traceState;
|
|
1069
1069
|
};
|
|
1070
|
-
return
|
|
1070
|
+
return TraceState4;
|
|
1071
1071
|
}();
|
|
1072
1072
|
}
|
|
1073
1073
|
});
|
|
1074
1074
|
|
|
1075
1075
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
1076
|
-
import { isSpanContextValid
|
|
1077
|
-
function
|
|
1078
|
-
var match =
|
|
1076
|
+
import { isSpanContextValid, trace, TraceFlags } from "@opentelemetry/api";
|
|
1077
|
+
function parseTraceParent(traceParent) {
|
|
1078
|
+
var match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
1079
1079
|
if (!match)
|
|
1080
1080
|
return null;
|
|
1081
1081
|
if (match[1] === "00" && match[5])
|
|
@@ -1086,61 +1086,61 @@ function parseTraceParent2(traceParent) {
|
|
|
1086
1086
|
traceFlags: parseInt(match[4], 16)
|
|
1087
1087
|
};
|
|
1088
1088
|
}
|
|
1089
|
-
var
|
|
1089
|
+
var TRACE_PARENT_HEADER, TRACE_STATE_HEADER, VERSION2, VERSION_PART, TRACE_ID_PART, PARENT_ID_PART, FLAGS_PART, TRACE_PARENT_REGEX, W3CTraceContextPropagator;
|
|
1090
1090
|
var init_W3CTraceContextPropagator = __esm({
|
|
1091
1091
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
1092
1092
|
"use strict";
|
|
1093
1093
|
init_suppress_tracing();
|
|
1094
1094
|
init_TraceState();
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
__name(
|
|
1104
|
-
|
|
1095
|
+
TRACE_PARENT_HEADER = "traceparent";
|
|
1096
|
+
TRACE_STATE_HEADER = "tracestate";
|
|
1097
|
+
VERSION2 = "00";
|
|
1098
|
+
VERSION_PART = "(?!ff)[\\da-f]{2}";
|
|
1099
|
+
TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
|
|
1100
|
+
PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
|
|
1101
|
+
FLAGS_PART = "[\\da-f]{2}";
|
|
1102
|
+
TRACE_PARENT_REGEX = new RegExp("^\\s?(" + VERSION_PART + ")-(" + TRACE_ID_PART + ")-(" + PARENT_ID_PART + ")-(" + FLAGS_PART + ")(-.*)?\\s?$");
|
|
1103
|
+
__name(parseTraceParent, "parseTraceParent");
|
|
1104
|
+
W3CTraceContextPropagator = /** @class */
|
|
1105
1105
|
function() {
|
|
1106
|
-
function
|
|
1106
|
+
function W3CTraceContextPropagator4() {
|
|
1107
1107
|
}
|
|
1108
|
-
__name(
|
|
1109
|
-
|
|
1110
|
-
var spanContext =
|
|
1111
|
-
if (!spanContext ||
|
|
1108
|
+
__name(W3CTraceContextPropagator4, "W3CTraceContextPropagator");
|
|
1109
|
+
W3CTraceContextPropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
1110
|
+
var spanContext = trace.getSpanContext(context5);
|
|
1111
|
+
if (!spanContext || isTracingSuppressed(context5) || !isSpanContextValid(spanContext))
|
|
1112
1112
|
return;
|
|
1113
|
-
var traceParent =
|
|
1114
|
-
setter.set(carrier,
|
|
1113
|
+
var traceParent = VERSION2 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || TraceFlags.NONE).toString(16);
|
|
1114
|
+
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
1115
1115
|
if (spanContext.traceState) {
|
|
1116
|
-
setter.set(carrier,
|
|
1116
|
+
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
|
-
|
|
1120
|
-
var traceParentHeader = getter.get(carrier,
|
|
1119
|
+
W3CTraceContextPropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
1120
|
+
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
1121
1121
|
if (!traceParentHeader)
|
|
1122
1122
|
return context5;
|
|
1123
1123
|
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
1124
1124
|
if (typeof traceParent !== "string")
|
|
1125
1125
|
return context5;
|
|
1126
|
-
var spanContext =
|
|
1126
|
+
var spanContext = parseTraceParent(traceParent);
|
|
1127
1127
|
if (!spanContext)
|
|
1128
1128
|
return context5;
|
|
1129
1129
|
spanContext.isRemote = true;
|
|
1130
|
-
var traceStateHeader = getter.get(carrier,
|
|
1130
|
+
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
1131
1131
|
if (traceStateHeader) {
|
|
1132
1132
|
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
1133
|
-
spanContext.traceState = new
|
|
1133
|
+
spanContext.traceState = new TraceState(typeof state === "string" ? state : void 0);
|
|
1134
1134
|
}
|
|
1135
|
-
return
|
|
1135
|
+
return trace.setSpanContext(context5, spanContext);
|
|
1136
1136
|
};
|
|
1137
|
-
|
|
1137
|
+
W3CTraceContextPropagator4.prototype.fields = function() {
|
|
1138
1138
|
return [
|
|
1139
|
-
|
|
1140
|
-
|
|
1139
|
+
TRACE_PARENT_HEADER,
|
|
1140
|
+
TRACE_STATE_HEADER
|
|
1141
1141
|
];
|
|
1142
1142
|
};
|
|
1143
|
-
return
|
|
1143
|
+
return W3CTraceContextPropagator4;
|
|
1144
1144
|
}();
|
|
1145
1145
|
}
|
|
1146
1146
|
});
|
|
@@ -1153,12 +1153,12 @@ var init_IdGenerator = __esm({
|
|
|
1153
1153
|
});
|
|
1154
1154
|
|
|
1155
1155
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js
|
|
1156
|
-
import { createContextKey as
|
|
1156
|
+
import { createContextKey as createContextKey2 } from "@opentelemetry/api";
|
|
1157
1157
|
var RPC_METADATA_KEY, RPCType;
|
|
1158
1158
|
var init_rpc_metadata = __esm({
|
|
1159
1159
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
1160
1160
|
"use strict";
|
|
1161
|
-
RPC_METADATA_KEY =
|
|
1161
|
+
RPC_METADATA_KEY = createContextKey2("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
1162
1162
|
(function(RPCType4) {
|
|
1163
1163
|
RPCType4["HTTP"] = "http";
|
|
1164
1164
|
})(RPCType || (RPCType = {}));
|
|
@@ -1214,7 +1214,7 @@ var init_AlwaysOnSampler = __esm({
|
|
|
1214
1214
|
});
|
|
1215
1215
|
|
|
1216
1216
|
// node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js
|
|
1217
|
-
import { isSpanContextValid as
|
|
1217
|
+
import { isSpanContextValid as isSpanContextValid2, TraceFlags as TraceFlags2, trace as trace2 } from "@opentelemetry/api";
|
|
1218
1218
|
var ParentBasedSampler;
|
|
1219
1219
|
var init_ParentBasedSampler = __esm({
|
|
1220
1220
|
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
@@ -1238,17 +1238,17 @@ var init_ParentBasedSampler = __esm({
|
|
|
1238
1238
|
}
|
|
1239
1239
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
1240
1240
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
1241
|
-
var parentContext =
|
|
1242
|
-
if (!parentContext || !
|
|
1241
|
+
var parentContext = trace2.getSpanContext(context5);
|
|
1242
|
+
if (!parentContext || !isSpanContextValid2(parentContext)) {
|
|
1243
1243
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1244
1244
|
}
|
|
1245
1245
|
if (parentContext.isRemote) {
|
|
1246
|
-
if (parentContext.traceFlags &
|
|
1246
|
+
if (parentContext.traceFlags & TraceFlags2.SAMPLED) {
|
|
1247
1247
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1248
1248
|
}
|
|
1249
1249
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1250
1250
|
}
|
|
1251
|
-
if (parentContext.traceFlags &
|
|
1251
|
+
if (parentContext.traceFlags & TraceFlags2.SAMPLED) {
|
|
1252
1252
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
1253
1253
|
}
|
|
1254
1254
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -1529,12 +1529,12 @@ var init_esm = __esm({
|
|
|
1529
1529
|
});
|
|
1530
1530
|
|
|
1531
1531
|
// node_modules/@opentelemetry/propagator-b3/build/esm/common.js
|
|
1532
|
-
import { createContextKey as
|
|
1532
|
+
import { createContextKey as createContextKey3 } from "@opentelemetry/api";
|
|
1533
1533
|
var B3_DEBUG_FLAG_KEY;
|
|
1534
1534
|
var init_common = __esm({
|
|
1535
1535
|
"node_modules/@opentelemetry/propagator-b3/build/esm/common.js"() {
|
|
1536
1536
|
"use strict";
|
|
1537
|
-
B3_DEBUG_FLAG_KEY =
|
|
1537
|
+
B3_DEBUG_FLAG_KEY = createContextKey3("OpenTelemetry Context Key B3 Debug Flag");
|
|
1538
1538
|
}
|
|
1539
1539
|
});
|
|
1540
1540
|
|
|
@@ -1553,9 +1553,9 @@ var init_constants2 = __esm({
|
|
|
1553
1553
|
});
|
|
1554
1554
|
|
|
1555
1555
|
// node_modules/@opentelemetry/propagator-b3/build/esm/B3MultiPropagator.js
|
|
1556
|
-
import { isSpanContextValid as
|
|
1556
|
+
import { isSpanContextValid as isSpanContextValid3, isValidSpanId, isValidTraceId as isValidTraceId2, trace as trace3, TraceFlags as TraceFlags3 } from "@opentelemetry/api";
|
|
1557
1557
|
function isValidSampledValue(sampled) {
|
|
1558
|
-
return sampled ===
|
|
1558
|
+
return sampled === TraceFlags3.SAMPLED || sampled === TraceFlags3.NONE;
|
|
1559
1559
|
}
|
|
1560
1560
|
function parseHeader(header) {
|
|
1561
1561
|
return Array.isArray(header) ? header[0] : header;
|
|
@@ -1586,10 +1586,10 @@ function getTraceFlags(carrier, getter) {
|
|
|
1586
1586
|
var traceFlags = getHeaderValue(carrier, getter, X_B3_SAMPLED);
|
|
1587
1587
|
var debug = getDebug(carrier, getter);
|
|
1588
1588
|
if (debug === "1" || VALID_SAMPLED_VALUES.has(traceFlags)) {
|
|
1589
|
-
return
|
|
1589
|
+
return TraceFlags3.SAMPLED;
|
|
1590
1590
|
}
|
|
1591
1591
|
if (traceFlags === void 0 || VALID_UNSAMPLED_VALUES.has(traceFlags)) {
|
|
1592
|
-
return
|
|
1592
|
+
return TraceFlags3.NONE;
|
|
1593
1593
|
}
|
|
1594
1594
|
return;
|
|
1595
1595
|
}
|
|
@@ -1627,8 +1627,8 @@ var init_B3MultiPropagator = __esm({
|
|
|
1627
1627
|
}
|
|
1628
1628
|
__name(B3MultiPropagator2, "B3MultiPropagator");
|
|
1629
1629
|
B3MultiPropagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1630
|
-
var spanContext =
|
|
1631
|
-
if (!spanContext || !
|
|
1630
|
+
var spanContext = trace3.getSpanContext(context5);
|
|
1631
|
+
if (!spanContext || !isSpanContextValid3(spanContext) || isTracingSuppressed(context5))
|
|
1632
1632
|
return;
|
|
1633
1633
|
var debug = context5.getValue(B3_DEBUG_FLAG_KEY);
|
|
1634
1634
|
setter.set(carrier, X_B3_TRACE_ID, spanContext.traceId);
|
|
@@ -1636,7 +1636,7 @@ var init_B3MultiPropagator = __esm({
|
|
|
1636
1636
|
if (debug === "1") {
|
|
1637
1637
|
setter.set(carrier, X_B3_FLAGS, debug);
|
|
1638
1638
|
} else if (spanContext.traceFlags !== void 0) {
|
|
1639
|
-
setter.set(carrier, X_B3_SAMPLED, (
|
|
1639
|
+
setter.set(carrier, X_B3_SAMPLED, (TraceFlags3.SAMPLED & spanContext.traceFlags) === TraceFlags3.SAMPLED ? "1" : "0");
|
|
1640
1640
|
}
|
|
1641
1641
|
};
|
|
1642
1642
|
B3MultiPropagator2.prototype.extract = function(context5, carrier, getter) {
|
|
@@ -1646,7 +1646,7 @@ var init_B3MultiPropagator = __esm({
|
|
|
1646
1646
|
var debug = getDebug(carrier, getter);
|
|
1647
1647
|
if (isValidTraceId2(traceId) && isValidSpanId(spanId) && isValidSampledValue(traceFlags)) {
|
|
1648
1648
|
context5 = context5.setValue(B3_DEBUG_FLAG_KEY, debug);
|
|
1649
|
-
return
|
|
1649
|
+
return trace3.setSpanContext(context5, {
|
|
1650
1650
|
traceId,
|
|
1651
1651
|
spanId,
|
|
1652
1652
|
isRemote: true,
|
|
@@ -1670,15 +1670,15 @@ var init_B3MultiPropagator = __esm({
|
|
|
1670
1670
|
});
|
|
1671
1671
|
|
|
1672
1672
|
// node_modules/@opentelemetry/propagator-b3/build/esm/B3SinglePropagator.js
|
|
1673
|
-
import { isSpanContextValid as
|
|
1673
|
+
import { isSpanContextValid as isSpanContextValid4, isValidSpanId as isValidSpanId2, isValidTraceId as isValidTraceId3, trace as trace4, TraceFlags as TraceFlags4 } from "@opentelemetry/api";
|
|
1674
1674
|
function convertToTraceId128(traceId) {
|
|
1675
1675
|
return traceId.length === 32 ? traceId : "" + PADDING + traceId;
|
|
1676
1676
|
}
|
|
1677
1677
|
function convertToTraceFlags(samplingState) {
|
|
1678
1678
|
if (samplingState && SAMPLED_VALUES.has(samplingState)) {
|
|
1679
|
-
return
|
|
1679
|
+
return TraceFlags4.SAMPLED;
|
|
1680
1680
|
}
|
|
1681
|
-
return
|
|
1681
|
+
return TraceFlags4.NONE;
|
|
1682
1682
|
}
|
|
1683
1683
|
var __read3, B3_CONTEXT_REGEX, PADDING, SAMPLED_VALUES, DEBUG_STATE, B3SinglePropagator;
|
|
1684
1684
|
var init_B3SinglePropagator = __esm({
|
|
@@ -1725,8 +1725,8 @@ var init_B3SinglePropagator = __esm({
|
|
|
1725
1725
|
}
|
|
1726
1726
|
__name(B3SinglePropagator2, "B3SinglePropagator");
|
|
1727
1727
|
B3SinglePropagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1728
|
-
var spanContext =
|
|
1729
|
-
if (!spanContext || !
|
|
1728
|
+
var spanContext = trace4.getSpanContext(context5);
|
|
1729
|
+
if (!spanContext || !isSpanContextValid4(spanContext) || isTracingSuppressed(context5))
|
|
1730
1730
|
return;
|
|
1731
1731
|
var samplingState = context5.getValue(B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 1;
|
|
1732
1732
|
var value = spanContext.traceId + "-" + spanContext.spanId + "-" + samplingState;
|
|
@@ -1748,7 +1748,7 @@ var init_B3SinglePropagator = __esm({
|
|
|
1748
1748
|
if (samplingState === DEBUG_STATE) {
|
|
1749
1749
|
context5 = context5.setValue(B3_DEBUG_FLAG_KEY, samplingState);
|
|
1750
1750
|
}
|
|
1751
|
-
return
|
|
1751
|
+
return trace4.setSpanContext(context5, {
|
|
1752
1752
|
traceId,
|
|
1753
1753
|
spanId,
|
|
1754
1754
|
isRemote: true,
|
|
@@ -1805,7 +1805,7 @@ var init_B3Propagator = __esm({
|
|
|
1805
1805
|
}
|
|
1806
1806
|
__name(B3Propagator2, "B3Propagator");
|
|
1807
1807
|
B3Propagator2.prototype.inject = function(context5, carrier, setter) {
|
|
1808
|
-
if (
|
|
1808
|
+
if (isTracingSuppressed(context5)) {
|
|
1809
1809
|
return;
|
|
1810
1810
|
}
|
|
1811
1811
|
this._inject(context5, carrier, setter);
|
|
@@ -1849,20 +1849,20 @@ var init_esm2 = __esm({
|
|
|
1849
1849
|
});
|
|
1850
1850
|
|
|
1851
1851
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
1852
|
-
import { createContextKey as
|
|
1852
|
+
import { createContextKey as createContextKey4 } from "@opentelemetry/api";
|
|
1853
1853
|
function suppressTracing(context5) {
|
|
1854
|
-
return context5.setValue(
|
|
1854
|
+
return context5.setValue(SUPPRESS_TRACING_KEY2, true);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return context5.getValue(
|
|
1856
|
+
function isTracingSuppressed2(context5) {
|
|
1857
|
+
return context5.getValue(SUPPRESS_TRACING_KEY2) === true;
|
|
1858
1858
|
}
|
|
1859
|
-
var
|
|
1859
|
+
var SUPPRESS_TRACING_KEY2;
|
|
1860
1860
|
var init_suppress_tracing2 = __esm({
|
|
1861
1861
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
1862
1862
|
"use strict";
|
|
1863
|
-
|
|
1863
|
+
SUPPRESS_TRACING_KEY2 = createContextKey4("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
1864
1864
|
__name(suppressTracing, "suppressTracing");
|
|
1865
|
-
__name(
|
|
1865
|
+
__name(isTracingSuppressed2, "isTracingSuppressed");
|
|
1866
1866
|
}
|
|
1867
1867
|
});
|
|
1868
1868
|
|
|
@@ -1971,7 +1971,7 @@ var init_W3CBaggagePropagator2 = __esm({
|
|
|
1971
1971
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
1972
1972
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
1973
1973
|
var baggage = propagation2.getBaggage(context5);
|
|
1974
|
-
if (!baggage ||
|
|
1974
|
+
if (!baggage || isTracingSuppressed2(context5))
|
|
1975
1975
|
return;
|
|
1976
1976
|
var keyPairs = getKeyPairs2(baggage).filter(function(pair) {
|
|
1977
1977
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS2;
|
|
@@ -2041,7 +2041,7 @@ var init_anchored_clock2 = __esm({
|
|
|
2041
2041
|
});
|
|
2042
2042
|
|
|
2043
2043
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
2044
|
-
import { diag as
|
|
2044
|
+
import { diag as diag4 } from "@opentelemetry/api";
|
|
2045
2045
|
function sanitizeAttributes(attributes) {
|
|
2046
2046
|
var e_1, _a4;
|
|
2047
2047
|
var out = {};
|
|
@@ -2049,14 +2049,14 @@ function sanitizeAttributes(attributes) {
|
|
|
2049
2049
|
return out;
|
|
2050
2050
|
}
|
|
2051
2051
|
try {
|
|
2052
|
-
for (var _b =
|
|
2052
|
+
for (var _b = __values2(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2053
2053
|
var _d = __read5(_c.value, 2), key = _d[0], val = _d[1];
|
|
2054
2054
|
if (!isAttributeKey(key)) {
|
|
2055
|
-
|
|
2055
|
+
diag4.warn("Invalid attribute key: " + key);
|
|
2056
2056
|
continue;
|
|
2057
2057
|
}
|
|
2058
2058
|
if (!isAttributeValue(val)) {
|
|
2059
|
-
|
|
2059
|
+
diag4.warn("Invalid attribute value set for key: " + key);
|
|
2060
2060
|
continue;
|
|
2061
2061
|
}
|
|
2062
2062
|
if (Array.isArray(val)) {
|
|
@@ -2096,7 +2096,7 @@ function isHomogeneousAttributeValueArray(arr) {
|
|
|
2096
2096
|
var e_2, _a4;
|
|
2097
2097
|
var type;
|
|
2098
2098
|
try {
|
|
2099
|
-
for (var arr_1 =
|
|
2099
|
+
for (var arr_1 = __values2(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) {
|
|
2100
2100
|
var element = arr_1_1.value;
|
|
2101
2101
|
if (element == null)
|
|
2102
2102
|
continue;
|
|
@@ -2136,11 +2136,11 @@ function isValidPrimitiveAttributeValue(val) {
|
|
|
2136
2136
|
}
|
|
2137
2137
|
return false;
|
|
2138
2138
|
}
|
|
2139
|
-
var
|
|
2139
|
+
var __values2, __read5;
|
|
2140
2140
|
var init_attributes2 = __esm({
|
|
2141
2141
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
2142
2142
|
"use strict";
|
|
2143
|
-
|
|
2143
|
+
__values2 = function(o) {
|
|
2144
2144
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2145
2145
|
if (m)
|
|
2146
2146
|
return m.call(o);
|
|
@@ -2189,10 +2189,10 @@ var init_attributes2 = __esm({
|
|
|
2189
2189
|
});
|
|
2190
2190
|
|
|
2191
2191
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
2192
|
-
import { diag as
|
|
2192
|
+
import { diag as diag5 } from "@opentelemetry/api";
|
|
2193
2193
|
function loggingErrorHandler2() {
|
|
2194
2194
|
return function(ex) {
|
|
2195
|
-
|
|
2195
|
+
diag5.error(stringifyException2(ex));
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
2198
|
function stringifyException2(ex) {
|
|
@@ -2574,11 +2574,11 @@ var init_performance2 = __esm({
|
|
|
2574
2574
|
});
|
|
2575
2575
|
|
|
2576
2576
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/version.js
|
|
2577
|
-
var
|
|
2577
|
+
var VERSION3;
|
|
2578
2578
|
var init_version2 = __esm({
|
|
2579
2579
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/version.js"() {
|
|
2580
2580
|
"use strict";
|
|
2581
|
-
|
|
2581
|
+
VERSION3 = "1.24.1";
|
|
2582
2582
|
}
|
|
2583
2583
|
});
|
|
2584
2584
|
|
|
@@ -2589,7 +2589,7 @@ var init_sdk_info2 = __esm({
|
|
|
2589
2589
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js"() {
|
|
2590
2590
|
"use strict";
|
|
2591
2591
|
init_version2();
|
|
2592
|
-
SDK_INFO2 = (_a2 = {}, _a2[SemanticResourceAttributes2.TELEMETRY_SDK_NAME] = "opentelemetry", _a2[SemanticResourceAttributes2.PROCESS_RUNTIME_NAME] = "node", _a2[SemanticResourceAttributes2.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues2.NODEJS, _a2[SemanticResourceAttributes2.TELEMETRY_SDK_VERSION] =
|
|
2592
|
+
SDK_INFO2 = (_a2 = {}, _a2[SemanticResourceAttributes2.TELEMETRY_SDK_NAME] = "opentelemetry", _a2[SemanticResourceAttributes2.PROCESS_RUNTIME_NAME] = "node", _a2[SemanticResourceAttributes2.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues2.NODEJS, _a2[SemanticResourceAttributes2.TELEMETRY_SDK_VERSION] = VERSION3, _a2);
|
|
2593
2593
|
}
|
|
2594
2594
|
});
|
|
2595
2595
|
|
|
@@ -2721,12 +2721,12 @@ var init_ExportResult2 = __esm({
|
|
|
2721
2721
|
});
|
|
2722
2722
|
|
|
2723
2723
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
2724
|
-
import { diag as
|
|
2725
|
-
var
|
|
2724
|
+
import { diag as diag6 } from "@opentelemetry/api";
|
|
2725
|
+
var __values3, CompositePropagator2;
|
|
2726
2726
|
var init_composite2 = __esm({
|
|
2727
2727
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
2728
2728
|
"use strict";
|
|
2729
|
-
|
|
2729
|
+
__values3 = function(o) {
|
|
2730
2730
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2731
2731
|
if (m)
|
|
2732
2732
|
return m.call(o);
|
|
@@ -2743,9 +2743,9 @@ var init_composite2 = __esm({
|
|
|
2743
2743
|
};
|
|
2744
2744
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2745
2745
|
};
|
|
2746
|
-
|
|
2746
|
+
CompositePropagator2 = /** @class */
|
|
2747
2747
|
function() {
|
|
2748
|
-
function
|
|
2748
|
+
function CompositePropagator4(config) {
|
|
2749
2749
|
if (config === void 0) {
|
|
2750
2750
|
config = {};
|
|
2751
2751
|
}
|
|
@@ -2757,16 +2757,16 @@ var init_composite2 = __esm({
|
|
|
2757
2757
|
return x.concat(y);
|
|
2758
2758
|
}, [])));
|
|
2759
2759
|
}
|
|
2760
|
-
__name(
|
|
2761
|
-
|
|
2760
|
+
__name(CompositePropagator4, "CompositePropagator");
|
|
2761
|
+
CompositePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
2762
2762
|
var e_1, _a4;
|
|
2763
2763
|
try {
|
|
2764
|
-
for (var _b =
|
|
2764
|
+
for (var _b = __values3(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2765
2765
|
var propagator = _c.value;
|
|
2766
2766
|
try {
|
|
2767
2767
|
propagator.inject(context5, carrier, setter);
|
|
2768
2768
|
} catch (err) {
|
|
2769
|
-
|
|
2769
|
+
diag6.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
2770
2770
|
}
|
|
2771
2771
|
}
|
|
2772
2772
|
} catch (e_1_1) {
|
|
@@ -2783,65 +2783,65 @@ var init_composite2 = __esm({
|
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
2785
|
};
|
|
2786
|
-
|
|
2786
|
+
CompositePropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
2787
2787
|
return this._propagators.reduce(function(ctx, propagator) {
|
|
2788
2788
|
try {
|
|
2789
2789
|
return propagator.extract(ctx, carrier, getter);
|
|
2790
2790
|
} catch (err) {
|
|
2791
|
-
|
|
2791
|
+
diag6.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
2792
2792
|
}
|
|
2793
2793
|
return ctx;
|
|
2794
2794
|
}, context5);
|
|
2795
2795
|
};
|
|
2796
|
-
|
|
2796
|
+
CompositePropagator4.prototype.fields = function() {
|
|
2797
2797
|
return this._fields.slice();
|
|
2798
2798
|
};
|
|
2799
|
-
return
|
|
2799
|
+
return CompositePropagator4;
|
|
2800
2800
|
}();
|
|
2801
2801
|
}
|
|
2802
2802
|
});
|
|
2803
2803
|
|
|
2804
2804
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
2805
|
-
function
|
|
2806
|
-
return
|
|
2805
|
+
function validateKey2(key) {
|
|
2806
|
+
return VALID_KEY_REGEX2.test(key);
|
|
2807
2807
|
}
|
|
2808
|
-
function
|
|
2809
|
-
return
|
|
2808
|
+
function validateValue2(value) {
|
|
2809
|
+
return VALID_VALUE_BASE_REGEX2.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX2.test(value);
|
|
2810
2810
|
}
|
|
2811
|
-
var
|
|
2811
|
+
var VALID_KEY_CHAR_RANGE2, VALID_KEY2, VALID_VENDOR_KEY2, VALID_KEY_REGEX2, VALID_VALUE_BASE_REGEX2, INVALID_VALUE_COMMA_EQUAL_REGEX2;
|
|
2812
2812
|
var init_validators2 = __esm({
|
|
2813
2813
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/internal/validators.js"() {
|
|
2814
2814
|
"use strict";
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
__name(
|
|
2822
|
-
__name(
|
|
2815
|
+
VALID_KEY_CHAR_RANGE2 = "[_0-9a-z-*/]";
|
|
2816
|
+
VALID_KEY2 = "[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,255}";
|
|
2817
|
+
VALID_VENDOR_KEY2 = "[a-z0-9]" + VALID_KEY_CHAR_RANGE2 + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE2 + "{0,13}";
|
|
2818
|
+
VALID_KEY_REGEX2 = new RegExp("^(?:" + VALID_KEY2 + "|" + VALID_VENDOR_KEY2 + ")$");
|
|
2819
|
+
VALID_VALUE_BASE_REGEX2 = /^[ -~]{0,255}[!-~]$/;
|
|
2820
|
+
INVALID_VALUE_COMMA_EQUAL_REGEX2 = /,|=/;
|
|
2821
|
+
__name(validateKey2, "validateKey");
|
|
2822
|
+
__name(validateValue2, "validateValue");
|
|
2823
2823
|
}
|
|
2824
2824
|
});
|
|
2825
2825
|
|
|
2826
2826
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
2827
|
-
var
|
|
2827
|
+
var MAX_TRACE_STATE_ITEMS2, MAX_TRACE_STATE_LEN2, LIST_MEMBERS_SEPARATOR2, LIST_MEMBER_KEY_VALUE_SPLITTER2, TraceState2;
|
|
2828
2828
|
var init_TraceState2 = __esm({
|
|
2829
2829
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js"() {
|
|
2830
2830
|
"use strict";
|
|
2831
2831
|
init_validators2();
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2832
|
+
MAX_TRACE_STATE_ITEMS2 = 32;
|
|
2833
|
+
MAX_TRACE_STATE_LEN2 = 512;
|
|
2834
|
+
LIST_MEMBERS_SEPARATOR2 = ",";
|
|
2835
|
+
LIST_MEMBER_KEY_VALUE_SPLITTER2 = "=";
|
|
2836
|
+
TraceState2 = /** @class */
|
|
2837
2837
|
function() {
|
|
2838
|
-
function
|
|
2838
|
+
function TraceState4(rawTraceState) {
|
|
2839
2839
|
this._internalState = /* @__PURE__ */ new Map();
|
|
2840
2840
|
if (rawTraceState)
|
|
2841
2841
|
this._parse(rawTraceState);
|
|
2842
2842
|
}
|
|
2843
|
-
__name(
|
|
2844
|
-
|
|
2843
|
+
__name(TraceState4, "TraceState");
|
|
2844
|
+
TraceState4.prototype.set = function(key, value) {
|
|
2845
2845
|
var traceState = this._clone();
|
|
2846
2846
|
if (traceState._internalState.has(key)) {
|
|
2847
2847
|
traceState._internalState.delete(key);
|
|
@@ -2849,58 +2849,58 @@ var init_TraceState2 = __esm({
|
|
|
2849
2849
|
traceState._internalState.set(key, value);
|
|
2850
2850
|
return traceState;
|
|
2851
2851
|
};
|
|
2852
|
-
|
|
2852
|
+
TraceState4.prototype.unset = function(key) {
|
|
2853
2853
|
var traceState = this._clone();
|
|
2854
2854
|
traceState._internalState.delete(key);
|
|
2855
2855
|
return traceState;
|
|
2856
2856
|
};
|
|
2857
|
-
|
|
2857
|
+
TraceState4.prototype.get = function(key) {
|
|
2858
2858
|
return this._internalState.get(key);
|
|
2859
2859
|
};
|
|
2860
|
-
|
|
2860
|
+
TraceState4.prototype.serialize = function() {
|
|
2861
2861
|
var _this = this;
|
|
2862
2862
|
return this._keys().reduce(function(agg, key) {
|
|
2863
|
-
agg.push(key +
|
|
2863
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER2 + _this.get(key));
|
|
2864
2864
|
return agg;
|
|
2865
|
-
}, []).join(
|
|
2865
|
+
}, []).join(LIST_MEMBERS_SEPARATOR2);
|
|
2866
2866
|
};
|
|
2867
|
-
|
|
2868
|
-
if (rawTraceState.length >
|
|
2867
|
+
TraceState4.prototype._parse = function(rawTraceState) {
|
|
2868
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN2)
|
|
2869
2869
|
return;
|
|
2870
|
-
this._internalState = rawTraceState.split(
|
|
2870
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR2).reverse().reduce(function(agg, part) {
|
|
2871
2871
|
var listMember = part.trim();
|
|
2872
|
-
var i = listMember.indexOf(
|
|
2872
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER2);
|
|
2873
2873
|
if (i !== -1) {
|
|
2874
2874
|
var key = listMember.slice(0, i);
|
|
2875
2875
|
var value = listMember.slice(i + 1, part.length);
|
|
2876
|
-
if (
|
|
2876
|
+
if (validateKey2(key) && validateValue2(value)) {
|
|
2877
2877
|
agg.set(key, value);
|
|
2878
2878
|
} else {
|
|
2879
2879
|
}
|
|
2880
2880
|
}
|
|
2881
2881
|
return agg;
|
|
2882
2882
|
}, /* @__PURE__ */ new Map());
|
|
2883
|
-
if (this._internalState.size >
|
|
2884
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0,
|
|
2883
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS2) {
|
|
2884
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS2));
|
|
2885
2885
|
}
|
|
2886
2886
|
};
|
|
2887
|
-
|
|
2887
|
+
TraceState4.prototype._keys = function() {
|
|
2888
2888
|
return Array.from(this._internalState.keys()).reverse();
|
|
2889
2889
|
};
|
|
2890
|
-
|
|
2891
|
-
var traceState = new
|
|
2890
|
+
TraceState4.prototype._clone = function() {
|
|
2891
|
+
var traceState = new TraceState4();
|
|
2892
2892
|
traceState._internalState = new Map(this._internalState);
|
|
2893
2893
|
return traceState;
|
|
2894
2894
|
};
|
|
2895
|
-
return
|
|
2895
|
+
return TraceState4;
|
|
2896
2896
|
}();
|
|
2897
2897
|
}
|
|
2898
2898
|
});
|
|
2899
2899
|
|
|
2900
2900
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
2901
|
-
import { isSpanContextValid as
|
|
2902
|
-
function
|
|
2903
|
-
var match =
|
|
2901
|
+
import { isSpanContextValid as isSpanContextValid5, trace as trace5, TraceFlags as TraceFlags5 } from "@opentelemetry/api";
|
|
2902
|
+
function parseTraceParent2(traceParent) {
|
|
2903
|
+
var match = TRACE_PARENT_REGEX2.exec(traceParent);
|
|
2904
2904
|
if (!match)
|
|
2905
2905
|
return null;
|
|
2906
2906
|
if (match[1] === "00" && match[5])
|
|
@@ -2911,61 +2911,61 @@ function parseTraceParent3(traceParent) {
|
|
|
2911
2911
|
traceFlags: parseInt(match[4], 16)
|
|
2912
2912
|
};
|
|
2913
2913
|
}
|
|
2914
|
-
var
|
|
2914
|
+
var TRACE_PARENT_HEADER2, TRACE_STATE_HEADER2, VERSION4, VERSION_PART2, TRACE_ID_PART2, PARENT_ID_PART2, FLAGS_PART2, TRACE_PARENT_REGEX2, W3CTraceContextPropagator2;
|
|
2915
2915
|
var init_W3CTraceContextPropagator2 = __esm({
|
|
2916
2916
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
2917
2917
|
"use strict";
|
|
2918
2918
|
init_suppress_tracing2();
|
|
2919
2919
|
init_TraceState2();
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
__name(
|
|
2929
|
-
|
|
2920
|
+
TRACE_PARENT_HEADER2 = "traceparent";
|
|
2921
|
+
TRACE_STATE_HEADER2 = "tracestate";
|
|
2922
|
+
VERSION4 = "00";
|
|
2923
|
+
VERSION_PART2 = "(?!ff)[\\da-f]{2}";
|
|
2924
|
+
TRACE_ID_PART2 = "(?![0]{32})[\\da-f]{32}";
|
|
2925
|
+
PARENT_ID_PART2 = "(?![0]{16})[\\da-f]{16}";
|
|
2926
|
+
FLAGS_PART2 = "[\\da-f]{2}";
|
|
2927
|
+
TRACE_PARENT_REGEX2 = new RegExp("^\\s?(" + VERSION_PART2 + ")-(" + TRACE_ID_PART2 + ")-(" + PARENT_ID_PART2 + ")-(" + FLAGS_PART2 + ")(-.*)?\\s?$");
|
|
2928
|
+
__name(parseTraceParent2, "parseTraceParent");
|
|
2929
|
+
W3CTraceContextPropagator2 = /** @class */
|
|
2930
2930
|
function() {
|
|
2931
|
-
function
|
|
2931
|
+
function W3CTraceContextPropagator4() {
|
|
2932
2932
|
}
|
|
2933
|
-
__name(
|
|
2934
|
-
|
|
2935
|
-
var spanContext =
|
|
2936
|
-
if (!spanContext ||
|
|
2933
|
+
__name(W3CTraceContextPropagator4, "W3CTraceContextPropagator");
|
|
2934
|
+
W3CTraceContextPropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
2935
|
+
var spanContext = trace5.getSpanContext(context5);
|
|
2936
|
+
if (!spanContext || isTracingSuppressed2(context5) || !isSpanContextValid5(spanContext))
|
|
2937
2937
|
return;
|
|
2938
|
-
var traceParent =
|
|
2939
|
-
setter.set(carrier,
|
|
2938
|
+
var traceParent = VERSION4 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || TraceFlags5.NONE).toString(16);
|
|
2939
|
+
setter.set(carrier, TRACE_PARENT_HEADER2, traceParent);
|
|
2940
2940
|
if (spanContext.traceState) {
|
|
2941
|
-
setter.set(carrier,
|
|
2941
|
+
setter.set(carrier, TRACE_STATE_HEADER2, spanContext.traceState.serialize());
|
|
2942
2942
|
}
|
|
2943
2943
|
};
|
|
2944
|
-
|
|
2945
|
-
var traceParentHeader = getter.get(carrier,
|
|
2944
|
+
W3CTraceContextPropagator4.prototype.extract = function(context5, carrier, getter) {
|
|
2945
|
+
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER2);
|
|
2946
2946
|
if (!traceParentHeader)
|
|
2947
2947
|
return context5;
|
|
2948
2948
|
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
2949
2949
|
if (typeof traceParent !== "string")
|
|
2950
2950
|
return context5;
|
|
2951
|
-
var spanContext =
|
|
2951
|
+
var spanContext = parseTraceParent2(traceParent);
|
|
2952
2952
|
if (!spanContext)
|
|
2953
2953
|
return context5;
|
|
2954
2954
|
spanContext.isRemote = true;
|
|
2955
|
-
var traceStateHeader = getter.get(carrier,
|
|
2955
|
+
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER2);
|
|
2956
2956
|
if (traceStateHeader) {
|
|
2957
2957
|
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
2958
|
-
spanContext.traceState = new
|
|
2958
|
+
spanContext.traceState = new TraceState2(typeof state === "string" ? state : void 0);
|
|
2959
2959
|
}
|
|
2960
|
-
return
|
|
2960
|
+
return trace5.setSpanContext(context5, spanContext);
|
|
2961
2961
|
};
|
|
2962
|
-
|
|
2962
|
+
W3CTraceContextPropagator4.prototype.fields = function() {
|
|
2963
2963
|
return [
|
|
2964
|
-
|
|
2965
|
-
|
|
2964
|
+
TRACE_PARENT_HEADER2,
|
|
2965
|
+
TRACE_STATE_HEADER2
|
|
2966
2966
|
];
|
|
2967
2967
|
};
|
|
2968
|
-
return
|
|
2968
|
+
return W3CTraceContextPropagator4;
|
|
2969
2969
|
}();
|
|
2970
2970
|
}
|
|
2971
2971
|
});
|
|
@@ -2978,12 +2978,12 @@ var init_IdGenerator2 = __esm({
|
|
|
2978
2978
|
});
|
|
2979
2979
|
|
|
2980
2980
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js
|
|
2981
|
-
import { createContextKey as
|
|
2981
|
+
import { createContextKey as createContextKey5 } from "@opentelemetry/api";
|
|
2982
2982
|
var RPC_METADATA_KEY2, RPCType2;
|
|
2983
2983
|
var init_rpc_metadata2 = __esm({
|
|
2984
2984
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
2985
2985
|
"use strict";
|
|
2986
|
-
RPC_METADATA_KEY2 =
|
|
2986
|
+
RPC_METADATA_KEY2 = createContextKey5("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
2987
2987
|
(function(RPCType4) {
|
|
2988
2988
|
RPCType4["HTTP"] = "http";
|
|
2989
2989
|
})(RPCType2 || (RPCType2 = {}));
|
|
@@ -3039,7 +3039,7 @@ var init_AlwaysOnSampler2 = __esm({
|
|
|
3039
3039
|
});
|
|
3040
3040
|
|
|
3041
3041
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js
|
|
3042
|
-
import { isSpanContextValid as
|
|
3042
|
+
import { isSpanContextValid as isSpanContextValid6, TraceFlags as TraceFlags6, trace as trace6 } from "@opentelemetry/api";
|
|
3043
3043
|
var ParentBasedSampler2;
|
|
3044
3044
|
var init_ParentBasedSampler2 = __esm({
|
|
3045
3045
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
@@ -3063,17 +3063,17 @@ var init_ParentBasedSampler2 = __esm({
|
|
|
3063
3063
|
}
|
|
3064
3064
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
3065
3065
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
3066
|
-
var parentContext =
|
|
3067
|
-
if (!parentContext || !
|
|
3066
|
+
var parentContext = trace6.getSpanContext(context5);
|
|
3067
|
+
if (!parentContext || !isSpanContextValid6(parentContext)) {
|
|
3068
3068
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3069
3069
|
}
|
|
3070
3070
|
if (parentContext.isRemote) {
|
|
3071
|
-
if (parentContext.traceFlags &
|
|
3071
|
+
if (parentContext.traceFlags & TraceFlags6.SAMPLED) {
|
|
3072
3072
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3073
3073
|
}
|
|
3074
3074
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3075
3075
|
}
|
|
3076
|
-
if (parentContext.traceFlags &
|
|
3076
|
+
if (parentContext.traceFlags & TraceFlags6.SAMPLED) {
|
|
3077
3077
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3078
3078
|
}
|
|
3079
3079
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -3586,15 +3586,15 @@ var init_enums = __esm({
|
|
|
3586
3586
|
});
|
|
3587
3587
|
|
|
3588
3588
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js
|
|
3589
|
-
import { diag as
|
|
3589
|
+
import { diag as diag7, SpanStatusCode } from "@opentelemetry/api";
|
|
3590
3590
|
import { SemanticAttributes } from "@opentelemetry/semantic-conventions";
|
|
3591
|
-
var
|
|
3591
|
+
var __values4, __read7, Span;
|
|
3592
3592
|
var init_Span = __esm({
|
|
3593
3593
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js"() {
|
|
3594
3594
|
"use strict";
|
|
3595
3595
|
init_esm3();
|
|
3596
3596
|
init_enums();
|
|
3597
|
-
|
|
3597
|
+
__values4 = function(o) {
|
|
3598
3598
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3599
3599
|
if (m)
|
|
3600
3600
|
return m.call(o);
|
|
@@ -3686,11 +3686,11 @@ var init_Span = __esm({
|
|
|
3686
3686
|
if (value == null || this._isSpanEnded())
|
|
3687
3687
|
return this;
|
|
3688
3688
|
if (key.length === 0) {
|
|
3689
|
-
|
|
3689
|
+
diag7.warn("Invalid attribute key: " + key);
|
|
3690
3690
|
return this;
|
|
3691
3691
|
}
|
|
3692
3692
|
if (!isAttributeValue(value)) {
|
|
3693
|
-
|
|
3693
|
+
diag7.warn("Invalid attribute value set for key: " + key);
|
|
3694
3694
|
return this;
|
|
3695
3695
|
}
|
|
3696
3696
|
if (Object.keys(this.attributes).length >= this._spanLimits.attributeCountLimit && !Object.prototype.hasOwnProperty.call(this.attributes, key)) {
|
|
@@ -3703,7 +3703,7 @@ var init_Span = __esm({
|
|
|
3703
3703
|
Span3.prototype.setAttributes = function(attributes) {
|
|
3704
3704
|
var e_1, _a4;
|
|
3705
3705
|
try {
|
|
3706
|
-
for (var _b =
|
|
3706
|
+
for (var _b = __values4(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3707
3707
|
var _d = __read7(_c.value, 2), k = _d[0], v = _d[1];
|
|
3708
3708
|
this.setAttribute(k, v);
|
|
3709
3709
|
}
|
|
@@ -3726,13 +3726,13 @@ var init_Span = __esm({
|
|
|
3726
3726
|
if (this._isSpanEnded())
|
|
3727
3727
|
return this;
|
|
3728
3728
|
if (this._spanLimits.eventCountLimit === 0) {
|
|
3729
|
-
|
|
3729
|
+
diag7.warn("No events allowed.");
|
|
3730
3730
|
this._droppedEventsCount++;
|
|
3731
3731
|
return this;
|
|
3732
3732
|
}
|
|
3733
3733
|
if (this.events.length >= this._spanLimits.eventCountLimit) {
|
|
3734
3734
|
if (this._droppedEventsCount === 0) {
|
|
3735
|
-
|
|
3735
|
+
diag7.debug("Dropping extra events.");
|
|
3736
3736
|
}
|
|
3737
3737
|
this.events.shift();
|
|
3738
3738
|
this._droppedEventsCount++;
|
|
@@ -3766,14 +3766,14 @@ var init_Span = __esm({
|
|
|
3766
3766
|
};
|
|
3767
3767
|
Span3.prototype.end = function(endTime) {
|
|
3768
3768
|
if (this._isSpanEnded()) {
|
|
3769
|
-
|
|
3769
|
+
diag7.error(this.name + " " + this._spanContext.traceId + "-" + this._spanContext.spanId + " - You can only call end() on a span once.");
|
|
3770
3770
|
return;
|
|
3771
3771
|
}
|
|
3772
3772
|
this._ended = true;
|
|
3773
3773
|
this.endTime = this._getTime(endTime);
|
|
3774
3774
|
this._duration = hrTimeDuration(this.startTime, this.endTime);
|
|
3775
3775
|
if (this._duration[0] < 0) {
|
|
3776
|
-
|
|
3776
|
+
diag7.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.", this.startTime, this.endTime);
|
|
3777
3777
|
this.endTime = this.startTime.slice();
|
|
3778
3778
|
this._duration = [
|
|
3779
3779
|
0,
|
|
@@ -3781,7 +3781,7 @@ var init_Span = __esm({
|
|
|
3781
3781
|
];
|
|
3782
3782
|
}
|
|
3783
3783
|
if (this._droppedEventsCount > 0) {
|
|
3784
|
-
|
|
3784
|
+
diag7.warn("Dropped " + this._droppedEventsCount + " events because eventCountLimit reached");
|
|
3785
3785
|
}
|
|
3786
3786
|
this._spanProcessor.onEnd(this);
|
|
3787
3787
|
};
|
|
@@ -3827,7 +3827,7 @@ var init_Span = __esm({
|
|
|
3827
3827
|
if (attributes[SemanticAttributes.EXCEPTION_TYPE] || attributes[SemanticAttributes.EXCEPTION_MESSAGE]) {
|
|
3828
3828
|
this.addEvent(ExceptionEventName, attributes, time);
|
|
3829
3829
|
} else {
|
|
3830
|
-
|
|
3830
|
+
diag7.warn("Failed to record an exception " + exception);
|
|
3831
3831
|
}
|
|
3832
3832
|
};
|
|
3833
3833
|
Object.defineProperty(Span3.prototype, "duration", {
|
|
@@ -3867,7 +3867,7 @@ var init_Span = __esm({
|
|
|
3867
3867
|
});
|
|
3868
3868
|
Span3.prototype._isSpanEnded = function() {
|
|
3869
3869
|
if (this._ended) {
|
|
3870
|
-
|
|
3870
|
+
diag7.warn("Can not execute the operation on ended Span {traceId: " + this._spanContext.traceId + ", spanId: " + this._spanContext.spanId + "}");
|
|
3871
3871
|
}
|
|
3872
3872
|
return this._ended;
|
|
3873
3873
|
};
|
|
@@ -3881,7 +3881,7 @@ var init_Span = __esm({
|
|
|
3881
3881
|
var _this = this;
|
|
3882
3882
|
var limit = this._attributeValueLengthLimit;
|
|
3883
3883
|
if (limit <= 0) {
|
|
3884
|
-
|
|
3884
|
+
diag7.warn("Attribute value limit must be positive, got " + limit);
|
|
3885
3885
|
return value;
|
|
3886
3886
|
}
|
|
3887
3887
|
if (typeof value === "string") {
|
|
@@ -3961,7 +3961,7 @@ var init_AlwaysOnSampler3 = __esm({
|
|
|
3961
3961
|
});
|
|
3962
3962
|
|
|
3963
3963
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js
|
|
3964
|
-
import { isSpanContextValid as
|
|
3964
|
+
import { isSpanContextValid as isSpanContextValid7, TraceFlags as TraceFlags7, trace as trace7 } from "@opentelemetry/api";
|
|
3965
3965
|
var ParentBasedSampler3;
|
|
3966
3966
|
var init_ParentBasedSampler3 = __esm({
|
|
3967
3967
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js"() {
|
|
@@ -3985,17 +3985,17 @@ var init_ParentBasedSampler3 = __esm({
|
|
|
3985
3985
|
}
|
|
3986
3986
|
__name(ParentBasedSampler5, "ParentBasedSampler");
|
|
3987
3987
|
ParentBasedSampler5.prototype.shouldSample = function(context5, traceId, spanName, spanKind, attributes, links) {
|
|
3988
|
-
var parentContext =
|
|
3989
|
-
if (!parentContext || !
|
|
3988
|
+
var parentContext = trace7.getSpanContext(context5);
|
|
3989
|
+
if (!parentContext || !isSpanContextValid7(parentContext)) {
|
|
3990
3990
|
return this._root.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3991
3991
|
}
|
|
3992
3992
|
if (parentContext.isRemote) {
|
|
3993
|
-
if (parentContext.traceFlags &
|
|
3993
|
+
if (parentContext.traceFlags & TraceFlags7.SAMPLED) {
|
|
3994
3994
|
return this._remoteParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3995
3995
|
}
|
|
3996
3996
|
return this._remoteParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
3997
3997
|
}
|
|
3998
|
-
if (parentContext.traceFlags &
|
|
3998
|
+
if (parentContext.traceFlags & TraceFlags7.SAMPLED) {
|
|
3999
3999
|
return this._localParentSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
4000
4000
|
}
|
|
4001
4001
|
return this._localParentNotSampled.shouldSample(context5, traceId, spanName, spanKind, attributes, links);
|
|
@@ -4054,7 +4054,7 @@ var init_TraceIdRatioBasedSampler3 = __esm({
|
|
|
4054
4054
|
});
|
|
4055
4055
|
|
|
4056
4056
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js
|
|
4057
|
-
import { diag as
|
|
4057
|
+
import { diag as diag8 } from "@opentelemetry/api";
|
|
4058
4058
|
function loadDefaultConfig() {
|
|
4059
4059
|
return {
|
|
4060
4060
|
sampler: buildSamplerFromEnv(env),
|
|
@@ -4097,22 +4097,22 @@ function buildSamplerFromEnv(environment) {
|
|
|
4097
4097
|
root: new TraceIdRatioBasedSampler3(getSamplerProbabilityFromEnv(environment))
|
|
4098
4098
|
});
|
|
4099
4099
|
default:
|
|
4100
|
-
|
|
4100
|
+
diag8.error('OTEL_TRACES_SAMPLER value "' + environment.OTEL_TRACES_SAMPLER + " invalid, defaulting to " + FALLBACK_OTEL_TRACES_SAMPLER + '".');
|
|
4101
4101
|
return new AlwaysOnSampler3();
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
4104
|
function getSamplerProbabilityFromEnv(environment) {
|
|
4105
4105
|
if (environment.OTEL_TRACES_SAMPLER_ARG === void 0 || environment.OTEL_TRACES_SAMPLER_ARG === "") {
|
|
4106
|
-
|
|
4106
|
+
diag8.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to " + DEFAULT_RATIO + ".");
|
|
4107
4107
|
return DEFAULT_RATIO;
|
|
4108
4108
|
}
|
|
4109
4109
|
var probability = Number(environment.OTEL_TRACES_SAMPLER_ARG);
|
|
4110
4110
|
if (isNaN(probability)) {
|
|
4111
|
-
|
|
4111
|
+
diag8.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is invalid, defaulting to " + DEFAULT_RATIO + ".");
|
|
4112
4112
|
return DEFAULT_RATIO;
|
|
4113
4113
|
}
|
|
4114
4114
|
if (probability < 0 || probability > 1) {
|
|
4115
|
-
|
|
4115
|
+
diag8.error("OTEL_TRACES_SAMPLER_ARG=" + environment.OTEL_TRACES_SAMPLER_ARG + " was given, but it is out of range ([0..1]), defaulting to " + DEFAULT_RATIO + ".");
|
|
4116
4116
|
return DEFAULT_RATIO;
|
|
4117
4117
|
}
|
|
4118
4118
|
return probability;
|
|
@@ -4167,7 +4167,7 @@ var init_utility = __esm({
|
|
|
4167
4167
|
});
|
|
4168
4168
|
|
|
4169
4169
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js
|
|
4170
|
-
import { context as context2, diag as
|
|
4170
|
+
import { context as context2, diag as diag9, TraceFlags as TraceFlags8 } from "@opentelemetry/api";
|
|
4171
4171
|
var BatchSpanProcessorBase;
|
|
4172
4172
|
var init_BatchSpanProcessorBase = __esm({
|
|
4173
4173
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js"() {
|
|
@@ -4187,7 +4187,7 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4187
4187
|
this._exportTimeoutMillis = typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === "number" ? config.exportTimeoutMillis : env2.OTEL_BSP_EXPORT_TIMEOUT;
|
|
4188
4188
|
this._shutdownOnce = new BindOnceFuture2(this._shutdown, this);
|
|
4189
4189
|
if (this._maxExportBatchSize > this._maxQueueSize) {
|
|
4190
|
-
|
|
4190
|
+
diag9.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize");
|
|
4191
4191
|
this._maxExportBatchSize = this._maxQueueSize;
|
|
4192
4192
|
}
|
|
4193
4193
|
}
|
|
@@ -4204,7 +4204,7 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4204
4204
|
if (this._shutdownOnce.isCalled) {
|
|
4205
4205
|
return;
|
|
4206
4206
|
}
|
|
4207
|
-
if ((span.spanContext().traceFlags &
|
|
4207
|
+
if ((span.spanContext().traceFlags & TraceFlags8.SAMPLED) === 0) {
|
|
4208
4208
|
return;
|
|
4209
4209
|
}
|
|
4210
4210
|
this._addToBuffer(span);
|
|
@@ -4225,13 +4225,13 @@ var init_BatchSpanProcessorBase = __esm({
|
|
|
4225
4225
|
BatchSpanProcessorBase2.prototype._addToBuffer = function(span) {
|
|
4226
4226
|
if (this._finishedSpans.length >= this._maxQueueSize) {
|
|
4227
4227
|
if (this._droppedSpansCount === 0) {
|
|
4228
|
-
|
|
4228
|
+
diag9.debug("maxQueueSize reached, dropping spans");
|
|
4229
4229
|
}
|
|
4230
4230
|
this._droppedSpansCount++;
|
|
4231
4231
|
return;
|
|
4232
4232
|
}
|
|
4233
4233
|
if (this._droppedSpansCount > 0) {
|
|
4234
|
-
|
|
4234
|
+
diag9.warn("Dropped " + this._droppedSpansCount + " spans because maxQueueSize reached");
|
|
4235
4235
|
this._droppedSpansCount = 0;
|
|
4236
4236
|
}
|
|
4237
4237
|
this._finishedSpans.push(span);
|
|
@@ -4468,7 +4468,7 @@ var init_Tracer = __esm({
|
|
|
4468
4468
|
context5 = api.trace.deleteSpan(context5);
|
|
4469
4469
|
}
|
|
4470
4470
|
var parentSpan = api.trace.getSpan(context5);
|
|
4471
|
-
if (
|
|
4471
|
+
if (isTracingSuppressed2(context5)) {
|
|
4472
4472
|
api.diag.debug("Instrumentation suppressed, returning Noop Span");
|
|
4473
4473
|
var nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
|
|
4474
4474
|
return nonRecordingSpan;
|
|
@@ -4547,12 +4547,12 @@ var init_Tracer = __esm({
|
|
|
4547
4547
|
});
|
|
4548
4548
|
|
|
4549
4549
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js
|
|
4550
|
-
var
|
|
4550
|
+
var __values5, MultiSpanProcessor;
|
|
4551
4551
|
var init_MultiSpanProcessor = __esm({
|
|
4552
4552
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js"() {
|
|
4553
4553
|
"use strict";
|
|
4554
4554
|
init_esm3();
|
|
4555
|
-
|
|
4555
|
+
__values5 = function(o) {
|
|
4556
4556
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4557
4557
|
if (m)
|
|
4558
4558
|
return m.call(o);
|
|
@@ -4579,7 +4579,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4579
4579
|
var e_1, _a4;
|
|
4580
4580
|
var promises = [];
|
|
4581
4581
|
try {
|
|
4582
|
-
for (var _b =
|
|
4582
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4583
4583
|
var spanProcessor = _c.value;
|
|
4584
4584
|
promises.push(spanProcessor.forceFlush());
|
|
4585
4585
|
}
|
|
@@ -4608,7 +4608,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4608
4608
|
MultiSpanProcessor2.prototype.onStart = function(span, context5) {
|
|
4609
4609
|
var e_2, _a4;
|
|
4610
4610
|
try {
|
|
4611
|
-
for (var _b =
|
|
4611
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4612
4612
|
var spanProcessor = _c.value;
|
|
4613
4613
|
spanProcessor.onStart(span, context5);
|
|
4614
4614
|
}
|
|
@@ -4629,7 +4629,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4629
4629
|
MultiSpanProcessor2.prototype.onEnd = function(span) {
|
|
4630
4630
|
var e_3, _a4;
|
|
4631
4631
|
try {
|
|
4632
|
-
for (var _b =
|
|
4632
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4633
4633
|
var spanProcessor = _c.value;
|
|
4634
4634
|
spanProcessor.onEnd(span);
|
|
4635
4635
|
}
|
|
@@ -4651,7 +4651,7 @@ var init_MultiSpanProcessor = __esm({
|
|
|
4651
4651
|
var e_4, _a4;
|
|
4652
4652
|
var promises = [];
|
|
4653
4653
|
try {
|
|
4654
|
-
for (var _b =
|
|
4654
|
+
for (var _b = __values5(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4655
4655
|
var spanProcessor = _c.value;
|
|
4656
4656
|
promises.push(spanProcessor.shutdown());
|
|
4657
4657
|
}
|
|
@@ -4705,7 +4705,7 @@ var init_NoopSpanProcessor = __esm({
|
|
|
4705
4705
|
});
|
|
4706
4706
|
|
|
4707
4707
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js
|
|
4708
|
-
import { context as context4, diag as
|
|
4708
|
+
import { context as context4, diag as diag11, propagation as propagation3, trace as trace9 } from "@opentelemetry/api";
|
|
4709
4709
|
import { Resource } from "@opentelemetry/resources";
|
|
4710
4710
|
var ForceFlushState, BasicTracerProvider;
|
|
4711
4711
|
var init_BasicTracerProvider = __esm({
|
|
@@ -4762,7 +4762,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4762
4762
|
BasicTracerProvider2.prototype.addSpanProcessor = function(spanProcessor) {
|
|
4763
4763
|
if (this._registeredSpanProcessors.length === 0) {
|
|
4764
4764
|
this.activeSpanProcessor.shutdown().catch(function(err) {
|
|
4765
|
-
return
|
|
4765
|
+
return diag11.error("Error while trying to shutdown current span processor", err);
|
|
4766
4766
|
});
|
|
4767
4767
|
}
|
|
4768
4768
|
this._registeredSpanProcessors.push(spanProcessor);
|
|
@@ -4775,7 +4775,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4775
4775
|
if (config === void 0) {
|
|
4776
4776
|
config = {};
|
|
4777
4777
|
}
|
|
4778
|
-
|
|
4778
|
+
trace9.setGlobalTracerProvider(this);
|
|
4779
4779
|
if (config.propagator === void 0) {
|
|
4780
4780
|
config.propagator = this._buildPropagatorFromEnv();
|
|
4781
4781
|
}
|
|
@@ -4842,7 +4842,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4842
4842
|
var propagators = uniquePropagatorNames.map(function(name) {
|
|
4843
4843
|
var propagator = _this._getPropagator(name);
|
|
4844
4844
|
if (!propagator) {
|
|
4845
|
-
|
|
4845
|
+
diag11.warn('Propagator "' + name + '" requested through environment variable is unavailable.');
|
|
4846
4846
|
}
|
|
4847
4847
|
return propagator;
|
|
4848
4848
|
});
|
|
@@ -4857,7 +4857,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4857
4857
|
} else if (uniquePropagatorNames.length === 1) {
|
|
4858
4858
|
return validPropagators[0];
|
|
4859
4859
|
} else {
|
|
4860
|
-
return new
|
|
4860
|
+
return new CompositePropagator2({
|
|
4861
4861
|
propagators: validPropagators
|
|
4862
4862
|
});
|
|
4863
4863
|
}
|
|
@@ -4868,7 +4868,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4868
4868
|
return;
|
|
4869
4869
|
var exporter = this._getSpanExporter(exporterName);
|
|
4870
4870
|
if (!exporter) {
|
|
4871
|
-
|
|
4871
|
+
diag11.error('Exporter "' + exporterName + '" requested through environment variable is unavailable.');
|
|
4872
4872
|
}
|
|
4873
4873
|
return exporter;
|
|
4874
4874
|
};
|
|
@@ -4876,7 +4876,7 @@ var init_BasicTracerProvider = __esm({
|
|
|
4876
4876
|
[
|
|
4877
4877
|
"tracecontext",
|
|
4878
4878
|
function() {
|
|
4879
|
-
return new
|
|
4879
|
+
return new W3CTraceContextPropagator2();
|
|
4880
4880
|
}
|
|
4881
4881
|
],
|
|
4882
4882
|
[
|
|
@@ -4893,12 +4893,12 @@ var init_BasicTracerProvider = __esm({
|
|
|
4893
4893
|
});
|
|
4894
4894
|
|
|
4895
4895
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/ConsoleSpanExporter.js
|
|
4896
|
-
var
|
|
4896
|
+
var __values6, ConsoleSpanExporter;
|
|
4897
4897
|
var init_ConsoleSpanExporter = __esm({
|
|
4898
4898
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/ConsoleSpanExporter.js"() {
|
|
4899
4899
|
"use strict";
|
|
4900
4900
|
init_esm3();
|
|
4901
|
-
|
|
4901
|
+
__values6 = function(o) {
|
|
4902
4902
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4903
4903
|
if (m)
|
|
4904
4904
|
return m.call(o);
|
|
@@ -4953,7 +4953,7 @@ var init_ConsoleSpanExporter = __esm({
|
|
|
4953
4953
|
ConsoleSpanExporter2.prototype._sendSpans = function(spans, done) {
|
|
4954
4954
|
var e_1, _a4;
|
|
4955
4955
|
try {
|
|
4956
|
-
for (var spans_1 =
|
|
4956
|
+
for (var spans_1 = __values6(spans), spans_1_1 = spans_1.next(); !spans_1_1.done; spans_1_1 = spans_1.next()) {
|
|
4957
4957
|
var span = spans_1_1.value;
|
|
4958
4958
|
console.dir(this._exportInfo(span), {
|
|
4959
4959
|
depth: 3
|
|
@@ -5071,7 +5071,7 @@ var init_ReadableSpan = __esm({
|
|
|
5071
5071
|
});
|
|
5072
5072
|
|
|
5073
5073
|
// node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/SimpleSpanProcessor.js
|
|
5074
|
-
import { TraceFlags as
|
|
5074
|
+
import { TraceFlags as TraceFlags10 } from "@opentelemetry/api";
|
|
5075
5075
|
var __awaiter, __generator, SimpleSpanProcessor;
|
|
5076
5076
|
var init_SimpleSpanProcessor = __esm({
|
|
5077
5077
|
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/SimpleSpanProcessor.js"() {
|
|
@@ -5260,7 +5260,7 @@ var init_SimpleSpanProcessor = __esm({
|
|
|
5260
5260
|
if (this._shutdownOnce.isCalled) {
|
|
5261
5261
|
return;
|
|
5262
5262
|
}
|
|
5263
|
-
if ((span.spanContext().traceFlags &
|
|
5263
|
+
if ((span.spanContext().traceFlags & TraceFlags10.SAMPLED) === 0) {
|
|
5264
5264
|
return;
|
|
5265
5265
|
}
|
|
5266
5266
|
var doExport = /* @__PURE__ */ __name(function() {
|
|
@@ -7323,16 +7323,16 @@ var require_semver2 = __commonJS({
|
|
|
7323
7323
|
});
|
|
7324
7324
|
|
|
7325
7325
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
7326
|
-
import { createContextKey as
|
|
7327
|
-
function
|
|
7328
|
-
return context5.getValue(
|
|
7326
|
+
import { createContextKey as createContextKey6 } from "@opentelemetry/api";
|
|
7327
|
+
function isTracingSuppressed3(context5) {
|
|
7328
|
+
return context5.getValue(SUPPRESS_TRACING_KEY3) === true;
|
|
7329
7329
|
}
|
|
7330
|
-
var
|
|
7330
|
+
var SUPPRESS_TRACING_KEY3;
|
|
7331
7331
|
var init_suppress_tracing3 = __esm({
|
|
7332
7332
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js"() {
|
|
7333
7333
|
"use strict";
|
|
7334
|
-
|
|
7335
|
-
__name(
|
|
7334
|
+
SUPPRESS_TRACING_KEY3 = createContextKey6("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
7335
|
+
__name(isTracingSuppressed3, "isTracingSuppressed");
|
|
7336
7336
|
}
|
|
7337
7337
|
});
|
|
7338
7338
|
|
|
@@ -7441,7 +7441,7 @@ var init_W3CBaggagePropagator3 = __esm({
|
|
|
7441
7441
|
__name(W3CBaggagePropagator4, "W3CBaggagePropagator");
|
|
7442
7442
|
W3CBaggagePropagator4.prototype.inject = function(context5, carrier, setter) {
|
|
7443
7443
|
var baggage = propagation4.getBaggage(context5);
|
|
7444
|
-
if (!baggage ||
|
|
7444
|
+
if (!baggage || isTracingSuppressed3(context5))
|
|
7445
7445
|
return;
|
|
7446
7446
|
var keyPairs = getKeyPairs3(baggage).filter(function(pair) {
|
|
7447
7447
|
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS3;
|
|
@@ -7511,7 +7511,7 @@ var init_anchored_clock3 = __esm({
|
|
|
7511
7511
|
});
|
|
7512
7512
|
|
|
7513
7513
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
7514
|
-
import { diag as
|
|
7514
|
+
import { diag as diag12 } from "@opentelemetry/api";
|
|
7515
7515
|
var init_attributes3 = __esm({
|
|
7516
7516
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/attributes.js"() {
|
|
7517
7517
|
"use strict";
|
|
@@ -7519,10 +7519,10 @@ var init_attributes3 = __esm({
|
|
|
7519
7519
|
});
|
|
7520
7520
|
|
|
7521
7521
|
// node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
7522
|
-
import { diag as
|
|
7522
|
+
import { diag as diag13 } from "@opentelemetry/api";
|
|
7523
7523
|
function loggingErrorHandler3() {
|
|
7524
7524
|
return function(ex) {
|
|
7525
|
-
|
|
7525
|
+
diag13.error(stringifyException3(ex));
|
|
7526
7526
|
};
|
|
7527
7527
|
}
|
|
7528
7528
|
function stringifyException3(ex) {
|
|
@@ -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
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js"() {
|
|
7778
7778
|
"use strict";
|
|
7779
7779
|
init_version3();
|
|
7780
|
-
SDK_INFO3 = (_a3 = {}, _a3[SemanticResourceAttributes3.TELEMETRY_SDK_NAME] = "opentelemetry", _a3[SemanticResourceAttributes3.PROCESS_RUNTIME_NAME] = "node", _a3[SemanticResourceAttributes3.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues3.NODEJS, _a3[SemanticResourceAttributes3.TELEMETRY_SDK_VERSION] =
|
|
7780
|
+
SDK_INFO3 = (_a3 = {}, _a3[SemanticResourceAttributes3.TELEMETRY_SDK_NAME] = "opentelemetry", _a3[SemanticResourceAttributes3.PROCESS_RUNTIME_NAME] = "node", _a3[SemanticResourceAttributes3.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues3.NODEJS, _a3[SemanticResourceAttributes3.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
|
-
import { diag as
|
|
7845
|
-
var
|
|
7844
|
+
import { diag as diag14 } from "@opentelemetry/api";
|
|
7845
|
+
var __values7, CompositePropagator3;
|
|
7846
7846
|
var init_composite3 = __esm({
|
|
7847
7847
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/propagation/composite.js"() {
|
|
7848
7848
|
"use strict";
|
|
7849
|
-
|
|
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
|
+
diag14.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
|
+
diag14.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,58 +7969,58 @@ 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
|
-
import { isSpanContextValid as
|
|
8022
|
-
function
|
|
8023
|
-
var match =
|
|
8021
|
+
import { isSpanContextValid as isSpanContextValid8, trace as trace10, TraceFlags as TraceFlags11 } from "@opentelemetry/api";
|
|
8022
|
+
function parseTraceParent3(traceParent) {
|
|
8023
|
+
var match = TRACE_PARENT_REGEX3.exec(traceParent);
|
|
8024
8024
|
if (!match)
|
|
8025
8025
|
return null;
|
|
8026
8026
|
if (match[1] === "00" && match[5])
|
|
@@ -8031,61 +8031,61 @@ function parseTraceParent4(traceParent) {
|
|
|
8031
8031
|
traceFlags: parseInt(match[4], 16)
|
|
8032
8032
|
};
|
|
8033
8033
|
}
|
|
8034
|
-
var
|
|
8034
|
+
var TRACE_PARENT_HEADER3, TRACE_STATE_HEADER3, VERSION6, VERSION_PART3, TRACE_ID_PART3, PARENT_ID_PART3, FLAGS_PART3, TRACE_PARENT_REGEX3, W3CTraceContextPropagator3;
|
|
8035
8035
|
var init_W3CTraceContextPropagator3 = __esm({
|
|
8036
8036
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js"() {
|
|
8037
8037
|
"use strict";
|
|
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 = trace10.getSpanContext(context5);
|
|
8056
|
+
if (!spanContext || isTracingSuppressed3(context5) || !isSpanContextValid8(spanContext))
|
|
8057
8057
|
return;
|
|
8058
|
-
var traceParent =
|
|
8059
|
-
setter.set(carrier,
|
|
8058
|
+
var traceParent = VERSION6 + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || TraceFlags11.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 trace10.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
|
-
import { createContextKey as
|
|
8101
|
+
import { createContextKey as createContextKey7 } from "@opentelemetry/api";
|
|
8102
8102
|
var RPC_METADATA_KEY3, RPCType3;
|
|
8103
8103
|
var init_rpc_metadata3 = __esm({
|
|
8104
8104
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/rpc-metadata.js"() {
|
|
8105
8105
|
"use strict";
|
|
8106
|
-
RPC_METADATA_KEY3 =
|
|
8106
|
+
RPC_METADATA_KEY3 = createContextKey7("OpenTelemetry SDK Context Key RPC_METADATA");
|
|
8107
8107
|
(function(RPCType4) {
|
|
8108
8108
|
RPCType4["HTTP"] = "http";
|
|
8109
8109
|
})(RPCType3 || (RPCType3 = {}));
|
|
@@ -8159,7 +8159,7 @@ 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
|
-
import { isSpanContextValid as
|
|
8162
|
+
import { isSpanContextValid as isSpanContextValid9, TraceFlags as TraceFlags12, trace as trace11 } from "@opentelemetry/api";
|
|
8163
8163
|
var ParentBasedSampler4;
|
|
8164
8164
|
var init_ParentBasedSampler4 = __esm({
|
|
8165
8165
|
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core/build/esm/trace/sampler/ParentBasedSampler.js"() {
|
|
@@ -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 || !
|
|
8186
|
+
var parentContext = trace11.getSpanContext(context5);
|
|
8187
|
+
if (!parentContext || !isSpanContextValid9(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 & TraceFlags12.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 & TraceFlags12.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);
|
|
@@ -8474,7 +8474,7 @@ var init_esm5 = __esm({
|
|
|
8474
8474
|
});
|
|
8475
8475
|
|
|
8476
8476
|
// node_modules/@opentelemetry/propagator-jaeger/build/esm/JaegerPropagator.js
|
|
8477
|
-
import { propagation as propagation5, trace as
|
|
8477
|
+
import { propagation as propagation5, trace as trace12, TraceFlags as TraceFlags13 } from "@opentelemetry/api";
|
|
8478
8478
|
function deserializeSpanContext(serializedString) {
|
|
8479
8479
|
var headers = decodeURIComponent(serializedString).split(":");
|
|
8480
8480
|
if (headers.length !== 4) {
|
|
@@ -8491,12 +8491,12 @@ function deserializeSpanContext(serializedString) {
|
|
|
8491
8491
|
traceFlags
|
|
8492
8492
|
};
|
|
8493
8493
|
}
|
|
8494
|
-
var
|
|
8494
|
+
var __values8, __read11, UBER_TRACE_ID_HEADER, UBER_BAGGAGE_HEADER_PREFIX, JaegerPropagator, VALID_HEX_RE;
|
|
8495
8495
|
var init_JaegerPropagator = __esm({
|
|
8496
8496
|
"node_modules/@opentelemetry/propagator-jaeger/build/esm/JaegerPropagator.js"() {
|
|
8497
8497
|
"use strict";
|
|
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 =
|
|
8555
|
+
var spanContext = trace12.getSpanContext(context5);
|
|
8556
8556
|
var baggage = propagation5.getBaggage(context5);
|
|
8557
|
-
if (spanContext &&
|
|
8558
|
-
var traceFlags = "0" + (spanContext.traceFlags ||
|
|
8557
|
+
if (spanContext && isTracingSuppressed3(context5) === false) {
|
|
8558
|
+
var traceFlags = "0" + (spanContext.traceFlags || TraceFlags13.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 = trace12.setSpanContext(newContext, spanContext);
|
|
8602
8602
|
}
|
|
8603
8603
|
}
|
|
8604
8604
|
if (baggageValues.length === 0)
|
|
8605
8605
|
return newContext;
|
|
8606
8606
|
var currentBaggage = (_b = propagation5.getBaggage(context5)) !== null && _b !== void 0 ? _b : propagation5.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;
|
|
@@ -9799,7 +9799,7 @@ var ExpressAdapter = class {
|
|
|
9799
9799
|
async startServer(port) {
|
|
9800
9800
|
return new Promise((resolve) => {
|
|
9801
9801
|
this.server = this.instance.listen(port, () => {
|
|
9802
|
-
this.logger
|
|
9802
|
+
this.logger?.info(`Server is running on PORT ${port}`);
|
|
9803
9803
|
resolve();
|
|
9804
9804
|
});
|
|
9805
9805
|
});
|
|
@@ -9836,7 +9836,7 @@ var FastifyAdapter = class {
|
|
|
9836
9836
|
this.instance = fastify({
|
|
9837
9837
|
bodyLimit: 10 * 1024 * 1024,
|
|
9838
9838
|
querystringParser: (str) => qs.parse(str),
|
|
9839
|
-
loggerInstance: env2.ENVIRONMENT !== "test" ? logger : false
|
|
9839
|
+
loggerInstance: env2.ENVIRONMENT !== "test" && logger ? logger : false
|
|
9840
9840
|
});
|
|
9841
9841
|
this.instance.register(cors2);
|
|
9842
9842
|
}
|
|
@@ -9877,7 +9877,7 @@ var FastifyAdapter = class {
|
|
|
9877
9877
|
port
|
|
9878
9878
|
});
|
|
9879
9879
|
if (this.env.NODE_ENV !== "test") {
|
|
9880
|
-
this.logger
|
|
9880
|
+
this.logger?.info(`Server is running on PORT ${port}`);
|
|
9881
9881
|
}
|
|
9882
9882
|
}
|
|
9883
9883
|
async closeServer() {
|
|
@@ -10270,245 +10270,6 @@ var WinstonOtelFastify = class WinstonOtelFastify2 {
|
|
|
10270
10270
|
}
|
|
10271
10271
|
};
|
|
10272
10272
|
|
|
10273
|
-
// node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js
|
|
10274
|
-
import { createContextKey } from "@opentelemetry/api";
|
|
10275
|
-
var SUPPRESS_TRACING_KEY = createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
10276
|
-
function isTracingSuppressed(context5) {
|
|
10277
|
-
return context5.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
10278
|
-
}
|
|
10279
|
-
__name(isTracingSuppressed, "isTracingSuppressed");
|
|
10280
|
-
|
|
10281
|
-
// node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
10282
|
-
import { diag } from "@opentelemetry/api";
|
|
10283
|
-
var __values = function(o) {
|
|
10284
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
10285
|
-
if (m)
|
|
10286
|
-
return m.call(o);
|
|
10287
|
-
if (o && typeof o.length === "number")
|
|
10288
|
-
return {
|
|
10289
|
-
next: function() {
|
|
10290
|
-
if (o && i >= o.length)
|
|
10291
|
-
o = void 0;
|
|
10292
|
-
return {
|
|
10293
|
-
value: o && o[i++],
|
|
10294
|
-
done: !o
|
|
10295
|
-
};
|
|
10296
|
-
}
|
|
10297
|
-
};
|
|
10298
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
10299
|
-
};
|
|
10300
|
-
var CompositePropagator = (
|
|
10301
|
-
/** @class */
|
|
10302
|
-
function() {
|
|
10303
|
-
function CompositePropagator5(config) {
|
|
10304
|
-
if (config === void 0) {
|
|
10305
|
-
config = {};
|
|
10306
|
-
}
|
|
10307
|
-
var _a4;
|
|
10308
|
-
this._propagators = (_a4 = config.propagators) !== null && _a4 !== void 0 ? _a4 : [];
|
|
10309
|
-
this._fields = Array.from(new Set(this._propagators.map(function(p) {
|
|
10310
|
-
return typeof p.fields === "function" ? p.fields() : [];
|
|
10311
|
-
}).reduce(function(x, y) {
|
|
10312
|
-
return x.concat(y);
|
|
10313
|
-
}, [])));
|
|
10314
|
-
}
|
|
10315
|
-
__name(CompositePropagator5, "CompositePropagator");
|
|
10316
|
-
CompositePropagator5.prototype.inject = function(context5, carrier, setter) {
|
|
10317
|
-
var e_1, _a4;
|
|
10318
|
-
try {
|
|
10319
|
-
for (var _b = __values(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
10320
|
-
var propagator = _c.value;
|
|
10321
|
-
try {
|
|
10322
|
-
propagator.inject(context5, carrier, setter);
|
|
10323
|
-
} catch (err) {
|
|
10324
|
-
diag.warn("Failed to inject with " + propagator.constructor.name + ". Err: " + err.message);
|
|
10325
|
-
}
|
|
10326
|
-
}
|
|
10327
|
-
} catch (e_1_1) {
|
|
10328
|
-
e_1 = {
|
|
10329
|
-
error: e_1_1
|
|
10330
|
-
};
|
|
10331
|
-
} finally {
|
|
10332
|
-
try {
|
|
10333
|
-
if (_c && !_c.done && (_a4 = _b.return))
|
|
10334
|
-
_a4.call(_b);
|
|
10335
|
-
} finally {
|
|
10336
|
-
if (e_1)
|
|
10337
|
-
throw e_1.error;
|
|
10338
|
-
}
|
|
10339
|
-
}
|
|
10340
|
-
};
|
|
10341
|
-
CompositePropagator5.prototype.extract = function(context5, carrier, getter) {
|
|
10342
|
-
return this._propagators.reduce(function(ctx, propagator) {
|
|
10343
|
-
try {
|
|
10344
|
-
return propagator.extract(ctx, carrier, getter);
|
|
10345
|
-
} catch (err) {
|
|
10346
|
-
diag.warn("Failed to extract with " + propagator.constructor.name + ". Err: " + err.message);
|
|
10347
|
-
}
|
|
10348
|
-
return ctx;
|
|
10349
|
-
}, context5);
|
|
10350
|
-
};
|
|
10351
|
-
CompositePropagator5.prototype.fields = function() {
|
|
10352
|
-
return this._fields.slice();
|
|
10353
|
-
};
|
|
10354
|
-
return CompositePropagator5;
|
|
10355
|
-
}()
|
|
10356
|
-
);
|
|
10357
|
-
|
|
10358
|
-
// node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
10359
|
-
import { isSpanContextValid, trace, TraceFlags } from "@opentelemetry/api";
|
|
10360
|
-
|
|
10361
|
-
// node_modules/@opentelemetry/core/build/esm/internal/validators.js
|
|
10362
|
-
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
10363
|
-
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
10364
|
-
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
10365
|
-
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
10366
|
-
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
10367
|
-
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
10368
|
-
function validateKey(key) {
|
|
10369
|
-
return VALID_KEY_REGEX.test(key);
|
|
10370
|
-
}
|
|
10371
|
-
__name(validateKey, "validateKey");
|
|
10372
|
-
function validateValue(value) {
|
|
10373
|
-
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
10374
|
-
}
|
|
10375
|
-
__name(validateValue, "validateValue");
|
|
10376
|
-
|
|
10377
|
-
// node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
10378
|
-
var MAX_TRACE_STATE_ITEMS = 32;
|
|
10379
|
-
var MAX_TRACE_STATE_LEN = 512;
|
|
10380
|
-
var LIST_MEMBERS_SEPARATOR = ",";
|
|
10381
|
-
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
10382
|
-
var TraceState = (
|
|
10383
|
-
/** @class */
|
|
10384
|
-
function() {
|
|
10385
|
-
function TraceState5(rawTraceState) {
|
|
10386
|
-
this._internalState = /* @__PURE__ */ new Map();
|
|
10387
|
-
if (rawTraceState)
|
|
10388
|
-
this._parse(rawTraceState);
|
|
10389
|
-
}
|
|
10390
|
-
__name(TraceState5, "TraceState");
|
|
10391
|
-
TraceState5.prototype.set = function(key, value) {
|
|
10392
|
-
var traceState = this._clone();
|
|
10393
|
-
if (traceState._internalState.has(key)) {
|
|
10394
|
-
traceState._internalState.delete(key);
|
|
10395
|
-
}
|
|
10396
|
-
traceState._internalState.set(key, value);
|
|
10397
|
-
return traceState;
|
|
10398
|
-
};
|
|
10399
|
-
TraceState5.prototype.unset = function(key) {
|
|
10400
|
-
var traceState = this._clone();
|
|
10401
|
-
traceState._internalState.delete(key);
|
|
10402
|
-
return traceState;
|
|
10403
|
-
};
|
|
10404
|
-
TraceState5.prototype.get = function(key) {
|
|
10405
|
-
return this._internalState.get(key);
|
|
10406
|
-
};
|
|
10407
|
-
TraceState5.prototype.serialize = function() {
|
|
10408
|
-
var _this = this;
|
|
10409
|
-
return this._keys().reduce(function(agg, key) {
|
|
10410
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
10411
|
-
return agg;
|
|
10412
|
-
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
10413
|
-
};
|
|
10414
|
-
TraceState5.prototype._parse = function(rawTraceState) {
|
|
10415
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
10416
|
-
return;
|
|
10417
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reverse().reduce(function(agg, part) {
|
|
10418
|
-
var listMember = part.trim();
|
|
10419
|
-
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
10420
|
-
if (i !== -1) {
|
|
10421
|
-
var key = listMember.slice(0, i);
|
|
10422
|
-
var value = listMember.slice(i + 1, part.length);
|
|
10423
|
-
if (validateKey(key) && validateValue(value)) {
|
|
10424
|
-
agg.set(key, value);
|
|
10425
|
-
} else {
|
|
10426
|
-
}
|
|
10427
|
-
}
|
|
10428
|
-
return agg;
|
|
10429
|
-
}, /* @__PURE__ */ new Map());
|
|
10430
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
10431
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
10432
|
-
}
|
|
10433
|
-
};
|
|
10434
|
-
TraceState5.prototype._keys = function() {
|
|
10435
|
-
return Array.from(this._internalState.keys()).reverse();
|
|
10436
|
-
};
|
|
10437
|
-
TraceState5.prototype._clone = function() {
|
|
10438
|
-
var traceState = new TraceState5();
|
|
10439
|
-
traceState._internalState = new Map(this._internalState);
|
|
10440
|
-
return traceState;
|
|
10441
|
-
};
|
|
10442
|
-
return TraceState5;
|
|
10443
|
-
}()
|
|
10444
|
-
);
|
|
10445
|
-
|
|
10446
|
-
// node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
|
|
10447
|
-
var TRACE_PARENT_HEADER = "traceparent";
|
|
10448
|
-
var TRACE_STATE_HEADER = "tracestate";
|
|
10449
|
-
var VERSION = "00";
|
|
10450
|
-
var VERSION_PART = "(?!ff)[\\da-f]{2}";
|
|
10451
|
-
var TRACE_ID_PART = "(?![0]{32})[\\da-f]{32}";
|
|
10452
|
-
var PARENT_ID_PART = "(?![0]{16})[\\da-f]{16}";
|
|
10453
|
-
var FLAGS_PART = "[\\da-f]{2}";
|
|
10454
|
-
var TRACE_PARENT_REGEX = new RegExp("^\\s?(" + VERSION_PART + ")-(" + TRACE_ID_PART + ")-(" + PARENT_ID_PART + ")-(" + FLAGS_PART + ")(-.*)?\\s?$");
|
|
10455
|
-
function parseTraceParent(traceParent) {
|
|
10456
|
-
var match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
10457
|
-
if (!match)
|
|
10458
|
-
return null;
|
|
10459
|
-
if (match[1] === "00" && match[5])
|
|
10460
|
-
return null;
|
|
10461
|
-
return {
|
|
10462
|
-
traceId: match[2],
|
|
10463
|
-
spanId: match[3],
|
|
10464
|
-
traceFlags: parseInt(match[4], 16)
|
|
10465
|
-
};
|
|
10466
|
-
}
|
|
10467
|
-
__name(parseTraceParent, "parseTraceParent");
|
|
10468
|
-
var W3CTraceContextPropagator = (
|
|
10469
|
-
/** @class */
|
|
10470
|
-
function() {
|
|
10471
|
-
function W3CTraceContextPropagator5() {
|
|
10472
|
-
}
|
|
10473
|
-
__name(W3CTraceContextPropagator5, "W3CTraceContextPropagator");
|
|
10474
|
-
W3CTraceContextPropagator5.prototype.inject = function(context5, carrier, setter) {
|
|
10475
|
-
var spanContext = trace.getSpanContext(context5);
|
|
10476
|
-
if (!spanContext || isTracingSuppressed(context5) || !isSpanContextValid(spanContext))
|
|
10477
|
-
return;
|
|
10478
|
-
var traceParent = VERSION + "-" + spanContext.traceId + "-" + spanContext.spanId + "-0" + Number(spanContext.traceFlags || TraceFlags.NONE).toString(16);
|
|
10479
|
-
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
10480
|
-
if (spanContext.traceState) {
|
|
10481
|
-
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
10482
|
-
}
|
|
10483
|
-
};
|
|
10484
|
-
W3CTraceContextPropagator5.prototype.extract = function(context5, carrier, getter) {
|
|
10485
|
-
var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
10486
|
-
if (!traceParentHeader)
|
|
10487
|
-
return context5;
|
|
10488
|
-
var traceParent = Array.isArray(traceParentHeader) ? traceParentHeader[0] : traceParentHeader;
|
|
10489
|
-
if (typeof traceParent !== "string")
|
|
10490
|
-
return context5;
|
|
10491
|
-
var spanContext = parseTraceParent(traceParent);
|
|
10492
|
-
if (!spanContext)
|
|
10493
|
-
return context5;
|
|
10494
|
-
spanContext.isRemote = true;
|
|
10495
|
-
var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
10496
|
-
if (traceStateHeader) {
|
|
10497
|
-
var state = Array.isArray(traceStateHeader) ? traceStateHeader.join(",") : traceStateHeader;
|
|
10498
|
-
spanContext.traceState = new TraceState(typeof state === "string" ? state : void 0);
|
|
10499
|
-
}
|
|
10500
|
-
return trace.setSpanContext(context5, spanContext);
|
|
10501
|
-
};
|
|
10502
|
-
W3CTraceContextPropagator5.prototype.fields = function() {
|
|
10503
|
-
return [
|
|
10504
|
-
TRACE_PARENT_HEADER,
|
|
10505
|
-
TRACE_STATE_HEADER
|
|
10506
|
-
];
|
|
10507
|
-
};
|
|
10508
|
-
return W3CTraceContextPropagator5;
|
|
10509
|
-
}()
|
|
10510
|
-
);
|
|
10511
|
-
|
|
10512
10273
|
// src/infra/adapters/observability/otel/opentelemetry.ts
|
|
10513
10274
|
var import_sdk_trace_node = __toESM(require_src2(), 1);
|
|
10514
10275
|
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-proto";
|
|
@@ -10530,7 +10291,7 @@ var OpenTelemetry = class OpenTelemetry2 {
|
|
|
10530
10291
|
const resource = new Resource2({
|
|
10531
10292
|
[SEMRESATTRS_SERVICE_NAME]: this.env.OTEL_SERVICE_NAME,
|
|
10532
10293
|
[SEMRESATTRS_SERVICE_VERSION]: this.env.OTEL_SERVICE_VERSION || "1.0.0",
|
|
10533
|
-
[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: this.env.ENVIRONMENT || "
|
|
10294
|
+
[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: this.env.ENVIRONMENT || "production"
|
|
10534
10295
|
});
|
|
10535
10296
|
const traceExporter = new OTLPTraceExporter({
|
|
10536
10297
|
url: this.env.OTEL_OTLP_TRACES_EXPORTER_URL,
|
|
@@ -10547,27 +10308,10 @@ var OpenTelemetry = class OpenTelemetry2 {
|
|
|
10547
10308
|
this.sdk = new NodeSDK({
|
|
10548
10309
|
resource,
|
|
10549
10310
|
traceExporter,
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
new W3CTraceContextPropagator()
|
|
10553
|
-
]
|
|
10554
|
-
}),
|
|
10555
|
-
spanProcessor: new import_sdk_trace_node.BatchSpanProcessor(traceExporter, {
|
|
10556
|
-
maxQueueSize: 2048,
|
|
10557
|
-
maxExportBatchSize: 512,
|
|
10558
|
-
scheduledDelayMillis: 5e3,
|
|
10559
|
-
exportTimeoutMillis: 3e4
|
|
10560
|
-
}),
|
|
10561
|
-
logRecordProcessor: new BatchLogRecordProcessor(logExporter, {
|
|
10562
|
-
maxQueueSize: 2048,
|
|
10563
|
-
maxExportBatchSize: 512,
|
|
10564
|
-
scheduledDelayMillis: 1e3,
|
|
10565
|
-
exportTimeoutMillis: 3e4
|
|
10566
|
-
}),
|
|
10311
|
+
spanProcessor: new import_sdk_trace_node.BatchSpanProcessor(traceExporter),
|
|
10312
|
+
logRecordProcessor: new BatchLogRecordProcessor(logExporter),
|
|
10567
10313
|
metricReader: new PeriodicExportingMetricReader({
|
|
10568
|
-
exporter: metricExporter
|
|
10569
|
-
exportIntervalMillis: 1e4,
|
|
10570
|
-
exportTimeoutMillis: 3e4
|
|
10314
|
+
exporter: metricExporter
|
|
10571
10315
|
})
|
|
10572
10316
|
});
|
|
10573
10317
|
}
|