@elizaos/cli 1.0.1 → 1.0.2
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/assets/index-BLUE6ehn.css +1 -0
- package/dist/assets/index-BLUE6ehn.css.br +0 -0
- package/dist/assets/{index-DLCBfFYd.js → index-BQEpBB33.js} +2038 -379
- package/dist/assets/{index-DLCBfFYd.js.map → index-BQEpBB33.js.map} +1 -1
- package/dist/assets/{index-DNxLn4OZ.js → index-eRnFTOEM.js} +2 -2
- package/dist/assets/index-eRnFTOEM.js.br +0 -0
- package/dist/assets/{index-DNxLn4OZ.js.map → index-eRnFTOEM.js.map} +1 -1
- package/dist/assets/vendor-CFQmvqmR.js.br +0 -0
- package/dist/{chunk-UMDJUAZA.js → chunk-URANH3OS.js} +199 -6
- package/dist/{chunk-5R4LDP3N.js → chunk-XVN7DK3U.js} +1 -1
- package/dist/commands/start.js +1 -1
- package/dist/commands/test.js +2 -2
- package/dist/index.html +2 -2
- package/dist/index.js +2 -2
- package/package.json +4 -4
- package/templates/project-starter/package.json +3 -3
- package/templates/project-starter/src/index.ts +1 -1
- package/dist/assets/index-ljsW7JJO.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-eRnFTOEM.js","assets/vendor-CFQmvqmR.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import { r as requireReact, a as requireReactDom, p as process$1, b as reactExports, g as getDefaultExportFromCjs, c as reactDomExports, R as React, d as ReactDOM, e as React$1, f as getAugmentedNamespace, u as useNavigate, h as useLocation, N as NavLink, i as useParams, L as Link, B as BrowserRouter, j as Routes, k as Route } from './vendor-CFQmvqmR.js';
|
|
3
3
|
|
|
4
4
|
true &&(function polyfill() {
|
|
@@ -14895,7 +14895,7 @@ function useControllableState({
|
|
|
14895
14895
|
const setValue = reactExports.useCallback(
|
|
14896
14896
|
(nextValue) => {
|
|
14897
14897
|
if (isControlled) {
|
|
14898
|
-
const value2 = isFunction$
|
|
14898
|
+
const value2 = isFunction$5(nextValue) ? nextValue(prop) : nextValue;
|
|
14899
14899
|
if (value2 !== prop) {
|
|
14900
14900
|
onChangeRef.current?.(value2);
|
|
14901
14901
|
}
|
|
@@ -14925,7 +14925,7 @@ function useUncontrolledState({
|
|
|
14925
14925
|
}, [value, prevValueRef]);
|
|
14926
14926
|
return [value, setValue, onChangeRef];
|
|
14927
14927
|
}
|
|
14928
|
-
function isFunction$
|
|
14928
|
+
function isFunction$5(value) {
|
|
14929
14929
|
return typeof value === "function";
|
|
14930
14930
|
}
|
|
14931
14931
|
|
|
@@ -21504,7 +21504,7 @@ function hashQueryKeyByOptions(queryKey, options) {
|
|
|
21504
21504
|
function hashKey(queryKey) {
|
|
21505
21505
|
return JSON.stringify(
|
|
21506
21506
|
queryKey,
|
|
21507
|
-
(_, val) => isPlainObject$
|
|
21507
|
+
(_, val) => isPlainObject$3(val) ? Object.keys(val).sort().reduce((result, key) => {
|
|
21508
21508
|
result[key] = val[key];
|
|
21509
21509
|
return result;
|
|
21510
21510
|
}, {}) : val
|
|
@@ -21527,7 +21527,7 @@ function replaceEqualDeep(a, b) {
|
|
|
21527
21527
|
return a;
|
|
21528
21528
|
}
|
|
21529
21529
|
const array = isPlainArray(a) && isPlainArray(b);
|
|
21530
|
-
if (array || isPlainObject$
|
|
21530
|
+
if (array || isPlainObject$3(a) && isPlainObject$3(b)) {
|
|
21531
21531
|
const aItems = array ? a : Object.keys(a);
|
|
21532
21532
|
const aSize = aItems.length;
|
|
21533
21533
|
const bItems = array ? b : Object.keys(b);
|
|
@@ -21564,7 +21564,7 @@ function shallowEqualObjects(a, b) {
|
|
|
21564
21564
|
function isPlainArray(value) {
|
|
21565
21565
|
return Array.isArray(value) && value.length === Object.keys(value).length;
|
|
21566
21566
|
}
|
|
21567
|
-
function isPlainObject$
|
|
21567
|
+
function isPlainObject$3(o) {
|
|
21568
21568
|
if (!hasObjectPrototype(o)) {
|
|
21569
21569
|
return false;
|
|
21570
21570
|
}
|
|
@@ -56763,7 +56763,7 @@ const modp15 = {"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc
|
|
|
56763
56763
|
const modp16 = {"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"};
|
|
56764
56764
|
const modp17 = {"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"};
|
|
56765
56765
|
const modp18 = {"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"};
|
|
56766
|
-
const require$$1$
|
|
56766
|
+
const require$$1$2 = {
|
|
56767
56767
|
modp1,
|
|
56768
56768
|
modp2,
|
|
56769
56769
|
modp5,
|
|
@@ -56953,7 +56953,7 @@ function requireBrowser$5 () {
|
|
|
56953
56953
|
if (hasRequiredBrowser$5) return browser$5;
|
|
56954
56954
|
hasRequiredBrowser$5 = 1;
|
|
56955
56955
|
var generatePrime = requireGeneratePrime();
|
|
56956
|
-
var primes = require$$1$
|
|
56956
|
+
var primes = require$$1$2;
|
|
56957
56957
|
|
|
56958
56958
|
var DH = requireDh();
|
|
56959
56959
|
|
|
@@ -77012,7 +77012,7 @@ function requireAsn1 () {
|
|
|
77012
77012
|
return asn1$1;
|
|
77013
77013
|
}
|
|
77014
77014
|
|
|
77015
|
-
const require$$1 = {
|
|
77015
|
+
const require$$1$1 = {
|
|
77016
77016
|
"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
|
|
77017
77017
|
"2.16.840.1.101.3.4.1.2": "aes-128-cbc",
|
|
77018
77018
|
"2.16.840.1.101.3.4.1.3": "aes-128-ofb",
|
|
@@ -77076,7 +77076,7 @@ function requireParseAsn1 () {
|
|
|
77076
77076
|
hasRequiredParseAsn1 = 1;
|
|
77077
77077
|
|
|
77078
77078
|
var asn1 = requireAsn1();
|
|
77079
|
-
var aesid = require$$1;
|
|
77079
|
+
var aesid = require$$1$1;
|
|
77080
77080
|
var fixProc = requireFixProc();
|
|
77081
77081
|
var ciphers = requireBrowser$7();
|
|
77082
77082
|
var compat = requireBrowser$8();
|
|
@@ -94484,7 +94484,7 @@ function getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {
|
|
|
94484
94484
|
}
|
|
94485
94485
|
|
|
94486
94486
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
94487
|
-
const objectToString$
|
|
94487
|
+
const objectToString$3 = Object.prototype.toString;
|
|
94488
94488
|
|
|
94489
94489
|
/**
|
|
94490
94490
|
* Checks whether given value's type is one of a few Error or Error-like
|
|
@@ -94494,7 +94494,7 @@ const objectToString$2 = Object.prototype.toString;
|
|
|
94494
94494
|
* @returns A boolean representing the result.
|
|
94495
94495
|
*/
|
|
94496
94496
|
function isError(wat) {
|
|
94497
|
-
switch (objectToString$
|
|
94497
|
+
switch (objectToString$3.call(wat)) {
|
|
94498
94498
|
case '[object Error]':
|
|
94499
94499
|
case '[object Exception]':
|
|
94500
94500
|
case '[object DOMException]':
|
|
@@ -94512,7 +94512,7 @@ function isError(wat) {
|
|
|
94512
94512
|
* @returns A boolean representing the result.
|
|
94513
94513
|
*/
|
|
94514
94514
|
function isBuiltin(wat, className) {
|
|
94515
|
-
return objectToString$
|
|
94515
|
+
return objectToString$3.call(wat) === `[object ${className}]`;
|
|
94516
94516
|
}
|
|
94517
94517
|
|
|
94518
94518
|
/**
|
|
@@ -94582,7 +94582,7 @@ function isParameterizedString(wat) {
|
|
|
94582
94582
|
* @param wat A value to be checked.
|
|
94583
94583
|
* @returns A boolean representing the result.
|
|
94584
94584
|
*/
|
|
94585
|
-
function isPrimitive$
|
|
94585
|
+
function isPrimitive$2(wat) {
|
|
94586
94586
|
return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');
|
|
94587
94587
|
}
|
|
94588
94588
|
|
|
@@ -94593,7 +94593,7 @@ function isPrimitive$1(wat) {
|
|
|
94593
94593
|
* @param wat A value to be checked.
|
|
94594
94594
|
* @returns A boolean representing the result.
|
|
94595
94595
|
*/
|
|
94596
|
-
function isPlainObject$
|
|
94596
|
+
function isPlainObject$2(wat) {
|
|
94597
94597
|
return isBuiltin(wat, 'Object');
|
|
94598
94598
|
}
|
|
94599
94599
|
|
|
@@ -94647,7 +94647,7 @@ function isThenable(wat) {
|
|
|
94647
94647
|
* @returns A boolean representing the result.
|
|
94648
94648
|
*/
|
|
94649
94649
|
function isSyntheticEvent(wat) {
|
|
94650
|
-
return isPlainObject$
|
|
94650
|
+
return isPlainObject$2(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
|
|
94651
94651
|
}
|
|
94652
94652
|
|
|
94653
94653
|
/**
|
|
@@ -95519,7 +95519,7 @@ function sessionToJSON(session) {
|
|
|
95519
95519
|
*
|
|
95520
95520
|
* By default, this merges 2 levels deep.
|
|
95521
95521
|
*/
|
|
95522
|
-
function merge$
|
|
95522
|
+
function merge$2(initialObj, mergeObj, levels = 2) {
|
|
95523
95523
|
// If the merge value is not an object, or we have no merge levels left,
|
|
95524
95524
|
// we just set the value to the merge value
|
|
95525
95525
|
if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {
|
|
@@ -95537,7 +95537,7 @@ function merge$1(initialObj, mergeObj, levels = 2) {
|
|
|
95537
95537
|
// Merge values into output, resursively
|
|
95538
95538
|
for (const key in mergeObj) {
|
|
95539
95539
|
if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {
|
|
95540
|
-
output[key] = merge$
|
|
95540
|
+
output[key] = merge$2(output[key], mergeObj[key], levels - 1);
|
|
95541
95541
|
}
|
|
95542
95542
|
}
|
|
95543
95543
|
|
|
@@ -95833,7 +95833,7 @@ let Scope$1 = class Scope {
|
|
|
95833
95833
|
return this;
|
|
95834
95834
|
}
|
|
95835
95835
|
const scopeToMerge = typeof captureContext === "function" ? captureContext(this) : captureContext;
|
|
95836
|
-
const scopeInstance = scopeToMerge instanceof Scope ? scopeToMerge.getScopeData() : isPlainObject$
|
|
95836
|
+
const scopeInstance = scopeToMerge instanceof Scope ? scopeToMerge.getScopeData() : isPlainObject$2(scopeToMerge) ? captureContext : void 0;
|
|
95837
95837
|
const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};
|
|
95838
95838
|
this._tags = { ...this._tags, ...tags };
|
|
95839
95839
|
this._extra = { ...this._extra, ...extra };
|
|
@@ -95947,7 +95947,7 @@ let Scope$1 = class Scope {
|
|
|
95947
95947
|
* Add data which will be accessible during event processing but won't get sent to Sentry.
|
|
95948
95948
|
*/
|
|
95949
95949
|
setSDKProcessingMetadata(newData) {
|
|
95950
|
-
this._sdkProcessingMetadata = merge$
|
|
95950
|
+
this._sdkProcessingMetadata = merge$2(this._sdkProcessingMetadata, newData, 2);
|
|
95951
95951
|
return this;
|
|
95952
95952
|
}
|
|
95953
95953
|
/**
|
|
@@ -97796,7 +97796,7 @@ function mergeScopeData(data, mergeData) {
|
|
|
97796
97796
|
mergeAndOverwriteScopeData(data, 'user', user);
|
|
97797
97797
|
mergeAndOverwriteScopeData(data, 'contexts', contexts);
|
|
97798
97798
|
|
|
97799
|
-
data.sdkProcessingMetadata = merge$
|
|
97799
|
+
data.sdkProcessingMetadata = merge$2(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);
|
|
97800
97800
|
|
|
97801
97801
|
if (level) {
|
|
97802
97802
|
data.level = level;
|
|
@@ -97836,7 +97836,7 @@ function mergeScopeData(data, mergeData) {
|
|
|
97836
97836
|
function mergeAndOverwriteScopeData
|
|
97837
97837
|
|
|
97838
97838
|
(data, prop, mergeVal) {
|
|
97839
|
-
data[prop] = merge$
|
|
97839
|
+
data[prop] = merge$2(data[prop], mergeVal, 1);
|
|
97840
97840
|
}
|
|
97841
97841
|
|
|
97842
97842
|
function applyDataToEvent(event, data) {
|
|
@@ -98742,7 +98742,7 @@ class Client {
|
|
|
98742
98742
|
|
|
98743
98743
|
const eventMessage = isParameterizedString(message) ? message : String(message);
|
|
98744
98744
|
|
|
98745
|
-
const promisedEvent = isPrimitive$
|
|
98745
|
+
const promisedEvent = isPrimitive$2(message)
|
|
98746
98746
|
? this.eventFromMessage(eventMessage, level, hintWithEventId)
|
|
98747
98747
|
: this.eventFromException(message, hintWithEventId);
|
|
98748
98748
|
|
|
@@ -99413,7 +99413,7 @@ function _validateBeforeSendResult(
|
|
|
99413
99413
|
if (isThenable(beforeSendResult)) {
|
|
99414
99414
|
return beforeSendResult.then(
|
|
99415
99415
|
event => {
|
|
99416
|
-
if (!isPlainObject$
|
|
99416
|
+
if (!isPlainObject$2(event) && event !== null) {
|
|
99417
99417
|
throw _makeInternalError(invalidValueError);
|
|
99418
99418
|
}
|
|
99419
99419
|
return event;
|
|
@@ -99422,7 +99422,7 @@ function _validateBeforeSendResult(
|
|
|
99422
99422
|
throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);
|
|
99423
99423
|
},
|
|
99424
99424
|
);
|
|
99425
|
-
} else if (!isPlainObject$
|
|
99425
|
+
} else if (!isPlainObject$2(beforeSendResult) && beforeSendResult !== null) {
|
|
99426
99426
|
throw _makeInternalError(invalidValueError);
|
|
99427
99427
|
}
|
|
99428
99428
|
return beforeSendResult;
|
|
@@ -99452,7 +99452,7 @@ function processBeforeSend(
|
|
|
99452
99452
|
showSpanDropWarning();
|
|
99453
99453
|
} else {
|
|
99454
99454
|
// update event with processed root span values
|
|
99455
|
-
processedEvent = merge$
|
|
99455
|
+
processedEvent = merge$2(event, convertSpanJsonToTransactionEvent(processedRootSpanJson));
|
|
99456
99456
|
}
|
|
99457
99457
|
|
|
99458
99458
|
// process child spans
|
|
@@ -101352,7 +101352,7 @@ function eventFromUnknownInput(
|
|
|
101352
101352
|
// we have a real Error object, do nothing
|
|
101353
101353
|
return eventFromError(stackParser, exception);
|
|
101354
101354
|
}
|
|
101355
|
-
if (isPlainObject$
|
|
101355
|
+
if (isPlainObject$2(exception) || isEvent(exception)) {
|
|
101356
101356
|
// If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
|
|
101357
101357
|
// it manually. This will allow us to group events based on top-level keys which is much better than creating a new
|
|
101358
101358
|
// group on any key/value change.
|
|
@@ -102706,7 +102706,7 @@ function _installGlobalOnUnhandledRejectionHandler(client) {
|
|
|
102706
102706
|
return;
|
|
102707
102707
|
}
|
|
102708
102708
|
const error = _getUnhandledRejectionError(e);
|
|
102709
|
-
const event = isPrimitive$
|
|
102709
|
+
const event = isPrimitive$2(error) ? _eventFromRejectionWithPrimitive(error) : eventFromUnknownInput(stackParser, error, void 0, attachStacktrace, true);
|
|
102710
102710
|
event.level = "error";
|
|
102711
102711
|
captureEvent(event, {
|
|
102712
102712
|
originalException: error,
|
|
@@ -102718,7 +102718,7 @@ function _installGlobalOnUnhandledRejectionHandler(client) {
|
|
|
102718
102718
|
});
|
|
102719
102719
|
}
|
|
102720
102720
|
function _getUnhandledRejectionError(error) {
|
|
102721
|
-
if (isPrimitive$
|
|
102721
|
+
if (isPrimitive$2(error)) {
|
|
102722
102722
|
return error;
|
|
102723
102723
|
}
|
|
102724
102724
|
try {
|
|
@@ -103092,7 +103092,7 @@ const createStream = async () => {
|
|
|
103092
103092
|
if (raw) {
|
|
103093
103093
|
return void 0;
|
|
103094
103094
|
}
|
|
103095
|
-
const pretty = await __vitePreload(() => import('./index-
|
|
103095
|
+
const pretty = await __vitePreload(() => import('./index-eRnFTOEM.js').then(n => n.i),true ?__vite__mapDeps([0,1]):void 0);
|
|
103096
103096
|
return pretty.default(createPrettyConfig());
|
|
103097
103097
|
};
|
|
103098
103098
|
const options = {
|
|
@@ -103198,7 +103198,7 @@ function parseBooleanFromText(value) {
|
|
|
103198
103198
|
}
|
|
103199
103199
|
stringType().uuid();
|
|
103200
103200
|
|
|
103201
|
-
var _globalThis$
|
|
103201
|
+
var _globalThis$3 = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof globalThis === "object" ? globalThis : {};
|
|
103202
103202
|
|
|
103203
103203
|
/*
|
|
103204
103204
|
* Copyright The OpenTelemetry Authors
|
|
@@ -103216,7 +103216,7 @@ var _globalThis$2 = typeof globalThis === "object" ? globalThis : typeof self ==
|
|
|
103216
103216
|
* limitations under the License.
|
|
103217
103217
|
*/
|
|
103218
103218
|
// this is autogenerated file, see scripts/version-update.js
|
|
103219
|
-
var VERSION$
|
|
103219
|
+
var VERSION$4 = '1.9.0';
|
|
103220
103220
|
|
|
103221
103221
|
var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
103222
103222
|
function _makeCompatibilityCheck(ownVersion) {
|
|
@@ -103282,31 +103282,31 @@ function _makeCompatibilityCheck(ownVersion) {
|
|
|
103282
103282
|
return _reject(globalVersion);
|
|
103283
103283
|
};
|
|
103284
103284
|
}
|
|
103285
|
-
var isCompatible = _makeCompatibilityCheck(VERSION$
|
|
103285
|
+
var isCompatible = _makeCompatibilityCheck(VERSION$4);
|
|
103286
103286
|
|
|
103287
|
-
var major = VERSION$
|
|
103287
|
+
var major = VERSION$4.split(".")[0];
|
|
103288
103288
|
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
|
|
103289
|
-
var _global$1 = _globalThis$
|
|
103289
|
+
var _global$1 = _globalThis$3;
|
|
103290
103290
|
function registerGlobal(type, instance, diag, allowOverride) {
|
|
103291
103291
|
var _a;
|
|
103292
103292
|
if (allowOverride === void 0) {
|
|
103293
103293
|
allowOverride = false;
|
|
103294
103294
|
}
|
|
103295
103295
|
var api = _global$1[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global$1[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
|
|
103296
|
-
version: VERSION$
|
|
103296
|
+
version: VERSION$4
|
|
103297
103297
|
};
|
|
103298
103298
|
if (!allowOverride && api[type]) {
|
|
103299
103299
|
var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
|
|
103300
103300
|
diag.error(err.stack || err.message);
|
|
103301
103301
|
return false;
|
|
103302
103302
|
}
|
|
103303
|
-
if (api.version !== VERSION$
|
|
103304
|
-
var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION$
|
|
103303
|
+
if (api.version !== VERSION$4) {
|
|
103304
|
+
var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION$4);
|
|
103305
103305
|
diag.error(err.stack || err.message);
|
|
103306
103306
|
return false;
|
|
103307
103307
|
}
|
|
103308
103308
|
api[type] = instance;
|
|
103309
|
-
diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION$
|
|
103309
|
+
diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION$4 + ".");
|
|
103310
103310
|
return true;
|
|
103311
103311
|
}
|
|
103312
103312
|
function getGlobal(type) {
|
|
@@ -103318,7 +103318,7 @@ function getGlobal(type) {
|
|
|
103318
103318
|
return (_b = _global$1[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
|
|
103319
103319
|
}
|
|
103320
103320
|
function unregisterGlobal(type, diag) {
|
|
103321
|
-
diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION$
|
|
103321
|
+
diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION$4 + ".");
|
|
103322
103322
|
var api = _global$1[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
103323
103323
|
if (api) {
|
|
103324
103324
|
delete api[type];
|
|
@@ -104752,12 +104752,12 @@ var SpanStatusCode;
|
|
|
104752
104752
|
* See the License for the specific language governing permissions and
|
|
104753
104753
|
* limitations under the License.
|
|
104754
104754
|
*/
|
|
104755
|
-
var VALID_KEY_CHAR_RANGE$
|
|
104756
|
-
var VALID_KEY$
|
|
104757
|
-
var VALID_VENDOR_KEY$
|
|
104758
|
-
var VALID_KEY_REGEX$
|
|
104759
|
-
var VALID_VALUE_BASE_REGEX$
|
|
104760
|
-
var INVALID_VALUE_COMMA_EQUAL_REGEX$
|
|
104755
|
+
var VALID_KEY_CHAR_RANGE$2 = '[_0-9a-z-*/]';
|
|
104756
|
+
var VALID_KEY$2 = "[a-z]" + VALID_KEY_CHAR_RANGE$2 + "{0,255}";
|
|
104757
|
+
var VALID_VENDOR_KEY$2 = "[a-z0-9]" + VALID_KEY_CHAR_RANGE$2 + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE$2 + "{0,13}";
|
|
104758
|
+
var VALID_KEY_REGEX$2 = new RegExp("^(?:" + VALID_KEY$2 + "|" + VALID_VENDOR_KEY$2 + ")$");
|
|
104759
|
+
var VALID_VALUE_BASE_REGEX$2 = /^[ -~]{0,255}[!-~]$/;
|
|
104760
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX$2 = /,|=/;
|
|
104761
104761
|
/**
|
|
104762
104762
|
* Key is opaque string up to 256 characters printable. It MUST begin with a
|
|
104763
104763
|
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
|
|
@@ -104766,16 +104766,16 @@ var INVALID_VALUE_COMMA_EQUAL_REGEX$1 = /,|=/;
|
|
|
104766
104766
|
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
|
|
104767
104767
|
* see https://www.w3.org/TR/trace-context/#key
|
|
104768
104768
|
*/
|
|
104769
|
-
function validateKey$
|
|
104770
|
-
return VALID_KEY_REGEX$
|
|
104769
|
+
function validateKey$2(key) {
|
|
104770
|
+
return VALID_KEY_REGEX$2.test(key);
|
|
104771
104771
|
}
|
|
104772
104772
|
/**
|
|
104773
104773
|
* Value is opaque string up to 256 characters printable ASCII RFC0020
|
|
104774
104774
|
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
|
|
104775
104775
|
*/
|
|
104776
|
-
function validateValue$
|
|
104777
|
-
return (VALID_VALUE_BASE_REGEX$
|
|
104778
|
-
!INVALID_VALUE_COMMA_EQUAL_REGEX$
|
|
104776
|
+
function validateValue$2(value) {
|
|
104777
|
+
return (VALID_VALUE_BASE_REGEX$2.test(value) &&
|
|
104778
|
+
!INVALID_VALUE_COMMA_EQUAL_REGEX$2.test(value));
|
|
104779
104779
|
}
|
|
104780
104780
|
|
|
104781
104781
|
/*
|
|
@@ -104793,10 +104793,10 @@ function validateValue$1(value) {
|
|
|
104793
104793
|
* See the License for the specific language governing permissions and
|
|
104794
104794
|
* limitations under the License.
|
|
104795
104795
|
*/
|
|
104796
|
-
var MAX_TRACE_STATE_ITEMS$
|
|
104797
|
-
var MAX_TRACE_STATE_LEN$
|
|
104798
|
-
var LIST_MEMBERS_SEPARATOR$
|
|
104799
|
-
var LIST_MEMBER_KEY_VALUE_SPLITTER$
|
|
104796
|
+
var MAX_TRACE_STATE_ITEMS$2 = 32;
|
|
104797
|
+
var MAX_TRACE_STATE_LEN$2 = 512;
|
|
104798
|
+
var LIST_MEMBERS_SEPARATOR$2 = ',';
|
|
104799
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER$2 = '=';
|
|
104800
104800
|
/**
|
|
104801
104801
|
* TraceState must be a class and not a simple object type because of the spec
|
|
104802
104802
|
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
|
|
@@ -104834,34 +104834,34 @@ var TraceStateImpl = /** @class */ (function () {
|
|
|
104834
104834
|
var _this = this;
|
|
104835
104835
|
return this._keys()
|
|
104836
104836
|
.reduce(function (agg, key) {
|
|
104837
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER$
|
|
104837
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER$2 + _this.get(key));
|
|
104838
104838
|
return agg;
|
|
104839
104839
|
}, [])
|
|
104840
|
-
.join(LIST_MEMBERS_SEPARATOR$
|
|
104840
|
+
.join(LIST_MEMBERS_SEPARATOR$2);
|
|
104841
104841
|
};
|
|
104842
104842
|
TraceStateImpl.prototype._parse = function (rawTraceState) {
|
|
104843
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN$
|
|
104843
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN$2)
|
|
104844
104844
|
return;
|
|
104845
104845
|
this._internalState = rawTraceState
|
|
104846
|
-
.split(LIST_MEMBERS_SEPARATOR$
|
|
104846
|
+
.split(LIST_MEMBERS_SEPARATOR$2)
|
|
104847
104847
|
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
|
|
104848
104848
|
.reduce(function (agg, part) {
|
|
104849
104849
|
var listMember = part.trim(); // Optional Whitespace (OWS) handling
|
|
104850
|
-
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER$
|
|
104850
|
+
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER$2);
|
|
104851
104851
|
if (i !== -1) {
|
|
104852
104852
|
var key = listMember.slice(0, i);
|
|
104853
104853
|
var value = listMember.slice(i + 1, part.length);
|
|
104854
|
-
if (validateKey$
|
|
104854
|
+
if (validateKey$2(key) && validateValue$2(value)) {
|
|
104855
104855
|
agg.set(key, value);
|
|
104856
104856
|
}
|
|
104857
104857
|
}
|
|
104858
104858
|
return agg;
|
|
104859
104859
|
}, new Map());
|
|
104860
104860
|
// Because of the reverse() requirement, trunc must be done after map is created
|
|
104861
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS$
|
|
104861
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS$2) {
|
|
104862
104862
|
this._internalState = new Map(Array.from(this._internalState.entries())
|
|
104863
104863
|
.reverse() // Use reverse same as original tracestate parse chain
|
|
104864
|
-
.slice(0, MAX_TRACE_STATE_ITEMS$
|
|
104864
|
+
.slice(0, MAX_TRACE_STATE_ITEMS$2));
|
|
104865
104865
|
}
|
|
104866
104866
|
};
|
|
104867
104867
|
TraceStateImpl.prototype._keys = function () {
|
|
@@ -105255,7 +105255,7 @@ const index$6 = {
|
|
|
105255
105255
|
trace: trace,
|
|
105256
105256
|
};
|
|
105257
105257
|
|
|
105258
|
-
const esm$
|
|
105258
|
+
const esm$4 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
105259
105259
|
__proto__: null,
|
|
105260
105260
|
DiagConsoleLogger,
|
|
105261
105261
|
get DiagLogLevel () { return DiagLogLevel; },
|
|
@@ -105412,10 +105412,10 @@ class ProxyLoggerProvider {
|
|
|
105412
105412
|
}
|
|
105413
105413
|
}
|
|
105414
105414
|
|
|
105415
|
-
const _globalThis$
|
|
105415
|
+
const _globalThis$2 = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof globalThis === "object" ? globalThis : {};
|
|
105416
105416
|
|
|
105417
105417
|
const GLOBAL_LOGS_API_KEY = Symbol.for("io.opentelemetry.js.api.logs");
|
|
105418
|
-
const _global = _globalThis$
|
|
105418
|
+
const _global = _globalThis$2;
|
|
105419
105419
|
function makeGetter(requiredVersion, instance, fallback) {
|
|
105420
105420
|
return (version) => version === requiredVersion ? instance : fallback;
|
|
105421
105421
|
}
|
|
@@ -106065,7 +106065,7 @@ function semconvStabilityFromStr(namespace, str) {
|
|
|
106065
106065
|
* limitations under the License.
|
|
106066
106066
|
*/
|
|
106067
106067
|
|
|
106068
|
-
const esm$
|
|
106068
|
+
const esm$3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
106069
106069
|
__proto__: null,
|
|
106070
106070
|
InstrumentationBase,
|
|
106071
106071
|
InstrumentationNodeModuleDefinition,
|
|
@@ -106082,9 +106082,9 @@ var src$1 = {};
|
|
|
106082
106082
|
|
|
106083
106083
|
var instrumentation = {};
|
|
106084
106084
|
|
|
106085
|
-
const require$$0 = /*@__PURE__*/getAugmentedNamespace(esm$
|
|
106085
|
+
const require$$0 = /*@__PURE__*/getAugmentedNamespace(esm$3);
|
|
106086
106086
|
|
|
106087
|
-
const require$$2 = /*@__PURE__*/getAugmentedNamespace(esm$
|
|
106087
|
+
const require$$2 = /*@__PURE__*/getAugmentedNamespace(esm$4);
|
|
106088
106088
|
|
|
106089
106089
|
var internalTypes = {};
|
|
106090
106090
|
|
|
@@ -107597,7 +107597,7 @@ const METRIC_SIGNALR_SERVER_CONNECTION_DURATION = "signalr.server.connection.dur
|
|
|
107597
107597
|
*/
|
|
107598
107598
|
// Deprecated. These are kept around for compatibility purposes
|
|
107599
107599
|
|
|
107600
|
-
const esm$
|
|
107600
|
+
const esm$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
107601
107601
|
__proto__: null,
|
|
107602
107602
|
ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED,
|
|
107603
107603
|
ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED,
|
|
@@ -108198,7 +108198,7 @@ const esm$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
108198
108198
|
TelemetrySdkLanguageValues
|
|
108199
108199
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
108200
108200
|
|
|
108201
|
-
const require$$8 = /*@__PURE__*/getAugmentedNamespace(esm$
|
|
108201
|
+
const require$$8 = /*@__PURE__*/getAugmentedNamespace(esm$2);
|
|
108202
108202
|
|
|
108203
108203
|
var semconv = {};
|
|
108204
108204
|
|
|
@@ -108640,15 +108640,15 @@ var src = {};
|
|
|
108640
108640
|
* See the License for the specific language governing permissions and
|
|
108641
108641
|
* limitations under the License.
|
|
108642
108642
|
*/
|
|
108643
|
-
const SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');
|
|
108644
|
-
function suppressTracing(context) {
|
|
108645
|
-
return context.setValue(SUPPRESS_TRACING_KEY, true);
|
|
108643
|
+
const SUPPRESS_TRACING_KEY$1 = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');
|
|
108644
|
+
function suppressTracing$1(context) {
|
|
108645
|
+
return context.setValue(SUPPRESS_TRACING_KEY$1, true);
|
|
108646
108646
|
}
|
|
108647
|
-
function unsuppressTracing(context) {
|
|
108648
|
-
return context.deleteValue(SUPPRESS_TRACING_KEY);
|
|
108647
|
+
function unsuppressTracing$1(context) {
|
|
108648
|
+
return context.deleteValue(SUPPRESS_TRACING_KEY$1);
|
|
108649
108649
|
}
|
|
108650
|
-
function isTracingSuppressed(context) {
|
|
108651
|
-
return context.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
108650
|
+
function isTracingSuppressed$1(context) {
|
|
108651
|
+
return context.getValue(SUPPRESS_TRACING_KEY$1) === true;
|
|
108652
108652
|
}
|
|
108653
108653
|
|
|
108654
108654
|
/*
|
|
@@ -108666,17 +108666,17 @@ function isTracingSuppressed(context) {
|
|
|
108666
108666
|
* See the License for the specific language governing permissions and
|
|
108667
108667
|
* limitations under the License.
|
|
108668
108668
|
*/
|
|
108669
|
-
const BAGGAGE_KEY_PAIR_SEPARATOR = '=';
|
|
108670
|
-
const BAGGAGE_PROPERTIES_SEPARATOR = ';';
|
|
108671
|
-
const BAGGAGE_ITEMS_SEPARATOR = ',';
|
|
108669
|
+
const BAGGAGE_KEY_PAIR_SEPARATOR$1 = '=';
|
|
108670
|
+
const BAGGAGE_PROPERTIES_SEPARATOR$1 = ';';
|
|
108671
|
+
const BAGGAGE_ITEMS_SEPARATOR$1 = ',';
|
|
108672
108672
|
// Name of the http header used to propagate the baggage
|
|
108673
|
-
const BAGGAGE_HEADER = 'baggage';
|
|
108673
|
+
const BAGGAGE_HEADER$1 = 'baggage';
|
|
108674
108674
|
// Maximum number of name-value pairs allowed by w3c spec
|
|
108675
|
-
const BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;
|
|
108675
|
+
const BAGGAGE_MAX_NAME_VALUE_PAIRS$1 = 180;
|
|
108676
108676
|
// Maximum number of bytes per a single name-value pair allowed by w3c spec
|
|
108677
|
-
const BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;
|
|
108677
|
+
const BAGGAGE_MAX_PER_NAME_VALUE_PAIRS$1 = 4096;
|
|
108678
108678
|
// Maximum total length of all name-value pairs allowed by w3c spec
|
|
108679
|
-
const BAGGAGE_MAX_TOTAL_LENGTH = 8192;
|
|
108679
|
+
const BAGGAGE_MAX_TOTAL_LENGTH$1 = 8192;
|
|
108680
108680
|
|
|
108681
108681
|
/*
|
|
108682
108682
|
* Copyright The OpenTelemetry Authors
|
|
@@ -108693,38 +108693,38 @@ const BAGGAGE_MAX_TOTAL_LENGTH = 8192;
|
|
|
108693
108693
|
* See the License for the specific language governing permissions and
|
|
108694
108694
|
* limitations under the License.
|
|
108695
108695
|
*/
|
|
108696
|
-
function serializeKeyPairs(keyPairs) {
|
|
108696
|
+
function serializeKeyPairs$1(keyPairs) {
|
|
108697
108697
|
return keyPairs.reduce((hValue, current) => {
|
|
108698
|
-
const value = `${hValue}${hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;
|
|
108699
|
-
return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;
|
|
108698
|
+
const value = `${hValue}${hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR$1 : ''}${current}`;
|
|
108699
|
+
return value.length > BAGGAGE_MAX_TOTAL_LENGTH$1 ? hValue : value;
|
|
108700
108700
|
}, '');
|
|
108701
108701
|
}
|
|
108702
|
-
function getKeyPairs(baggage) {
|
|
108702
|
+
function getKeyPairs$1(baggage) {
|
|
108703
108703
|
return baggage.getAllEntries().map(([key, value]) => {
|
|
108704
108704
|
let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;
|
|
108705
108705
|
// include opaque metadata if provided
|
|
108706
108706
|
// NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation
|
|
108707
108707
|
if (value.metadata !== undefined) {
|
|
108708
|
-
entry += BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();
|
|
108708
|
+
entry += BAGGAGE_PROPERTIES_SEPARATOR$1 + value.metadata.toString();
|
|
108709
108709
|
}
|
|
108710
108710
|
return entry;
|
|
108711
108711
|
});
|
|
108712
108712
|
}
|
|
108713
|
-
function parsePairKeyValue(entry) {
|
|
108714
|
-
const valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);
|
|
108713
|
+
function parsePairKeyValue$1(entry) {
|
|
108714
|
+
const valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR$1);
|
|
108715
108715
|
if (valueProps.length <= 0)
|
|
108716
108716
|
return;
|
|
108717
108717
|
const keyPairPart = valueProps.shift();
|
|
108718
108718
|
if (!keyPairPart)
|
|
108719
108719
|
return;
|
|
108720
|
-
const separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);
|
|
108720
|
+
const separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR$1);
|
|
108721
108721
|
if (separatorIndex <= 0)
|
|
108722
108722
|
return;
|
|
108723
108723
|
const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());
|
|
108724
108724
|
const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());
|
|
108725
108725
|
let metadata;
|
|
108726
108726
|
if (valueProps.length > 0) {
|
|
108727
|
-
metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));
|
|
108727
|
+
metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR$1));
|
|
108728
108728
|
}
|
|
108729
108729
|
return { key, value, metadata };
|
|
108730
108730
|
}
|
|
@@ -108732,11 +108732,11 @@ function parsePairKeyValue(entry) {
|
|
|
108732
108732
|
* Parse a string serialized in the baggage HTTP Format (without metadata):
|
|
108733
108733
|
* https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md
|
|
108734
108734
|
*/
|
|
108735
|
-
function parseKeyPairsIntoRecord(value) {
|
|
108735
|
+
function parseKeyPairsIntoRecord$1(value) {
|
|
108736
108736
|
const result = {};
|
|
108737
108737
|
if (typeof value === 'string' && value.length > 0) {
|
|
108738
|
-
value.split(BAGGAGE_ITEMS_SEPARATOR).forEach(entry => {
|
|
108739
|
-
const keyPair = parsePairKeyValue(entry);
|
|
108738
|
+
value.split(BAGGAGE_ITEMS_SEPARATOR$1).forEach(entry => {
|
|
108739
|
+
const keyPair = parsePairKeyValue$1(entry);
|
|
108740
108740
|
if (keyPair !== undefined && keyPair.value.length > 0) {
|
|
108741
108741
|
result[keyPair.key] = keyPair.value;
|
|
108742
108742
|
}
|
|
@@ -108766,25 +108766,25 @@ function parseKeyPairsIntoRecord(value) {
|
|
|
108766
108766
|
* Based on the Baggage specification:
|
|
108767
108767
|
* https://w3c.github.io/baggage/
|
|
108768
108768
|
*/
|
|
108769
|
-
class W3CBaggagePropagator {
|
|
108769
|
+
let W3CBaggagePropagator$1 = class W3CBaggagePropagator {
|
|
108770
108770
|
inject(context, carrier, setter) {
|
|
108771
108771
|
const baggage = propagation.getBaggage(context);
|
|
108772
|
-
if (!baggage || isTracingSuppressed(context))
|
|
108772
|
+
if (!baggage || isTracingSuppressed$1(context))
|
|
108773
108773
|
return;
|
|
108774
|
-
const keyPairs = getKeyPairs(baggage)
|
|
108774
|
+
const keyPairs = getKeyPairs$1(baggage)
|
|
108775
108775
|
.filter((pair) => {
|
|
108776
|
-
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
|
|
108776
|
+
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS$1;
|
|
108777
108777
|
})
|
|
108778
|
-
.slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS);
|
|
108779
|
-
const headerValue = serializeKeyPairs(keyPairs);
|
|
108778
|
+
.slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS$1);
|
|
108779
|
+
const headerValue = serializeKeyPairs$1(keyPairs);
|
|
108780
108780
|
if (headerValue.length > 0) {
|
|
108781
|
-
setter.set(carrier, BAGGAGE_HEADER, headerValue);
|
|
108781
|
+
setter.set(carrier, BAGGAGE_HEADER$1, headerValue);
|
|
108782
108782
|
}
|
|
108783
108783
|
}
|
|
108784
108784
|
extract(context, carrier, getter) {
|
|
108785
|
-
const headerValue = getter.get(carrier, BAGGAGE_HEADER);
|
|
108785
|
+
const headerValue = getter.get(carrier, BAGGAGE_HEADER$1);
|
|
108786
108786
|
const baggageString = Array.isArray(headerValue)
|
|
108787
|
-
? headerValue.join(BAGGAGE_ITEMS_SEPARATOR)
|
|
108787
|
+
? headerValue.join(BAGGAGE_ITEMS_SEPARATOR$1)
|
|
108788
108788
|
: headerValue;
|
|
108789
108789
|
if (!baggageString)
|
|
108790
108790
|
return context;
|
|
@@ -108792,9 +108792,9 @@ class W3CBaggagePropagator {
|
|
|
108792
108792
|
if (baggageString.length === 0) {
|
|
108793
108793
|
return context;
|
|
108794
108794
|
}
|
|
108795
|
-
const pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR);
|
|
108795
|
+
const pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR$1);
|
|
108796
108796
|
pairs.forEach(entry => {
|
|
108797
|
-
const keyPair = parsePairKeyValue(entry);
|
|
108797
|
+
const keyPair = parsePairKeyValue$1(entry);
|
|
108798
108798
|
if (keyPair) {
|
|
108799
108799
|
const baggageEntry = { value: keyPair.value };
|
|
108800
108800
|
if (keyPair.metadata) {
|
|
@@ -108809,9 +108809,9 @@ class W3CBaggagePropagator {
|
|
|
108809
108809
|
return propagation.setBaggage(context, propagation.createBaggage(baggage));
|
|
108810
108810
|
}
|
|
108811
108811
|
fields() {
|
|
108812
|
-
return [BAGGAGE_HEADER];
|
|
108812
|
+
return [BAGGAGE_HEADER$1];
|
|
108813
108813
|
}
|
|
108814
|
-
}
|
|
108814
|
+
};
|
|
108815
108815
|
|
|
108816
108816
|
/*
|
|
108817
108817
|
* Copyright The OpenTelemetry Authors
|
|
@@ -108845,7 +108845,7 @@ class W3CBaggagePropagator {
|
|
|
108845
108845
|
* Heavily inspired by the OTel Java anchored clock
|
|
108846
108846
|
* https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/AnchoredClock.java
|
|
108847
108847
|
*/
|
|
108848
|
-
class AnchoredClock {
|
|
108848
|
+
let AnchoredClock$1 = class AnchoredClock {
|
|
108849
108849
|
_monotonicClock;
|
|
108850
108850
|
_epochMillis;
|
|
108851
108851
|
_performanceMillis;
|
|
@@ -108868,7 +108868,7 @@ class AnchoredClock {
|
|
|
108868
108868
|
const delta = this._monotonicClock.now() - this._performanceMillis;
|
|
108869
108869
|
return this._epochMillis + delta;
|
|
108870
108870
|
}
|
|
108871
|
-
}
|
|
108871
|
+
};
|
|
108872
108872
|
|
|
108873
108873
|
/*
|
|
108874
108874
|
* Copyright The OpenTelemetry Authors
|
|
@@ -108885,17 +108885,17 @@ class AnchoredClock {
|
|
|
108885
108885
|
* See the License for the specific language governing permissions and
|
|
108886
108886
|
* limitations under the License.
|
|
108887
108887
|
*/
|
|
108888
|
-
function sanitizeAttributes(attributes) {
|
|
108888
|
+
function sanitizeAttributes$1(attributes) {
|
|
108889
108889
|
const out = {};
|
|
108890
108890
|
if (typeof attributes !== 'object' || attributes == null) {
|
|
108891
108891
|
return out;
|
|
108892
108892
|
}
|
|
108893
108893
|
for (const [key, val] of Object.entries(attributes)) {
|
|
108894
|
-
if (!isAttributeKey(key)) {
|
|
108894
|
+
if (!isAttributeKey$1(key)) {
|
|
108895
108895
|
diag.warn(`Invalid attribute key: ${key}`);
|
|
108896
108896
|
continue;
|
|
108897
108897
|
}
|
|
108898
|
-
if (!isAttributeValue(val)) {
|
|
108898
|
+
if (!isAttributeValue$1(val)) {
|
|
108899
108899
|
diag.warn(`Invalid attribute value set for key: ${key}`);
|
|
108900
108900
|
continue;
|
|
108901
108901
|
}
|
|
@@ -108908,26 +108908,26 @@ function sanitizeAttributes(attributes) {
|
|
|
108908
108908
|
}
|
|
108909
108909
|
return out;
|
|
108910
108910
|
}
|
|
108911
|
-
function isAttributeKey(key) {
|
|
108911
|
+
function isAttributeKey$1(key) {
|
|
108912
108912
|
return typeof key === 'string' && key.length > 0;
|
|
108913
108913
|
}
|
|
108914
|
-
function isAttributeValue(val) {
|
|
108914
|
+
function isAttributeValue$1(val) {
|
|
108915
108915
|
if (val == null) {
|
|
108916
108916
|
return true;
|
|
108917
108917
|
}
|
|
108918
108918
|
if (Array.isArray(val)) {
|
|
108919
|
-
return isHomogeneousAttributeValueArray(val);
|
|
108919
|
+
return isHomogeneousAttributeValueArray$1(val);
|
|
108920
108920
|
}
|
|
108921
|
-
return isValidPrimitiveAttributeValue(val);
|
|
108921
|
+
return isValidPrimitiveAttributeValue$1(val);
|
|
108922
108922
|
}
|
|
108923
|
-
function isHomogeneousAttributeValueArray(arr) {
|
|
108923
|
+
function isHomogeneousAttributeValueArray$1(arr) {
|
|
108924
108924
|
let type;
|
|
108925
108925
|
for (const element of arr) {
|
|
108926
108926
|
// null/undefined elements are allowed
|
|
108927
108927
|
if (element == null)
|
|
108928
108928
|
continue;
|
|
108929
108929
|
if (!type) {
|
|
108930
|
-
if (isValidPrimitiveAttributeValue(element)) {
|
|
108930
|
+
if (isValidPrimitiveAttributeValue$1(element)) {
|
|
108931
108931
|
type = typeof element;
|
|
108932
108932
|
continue;
|
|
108933
108933
|
}
|
|
@@ -108941,7 +108941,7 @@ function isHomogeneousAttributeValueArray(arr) {
|
|
|
108941
108941
|
}
|
|
108942
108942
|
return true;
|
|
108943
108943
|
}
|
|
108944
|
-
function isValidPrimitiveAttributeValue(val) {
|
|
108944
|
+
function isValidPrimitiveAttributeValue$1(val) {
|
|
108945
108945
|
switch (typeof val) {
|
|
108946
108946
|
case 'number':
|
|
108947
108947
|
case 'boolean':
|
|
@@ -108970,21 +108970,21 @@ function isValidPrimitiveAttributeValue(val) {
|
|
|
108970
108970
|
* Returns a function that logs an error using the provided logger, or a
|
|
108971
108971
|
* console logger if one was not provided.
|
|
108972
108972
|
*/
|
|
108973
|
-
function loggingErrorHandler() {
|
|
108973
|
+
function loggingErrorHandler$1() {
|
|
108974
108974
|
return (ex) => {
|
|
108975
|
-
diag.error(stringifyException(ex));
|
|
108975
|
+
diag.error(stringifyException$1(ex));
|
|
108976
108976
|
};
|
|
108977
108977
|
}
|
|
108978
108978
|
/**
|
|
108979
108979
|
* Converts an exception into a string representation
|
|
108980
108980
|
* @param {Exception} ex
|
|
108981
108981
|
*/
|
|
108982
|
-
function stringifyException(ex) {
|
|
108982
|
+
function stringifyException$1(ex) {
|
|
108983
108983
|
if (typeof ex === 'string') {
|
|
108984
108984
|
return ex;
|
|
108985
108985
|
}
|
|
108986
108986
|
else {
|
|
108987
|
-
return JSON.stringify(flattenException(ex));
|
|
108987
|
+
return JSON.stringify(flattenException$1(ex));
|
|
108988
108988
|
}
|
|
108989
108989
|
}
|
|
108990
108990
|
/**
|
|
@@ -108992,7 +108992,7 @@ function stringifyException(ex) {
|
|
|
108992
108992
|
* and coercing values to strings. Duplicate properties will not be overwritten;
|
|
108993
108993
|
* the first insert wins.
|
|
108994
108994
|
*/
|
|
108995
|
-
function flattenException(ex) {
|
|
108995
|
+
function flattenException$1(ex) {
|
|
108996
108996
|
const result = {};
|
|
108997
108997
|
let current = ex;
|
|
108998
108998
|
while (current !== null) {
|
|
@@ -109009,13 +109009,13 @@ function flattenException(ex) {
|
|
|
109009
109009
|
return result;
|
|
109010
109010
|
}
|
|
109011
109011
|
|
|
109012
|
-
let delegateHandler = loggingErrorHandler();
|
|
109013
|
-
function setGlobalErrorHandler(handler) {
|
|
109014
|
-
delegateHandler = handler;
|
|
109012
|
+
let delegateHandler$1 = loggingErrorHandler$1();
|
|
109013
|
+
function setGlobalErrorHandler$1(handler) {
|
|
109014
|
+
delegateHandler$1 = handler;
|
|
109015
109015
|
}
|
|
109016
|
-
function globalErrorHandler(ex) {
|
|
109016
|
+
function globalErrorHandler$1(ex) {
|
|
109017
109017
|
try {
|
|
109018
|
-
delegateHandler(ex);
|
|
109018
|
+
delegateHandler$1(ex);
|
|
109019
109019
|
} catch {
|
|
109020
109020
|
}
|
|
109021
109021
|
}
|
|
@@ -109035,20 +109035,20 @@ function globalErrorHandler(ex) {
|
|
|
109035
109035
|
* See the License for the specific language governing permissions and
|
|
109036
109036
|
* limitations under the License.
|
|
109037
109037
|
*/
|
|
109038
|
-
function getStringFromEnv(_) {
|
|
109038
|
+
function getStringFromEnv$1(_) {
|
|
109039
109039
|
return undefined;
|
|
109040
109040
|
}
|
|
109041
|
-
function getBooleanFromEnv(_) {
|
|
109041
|
+
function getBooleanFromEnv$1(_) {
|
|
109042
109042
|
return undefined;
|
|
109043
109043
|
}
|
|
109044
|
-
function getNumberFromEnv(_) {
|
|
109044
|
+
function getNumberFromEnv$1(_) {
|
|
109045
109045
|
return undefined;
|
|
109046
109046
|
}
|
|
109047
|
-
function getStringListFromEnv(_) {
|
|
109047
|
+
function getStringListFromEnv$1(_) {
|
|
109048
109048
|
return undefined;
|
|
109049
109049
|
}
|
|
109050
109050
|
|
|
109051
|
-
const _globalThis = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof globalThis === "object" ? globalThis : {};
|
|
109051
|
+
const _globalThis$1 = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof globalThis === "object" ? globalThis : {};
|
|
109052
109052
|
|
|
109053
109053
|
/*
|
|
109054
109054
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109065,7 +109065,7 @@ const _globalThis = typeof globalThis === "object" ? globalThis : typeof self ==
|
|
|
109065
109065
|
* See the License for the specific language governing permissions and
|
|
109066
109066
|
* limitations under the License.
|
|
109067
109067
|
*/
|
|
109068
|
-
const otperformance = performance;
|
|
109068
|
+
const otperformance$1 = performance;
|
|
109069
109069
|
|
|
109070
109070
|
/*
|
|
109071
109071
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109083,7 +109083,7 @@ const otperformance = performance;
|
|
|
109083
109083
|
* limitations under the License.
|
|
109084
109084
|
*/
|
|
109085
109085
|
// this is autogenerated file, see scripts/version-update.js
|
|
109086
|
-
const VERSION$
|
|
109086
|
+
const VERSION$3 = '2.0.1';
|
|
109087
109087
|
|
|
109088
109088
|
/*
|
|
109089
109089
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109112,7 +109112,7 @@ const VERSION$1 = '2.0.1';
|
|
|
109112
109112
|
*
|
|
109113
109113
|
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
109114
109114
|
*/
|
|
109115
|
-
const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name';
|
|
109115
|
+
const ATTR_PROCESS_RUNTIME_NAME$1 = 'process.runtime.name';
|
|
109116
109116
|
|
|
109117
109117
|
/*
|
|
109118
109118
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109130,11 +109130,11 @@ const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name';
|
|
|
109130
109130
|
* limitations under the License.
|
|
109131
109131
|
*/
|
|
109132
109132
|
/** Constants describing the SDK in use */
|
|
109133
|
-
const SDK_INFO = {
|
|
109133
|
+
const SDK_INFO$1 = {
|
|
109134
109134
|
[ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',
|
|
109135
|
-
[ATTR_PROCESS_RUNTIME_NAME]: 'browser',
|
|
109135
|
+
[ATTR_PROCESS_RUNTIME_NAME$1]: 'browser',
|
|
109136
109136
|
[ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS,
|
|
109137
|
-
[ATTR_TELEMETRY_SDK_VERSION]: VERSION$
|
|
109137
|
+
[ATTR_TELEMETRY_SDK_VERSION]: VERSION$3,
|
|
109138
109138
|
};
|
|
109139
109139
|
|
|
109140
109140
|
/*
|
|
@@ -109152,7 +109152,7 @@ const SDK_INFO = {
|
|
|
109152
109152
|
* See the License for the specific language governing permissions and
|
|
109153
109153
|
* limitations under the License.
|
|
109154
109154
|
*/
|
|
109155
|
-
function unrefTimer(_timer) { }
|
|
109155
|
+
function unrefTimer$1(_timer) { }
|
|
109156
109156
|
|
|
109157
109157
|
/*
|
|
109158
109158
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109169,26 +109169,26 @@ function unrefTimer(_timer) { }
|
|
|
109169
109169
|
* See the License for the specific language governing permissions and
|
|
109170
109170
|
* limitations under the License.
|
|
109171
109171
|
*/
|
|
109172
|
-
const NANOSECOND_DIGITS = 9;
|
|
109173
|
-
const NANOSECOND_DIGITS_IN_MILLIS = 6;
|
|
109174
|
-
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);
|
|
109175
|
-
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
109172
|
+
const NANOSECOND_DIGITS$1 = 9;
|
|
109173
|
+
const NANOSECOND_DIGITS_IN_MILLIS$1 = 6;
|
|
109174
|
+
const MILLISECONDS_TO_NANOSECONDS$1 = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS$1);
|
|
109175
|
+
const SECOND_TO_NANOSECONDS$1 = Math.pow(10, NANOSECOND_DIGITS$1);
|
|
109176
109176
|
/**
|
|
109177
109177
|
* Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).
|
|
109178
109178
|
* @param epochMillis
|
|
109179
109179
|
*/
|
|
109180
|
-
function millisToHrTime(epochMillis) {
|
|
109180
|
+
function millisToHrTime$1(epochMillis) {
|
|
109181
109181
|
const epochSeconds = epochMillis / 1000;
|
|
109182
109182
|
// Decimals only.
|
|
109183
109183
|
const seconds = Math.trunc(epochSeconds);
|
|
109184
109184
|
// Round sub-nanosecond accuracy to nanosecond.
|
|
109185
|
-
const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);
|
|
109185
|
+
const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS$1);
|
|
109186
109186
|
return [seconds, nanos];
|
|
109187
109187
|
}
|
|
109188
|
-
function getTimeOrigin() {
|
|
109189
|
-
let timeOrigin = otperformance.timeOrigin;
|
|
109188
|
+
function getTimeOrigin$1() {
|
|
109189
|
+
let timeOrigin = otperformance$1.timeOrigin;
|
|
109190
109190
|
if (typeof timeOrigin !== 'number') {
|
|
109191
|
-
const perf = otperformance;
|
|
109191
|
+
const perf = otperformance$1;
|
|
109192
109192
|
timeOrigin = perf.timing && perf.timing.fetchStart;
|
|
109193
109193
|
}
|
|
109194
109194
|
return timeOrigin;
|
|
@@ -109197,33 +109197,33 @@ function getTimeOrigin() {
|
|
|
109197
109197
|
* Returns an hrtime calculated via performance component.
|
|
109198
109198
|
* @param performanceNow
|
|
109199
109199
|
*/
|
|
109200
|
-
function hrTime(performanceNow) {
|
|
109201
|
-
const timeOrigin = millisToHrTime(getTimeOrigin());
|
|
109202
|
-
const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : otperformance.now());
|
|
109203
|
-
return addHrTimes(timeOrigin, now);
|
|
109200
|
+
function hrTime$1(performanceNow) {
|
|
109201
|
+
const timeOrigin = millisToHrTime$1(getTimeOrigin$1());
|
|
109202
|
+
const now = millisToHrTime$1(typeof performanceNow === 'number' ? performanceNow : otperformance$1.now());
|
|
109203
|
+
return addHrTimes$1(timeOrigin, now);
|
|
109204
109204
|
}
|
|
109205
109205
|
/**
|
|
109206
109206
|
*
|
|
109207
109207
|
* Converts a TimeInput to an HrTime, defaults to _hrtime().
|
|
109208
109208
|
* @param time
|
|
109209
109209
|
*/
|
|
109210
|
-
function timeInputToHrTime(time) {
|
|
109210
|
+
function timeInputToHrTime$1(time) {
|
|
109211
109211
|
// process.hrtime
|
|
109212
|
-
if (isTimeInputHrTime(time)) {
|
|
109212
|
+
if (isTimeInputHrTime$1(time)) {
|
|
109213
109213
|
return time;
|
|
109214
109214
|
}
|
|
109215
109215
|
else if (typeof time === 'number') {
|
|
109216
109216
|
// Must be a performance.now() if it's smaller than process start time.
|
|
109217
|
-
if (time < getTimeOrigin()) {
|
|
109218
|
-
return hrTime(time);
|
|
109217
|
+
if (time < getTimeOrigin$1()) {
|
|
109218
|
+
return hrTime$1(time);
|
|
109219
109219
|
}
|
|
109220
109220
|
else {
|
|
109221
109221
|
// epoch milliseconds or performance.timeOrigin
|
|
109222
|
-
return millisToHrTime(time);
|
|
109222
|
+
return millisToHrTime$1(time);
|
|
109223
109223
|
}
|
|
109224
109224
|
}
|
|
109225
109225
|
else if (time instanceof Date) {
|
|
109226
|
-
return millisToHrTime(time.getTime());
|
|
109226
|
+
return millisToHrTime$1(time.getTime());
|
|
109227
109227
|
}
|
|
109228
109228
|
else {
|
|
109229
109229
|
throw TypeError('Invalid input type');
|
|
@@ -109234,14 +109234,14 @@ function timeInputToHrTime(time) {
|
|
|
109234
109234
|
* @param startTime
|
|
109235
109235
|
* @param endTime
|
|
109236
109236
|
*/
|
|
109237
|
-
function hrTimeDuration(startTime, endTime) {
|
|
109237
|
+
function hrTimeDuration$1(startTime, endTime) {
|
|
109238
109238
|
let seconds = endTime[0] - startTime[0];
|
|
109239
109239
|
let nanos = endTime[1] - startTime[1];
|
|
109240
109240
|
// overflow
|
|
109241
109241
|
if (nanos < 0) {
|
|
109242
109242
|
seconds -= 1;
|
|
109243
109243
|
// negate
|
|
109244
|
-
nanos += SECOND_TO_NANOSECONDS;
|
|
109244
|
+
nanos += SECOND_TO_NANOSECONDS$1;
|
|
109245
109245
|
}
|
|
109246
109246
|
return [seconds, nanos];
|
|
109247
109247
|
}
|
|
@@ -109249,8 +109249,8 @@ function hrTimeDuration(startTime, endTime) {
|
|
|
109249
109249
|
* Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z"
|
|
109250
109250
|
* @param time
|
|
109251
109251
|
*/
|
|
109252
|
-
function hrTimeToTimeStamp(time) {
|
|
109253
|
-
const precision = NANOSECOND_DIGITS;
|
|
109252
|
+
function hrTimeToTimeStamp$1(time) {
|
|
109253
|
+
const precision = NANOSECOND_DIGITS$1;
|
|
109254
109254
|
const tmp = `${'0'.repeat(precision)}${time[1]}Z`;
|
|
109255
109255
|
const nanoString = tmp.substring(tmp.length - precision - 1);
|
|
109256
109256
|
const date = new Date(time[0] * 1000).toISOString();
|
|
@@ -109260,28 +109260,28 @@ function hrTimeToTimeStamp(time) {
|
|
|
109260
109260
|
* Convert hrTime to nanoseconds.
|
|
109261
109261
|
* @param time
|
|
109262
109262
|
*/
|
|
109263
|
-
function hrTimeToNanoseconds(time) {
|
|
109264
|
-
return time[0] * SECOND_TO_NANOSECONDS + time[1];
|
|
109263
|
+
function hrTimeToNanoseconds$1(time) {
|
|
109264
|
+
return time[0] * SECOND_TO_NANOSECONDS$1 + time[1];
|
|
109265
109265
|
}
|
|
109266
109266
|
/**
|
|
109267
109267
|
* Convert hrTime to milliseconds.
|
|
109268
109268
|
* @param time
|
|
109269
109269
|
*/
|
|
109270
|
-
function hrTimeToMilliseconds(time) {
|
|
109270
|
+
function hrTimeToMilliseconds$1(time) {
|
|
109271
109271
|
return time[0] * 1e3 + time[1] / 1e6;
|
|
109272
109272
|
}
|
|
109273
109273
|
/**
|
|
109274
109274
|
* Convert hrTime to microseconds.
|
|
109275
109275
|
* @param time
|
|
109276
109276
|
*/
|
|
109277
|
-
function hrTimeToMicroseconds(time) {
|
|
109277
|
+
function hrTimeToMicroseconds$1(time) {
|
|
109278
109278
|
return time[0] * 1e6 + time[1] / 1e3;
|
|
109279
109279
|
}
|
|
109280
109280
|
/**
|
|
109281
109281
|
* check if time is HrTime
|
|
109282
109282
|
* @param value
|
|
109283
109283
|
*/
|
|
109284
|
-
function isTimeInputHrTime(value) {
|
|
109284
|
+
function isTimeInputHrTime$1(value) {
|
|
109285
109285
|
return (Array.isArray(value) &&
|
|
109286
109286
|
value.length === 2 &&
|
|
109287
109287
|
typeof value[0] === 'number' &&
|
|
@@ -109291,19 +109291,19 @@ function isTimeInputHrTime(value) {
|
|
|
109291
109291
|
* check if input value is a correct types.TimeInput
|
|
109292
109292
|
* @param value
|
|
109293
109293
|
*/
|
|
109294
|
-
function isTimeInput(value) {
|
|
109295
|
-
return (isTimeInputHrTime(value) ||
|
|
109294
|
+
function isTimeInput$1(value) {
|
|
109295
|
+
return (isTimeInputHrTime$1(value) ||
|
|
109296
109296
|
typeof value === 'number' ||
|
|
109297
109297
|
value instanceof Date);
|
|
109298
109298
|
}
|
|
109299
109299
|
/**
|
|
109300
109300
|
* Given 2 HrTime formatted times, return their sum as an HrTime.
|
|
109301
109301
|
*/
|
|
109302
|
-
function addHrTimes(time1, time2) {
|
|
109302
|
+
function addHrTimes$1(time1, time2) {
|
|
109303
109303
|
const out = [time1[0] + time2[0], time1[1] + time2[1]];
|
|
109304
109304
|
// Nanoseconds
|
|
109305
|
-
if (out[1] >= SECOND_TO_NANOSECONDS) {
|
|
109306
|
-
out[1] -= SECOND_TO_NANOSECONDS;
|
|
109305
|
+
if (out[1] >= SECOND_TO_NANOSECONDS$1) {
|
|
109306
|
+
out[1] -= SECOND_TO_NANOSECONDS$1;
|
|
109307
109307
|
out[0] += 1;
|
|
109308
109308
|
}
|
|
109309
109309
|
return out;
|
|
@@ -109324,11 +109324,11 @@ function addHrTimes(time1, time2) {
|
|
|
109324
109324
|
* See the License for the specific language governing permissions and
|
|
109325
109325
|
* limitations under the License.
|
|
109326
109326
|
*/
|
|
109327
|
-
var ExportResultCode;
|
|
109327
|
+
var ExportResultCode$1;
|
|
109328
109328
|
(function (ExportResultCode) {
|
|
109329
109329
|
ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS";
|
|
109330
109330
|
ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED";
|
|
109331
|
-
})(ExportResultCode || (ExportResultCode = {}));
|
|
109331
|
+
})(ExportResultCode$1 || (ExportResultCode$1 = {}));
|
|
109332
109332
|
|
|
109333
109333
|
/*
|
|
109334
109334
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109346,7 +109346,7 @@ var ExportResultCode;
|
|
|
109346
109346
|
* limitations under the License.
|
|
109347
109347
|
*/
|
|
109348
109348
|
/** Combines multiple propagators into a single propagator. */
|
|
109349
|
-
class CompositePropagator {
|
|
109349
|
+
let CompositePropagator$1 = class CompositePropagator {
|
|
109350
109350
|
_propagators;
|
|
109351
109351
|
_fields;
|
|
109352
109352
|
/**
|
|
@@ -109404,7 +109404,7 @@ class CompositePropagator {
|
|
|
109404
109404
|
// return a new array so our fields cannot be modified
|
|
109405
109405
|
return this._fields.slice();
|
|
109406
109406
|
}
|
|
109407
|
-
}
|
|
109407
|
+
};
|
|
109408
109408
|
|
|
109409
109409
|
/*
|
|
109410
109410
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109421,12 +109421,12 @@ class CompositePropagator {
|
|
|
109421
109421
|
* See the License for the specific language governing permissions and
|
|
109422
109422
|
* limitations under the License.
|
|
109423
109423
|
*/
|
|
109424
|
-
const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
|
|
109425
|
-
const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
109426
|
-
const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
109427
|
-
const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
109428
|
-
const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
109429
|
-
const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
109424
|
+
const VALID_KEY_CHAR_RANGE$1 = '[_0-9a-z-*/]';
|
|
109425
|
+
const VALID_KEY$1 = `[a-z]${VALID_KEY_CHAR_RANGE$1}{0,255}`;
|
|
109426
|
+
const VALID_VENDOR_KEY$1 = `[a-z0-9]${VALID_KEY_CHAR_RANGE$1}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE$1}{0,13}`;
|
|
109427
|
+
const VALID_KEY_REGEX$1 = new RegExp(`^(?:${VALID_KEY$1}|${VALID_VENDOR_KEY$1})$`);
|
|
109428
|
+
const VALID_VALUE_BASE_REGEX$1 = /^[ -~]{0,255}[!-~]$/;
|
|
109429
|
+
const INVALID_VALUE_COMMA_EQUAL_REGEX$1 = /,|=/;
|
|
109430
109430
|
/**
|
|
109431
109431
|
* Key is opaque string up to 256 characters printable. It MUST begin with a
|
|
109432
109432
|
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
|
|
@@ -109435,16 +109435,16 @@ const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
|
109435
109435
|
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
|
|
109436
109436
|
* see https://www.w3.org/TR/trace-context/#key
|
|
109437
109437
|
*/
|
|
109438
|
-
function validateKey(key) {
|
|
109439
|
-
return VALID_KEY_REGEX.test(key);
|
|
109438
|
+
function validateKey$1(key) {
|
|
109439
|
+
return VALID_KEY_REGEX$1.test(key);
|
|
109440
109440
|
}
|
|
109441
109441
|
/**
|
|
109442
109442
|
* Value is opaque string up to 256 characters printable ASCII RFC0020
|
|
109443
109443
|
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
|
|
109444
109444
|
*/
|
|
109445
|
-
function validateValue(value) {
|
|
109446
|
-
return (VALID_VALUE_BASE_REGEX.test(value) &&
|
|
109447
|
-
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
|
|
109445
|
+
function validateValue$1(value) {
|
|
109446
|
+
return (VALID_VALUE_BASE_REGEX$1.test(value) &&
|
|
109447
|
+
!INVALID_VALUE_COMMA_EQUAL_REGEX$1.test(value));
|
|
109448
109448
|
}
|
|
109449
109449
|
|
|
109450
109450
|
/*
|
|
@@ -109462,10 +109462,10 @@ function validateValue(value) {
|
|
|
109462
109462
|
* See the License for the specific language governing permissions and
|
|
109463
109463
|
* limitations under the License.
|
|
109464
109464
|
*/
|
|
109465
|
-
const MAX_TRACE_STATE_ITEMS = 32;
|
|
109466
|
-
const MAX_TRACE_STATE_LEN = 512;
|
|
109467
|
-
const LIST_MEMBERS_SEPARATOR = ',';
|
|
109468
|
-
const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
|
|
109465
|
+
const MAX_TRACE_STATE_ITEMS$1 = 32;
|
|
109466
|
+
const MAX_TRACE_STATE_LEN$1 = 512;
|
|
109467
|
+
const LIST_MEMBERS_SEPARATOR$1 = ',';
|
|
109468
|
+
const LIST_MEMBER_KEY_VALUE_SPLITTER$1 = '=';
|
|
109469
109469
|
/**
|
|
109470
109470
|
* TraceState must be a class and not a simple object type because of the spec
|
|
109471
109471
|
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
|
|
@@ -109475,7 +109475,7 @@ const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
|
|
|
109475
109475
|
* - The value of any key can be updated. Modified keys MUST be moved to the
|
|
109476
109476
|
* beginning of the list.
|
|
109477
109477
|
*/
|
|
109478
|
-
class TraceState {
|
|
109478
|
+
let TraceState$1 = class TraceState {
|
|
109479
109479
|
_internalState = new Map();
|
|
109480
109480
|
constructor(rawTraceState) {
|
|
109481
109481
|
if (rawTraceState)
|
|
@@ -109502,34 +109502,34 @@ class TraceState {
|
|
|
109502
109502
|
serialize() {
|
|
109503
109503
|
return this._keys()
|
|
109504
109504
|
.reduce((agg, key) => {
|
|
109505
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
109505
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER$1 + this.get(key));
|
|
109506
109506
|
return agg;
|
|
109507
109507
|
}, [])
|
|
109508
|
-
.join(LIST_MEMBERS_SEPARATOR);
|
|
109508
|
+
.join(LIST_MEMBERS_SEPARATOR$1);
|
|
109509
109509
|
}
|
|
109510
109510
|
_parse(rawTraceState) {
|
|
109511
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
109511
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN$1)
|
|
109512
109512
|
return;
|
|
109513
109513
|
this._internalState = rawTraceState
|
|
109514
|
-
.split(LIST_MEMBERS_SEPARATOR)
|
|
109514
|
+
.split(LIST_MEMBERS_SEPARATOR$1)
|
|
109515
109515
|
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
|
|
109516
109516
|
.reduce((agg, part) => {
|
|
109517
109517
|
const listMember = part.trim(); // Optional Whitespace (OWS) handling
|
|
109518
|
-
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
109518
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER$1);
|
|
109519
109519
|
if (i !== -1) {
|
|
109520
109520
|
const key = listMember.slice(0, i);
|
|
109521
109521
|
const value = listMember.slice(i + 1, part.length);
|
|
109522
|
-
if (validateKey(key) && validateValue(value)) {
|
|
109522
|
+
if (validateKey$1(key) && validateValue$1(value)) {
|
|
109523
109523
|
agg.set(key, value);
|
|
109524
109524
|
}
|
|
109525
109525
|
}
|
|
109526
109526
|
return agg;
|
|
109527
109527
|
}, new Map());
|
|
109528
109528
|
// Because of the reverse() requirement, trunc must be done after map is created
|
|
109529
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
109529
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS$1) {
|
|
109530
109530
|
this._internalState = new Map(Array.from(this._internalState.entries())
|
|
109531
109531
|
.reverse() // Use reverse same as original tracestate parse chain
|
|
109532
|
-
.slice(0, MAX_TRACE_STATE_ITEMS));
|
|
109532
|
+
.slice(0, MAX_TRACE_STATE_ITEMS$1));
|
|
109533
109533
|
}
|
|
109534
109534
|
}
|
|
109535
109535
|
_keys() {
|
|
@@ -109540,7 +109540,7 @@ class TraceState {
|
|
|
109540
109540
|
traceState._internalState = new Map(this._internalState);
|
|
109541
109541
|
return traceState;
|
|
109542
109542
|
}
|
|
109543
|
-
}
|
|
109543
|
+
};
|
|
109544
109544
|
|
|
109545
109545
|
/*
|
|
109546
109546
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109557,14 +109557,14 @@ class TraceState {
|
|
|
109557
109557
|
* See the License for the specific language governing permissions and
|
|
109558
109558
|
* limitations under the License.
|
|
109559
109559
|
*/
|
|
109560
|
-
const TRACE_PARENT_HEADER = 'traceparent';
|
|
109561
|
-
const TRACE_STATE_HEADER = 'tracestate';
|
|
109562
|
-
const VERSION = '00';
|
|
109563
|
-
const VERSION_PART = '(?!ff)[\\da-f]{2}';
|
|
109564
|
-
const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}';
|
|
109565
|
-
const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}';
|
|
109566
|
-
const FLAGS_PART = '[\\da-f]{2}';
|
|
109567
|
-
const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`);
|
|
109560
|
+
const TRACE_PARENT_HEADER$1 = 'traceparent';
|
|
109561
|
+
const TRACE_STATE_HEADER$1 = 'tracestate';
|
|
109562
|
+
const VERSION$2 = '00';
|
|
109563
|
+
const VERSION_PART$1 = '(?!ff)[\\da-f]{2}';
|
|
109564
|
+
const TRACE_ID_PART$1 = '(?![0]{32})[\\da-f]{32}';
|
|
109565
|
+
const PARENT_ID_PART$1 = '(?![0]{16})[\\da-f]{16}';
|
|
109566
|
+
const FLAGS_PART$1 = '[\\da-f]{2}';
|
|
109567
|
+
const TRACE_PARENT_REGEX$1 = new RegExp(`^\\s?(${VERSION_PART$1})-(${TRACE_ID_PART$1})-(${PARENT_ID_PART$1})-(${FLAGS_PART$1})(-.*)?\\s?$`);
|
|
109568
109568
|
/**
|
|
109569
109569
|
* Parses information from the [traceparent] span tag and converts it into {@link SpanContext}
|
|
109570
109570
|
* @param traceParent - A meta property that comes from server.
|
|
@@ -109575,8 +109575,8 @@ const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})
|
|
|
109575
109575
|
* for example: '{version}-{traceId}-{spanId}-{sampleDecision}'
|
|
109576
109576
|
* For more information see {@link https://www.w3.org/TR/trace-context/}
|
|
109577
109577
|
*/
|
|
109578
|
-
function parseTraceParent(traceParent) {
|
|
109579
|
-
const match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
109578
|
+
function parseTraceParent$1(traceParent) {
|
|
109579
|
+
const match = TRACE_PARENT_REGEX$1.exec(traceParent);
|
|
109580
109580
|
if (!match)
|
|
109581
109581
|
return null;
|
|
109582
109582
|
// According to the specification the implementation should be compatible
|
|
@@ -109596,21 +109596,21 @@ function parseTraceParent(traceParent) {
|
|
|
109596
109596
|
* Based on the Trace Context specification:
|
|
109597
109597
|
* https://www.w3.org/TR/trace-context/
|
|
109598
109598
|
*/
|
|
109599
|
-
class W3CTraceContextPropagator {
|
|
109599
|
+
let W3CTraceContextPropagator$1 = class W3CTraceContextPropagator {
|
|
109600
109600
|
inject(context, carrier, setter) {
|
|
109601
109601
|
const spanContext = trace.getSpanContext(context);
|
|
109602
109602
|
if (!spanContext ||
|
|
109603
|
-
isTracingSuppressed(context) ||
|
|
109603
|
+
isTracingSuppressed$1(context) ||
|
|
109604
109604
|
!isSpanContextValid(spanContext))
|
|
109605
109605
|
return;
|
|
109606
|
-
const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || TraceFlags.NONE).toString(16)}`;
|
|
109607
|
-
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
109606
|
+
const traceParent = `${VERSION$2}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || TraceFlags.NONE).toString(16)}`;
|
|
109607
|
+
setter.set(carrier, TRACE_PARENT_HEADER$1, traceParent);
|
|
109608
109608
|
if (spanContext.traceState) {
|
|
109609
|
-
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
109609
|
+
setter.set(carrier, TRACE_STATE_HEADER$1, spanContext.traceState.serialize());
|
|
109610
109610
|
}
|
|
109611
109611
|
}
|
|
109612
109612
|
extract(context, carrier, getter) {
|
|
109613
|
-
const traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
109613
|
+
const traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER$1);
|
|
109614
109614
|
if (!traceParentHeader)
|
|
109615
109615
|
return context;
|
|
109616
109616
|
const traceParent = Array.isArray(traceParentHeader)
|
|
@@ -109618,25 +109618,25 @@ class W3CTraceContextPropagator {
|
|
|
109618
109618
|
: traceParentHeader;
|
|
109619
109619
|
if (typeof traceParent !== 'string')
|
|
109620
109620
|
return context;
|
|
109621
|
-
const spanContext = parseTraceParent(traceParent);
|
|
109621
|
+
const spanContext = parseTraceParent$1(traceParent);
|
|
109622
109622
|
if (!spanContext)
|
|
109623
109623
|
return context;
|
|
109624
109624
|
spanContext.isRemote = true;
|
|
109625
|
-
const traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
109625
|
+
const traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER$1);
|
|
109626
109626
|
if (traceStateHeader) {
|
|
109627
109627
|
// If more than one `tracestate` header is found, we merge them into a
|
|
109628
109628
|
// single header.
|
|
109629
109629
|
const state = Array.isArray(traceStateHeader)
|
|
109630
109630
|
? traceStateHeader.join(',')
|
|
109631
109631
|
: traceStateHeader;
|
|
109632
|
-
spanContext.traceState = new TraceState(typeof state === 'string' ? state : undefined);
|
|
109632
|
+
spanContext.traceState = new TraceState$1(typeof state === 'string' ? state : undefined);
|
|
109633
109633
|
}
|
|
109634
109634
|
return trace.setSpanContext(context, spanContext);
|
|
109635
109635
|
}
|
|
109636
109636
|
fields() {
|
|
109637
|
-
return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER];
|
|
109637
|
+
return [TRACE_PARENT_HEADER$1, TRACE_STATE_HEADER$1];
|
|
109638
109638
|
}
|
|
109639
|
-
}
|
|
109639
|
+
};
|
|
109640
109640
|
|
|
109641
109641
|
/*
|
|
109642
109642
|
* Copyright The OpenTelemetry Authors
|
|
@@ -109653,19 +109653,19 @@ class W3CTraceContextPropagator {
|
|
|
109653
109653
|
* See the License for the specific language governing permissions and
|
|
109654
109654
|
* limitations under the License.
|
|
109655
109655
|
*/
|
|
109656
|
-
const RPC_METADATA_KEY = createContextKey('OpenTelemetry SDK Context Key RPC_METADATA');
|
|
109657
|
-
var RPCType;
|
|
109656
|
+
const RPC_METADATA_KEY$1 = createContextKey('OpenTelemetry SDK Context Key RPC_METADATA');
|
|
109657
|
+
var RPCType$1;
|
|
109658
109658
|
(function (RPCType) {
|
|
109659
109659
|
RPCType["HTTP"] = "http";
|
|
109660
|
-
})(RPCType || (RPCType = {}));
|
|
109661
|
-
function setRPCMetadata(context, meta) {
|
|
109662
|
-
return context.setValue(RPC_METADATA_KEY, meta);
|
|
109660
|
+
})(RPCType$1 || (RPCType$1 = {}));
|
|
109661
|
+
function setRPCMetadata$1(context, meta) {
|
|
109662
|
+
return context.setValue(RPC_METADATA_KEY$1, meta);
|
|
109663
109663
|
}
|
|
109664
|
-
function deleteRPCMetadata(context) {
|
|
109665
|
-
return context.deleteValue(RPC_METADATA_KEY);
|
|
109664
|
+
function deleteRPCMetadata$1(context) {
|
|
109665
|
+
return context.deleteValue(RPC_METADATA_KEY$1);
|
|
109666
109666
|
}
|
|
109667
|
-
function getRPCMetadata(context) {
|
|
109668
|
-
return context.getValue(RPC_METADATA_KEY);
|
|
109667
|
+
function getRPCMetadata$1(context) {
|
|
109668
|
+
return context.getValue(RPC_METADATA_KEY$1);
|
|
109669
109669
|
}
|
|
109670
109670
|
|
|
109671
109671
|
/*
|
|
@@ -109688,17 +109688,17 @@ function getRPCMetadata(context) {
|
|
|
109688
109688
|
* based on lodash in order to support esm builds without esModuleInterop.
|
|
109689
109689
|
* lodash is using MIT License.
|
|
109690
109690
|
**/
|
|
109691
|
-
const objectTag = '[object Object]';
|
|
109692
|
-
const nullTag$
|
|
109693
|
-
const undefinedTag$
|
|
109694
|
-
const funcProto = Function.prototype;
|
|
109695
|
-
const funcToString = funcProto.toString;
|
|
109696
|
-
const objectCtorString = funcToString.call(Object);
|
|
109697
|
-
const getPrototypeOf = Object.getPrototypeOf;
|
|
109698
|
-
const objectProto$
|
|
109699
|
-
const hasOwnProperty$
|
|
109700
|
-
const symToStringTag$
|
|
109701
|
-
const nativeObjectToString$
|
|
109691
|
+
const objectTag$1 = '[object Object]';
|
|
109692
|
+
const nullTag$2 = '[object Null]';
|
|
109693
|
+
const undefinedTag$2 = '[object Undefined]';
|
|
109694
|
+
const funcProto$1 = Function.prototype;
|
|
109695
|
+
const funcToString$1 = funcProto$1.toString;
|
|
109696
|
+
const objectCtorString$1 = funcToString$1.call(Object);
|
|
109697
|
+
const getPrototypeOf$1 = Object.getPrototypeOf;
|
|
109698
|
+
const objectProto$3 = Object.prototype;
|
|
109699
|
+
const hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
109700
|
+
const symToStringTag$3 = Symbol ? Symbol.toStringTag : undefined;
|
|
109701
|
+
const nativeObjectToString$3 = objectProto$3.toString;
|
|
109702
109702
|
/**
|
|
109703
109703
|
* Checks if `value` is a plain object, that is, an object created by the
|
|
109704
109704
|
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
@@ -109727,18 +109727,18 @@ const nativeObjectToString$2 = objectProto$2.toString;
|
|
|
109727
109727
|
* _.isPlainObject(Object.create(null));
|
|
109728
109728
|
* // => true
|
|
109729
109729
|
*/
|
|
109730
|
-
function isPlainObject(value) {
|
|
109731
|
-
if (!isObjectLike$
|
|
109730
|
+
function isPlainObject$1(value) {
|
|
109731
|
+
if (!isObjectLike$2(value) || baseGetTag$2(value) !== objectTag$1) {
|
|
109732
109732
|
return false;
|
|
109733
109733
|
}
|
|
109734
|
-
const proto = getPrototypeOf(value);
|
|
109734
|
+
const proto = getPrototypeOf$1(value);
|
|
109735
109735
|
if (proto === null) {
|
|
109736
109736
|
return true;
|
|
109737
109737
|
}
|
|
109738
|
-
const Ctor = hasOwnProperty$
|
|
109738
|
+
const Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
|
|
109739
109739
|
return (typeof Ctor == 'function' &&
|
|
109740
109740
|
Ctor instanceof Ctor &&
|
|
109741
|
-
funcToString.call(Ctor) === objectCtorString);
|
|
109741
|
+
funcToString$1.call(Ctor) === objectCtorString$1);
|
|
109742
109742
|
}
|
|
109743
109743
|
/**
|
|
109744
109744
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
@@ -109764,7 +109764,7 @@ function isPlainObject(value) {
|
|
|
109764
109764
|
* _.isObjectLike(null);
|
|
109765
109765
|
* // => false
|
|
109766
109766
|
*/
|
|
109767
|
-
function isObjectLike$
|
|
109767
|
+
function isObjectLike$2(value) {
|
|
109768
109768
|
return value != null && typeof value == 'object';
|
|
109769
109769
|
}
|
|
109770
109770
|
/**
|
|
@@ -109774,13 +109774,13 @@ function isObjectLike$1(value) {
|
|
|
109774
109774
|
* @param {*} value The value to query.
|
|
109775
109775
|
* @returns {string} Returns the `toStringTag`.
|
|
109776
109776
|
*/
|
|
109777
|
-
function baseGetTag$
|
|
109777
|
+
function baseGetTag$2(value) {
|
|
109778
109778
|
if (value == null) {
|
|
109779
|
-
return value === undefined ? undefinedTag$
|
|
109779
|
+
return value === undefined ? undefinedTag$2 : nullTag$2;
|
|
109780
109780
|
}
|
|
109781
|
-
return symToStringTag$
|
|
109782
|
-
? getRawTag$
|
|
109783
|
-
: objectToString$
|
|
109781
|
+
return symToStringTag$3 && symToStringTag$3 in Object(value)
|
|
109782
|
+
? getRawTag$2(value)
|
|
109783
|
+
: objectToString$2(value);
|
|
109784
109784
|
}
|
|
109785
109785
|
/**
|
|
109786
109786
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -109789,23 +109789,23 @@ function baseGetTag$1(value) {
|
|
|
109789
109789
|
* @param {*} value The value to query.
|
|
109790
109790
|
* @returns {string} Returns the raw `toStringTag`.
|
|
109791
109791
|
*/
|
|
109792
|
-
function getRawTag$
|
|
109793
|
-
const isOwn = hasOwnProperty$
|
|
109792
|
+
function getRawTag$2(value) {
|
|
109793
|
+
const isOwn = hasOwnProperty$2.call(value, symToStringTag$3), tag = value[symToStringTag$3];
|
|
109794
109794
|
let unmasked = false;
|
|
109795
109795
|
try {
|
|
109796
|
-
value[symToStringTag$
|
|
109796
|
+
value[symToStringTag$3] = undefined;
|
|
109797
109797
|
unmasked = true;
|
|
109798
109798
|
}
|
|
109799
109799
|
catch (e) {
|
|
109800
109800
|
// silence
|
|
109801
109801
|
}
|
|
109802
|
-
const result = nativeObjectToString$
|
|
109802
|
+
const result = nativeObjectToString$3.call(value);
|
|
109803
109803
|
if (unmasked) {
|
|
109804
109804
|
if (isOwn) {
|
|
109805
|
-
value[symToStringTag$
|
|
109805
|
+
value[symToStringTag$3] = tag;
|
|
109806
109806
|
}
|
|
109807
109807
|
else {
|
|
109808
|
-
delete value[symToStringTag$
|
|
109808
|
+
delete value[symToStringTag$3];
|
|
109809
109809
|
}
|
|
109810
109810
|
}
|
|
109811
109811
|
return result;
|
|
@@ -109817,8 +109817,8 @@ function getRawTag$1(value) {
|
|
|
109817
109817
|
* @param {*} value The value to convert.
|
|
109818
109818
|
* @returns {string} Returns the converted string.
|
|
109819
109819
|
*/
|
|
109820
|
-
function objectToString$
|
|
109821
|
-
return nativeObjectToString$
|
|
109820
|
+
function objectToString$2(value) {
|
|
109821
|
+
return nativeObjectToString$3.call(value);
|
|
109822
109822
|
}
|
|
109823
109823
|
|
|
109824
109824
|
/*
|
|
@@ -109837,21 +109837,21 @@ function objectToString$1(value) {
|
|
|
109837
109837
|
* limitations under the License.
|
|
109838
109838
|
*/
|
|
109839
109839
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
109840
|
-
const MAX_LEVEL = 20;
|
|
109840
|
+
const MAX_LEVEL$1 = 20;
|
|
109841
109841
|
/**
|
|
109842
109842
|
* Merges objects together
|
|
109843
109843
|
* @param args - objects / values to be merged
|
|
109844
109844
|
*/
|
|
109845
|
-
function merge(...args) {
|
|
109845
|
+
function merge$1(...args) {
|
|
109846
109846
|
let result = args.shift();
|
|
109847
109847
|
const objects = new WeakMap();
|
|
109848
109848
|
while (args.length > 0) {
|
|
109849
|
-
result = mergeTwoObjects(result, args.shift(), 0, objects);
|
|
109849
|
+
result = mergeTwoObjects$1(result, args.shift(), 0, objects);
|
|
109850
109850
|
}
|
|
109851
109851
|
return result;
|
|
109852
109852
|
}
|
|
109853
|
-
function takeValue(value) {
|
|
109854
|
-
if (isArray(value)) {
|
|
109853
|
+
function takeValue$1(value) {
|
|
109854
|
+
if (isArray$1(value)) {
|
|
109855
109855
|
return value.slice();
|
|
109856
109856
|
}
|
|
109857
109857
|
return value;
|
|
@@ -109864,33 +109864,33 @@ function takeValue(value) {
|
|
|
109864
109864
|
* @param objects - objects holder that has been already referenced - to prevent
|
|
109865
109865
|
* cyclic dependency
|
|
109866
109866
|
*/
|
|
109867
|
-
function mergeTwoObjects(one, two, level = 0, objects) {
|
|
109867
|
+
function mergeTwoObjects$1(one, two, level = 0, objects) {
|
|
109868
109868
|
let result;
|
|
109869
|
-
if (level > MAX_LEVEL) {
|
|
109869
|
+
if (level > MAX_LEVEL$1) {
|
|
109870
109870
|
return undefined;
|
|
109871
109871
|
}
|
|
109872
109872
|
level++;
|
|
109873
|
-
if (isPrimitive(one) || isPrimitive(two) || isFunction$
|
|
109874
|
-
result = takeValue(two);
|
|
109873
|
+
if (isPrimitive$1(one) || isPrimitive$1(two) || isFunction$4(two)) {
|
|
109874
|
+
result = takeValue$1(two);
|
|
109875
109875
|
}
|
|
109876
|
-
else if (isArray(one)) {
|
|
109876
|
+
else if (isArray$1(one)) {
|
|
109877
109877
|
result = one.slice();
|
|
109878
|
-
if (isArray(two)) {
|
|
109878
|
+
if (isArray$1(two)) {
|
|
109879
109879
|
for (let i = 0, j = two.length; i < j; i++) {
|
|
109880
|
-
result.push(takeValue(two[i]));
|
|
109880
|
+
result.push(takeValue$1(two[i]));
|
|
109881
109881
|
}
|
|
109882
109882
|
}
|
|
109883
|
-
else if (isObject$
|
|
109883
|
+
else if (isObject$5(two)) {
|
|
109884
109884
|
const keys = Object.keys(two);
|
|
109885
109885
|
for (let i = 0, j = keys.length; i < j; i++) {
|
|
109886
109886
|
const key = keys[i];
|
|
109887
|
-
result[key] = takeValue(two[key]);
|
|
109887
|
+
result[key] = takeValue$1(two[key]);
|
|
109888
109888
|
}
|
|
109889
109889
|
}
|
|
109890
109890
|
}
|
|
109891
|
-
else if (isObject$
|
|
109892
|
-
if (isObject$
|
|
109893
|
-
if (!shouldMerge(one, two)) {
|
|
109891
|
+
else if (isObject$5(one)) {
|
|
109892
|
+
if (isObject$5(two)) {
|
|
109893
|
+
if (!shouldMerge$1(one, two)) {
|
|
109894
109894
|
return two;
|
|
109895
109895
|
}
|
|
109896
109896
|
result = Object.assign({}, one);
|
|
@@ -109898,7 +109898,7 @@ function mergeTwoObjects(one, two, level = 0, objects) {
|
|
|
109898
109898
|
for (let i = 0, j = keys.length; i < j; i++) {
|
|
109899
109899
|
const key = keys[i];
|
|
109900
109900
|
const twoValue = two[key];
|
|
109901
|
-
if (isPrimitive(twoValue)) {
|
|
109901
|
+
if (isPrimitive$1(twoValue)) {
|
|
109902
109902
|
if (typeof twoValue === 'undefined') {
|
|
109903
109903
|
delete result[key];
|
|
109904
109904
|
}
|
|
@@ -109910,12 +109910,12 @@ function mergeTwoObjects(one, two, level = 0, objects) {
|
|
|
109910
109910
|
else {
|
|
109911
109911
|
const obj1 = result[key];
|
|
109912
109912
|
const obj2 = twoValue;
|
|
109913
|
-
if (wasObjectReferenced(one, key, objects) ||
|
|
109914
|
-
wasObjectReferenced(two, key, objects)) {
|
|
109913
|
+
if (wasObjectReferenced$1(one, key, objects) ||
|
|
109914
|
+
wasObjectReferenced$1(two, key, objects)) {
|
|
109915
109915
|
delete result[key];
|
|
109916
109916
|
}
|
|
109917
109917
|
else {
|
|
109918
|
-
if (isObject$
|
|
109918
|
+
if (isObject$5(obj1) && isObject$5(obj2)) {
|
|
109919
109919
|
const arr1 = objects.get(obj1) || [];
|
|
109920
109920
|
const arr2 = objects.get(obj2) || [];
|
|
109921
109921
|
arr1.push({ obj: one, key });
|
|
@@ -109923,7 +109923,7 @@ function mergeTwoObjects(one, two, level = 0, objects) {
|
|
|
109923
109923
|
objects.set(obj1, arr1);
|
|
109924
109924
|
objects.set(obj2, arr2);
|
|
109925
109925
|
}
|
|
109926
|
-
result[key] = mergeTwoObjects(result[key], twoValue, level, objects);
|
|
109926
|
+
result[key] = mergeTwoObjects$1(result[key], twoValue, level, objects);
|
|
109927
109927
|
}
|
|
109928
109928
|
}
|
|
109929
109929
|
}
|
|
@@ -109940,7 +109940,7 @@ function mergeTwoObjects(one, two, level = 0, objects) {
|
|
|
109940
109940
|
* @param key
|
|
109941
109941
|
* @param objects
|
|
109942
109942
|
*/
|
|
109943
|
-
function wasObjectReferenced(obj, key, objects) {
|
|
109943
|
+
function wasObjectReferenced$1(obj, key, objects) {
|
|
109944
109944
|
const arr = objects.get(obj[key]) || [];
|
|
109945
109945
|
for (let i = 0, j = arr.length; i < j; i++) {
|
|
109946
109946
|
const info = arr[i];
|
|
@@ -109950,19 +109950,19 @@ function wasObjectReferenced(obj, key, objects) {
|
|
|
109950
109950
|
}
|
|
109951
109951
|
return false;
|
|
109952
109952
|
}
|
|
109953
|
-
function isArray(value) {
|
|
109953
|
+
function isArray$1(value) {
|
|
109954
109954
|
return Array.isArray(value);
|
|
109955
109955
|
}
|
|
109956
|
-
function isFunction$
|
|
109956
|
+
function isFunction$4(value) {
|
|
109957
109957
|
return typeof value === 'function';
|
|
109958
109958
|
}
|
|
109959
|
-
function isObject$
|
|
109960
|
-
return (!isPrimitive(value) &&
|
|
109961
|
-
!isArray(value) &&
|
|
109962
|
-
!isFunction$
|
|
109959
|
+
function isObject$5(value) {
|
|
109960
|
+
return (!isPrimitive$1(value) &&
|
|
109961
|
+
!isArray$1(value) &&
|
|
109962
|
+
!isFunction$4(value) &&
|
|
109963
109963
|
typeof value === 'object');
|
|
109964
109964
|
}
|
|
109965
|
-
function isPrimitive(value) {
|
|
109965
|
+
function isPrimitive$1(value) {
|
|
109966
109966
|
return (typeof value === 'string' ||
|
|
109967
109967
|
typeof value === 'number' ||
|
|
109968
109968
|
typeof value === 'boolean' ||
|
|
@@ -109971,8 +109971,8 @@ function isPrimitive(value) {
|
|
|
109971
109971
|
value instanceof RegExp ||
|
|
109972
109972
|
value === null);
|
|
109973
109973
|
}
|
|
109974
|
-
function shouldMerge(one, two) {
|
|
109975
|
-
if (!isPlainObject(one) || !isPlainObject(two)) {
|
|
109974
|
+
function shouldMerge$1(one, two) {
|
|
109975
|
+
if (!isPlainObject$1(one) || !isPlainObject$1(two)) {
|
|
109976
109976
|
return false;
|
|
109977
109977
|
}
|
|
109978
109978
|
return true;
|
|
@@ -109996,14 +109996,14 @@ function shouldMerge(one, two) {
|
|
|
109996
109996
|
/**
|
|
109997
109997
|
* Error that is thrown on timeouts.
|
|
109998
109998
|
*/
|
|
109999
|
-
class TimeoutError extends Error {
|
|
109999
|
+
let TimeoutError$1 = class TimeoutError extends Error {
|
|
110000
110000
|
constructor(message) {
|
|
110001
110001
|
super(message);
|
|
110002
110002
|
// manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:
|
|
110003
110003
|
// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
110004
110004
|
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
110005
110005
|
}
|
|
110006
|
-
}
|
|
110006
|
+
};
|
|
110007
110007
|
/**
|
|
110008
110008
|
* Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise
|
|
110009
110009
|
* rejects, and resolves if the specified promise resolves.
|
|
@@ -110013,11 +110013,11 @@ class TimeoutError extends Error {
|
|
|
110013
110013
|
* @param promise promise to use with timeout.
|
|
110014
110014
|
* @param timeout the timeout in milliseconds until the returned promise is rejected.
|
|
110015
110015
|
*/
|
|
110016
|
-
function callWithTimeout(promise, timeout) {
|
|
110016
|
+
function callWithTimeout$1(promise, timeout) {
|
|
110017
110017
|
let timeoutHandle;
|
|
110018
110018
|
const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
|
|
110019
110019
|
timeoutHandle = setTimeout(function timeoutHandler() {
|
|
110020
|
-
reject(new TimeoutError('Operation timed out.'));
|
|
110020
|
+
reject(new TimeoutError$1('Operation timed out.'));
|
|
110021
110021
|
}, timeout);
|
|
110022
110022
|
});
|
|
110023
110023
|
return Promise.race([promise, timeoutPromise]).then(result => {
|
|
@@ -110044,7 +110044,7 @@ function callWithTimeout(promise, timeout) {
|
|
|
110044
110044
|
* See the License for the specific language governing permissions and
|
|
110045
110045
|
* limitations under the License.
|
|
110046
110046
|
*/
|
|
110047
|
-
function urlMatches(url, urlToMatch) {
|
|
110047
|
+
function urlMatches$1(url, urlToMatch) {
|
|
110048
110048
|
if (typeof urlToMatch === 'string') {
|
|
110049
110049
|
return url === urlToMatch;
|
|
110050
110050
|
}
|
|
@@ -110057,12 +110057,12 @@ function urlMatches(url, urlToMatch) {
|
|
|
110057
110057
|
* @param url
|
|
110058
110058
|
* @param ignoredUrls
|
|
110059
110059
|
*/
|
|
110060
|
-
function isUrlIgnored(url, ignoredUrls) {
|
|
110060
|
+
function isUrlIgnored$1(url, ignoredUrls) {
|
|
110061
110061
|
if (!ignoredUrls) {
|
|
110062
110062
|
return false;
|
|
110063
110063
|
}
|
|
110064
110064
|
for (const ignoreUrl of ignoredUrls) {
|
|
110065
|
-
if (urlMatches(url, ignoreUrl)) {
|
|
110065
|
+
if (urlMatches$1(url, ignoreUrl)) {
|
|
110066
110066
|
return true;
|
|
110067
110067
|
}
|
|
110068
110068
|
}
|
|
@@ -110084,7 +110084,7 @@ function isUrlIgnored(url, ignoredUrls) {
|
|
|
110084
110084
|
* See the License for the specific language governing permissions and
|
|
110085
110085
|
* limitations under the License.
|
|
110086
110086
|
*/
|
|
110087
|
-
let Deferred$
|
|
110087
|
+
let Deferred$2 = class Deferred {
|
|
110088
110088
|
_promise;
|
|
110089
110089
|
_resolve;
|
|
110090
110090
|
_reject;
|
|
@@ -110123,11 +110123,11 @@ let Deferred$1 = class Deferred {
|
|
|
110123
110123
|
/**
|
|
110124
110124
|
* Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.
|
|
110125
110125
|
*/
|
|
110126
|
-
class BindOnceFuture {
|
|
110126
|
+
let BindOnceFuture$1 = class BindOnceFuture {
|
|
110127
110127
|
_callback;
|
|
110128
110128
|
_that;
|
|
110129
110129
|
_isCalled = false;
|
|
110130
|
-
_deferred = new Deferred$
|
|
110130
|
+
_deferred = new Deferred$2();
|
|
110131
110131
|
constructor(_callback, _that) {
|
|
110132
110132
|
this._callback = _callback;
|
|
110133
110133
|
this._that = _that;
|
|
@@ -110150,7 +110150,7 @@ class BindOnceFuture {
|
|
|
110150
110150
|
}
|
|
110151
110151
|
return this._deferred.promise;
|
|
110152
110152
|
}
|
|
110153
|
-
}
|
|
110153
|
+
};
|
|
110154
110154
|
|
|
110155
110155
|
/*
|
|
110156
110156
|
* Copyright The OpenTelemetry Authors
|
|
@@ -110167,7 +110167,7 @@ class BindOnceFuture {
|
|
|
110167
110167
|
* See the License for the specific language governing permissions and
|
|
110168
110168
|
* limitations under the License.
|
|
110169
110169
|
*/
|
|
110170
|
-
const logLevelMap = {
|
|
110170
|
+
const logLevelMap$1 = {
|
|
110171
110171
|
ALL: DiagLogLevel.ALL,
|
|
110172
110172
|
VERBOSE: DiagLogLevel.VERBOSE,
|
|
110173
110173
|
DEBUG: DiagLogLevel.DEBUG,
|
|
@@ -110180,14 +110180,14 @@ const logLevelMap = {
|
|
|
110180
110180
|
* Convert a string to a {@link DiagLogLevel}, defaults to {@link DiagLogLevel} if the log level does not exist or undefined if the input is undefined.
|
|
110181
110181
|
* @param value
|
|
110182
110182
|
*/
|
|
110183
|
-
function diagLogLevelFromString(value) {
|
|
110183
|
+
function diagLogLevelFromString$1(value) {
|
|
110184
110184
|
if (value == null) {
|
|
110185
110185
|
// don't fall back to default - no value set has different semantics for ús than an incorrect value (do not set vs. fall back to default)
|
|
110186
110186
|
return undefined;
|
|
110187
110187
|
}
|
|
110188
|
-
const resolvedLogLevel = logLevelMap[value.toUpperCase()];
|
|
110188
|
+
const resolvedLogLevel = logLevelMap$1[value.toUpperCase()];
|
|
110189
110189
|
if (resolvedLogLevel == null) {
|
|
110190
|
-
diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap)}, using default`);
|
|
110190
|
+
diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap$1)}, using default`);
|
|
110191
110191
|
return DiagLogLevel.INFO;
|
|
110192
110192
|
}
|
|
110193
110193
|
return resolvedLogLevel;
|
|
@@ -110212,10 +110212,10 @@ function diagLogLevelFromString(value) {
|
|
|
110212
110212
|
* @internal
|
|
110213
110213
|
* Shared functionality used by Exporters while exporting data, including suppression of Traces.
|
|
110214
110214
|
*/
|
|
110215
|
-
function _export(exporter, arg) {
|
|
110215
|
+
function _export$1(exporter, arg) {
|
|
110216
110216
|
return new Promise(resolve => {
|
|
110217
110217
|
// prevent downstream exporter calls from generating spans
|
|
110218
|
-
context.with(suppressTracing(context.active()), () => {
|
|
110218
|
+
context.with(suppressTracing$1(context.active()), () => {
|
|
110219
110219
|
exporter.export(arg, (result) => {
|
|
110220
110220
|
resolve(result);
|
|
110221
110221
|
});
|
|
@@ -110223,65 +110223,65 @@ function _export(exporter, arg) {
|
|
|
110223
110223
|
});
|
|
110224
110224
|
}
|
|
110225
110225
|
|
|
110226
|
-
const internal = {
|
|
110227
|
-
_export
|
|
110226
|
+
const internal$1 = {
|
|
110227
|
+
_export: _export$1
|
|
110228
110228
|
};
|
|
110229
110229
|
|
|
110230
|
-
const esm = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
110230
|
+
const esm$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
110231
110231
|
__proto__: null,
|
|
110232
|
-
AnchoredClock,
|
|
110233
|
-
BindOnceFuture,
|
|
110234
|
-
CompositePropagator,
|
|
110235
|
-
get ExportResultCode () { return ExportResultCode; },
|
|
110236
|
-
get RPCType () { return RPCType; },
|
|
110237
|
-
SDK_INFO,
|
|
110238
|
-
TRACE_PARENT_HEADER,
|
|
110239
|
-
TRACE_STATE_HEADER,
|
|
110240
|
-
TimeoutError,
|
|
110241
|
-
TraceState,
|
|
110242
|
-
W3CBaggagePropagator,
|
|
110243
|
-
W3CTraceContextPropagator,
|
|
110244
|
-
_globalThis,
|
|
110245
|
-
addHrTimes,
|
|
110246
|
-
callWithTimeout,
|
|
110247
|
-
deleteRPCMetadata,
|
|
110248
|
-
diagLogLevelFromString,
|
|
110249
|
-
getBooleanFromEnv,
|
|
110250
|
-
getNumberFromEnv,
|
|
110251
|
-
getRPCMetadata,
|
|
110252
|
-
getStringFromEnv,
|
|
110253
|
-
getStringListFromEnv,
|
|
110254
|
-
getTimeOrigin,
|
|
110255
|
-
globalErrorHandler,
|
|
110256
|
-
hrTime,
|
|
110257
|
-
hrTimeDuration,
|
|
110258
|
-
hrTimeToMicroseconds,
|
|
110259
|
-
hrTimeToMilliseconds,
|
|
110260
|
-
hrTimeToNanoseconds,
|
|
110261
|
-
hrTimeToTimeStamp,
|
|
110262
|
-
internal,
|
|
110263
|
-
isAttributeValue,
|
|
110264
|
-
isTimeInput,
|
|
110265
|
-
isTimeInputHrTime,
|
|
110266
|
-
isTracingSuppressed,
|
|
110267
|
-
isUrlIgnored,
|
|
110268
|
-
loggingErrorHandler,
|
|
110269
|
-
merge,
|
|
110270
|
-
millisToHrTime,
|
|
110271
|
-
otperformance,
|
|
110272
|
-
parseKeyPairsIntoRecord,
|
|
110273
|
-
parseTraceParent,
|
|
110274
|
-
sanitizeAttributes,
|
|
110275
|
-
setGlobalErrorHandler,
|
|
110276
|
-
setRPCMetadata,
|
|
110277
|
-
suppressTracing,
|
|
110278
|
-
timeInputToHrTime,
|
|
110279
|
-
unrefTimer,
|
|
110280
|
-
unsuppressTracing,
|
|
110281
|
-
urlMatches
|
|
110232
|
+
AnchoredClock: AnchoredClock$1,
|
|
110233
|
+
BindOnceFuture: BindOnceFuture$1,
|
|
110234
|
+
CompositePropagator: CompositePropagator$1,
|
|
110235
|
+
get ExportResultCode () { return ExportResultCode$1; },
|
|
110236
|
+
get RPCType () { return RPCType$1; },
|
|
110237
|
+
SDK_INFO: SDK_INFO$1,
|
|
110238
|
+
TRACE_PARENT_HEADER: TRACE_PARENT_HEADER$1,
|
|
110239
|
+
TRACE_STATE_HEADER: TRACE_STATE_HEADER$1,
|
|
110240
|
+
TimeoutError: TimeoutError$1,
|
|
110241
|
+
TraceState: TraceState$1,
|
|
110242
|
+
W3CBaggagePropagator: W3CBaggagePropagator$1,
|
|
110243
|
+
W3CTraceContextPropagator: W3CTraceContextPropagator$1,
|
|
110244
|
+
_globalThis: _globalThis$1,
|
|
110245
|
+
addHrTimes: addHrTimes$1,
|
|
110246
|
+
callWithTimeout: callWithTimeout$1,
|
|
110247
|
+
deleteRPCMetadata: deleteRPCMetadata$1,
|
|
110248
|
+
diagLogLevelFromString: diagLogLevelFromString$1,
|
|
110249
|
+
getBooleanFromEnv: getBooleanFromEnv$1,
|
|
110250
|
+
getNumberFromEnv: getNumberFromEnv$1,
|
|
110251
|
+
getRPCMetadata: getRPCMetadata$1,
|
|
110252
|
+
getStringFromEnv: getStringFromEnv$1,
|
|
110253
|
+
getStringListFromEnv: getStringListFromEnv$1,
|
|
110254
|
+
getTimeOrigin: getTimeOrigin$1,
|
|
110255
|
+
globalErrorHandler: globalErrorHandler$1,
|
|
110256
|
+
hrTime: hrTime$1,
|
|
110257
|
+
hrTimeDuration: hrTimeDuration$1,
|
|
110258
|
+
hrTimeToMicroseconds: hrTimeToMicroseconds$1,
|
|
110259
|
+
hrTimeToMilliseconds: hrTimeToMilliseconds$1,
|
|
110260
|
+
hrTimeToNanoseconds: hrTimeToNanoseconds$1,
|
|
110261
|
+
hrTimeToTimeStamp: hrTimeToTimeStamp$1,
|
|
110262
|
+
internal: internal$1,
|
|
110263
|
+
isAttributeValue: isAttributeValue$1,
|
|
110264
|
+
isTimeInput: isTimeInput$1,
|
|
110265
|
+
isTimeInputHrTime: isTimeInputHrTime$1,
|
|
110266
|
+
isTracingSuppressed: isTracingSuppressed$1,
|
|
110267
|
+
isUrlIgnored: isUrlIgnored$1,
|
|
110268
|
+
loggingErrorHandler: loggingErrorHandler$1,
|
|
110269
|
+
merge: merge$1,
|
|
110270
|
+
millisToHrTime: millisToHrTime$1,
|
|
110271
|
+
otperformance: otperformance$1,
|
|
110272
|
+
parseKeyPairsIntoRecord: parseKeyPairsIntoRecord$1,
|
|
110273
|
+
parseTraceParent: parseTraceParent$1,
|
|
110274
|
+
sanitizeAttributes: sanitizeAttributes$1,
|
|
110275
|
+
setGlobalErrorHandler: setGlobalErrorHandler$1,
|
|
110276
|
+
setRPCMetadata: setRPCMetadata$1,
|
|
110277
|
+
suppressTracing: suppressTracing$1,
|
|
110278
|
+
timeInputToHrTime: timeInputToHrTime$1,
|
|
110279
|
+
unrefTimer: unrefTimer$1,
|
|
110280
|
+
unsuppressTracing: unsuppressTracing$1,
|
|
110281
|
+
urlMatches: urlMatches$1
|
|
110282
110282
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
110283
110283
|
|
|
110284
|
-
const require$$
|
|
110284
|
+
const require$$1 = /*@__PURE__*/getAugmentedNamespace(esm$1);
|
|
110285
110285
|
|
|
110286
110286
|
var hasRequiredSrc$1;
|
|
110287
110287
|
|
|
@@ -110306,7 +110306,7 @@ function requireSrc$1 () {
|
|
|
110306
110306
|
Object.defineProperty(src, "__esModule", { value: true });
|
|
110307
110307
|
src.addSqlCommenterComment = void 0;
|
|
110308
110308
|
const api_1 = require$$2;
|
|
110309
|
-
const core_1 = require$$
|
|
110309
|
+
const core_1 = require$$1;
|
|
110310
110310
|
// NOTE: This function currently is returning false-positives
|
|
110311
110311
|
// in cases where comment characters appear in string literals
|
|
110312
110312
|
// ("SELECT '-- not a comment';" would return true, although has no comment)
|
|
@@ -110391,6 +110391,1664 @@ function requireVersion () {
|
|
|
110391
110391
|
return version$1;
|
|
110392
110392
|
}
|
|
110393
110393
|
|
|
110394
|
+
/*
|
|
110395
|
+
* Copyright The OpenTelemetry Authors
|
|
110396
|
+
*
|
|
110397
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110398
|
+
* you may not use this file except in compliance with the License.
|
|
110399
|
+
* You may obtain a copy of the License at
|
|
110400
|
+
*
|
|
110401
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110402
|
+
*
|
|
110403
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110404
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110405
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110406
|
+
* See the License for the specific language governing permissions and
|
|
110407
|
+
* limitations under the License.
|
|
110408
|
+
*/
|
|
110409
|
+
const SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');
|
|
110410
|
+
function suppressTracing(context) {
|
|
110411
|
+
return context.setValue(SUPPRESS_TRACING_KEY, true);
|
|
110412
|
+
}
|
|
110413
|
+
function unsuppressTracing(context) {
|
|
110414
|
+
return context.deleteValue(SUPPRESS_TRACING_KEY);
|
|
110415
|
+
}
|
|
110416
|
+
function isTracingSuppressed(context) {
|
|
110417
|
+
return context.getValue(SUPPRESS_TRACING_KEY) === true;
|
|
110418
|
+
}
|
|
110419
|
+
|
|
110420
|
+
/*
|
|
110421
|
+
* Copyright The OpenTelemetry Authors
|
|
110422
|
+
*
|
|
110423
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110424
|
+
* you may not use this file except in compliance with the License.
|
|
110425
|
+
* You may obtain a copy of the License at
|
|
110426
|
+
*
|
|
110427
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110428
|
+
*
|
|
110429
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110430
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110431
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110432
|
+
* See the License for the specific language governing permissions and
|
|
110433
|
+
* limitations under the License.
|
|
110434
|
+
*/
|
|
110435
|
+
const BAGGAGE_KEY_PAIR_SEPARATOR = '=';
|
|
110436
|
+
const BAGGAGE_PROPERTIES_SEPARATOR = ';';
|
|
110437
|
+
const BAGGAGE_ITEMS_SEPARATOR = ',';
|
|
110438
|
+
// Name of the http header used to propagate the baggage
|
|
110439
|
+
const BAGGAGE_HEADER = 'baggage';
|
|
110440
|
+
// Maximum number of name-value pairs allowed by w3c spec
|
|
110441
|
+
const BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;
|
|
110442
|
+
// Maximum number of bytes per a single name-value pair allowed by w3c spec
|
|
110443
|
+
const BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;
|
|
110444
|
+
// Maximum total length of all name-value pairs allowed by w3c spec
|
|
110445
|
+
const BAGGAGE_MAX_TOTAL_LENGTH = 8192;
|
|
110446
|
+
|
|
110447
|
+
/*
|
|
110448
|
+
* Copyright The OpenTelemetry Authors
|
|
110449
|
+
*
|
|
110450
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110451
|
+
* you may not use this file except in compliance with the License.
|
|
110452
|
+
* You may obtain a copy of the License at
|
|
110453
|
+
*
|
|
110454
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110455
|
+
*
|
|
110456
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110457
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110458
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110459
|
+
* See the License for the specific language governing permissions and
|
|
110460
|
+
* limitations under the License.
|
|
110461
|
+
*/
|
|
110462
|
+
function serializeKeyPairs(keyPairs) {
|
|
110463
|
+
return keyPairs.reduce((hValue, current) => {
|
|
110464
|
+
const value = `${hValue}${hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;
|
|
110465
|
+
return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;
|
|
110466
|
+
}, '');
|
|
110467
|
+
}
|
|
110468
|
+
function getKeyPairs(baggage) {
|
|
110469
|
+
return baggage.getAllEntries().map(([key, value]) => {
|
|
110470
|
+
let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;
|
|
110471
|
+
// include opaque metadata if provided
|
|
110472
|
+
// NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation
|
|
110473
|
+
if (value.metadata !== undefined) {
|
|
110474
|
+
entry += BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();
|
|
110475
|
+
}
|
|
110476
|
+
return entry;
|
|
110477
|
+
});
|
|
110478
|
+
}
|
|
110479
|
+
function parsePairKeyValue(entry) {
|
|
110480
|
+
const valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);
|
|
110481
|
+
if (valueProps.length <= 0)
|
|
110482
|
+
return;
|
|
110483
|
+
const keyPairPart = valueProps.shift();
|
|
110484
|
+
if (!keyPairPart)
|
|
110485
|
+
return;
|
|
110486
|
+
const separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);
|
|
110487
|
+
if (separatorIndex <= 0)
|
|
110488
|
+
return;
|
|
110489
|
+
const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());
|
|
110490
|
+
const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());
|
|
110491
|
+
let metadata;
|
|
110492
|
+
if (valueProps.length > 0) {
|
|
110493
|
+
metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));
|
|
110494
|
+
}
|
|
110495
|
+
return { key, value, metadata };
|
|
110496
|
+
}
|
|
110497
|
+
/**
|
|
110498
|
+
* Parse a string serialized in the baggage HTTP Format (without metadata):
|
|
110499
|
+
* https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md
|
|
110500
|
+
*/
|
|
110501
|
+
function parseKeyPairsIntoRecord(value) {
|
|
110502
|
+
const result = {};
|
|
110503
|
+
if (typeof value === 'string' && value.length > 0) {
|
|
110504
|
+
value.split(BAGGAGE_ITEMS_SEPARATOR).forEach(entry => {
|
|
110505
|
+
const keyPair = parsePairKeyValue(entry);
|
|
110506
|
+
if (keyPair !== undefined && keyPair.value.length > 0) {
|
|
110507
|
+
result[keyPair.key] = keyPair.value;
|
|
110508
|
+
}
|
|
110509
|
+
});
|
|
110510
|
+
}
|
|
110511
|
+
return result;
|
|
110512
|
+
}
|
|
110513
|
+
|
|
110514
|
+
/*
|
|
110515
|
+
* Copyright The OpenTelemetry Authors
|
|
110516
|
+
*
|
|
110517
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110518
|
+
* you may not use this file except in compliance with the License.
|
|
110519
|
+
* You may obtain a copy of the License at
|
|
110520
|
+
*
|
|
110521
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110522
|
+
*
|
|
110523
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110524
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110525
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110526
|
+
* See the License for the specific language governing permissions and
|
|
110527
|
+
* limitations under the License.
|
|
110528
|
+
*/
|
|
110529
|
+
/**
|
|
110530
|
+
* Propagates {@link Baggage} through Context format propagation.
|
|
110531
|
+
*
|
|
110532
|
+
* Based on the Baggage specification:
|
|
110533
|
+
* https://w3c.github.io/baggage/
|
|
110534
|
+
*/
|
|
110535
|
+
class W3CBaggagePropagator {
|
|
110536
|
+
inject(context, carrier, setter) {
|
|
110537
|
+
const baggage = propagation.getBaggage(context);
|
|
110538
|
+
if (!baggage || isTracingSuppressed(context))
|
|
110539
|
+
return;
|
|
110540
|
+
const keyPairs = getKeyPairs(baggage)
|
|
110541
|
+
.filter((pair) => {
|
|
110542
|
+
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
|
|
110543
|
+
})
|
|
110544
|
+
.slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS);
|
|
110545
|
+
const headerValue = serializeKeyPairs(keyPairs);
|
|
110546
|
+
if (headerValue.length > 0) {
|
|
110547
|
+
setter.set(carrier, BAGGAGE_HEADER, headerValue);
|
|
110548
|
+
}
|
|
110549
|
+
}
|
|
110550
|
+
extract(context, carrier, getter) {
|
|
110551
|
+
const headerValue = getter.get(carrier, BAGGAGE_HEADER);
|
|
110552
|
+
const baggageString = Array.isArray(headerValue)
|
|
110553
|
+
? headerValue.join(BAGGAGE_ITEMS_SEPARATOR)
|
|
110554
|
+
: headerValue;
|
|
110555
|
+
if (!baggageString)
|
|
110556
|
+
return context;
|
|
110557
|
+
const baggage = {};
|
|
110558
|
+
if (baggageString.length === 0) {
|
|
110559
|
+
return context;
|
|
110560
|
+
}
|
|
110561
|
+
const pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR);
|
|
110562
|
+
pairs.forEach(entry => {
|
|
110563
|
+
const keyPair = parsePairKeyValue(entry);
|
|
110564
|
+
if (keyPair) {
|
|
110565
|
+
const baggageEntry = { value: keyPair.value };
|
|
110566
|
+
if (keyPair.metadata) {
|
|
110567
|
+
baggageEntry.metadata = keyPair.metadata;
|
|
110568
|
+
}
|
|
110569
|
+
baggage[keyPair.key] = baggageEntry;
|
|
110570
|
+
}
|
|
110571
|
+
});
|
|
110572
|
+
if (Object.entries(baggage).length === 0) {
|
|
110573
|
+
return context;
|
|
110574
|
+
}
|
|
110575
|
+
return propagation.setBaggage(context, propagation.createBaggage(baggage));
|
|
110576
|
+
}
|
|
110577
|
+
fields() {
|
|
110578
|
+
return [BAGGAGE_HEADER];
|
|
110579
|
+
}
|
|
110580
|
+
}
|
|
110581
|
+
|
|
110582
|
+
/*
|
|
110583
|
+
* Copyright The OpenTelemetry Authors
|
|
110584
|
+
*
|
|
110585
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110586
|
+
* you may not use this file except in compliance with the License.
|
|
110587
|
+
* You may obtain a copy of the License at
|
|
110588
|
+
*
|
|
110589
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110590
|
+
*
|
|
110591
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110592
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110593
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110594
|
+
* See the License for the specific language governing permissions and
|
|
110595
|
+
* limitations under the License.
|
|
110596
|
+
*/
|
|
110597
|
+
/**
|
|
110598
|
+
* A utility for returning wall times anchored to a given point in time. Wall time measurements will
|
|
110599
|
+
* not be taken from the system, but instead are computed by adding a monotonic clock time
|
|
110600
|
+
* to the anchor point.
|
|
110601
|
+
*
|
|
110602
|
+
* This is needed because the system time can change and result in unexpected situations like
|
|
110603
|
+
* spans ending before they are started. Creating an anchored clock for each local root span
|
|
110604
|
+
* ensures that span timings and durations are accurate while preventing span times from drifting
|
|
110605
|
+
* too far from the system clock.
|
|
110606
|
+
*
|
|
110607
|
+
* Only creating an anchored clock once per local trace ensures span times are correct relative
|
|
110608
|
+
* to each other. For example, a child span will never have a start time before its parent even
|
|
110609
|
+
* if the system clock is corrected during the local trace.
|
|
110610
|
+
*
|
|
110611
|
+
* Heavily inspired by the OTel Java anchored clock
|
|
110612
|
+
* https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/AnchoredClock.java
|
|
110613
|
+
*/
|
|
110614
|
+
class AnchoredClock {
|
|
110615
|
+
_monotonicClock;
|
|
110616
|
+
_epochMillis;
|
|
110617
|
+
_performanceMillis;
|
|
110618
|
+
/**
|
|
110619
|
+
* Create a new AnchoredClock anchored to the current time returned by systemClock.
|
|
110620
|
+
*
|
|
110621
|
+
* @param systemClock should be a clock that returns the number of milliseconds since January 1 1970 such as Date
|
|
110622
|
+
* @param monotonicClock should be a clock that counts milliseconds monotonically such as window.performance or perf_hooks.performance
|
|
110623
|
+
*/
|
|
110624
|
+
constructor(systemClock, monotonicClock) {
|
|
110625
|
+
this._monotonicClock = monotonicClock;
|
|
110626
|
+
this._epochMillis = systemClock.now();
|
|
110627
|
+
this._performanceMillis = monotonicClock.now();
|
|
110628
|
+
}
|
|
110629
|
+
/**
|
|
110630
|
+
* Returns the current time by adding the number of milliseconds since the
|
|
110631
|
+
* AnchoredClock was created to the creation epoch time
|
|
110632
|
+
*/
|
|
110633
|
+
now() {
|
|
110634
|
+
const delta = this._monotonicClock.now() - this._performanceMillis;
|
|
110635
|
+
return this._epochMillis + delta;
|
|
110636
|
+
}
|
|
110637
|
+
}
|
|
110638
|
+
|
|
110639
|
+
/*
|
|
110640
|
+
* Copyright The OpenTelemetry Authors
|
|
110641
|
+
*
|
|
110642
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110643
|
+
* you may not use this file except in compliance with the License.
|
|
110644
|
+
* You may obtain a copy of the License at
|
|
110645
|
+
*
|
|
110646
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110647
|
+
*
|
|
110648
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110649
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110650
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110651
|
+
* See the License for the specific language governing permissions and
|
|
110652
|
+
* limitations under the License.
|
|
110653
|
+
*/
|
|
110654
|
+
function sanitizeAttributes(attributes) {
|
|
110655
|
+
const out = {};
|
|
110656
|
+
if (typeof attributes !== 'object' || attributes == null) {
|
|
110657
|
+
return out;
|
|
110658
|
+
}
|
|
110659
|
+
for (const [key, val] of Object.entries(attributes)) {
|
|
110660
|
+
if (!isAttributeKey(key)) {
|
|
110661
|
+
diag.warn(`Invalid attribute key: ${key}`);
|
|
110662
|
+
continue;
|
|
110663
|
+
}
|
|
110664
|
+
if (!isAttributeValue(val)) {
|
|
110665
|
+
diag.warn(`Invalid attribute value set for key: ${key}`);
|
|
110666
|
+
continue;
|
|
110667
|
+
}
|
|
110668
|
+
if (Array.isArray(val)) {
|
|
110669
|
+
out[key] = val.slice();
|
|
110670
|
+
}
|
|
110671
|
+
else {
|
|
110672
|
+
out[key] = val;
|
|
110673
|
+
}
|
|
110674
|
+
}
|
|
110675
|
+
return out;
|
|
110676
|
+
}
|
|
110677
|
+
function isAttributeKey(key) {
|
|
110678
|
+
return typeof key === 'string' && key.length > 0;
|
|
110679
|
+
}
|
|
110680
|
+
function isAttributeValue(val) {
|
|
110681
|
+
if (val == null) {
|
|
110682
|
+
return true;
|
|
110683
|
+
}
|
|
110684
|
+
if (Array.isArray(val)) {
|
|
110685
|
+
return isHomogeneousAttributeValueArray(val);
|
|
110686
|
+
}
|
|
110687
|
+
return isValidPrimitiveAttributeValue(val);
|
|
110688
|
+
}
|
|
110689
|
+
function isHomogeneousAttributeValueArray(arr) {
|
|
110690
|
+
let type;
|
|
110691
|
+
for (const element of arr) {
|
|
110692
|
+
// null/undefined elements are allowed
|
|
110693
|
+
if (element == null)
|
|
110694
|
+
continue;
|
|
110695
|
+
if (!type) {
|
|
110696
|
+
if (isValidPrimitiveAttributeValue(element)) {
|
|
110697
|
+
type = typeof element;
|
|
110698
|
+
continue;
|
|
110699
|
+
}
|
|
110700
|
+
// encountered an invalid primitive
|
|
110701
|
+
return false;
|
|
110702
|
+
}
|
|
110703
|
+
if (typeof element === type) {
|
|
110704
|
+
continue;
|
|
110705
|
+
}
|
|
110706
|
+
return false;
|
|
110707
|
+
}
|
|
110708
|
+
return true;
|
|
110709
|
+
}
|
|
110710
|
+
function isValidPrimitiveAttributeValue(val) {
|
|
110711
|
+
switch (typeof val) {
|
|
110712
|
+
case 'number':
|
|
110713
|
+
case 'boolean':
|
|
110714
|
+
case 'string':
|
|
110715
|
+
return true;
|
|
110716
|
+
}
|
|
110717
|
+
return false;
|
|
110718
|
+
}
|
|
110719
|
+
|
|
110720
|
+
/*
|
|
110721
|
+
* Copyright The OpenTelemetry Authors
|
|
110722
|
+
*
|
|
110723
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110724
|
+
* you may not use this file except in compliance with the License.
|
|
110725
|
+
* You may obtain a copy of the License at
|
|
110726
|
+
*
|
|
110727
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110728
|
+
*
|
|
110729
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110730
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110731
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110732
|
+
* See the License for the specific language governing permissions and
|
|
110733
|
+
* limitations under the License.
|
|
110734
|
+
*/
|
|
110735
|
+
/**
|
|
110736
|
+
* Returns a function that logs an error using the provided logger, or a
|
|
110737
|
+
* console logger if one was not provided.
|
|
110738
|
+
*/
|
|
110739
|
+
function loggingErrorHandler() {
|
|
110740
|
+
return (ex) => {
|
|
110741
|
+
diag.error(stringifyException(ex));
|
|
110742
|
+
};
|
|
110743
|
+
}
|
|
110744
|
+
/**
|
|
110745
|
+
* Converts an exception into a string representation
|
|
110746
|
+
* @param {Exception} ex
|
|
110747
|
+
*/
|
|
110748
|
+
function stringifyException(ex) {
|
|
110749
|
+
if (typeof ex === 'string') {
|
|
110750
|
+
return ex;
|
|
110751
|
+
}
|
|
110752
|
+
else {
|
|
110753
|
+
return JSON.stringify(flattenException(ex));
|
|
110754
|
+
}
|
|
110755
|
+
}
|
|
110756
|
+
/**
|
|
110757
|
+
* Flattens an exception into key-value pairs by traversing the prototype chain
|
|
110758
|
+
* and coercing values to strings. Duplicate properties will not be overwritten;
|
|
110759
|
+
* the first insert wins.
|
|
110760
|
+
*/
|
|
110761
|
+
function flattenException(ex) {
|
|
110762
|
+
const result = {};
|
|
110763
|
+
let current = ex;
|
|
110764
|
+
while (current !== null) {
|
|
110765
|
+
Object.getOwnPropertyNames(current).forEach(propertyName => {
|
|
110766
|
+
if (result[propertyName])
|
|
110767
|
+
return;
|
|
110768
|
+
const value = current[propertyName];
|
|
110769
|
+
if (value) {
|
|
110770
|
+
result[propertyName] = String(value);
|
|
110771
|
+
}
|
|
110772
|
+
});
|
|
110773
|
+
current = Object.getPrototypeOf(current);
|
|
110774
|
+
}
|
|
110775
|
+
return result;
|
|
110776
|
+
}
|
|
110777
|
+
|
|
110778
|
+
let delegateHandler = loggingErrorHandler();
|
|
110779
|
+
function setGlobalErrorHandler(handler) {
|
|
110780
|
+
delegateHandler = handler;
|
|
110781
|
+
}
|
|
110782
|
+
function globalErrorHandler(ex) {
|
|
110783
|
+
try {
|
|
110784
|
+
delegateHandler(ex);
|
|
110785
|
+
} catch {
|
|
110786
|
+
}
|
|
110787
|
+
}
|
|
110788
|
+
|
|
110789
|
+
/*
|
|
110790
|
+
* Copyright The OpenTelemetry Authors
|
|
110791
|
+
*
|
|
110792
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110793
|
+
* you may not use this file except in compliance with the License.
|
|
110794
|
+
* You may obtain a copy of the License at
|
|
110795
|
+
*
|
|
110796
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110797
|
+
*
|
|
110798
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110799
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110800
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110801
|
+
* See the License for the specific language governing permissions and
|
|
110802
|
+
* limitations under the License.
|
|
110803
|
+
*/
|
|
110804
|
+
function getStringFromEnv(_) {
|
|
110805
|
+
return undefined;
|
|
110806
|
+
}
|
|
110807
|
+
function getBooleanFromEnv(_) {
|
|
110808
|
+
return undefined;
|
|
110809
|
+
}
|
|
110810
|
+
function getNumberFromEnv(_) {
|
|
110811
|
+
return undefined;
|
|
110812
|
+
}
|
|
110813
|
+
function getStringListFromEnv(_) {
|
|
110814
|
+
return undefined;
|
|
110815
|
+
}
|
|
110816
|
+
|
|
110817
|
+
const _globalThis = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof globalThis === "object" ? globalThis : {};
|
|
110818
|
+
|
|
110819
|
+
/*
|
|
110820
|
+
* Copyright The OpenTelemetry Authors
|
|
110821
|
+
*
|
|
110822
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110823
|
+
* you may not use this file except in compliance with the License.
|
|
110824
|
+
* You may obtain a copy of the License at
|
|
110825
|
+
*
|
|
110826
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110827
|
+
*
|
|
110828
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110829
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110830
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110831
|
+
* See the License for the specific language governing permissions and
|
|
110832
|
+
* limitations under the License.
|
|
110833
|
+
*/
|
|
110834
|
+
const otperformance = performance;
|
|
110835
|
+
|
|
110836
|
+
/*
|
|
110837
|
+
* Copyright The OpenTelemetry Authors
|
|
110838
|
+
*
|
|
110839
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110840
|
+
* you may not use this file except in compliance with the License.
|
|
110841
|
+
* You may obtain a copy of the License at
|
|
110842
|
+
*
|
|
110843
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110844
|
+
*
|
|
110845
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110846
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110847
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110848
|
+
* See the License for the specific language governing permissions and
|
|
110849
|
+
* limitations under the License.
|
|
110850
|
+
*/
|
|
110851
|
+
// this is autogenerated file, see scripts/version-update.js
|
|
110852
|
+
const VERSION$1 = '2.0.1';
|
|
110853
|
+
|
|
110854
|
+
/*
|
|
110855
|
+
* Copyright The OpenTelemetry Authors
|
|
110856
|
+
*
|
|
110857
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110858
|
+
* you may not use this file except in compliance with the License.
|
|
110859
|
+
* You may obtain a copy of the License at
|
|
110860
|
+
*
|
|
110861
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110862
|
+
*
|
|
110863
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110864
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110865
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110866
|
+
* See the License for the specific language governing permissions and
|
|
110867
|
+
* limitations under the License.
|
|
110868
|
+
*/
|
|
110869
|
+
/*
|
|
110870
|
+
* This file contains a copy of unstable semantic convention definitions
|
|
110871
|
+
* used by this package.
|
|
110872
|
+
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
|
|
110873
|
+
*/
|
|
110874
|
+
/**
|
|
110875
|
+
* The name of the runtime of this process.
|
|
110876
|
+
*
|
|
110877
|
+
* @example OpenJDK Runtime Environment
|
|
110878
|
+
*
|
|
110879
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
110880
|
+
*/
|
|
110881
|
+
const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name';
|
|
110882
|
+
|
|
110883
|
+
/*
|
|
110884
|
+
* Copyright The OpenTelemetry Authors
|
|
110885
|
+
*
|
|
110886
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110887
|
+
* you may not use this file except in compliance with the License.
|
|
110888
|
+
* You may obtain a copy of the License at
|
|
110889
|
+
*
|
|
110890
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110891
|
+
*
|
|
110892
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110893
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110894
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110895
|
+
* See the License for the specific language governing permissions and
|
|
110896
|
+
* limitations under the License.
|
|
110897
|
+
*/
|
|
110898
|
+
/** Constants describing the SDK in use */
|
|
110899
|
+
const SDK_INFO = {
|
|
110900
|
+
[ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',
|
|
110901
|
+
[ATTR_PROCESS_RUNTIME_NAME]: 'browser',
|
|
110902
|
+
[ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS,
|
|
110903
|
+
[ATTR_TELEMETRY_SDK_VERSION]: VERSION$1,
|
|
110904
|
+
};
|
|
110905
|
+
|
|
110906
|
+
/*
|
|
110907
|
+
* Copyright The OpenTelemetry Authors
|
|
110908
|
+
*
|
|
110909
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110910
|
+
* you may not use this file except in compliance with the License.
|
|
110911
|
+
* You may obtain a copy of the License at
|
|
110912
|
+
*
|
|
110913
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110914
|
+
*
|
|
110915
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110916
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110917
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110918
|
+
* See the License for the specific language governing permissions and
|
|
110919
|
+
* limitations under the License.
|
|
110920
|
+
*/
|
|
110921
|
+
function unrefTimer(_timer) { }
|
|
110922
|
+
|
|
110923
|
+
/*
|
|
110924
|
+
* Copyright The OpenTelemetry Authors
|
|
110925
|
+
*
|
|
110926
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
110927
|
+
* you may not use this file except in compliance with the License.
|
|
110928
|
+
* You may obtain a copy of the License at
|
|
110929
|
+
*
|
|
110930
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
110931
|
+
*
|
|
110932
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
110933
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
110934
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
110935
|
+
* See the License for the specific language governing permissions and
|
|
110936
|
+
* limitations under the License.
|
|
110937
|
+
*/
|
|
110938
|
+
const NANOSECOND_DIGITS = 9;
|
|
110939
|
+
const NANOSECOND_DIGITS_IN_MILLIS = 6;
|
|
110940
|
+
const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);
|
|
110941
|
+
const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);
|
|
110942
|
+
/**
|
|
110943
|
+
* Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).
|
|
110944
|
+
* @param epochMillis
|
|
110945
|
+
*/
|
|
110946
|
+
function millisToHrTime(epochMillis) {
|
|
110947
|
+
const epochSeconds = epochMillis / 1000;
|
|
110948
|
+
// Decimals only.
|
|
110949
|
+
const seconds = Math.trunc(epochSeconds);
|
|
110950
|
+
// Round sub-nanosecond accuracy to nanosecond.
|
|
110951
|
+
const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);
|
|
110952
|
+
return [seconds, nanos];
|
|
110953
|
+
}
|
|
110954
|
+
function getTimeOrigin() {
|
|
110955
|
+
let timeOrigin = otperformance.timeOrigin;
|
|
110956
|
+
if (typeof timeOrigin !== 'number') {
|
|
110957
|
+
const perf = otperformance;
|
|
110958
|
+
timeOrigin = perf.timing && perf.timing.fetchStart;
|
|
110959
|
+
}
|
|
110960
|
+
return timeOrigin;
|
|
110961
|
+
}
|
|
110962
|
+
/**
|
|
110963
|
+
* Returns an hrtime calculated via performance component.
|
|
110964
|
+
* @param performanceNow
|
|
110965
|
+
*/
|
|
110966
|
+
function hrTime(performanceNow) {
|
|
110967
|
+
const timeOrigin = millisToHrTime(getTimeOrigin());
|
|
110968
|
+
const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : otperformance.now());
|
|
110969
|
+
return addHrTimes(timeOrigin, now);
|
|
110970
|
+
}
|
|
110971
|
+
/**
|
|
110972
|
+
*
|
|
110973
|
+
* Converts a TimeInput to an HrTime, defaults to _hrtime().
|
|
110974
|
+
* @param time
|
|
110975
|
+
*/
|
|
110976
|
+
function timeInputToHrTime(time) {
|
|
110977
|
+
// process.hrtime
|
|
110978
|
+
if (isTimeInputHrTime(time)) {
|
|
110979
|
+
return time;
|
|
110980
|
+
}
|
|
110981
|
+
else if (typeof time === 'number') {
|
|
110982
|
+
// Must be a performance.now() if it's smaller than process start time.
|
|
110983
|
+
if (time < getTimeOrigin()) {
|
|
110984
|
+
return hrTime(time);
|
|
110985
|
+
}
|
|
110986
|
+
else {
|
|
110987
|
+
// epoch milliseconds or performance.timeOrigin
|
|
110988
|
+
return millisToHrTime(time);
|
|
110989
|
+
}
|
|
110990
|
+
}
|
|
110991
|
+
else if (time instanceof Date) {
|
|
110992
|
+
return millisToHrTime(time.getTime());
|
|
110993
|
+
}
|
|
110994
|
+
else {
|
|
110995
|
+
throw TypeError('Invalid input type');
|
|
110996
|
+
}
|
|
110997
|
+
}
|
|
110998
|
+
/**
|
|
110999
|
+
* Returns a duration of two hrTime.
|
|
111000
|
+
* @param startTime
|
|
111001
|
+
* @param endTime
|
|
111002
|
+
*/
|
|
111003
|
+
function hrTimeDuration(startTime, endTime) {
|
|
111004
|
+
let seconds = endTime[0] - startTime[0];
|
|
111005
|
+
let nanos = endTime[1] - startTime[1];
|
|
111006
|
+
// overflow
|
|
111007
|
+
if (nanos < 0) {
|
|
111008
|
+
seconds -= 1;
|
|
111009
|
+
// negate
|
|
111010
|
+
nanos += SECOND_TO_NANOSECONDS;
|
|
111011
|
+
}
|
|
111012
|
+
return [seconds, nanos];
|
|
111013
|
+
}
|
|
111014
|
+
/**
|
|
111015
|
+
* Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z"
|
|
111016
|
+
* @param time
|
|
111017
|
+
*/
|
|
111018
|
+
function hrTimeToTimeStamp(time) {
|
|
111019
|
+
const precision = NANOSECOND_DIGITS;
|
|
111020
|
+
const tmp = `${'0'.repeat(precision)}${time[1]}Z`;
|
|
111021
|
+
const nanoString = tmp.substring(tmp.length - precision - 1);
|
|
111022
|
+
const date = new Date(time[0] * 1000).toISOString();
|
|
111023
|
+
return date.replace('000Z', nanoString);
|
|
111024
|
+
}
|
|
111025
|
+
/**
|
|
111026
|
+
* Convert hrTime to nanoseconds.
|
|
111027
|
+
* @param time
|
|
111028
|
+
*/
|
|
111029
|
+
function hrTimeToNanoseconds(time) {
|
|
111030
|
+
return time[0] * SECOND_TO_NANOSECONDS + time[1];
|
|
111031
|
+
}
|
|
111032
|
+
/**
|
|
111033
|
+
* Convert hrTime to milliseconds.
|
|
111034
|
+
* @param time
|
|
111035
|
+
*/
|
|
111036
|
+
function hrTimeToMilliseconds(time) {
|
|
111037
|
+
return time[0] * 1e3 + time[1] / 1e6;
|
|
111038
|
+
}
|
|
111039
|
+
/**
|
|
111040
|
+
* Convert hrTime to microseconds.
|
|
111041
|
+
* @param time
|
|
111042
|
+
*/
|
|
111043
|
+
function hrTimeToMicroseconds(time) {
|
|
111044
|
+
return time[0] * 1e6 + time[1] / 1e3;
|
|
111045
|
+
}
|
|
111046
|
+
/**
|
|
111047
|
+
* check if time is HrTime
|
|
111048
|
+
* @param value
|
|
111049
|
+
*/
|
|
111050
|
+
function isTimeInputHrTime(value) {
|
|
111051
|
+
return (Array.isArray(value) &&
|
|
111052
|
+
value.length === 2 &&
|
|
111053
|
+
typeof value[0] === 'number' &&
|
|
111054
|
+
typeof value[1] === 'number');
|
|
111055
|
+
}
|
|
111056
|
+
/**
|
|
111057
|
+
* check if input value is a correct types.TimeInput
|
|
111058
|
+
* @param value
|
|
111059
|
+
*/
|
|
111060
|
+
function isTimeInput(value) {
|
|
111061
|
+
return (isTimeInputHrTime(value) ||
|
|
111062
|
+
typeof value === 'number' ||
|
|
111063
|
+
value instanceof Date);
|
|
111064
|
+
}
|
|
111065
|
+
/**
|
|
111066
|
+
* Given 2 HrTime formatted times, return their sum as an HrTime.
|
|
111067
|
+
*/
|
|
111068
|
+
function addHrTimes(time1, time2) {
|
|
111069
|
+
const out = [time1[0] + time2[0], time1[1] + time2[1]];
|
|
111070
|
+
// Nanoseconds
|
|
111071
|
+
if (out[1] >= SECOND_TO_NANOSECONDS) {
|
|
111072
|
+
out[1] -= SECOND_TO_NANOSECONDS;
|
|
111073
|
+
out[0] += 1;
|
|
111074
|
+
}
|
|
111075
|
+
return out;
|
|
111076
|
+
}
|
|
111077
|
+
|
|
111078
|
+
/*
|
|
111079
|
+
* Copyright The OpenTelemetry Authors
|
|
111080
|
+
*
|
|
111081
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111082
|
+
* you may not use this file except in compliance with the License.
|
|
111083
|
+
* You may obtain a copy of the License at
|
|
111084
|
+
*
|
|
111085
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111086
|
+
*
|
|
111087
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111088
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111089
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111090
|
+
* See the License for the specific language governing permissions and
|
|
111091
|
+
* limitations under the License.
|
|
111092
|
+
*/
|
|
111093
|
+
var ExportResultCode;
|
|
111094
|
+
(function (ExportResultCode) {
|
|
111095
|
+
ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS";
|
|
111096
|
+
ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED";
|
|
111097
|
+
})(ExportResultCode || (ExportResultCode = {}));
|
|
111098
|
+
|
|
111099
|
+
/*
|
|
111100
|
+
* Copyright The OpenTelemetry Authors
|
|
111101
|
+
*
|
|
111102
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111103
|
+
* you may not use this file except in compliance with the License.
|
|
111104
|
+
* You may obtain a copy of the License at
|
|
111105
|
+
*
|
|
111106
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111107
|
+
*
|
|
111108
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111109
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111110
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111111
|
+
* See the License for the specific language governing permissions and
|
|
111112
|
+
* limitations under the License.
|
|
111113
|
+
*/
|
|
111114
|
+
/** Combines multiple propagators into a single propagator. */
|
|
111115
|
+
class CompositePropagator {
|
|
111116
|
+
_propagators;
|
|
111117
|
+
_fields;
|
|
111118
|
+
/**
|
|
111119
|
+
* Construct a composite propagator from a list of propagators.
|
|
111120
|
+
*
|
|
111121
|
+
* @param [config] Configuration object for composite propagator
|
|
111122
|
+
*/
|
|
111123
|
+
constructor(config = {}) {
|
|
111124
|
+
this._propagators = config.propagators ?? [];
|
|
111125
|
+
this._fields = Array.from(new Set(this._propagators
|
|
111126
|
+
// older propagators may not have fields function, null check to be sure
|
|
111127
|
+
.map(p => (typeof p.fields === 'function' ? p.fields() : []))
|
|
111128
|
+
.reduce((x, y) => x.concat(y), [])));
|
|
111129
|
+
}
|
|
111130
|
+
/**
|
|
111131
|
+
* Run each of the configured propagators with the given context and carrier.
|
|
111132
|
+
* Propagators are run in the order they are configured, so if multiple
|
|
111133
|
+
* propagators write the same carrier key, the propagator later in the list
|
|
111134
|
+
* will "win".
|
|
111135
|
+
*
|
|
111136
|
+
* @param context Context to inject
|
|
111137
|
+
* @param carrier Carrier into which context will be injected
|
|
111138
|
+
*/
|
|
111139
|
+
inject(context, carrier, setter) {
|
|
111140
|
+
for (const propagator of this._propagators) {
|
|
111141
|
+
try {
|
|
111142
|
+
propagator.inject(context, carrier, setter);
|
|
111143
|
+
}
|
|
111144
|
+
catch (err) {
|
|
111145
|
+
diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
|
|
111146
|
+
}
|
|
111147
|
+
}
|
|
111148
|
+
}
|
|
111149
|
+
/**
|
|
111150
|
+
* Run each of the configured propagators with the given context and carrier.
|
|
111151
|
+
* Propagators are run in the order they are configured, so if multiple
|
|
111152
|
+
* propagators write the same context key, the propagator later in the list
|
|
111153
|
+
* will "win".
|
|
111154
|
+
*
|
|
111155
|
+
* @param context Context to add values to
|
|
111156
|
+
* @param carrier Carrier from which to extract context
|
|
111157
|
+
*/
|
|
111158
|
+
extract(context, carrier, getter) {
|
|
111159
|
+
return this._propagators.reduce((ctx, propagator) => {
|
|
111160
|
+
try {
|
|
111161
|
+
return propagator.extract(ctx, carrier, getter);
|
|
111162
|
+
}
|
|
111163
|
+
catch (err) {
|
|
111164
|
+
diag.warn(`Failed to extract with ${propagator.constructor.name}. Err: ${err.message}`);
|
|
111165
|
+
}
|
|
111166
|
+
return ctx;
|
|
111167
|
+
}, context);
|
|
111168
|
+
}
|
|
111169
|
+
fields() {
|
|
111170
|
+
// return a new array so our fields cannot be modified
|
|
111171
|
+
return this._fields.slice();
|
|
111172
|
+
}
|
|
111173
|
+
}
|
|
111174
|
+
|
|
111175
|
+
/*
|
|
111176
|
+
* Copyright The OpenTelemetry Authors
|
|
111177
|
+
*
|
|
111178
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111179
|
+
* you may not use this file except in compliance with the License.
|
|
111180
|
+
* You may obtain a copy of the License at
|
|
111181
|
+
*
|
|
111182
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111183
|
+
*
|
|
111184
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111185
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111186
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111187
|
+
* See the License for the specific language governing permissions and
|
|
111188
|
+
* limitations under the License.
|
|
111189
|
+
*/
|
|
111190
|
+
const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
|
|
111191
|
+
const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
111192
|
+
const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
111193
|
+
const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
111194
|
+
const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
111195
|
+
const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
111196
|
+
/**
|
|
111197
|
+
* Key is opaque string up to 256 characters printable. It MUST begin with a
|
|
111198
|
+
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
|
|
111199
|
+
* underscores _, dashes -, asterisks *, and forward slashes /.
|
|
111200
|
+
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
|
|
111201
|
+
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
|
|
111202
|
+
* see https://www.w3.org/TR/trace-context/#key
|
|
111203
|
+
*/
|
|
111204
|
+
function validateKey(key) {
|
|
111205
|
+
return VALID_KEY_REGEX.test(key);
|
|
111206
|
+
}
|
|
111207
|
+
/**
|
|
111208
|
+
* Value is opaque string up to 256 characters printable ASCII RFC0020
|
|
111209
|
+
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
|
|
111210
|
+
*/
|
|
111211
|
+
function validateValue(value) {
|
|
111212
|
+
return (VALID_VALUE_BASE_REGEX.test(value) &&
|
|
111213
|
+
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
|
|
111214
|
+
}
|
|
111215
|
+
|
|
111216
|
+
/*
|
|
111217
|
+
* Copyright The OpenTelemetry Authors
|
|
111218
|
+
*
|
|
111219
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111220
|
+
* you may not use this file except in compliance with the License.
|
|
111221
|
+
* You may obtain a copy of the License at
|
|
111222
|
+
*
|
|
111223
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111224
|
+
*
|
|
111225
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111226
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111227
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111228
|
+
* See the License for the specific language governing permissions and
|
|
111229
|
+
* limitations under the License.
|
|
111230
|
+
*/
|
|
111231
|
+
const MAX_TRACE_STATE_ITEMS = 32;
|
|
111232
|
+
const MAX_TRACE_STATE_LEN = 512;
|
|
111233
|
+
const LIST_MEMBERS_SEPARATOR = ',';
|
|
111234
|
+
const LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
|
|
111235
|
+
/**
|
|
111236
|
+
* TraceState must be a class and not a simple object type because of the spec
|
|
111237
|
+
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
|
|
111238
|
+
*
|
|
111239
|
+
* Here is the list of allowed mutations:
|
|
111240
|
+
* - New key-value pair should be added into the beginning of the list
|
|
111241
|
+
* - The value of any key can be updated. Modified keys MUST be moved to the
|
|
111242
|
+
* beginning of the list.
|
|
111243
|
+
*/
|
|
111244
|
+
class TraceState {
|
|
111245
|
+
_internalState = new Map();
|
|
111246
|
+
constructor(rawTraceState) {
|
|
111247
|
+
if (rawTraceState)
|
|
111248
|
+
this._parse(rawTraceState);
|
|
111249
|
+
}
|
|
111250
|
+
set(key, value) {
|
|
111251
|
+
// TODO: Benchmark the different approaches(map vs list) and
|
|
111252
|
+
// use the faster one.
|
|
111253
|
+
const traceState = this._clone();
|
|
111254
|
+
if (traceState._internalState.has(key)) {
|
|
111255
|
+
traceState._internalState.delete(key);
|
|
111256
|
+
}
|
|
111257
|
+
traceState._internalState.set(key, value);
|
|
111258
|
+
return traceState;
|
|
111259
|
+
}
|
|
111260
|
+
unset(key) {
|
|
111261
|
+
const traceState = this._clone();
|
|
111262
|
+
traceState._internalState.delete(key);
|
|
111263
|
+
return traceState;
|
|
111264
|
+
}
|
|
111265
|
+
get(key) {
|
|
111266
|
+
return this._internalState.get(key);
|
|
111267
|
+
}
|
|
111268
|
+
serialize() {
|
|
111269
|
+
return this._keys()
|
|
111270
|
+
.reduce((agg, key) => {
|
|
111271
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
111272
|
+
return agg;
|
|
111273
|
+
}, [])
|
|
111274
|
+
.join(LIST_MEMBERS_SEPARATOR);
|
|
111275
|
+
}
|
|
111276
|
+
_parse(rawTraceState) {
|
|
111277
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
111278
|
+
return;
|
|
111279
|
+
this._internalState = rawTraceState
|
|
111280
|
+
.split(LIST_MEMBERS_SEPARATOR)
|
|
111281
|
+
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
|
|
111282
|
+
.reduce((agg, part) => {
|
|
111283
|
+
const listMember = part.trim(); // Optional Whitespace (OWS) handling
|
|
111284
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
111285
|
+
if (i !== -1) {
|
|
111286
|
+
const key = listMember.slice(0, i);
|
|
111287
|
+
const value = listMember.slice(i + 1, part.length);
|
|
111288
|
+
if (validateKey(key) && validateValue(value)) {
|
|
111289
|
+
agg.set(key, value);
|
|
111290
|
+
}
|
|
111291
|
+
}
|
|
111292
|
+
return agg;
|
|
111293
|
+
}, new Map());
|
|
111294
|
+
// Because of the reverse() requirement, trunc must be done after map is created
|
|
111295
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
111296
|
+
this._internalState = new Map(Array.from(this._internalState.entries())
|
|
111297
|
+
.reverse() // Use reverse same as original tracestate parse chain
|
|
111298
|
+
.slice(0, MAX_TRACE_STATE_ITEMS));
|
|
111299
|
+
}
|
|
111300
|
+
}
|
|
111301
|
+
_keys() {
|
|
111302
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
111303
|
+
}
|
|
111304
|
+
_clone() {
|
|
111305
|
+
const traceState = new TraceState();
|
|
111306
|
+
traceState._internalState = new Map(this._internalState);
|
|
111307
|
+
return traceState;
|
|
111308
|
+
}
|
|
111309
|
+
}
|
|
111310
|
+
|
|
111311
|
+
/*
|
|
111312
|
+
* Copyright The OpenTelemetry Authors
|
|
111313
|
+
*
|
|
111314
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111315
|
+
* you may not use this file except in compliance with the License.
|
|
111316
|
+
* You may obtain a copy of the License at
|
|
111317
|
+
*
|
|
111318
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111319
|
+
*
|
|
111320
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111321
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111322
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111323
|
+
* See the License for the specific language governing permissions and
|
|
111324
|
+
* limitations under the License.
|
|
111325
|
+
*/
|
|
111326
|
+
const TRACE_PARENT_HEADER = 'traceparent';
|
|
111327
|
+
const TRACE_STATE_HEADER = 'tracestate';
|
|
111328
|
+
const VERSION = '00';
|
|
111329
|
+
const VERSION_PART = '(?!ff)[\\da-f]{2}';
|
|
111330
|
+
const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}';
|
|
111331
|
+
const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}';
|
|
111332
|
+
const FLAGS_PART = '[\\da-f]{2}';
|
|
111333
|
+
const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`);
|
|
111334
|
+
/**
|
|
111335
|
+
* Parses information from the [traceparent] span tag and converts it into {@link SpanContext}
|
|
111336
|
+
* @param traceParent - A meta property that comes from server.
|
|
111337
|
+
* It should be dynamically generated server side to have the server's request trace Id,
|
|
111338
|
+
* a parent span Id that was set on the server's request span,
|
|
111339
|
+
* and the trace flags to indicate the server's sampling decision
|
|
111340
|
+
* (01 = sampled, 00 = not sampled).
|
|
111341
|
+
* for example: '{version}-{traceId}-{spanId}-{sampleDecision}'
|
|
111342
|
+
* For more information see {@link https://www.w3.org/TR/trace-context/}
|
|
111343
|
+
*/
|
|
111344
|
+
function parseTraceParent(traceParent) {
|
|
111345
|
+
const match = TRACE_PARENT_REGEX.exec(traceParent);
|
|
111346
|
+
if (!match)
|
|
111347
|
+
return null;
|
|
111348
|
+
// According to the specification the implementation should be compatible
|
|
111349
|
+
// with future versions. If there are more parts, we only reject it if it's using version 00
|
|
111350
|
+
// See https://www.w3.org/TR/trace-context/#versioning-of-traceparent
|
|
111351
|
+
if (match[1] === '00' && match[5])
|
|
111352
|
+
return null;
|
|
111353
|
+
return {
|
|
111354
|
+
traceId: match[2],
|
|
111355
|
+
spanId: match[3],
|
|
111356
|
+
traceFlags: parseInt(match[4], 16),
|
|
111357
|
+
};
|
|
111358
|
+
}
|
|
111359
|
+
/**
|
|
111360
|
+
* Propagates {@link SpanContext} through Trace Context format propagation.
|
|
111361
|
+
*
|
|
111362
|
+
* Based on the Trace Context specification:
|
|
111363
|
+
* https://www.w3.org/TR/trace-context/
|
|
111364
|
+
*/
|
|
111365
|
+
class W3CTraceContextPropagator {
|
|
111366
|
+
inject(context, carrier, setter) {
|
|
111367
|
+
const spanContext = trace.getSpanContext(context);
|
|
111368
|
+
if (!spanContext ||
|
|
111369
|
+
isTracingSuppressed(context) ||
|
|
111370
|
+
!isSpanContextValid(spanContext))
|
|
111371
|
+
return;
|
|
111372
|
+
const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || TraceFlags.NONE).toString(16)}`;
|
|
111373
|
+
setter.set(carrier, TRACE_PARENT_HEADER, traceParent);
|
|
111374
|
+
if (spanContext.traceState) {
|
|
111375
|
+
setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());
|
|
111376
|
+
}
|
|
111377
|
+
}
|
|
111378
|
+
extract(context, carrier, getter) {
|
|
111379
|
+
const traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);
|
|
111380
|
+
if (!traceParentHeader)
|
|
111381
|
+
return context;
|
|
111382
|
+
const traceParent = Array.isArray(traceParentHeader)
|
|
111383
|
+
? traceParentHeader[0]
|
|
111384
|
+
: traceParentHeader;
|
|
111385
|
+
if (typeof traceParent !== 'string')
|
|
111386
|
+
return context;
|
|
111387
|
+
const spanContext = parseTraceParent(traceParent);
|
|
111388
|
+
if (!spanContext)
|
|
111389
|
+
return context;
|
|
111390
|
+
spanContext.isRemote = true;
|
|
111391
|
+
const traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);
|
|
111392
|
+
if (traceStateHeader) {
|
|
111393
|
+
// If more than one `tracestate` header is found, we merge them into a
|
|
111394
|
+
// single header.
|
|
111395
|
+
const state = Array.isArray(traceStateHeader)
|
|
111396
|
+
? traceStateHeader.join(',')
|
|
111397
|
+
: traceStateHeader;
|
|
111398
|
+
spanContext.traceState = new TraceState(typeof state === 'string' ? state : undefined);
|
|
111399
|
+
}
|
|
111400
|
+
return trace.setSpanContext(context, spanContext);
|
|
111401
|
+
}
|
|
111402
|
+
fields() {
|
|
111403
|
+
return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER];
|
|
111404
|
+
}
|
|
111405
|
+
}
|
|
111406
|
+
|
|
111407
|
+
/*
|
|
111408
|
+
* Copyright The OpenTelemetry Authors
|
|
111409
|
+
*
|
|
111410
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111411
|
+
* you may not use this file except in compliance with the License.
|
|
111412
|
+
* You may obtain a copy of the License at
|
|
111413
|
+
*
|
|
111414
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111415
|
+
*
|
|
111416
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111417
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111418
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111419
|
+
* See the License for the specific language governing permissions and
|
|
111420
|
+
* limitations under the License.
|
|
111421
|
+
*/
|
|
111422
|
+
const RPC_METADATA_KEY = createContextKey('OpenTelemetry SDK Context Key RPC_METADATA');
|
|
111423
|
+
var RPCType;
|
|
111424
|
+
(function (RPCType) {
|
|
111425
|
+
RPCType["HTTP"] = "http";
|
|
111426
|
+
})(RPCType || (RPCType = {}));
|
|
111427
|
+
function setRPCMetadata(context, meta) {
|
|
111428
|
+
return context.setValue(RPC_METADATA_KEY, meta);
|
|
111429
|
+
}
|
|
111430
|
+
function deleteRPCMetadata(context) {
|
|
111431
|
+
return context.deleteValue(RPC_METADATA_KEY);
|
|
111432
|
+
}
|
|
111433
|
+
function getRPCMetadata(context) {
|
|
111434
|
+
return context.getValue(RPC_METADATA_KEY);
|
|
111435
|
+
}
|
|
111436
|
+
|
|
111437
|
+
/*
|
|
111438
|
+
* Copyright The OpenTelemetry Authors
|
|
111439
|
+
*
|
|
111440
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111441
|
+
* you may not use this file except in compliance with the License.
|
|
111442
|
+
* You may obtain a copy of the License at
|
|
111443
|
+
*
|
|
111444
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111445
|
+
*
|
|
111446
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111447
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111448
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111449
|
+
* See the License for the specific language governing permissions and
|
|
111450
|
+
* limitations under the License.
|
|
111451
|
+
*/
|
|
111452
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
111453
|
+
/**
|
|
111454
|
+
* based on lodash in order to support esm builds without esModuleInterop.
|
|
111455
|
+
* lodash is using MIT License.
|
|
111456
|
+
**/
|
|
111457
|
+
const objectTag = '[object Object]';
|
|
111458
|
+
const nullTag$1 = '[object Null]';
|
|
111459
|
+
const undefinedTag$1 = '[object Undefined]';
|
|
111460
|
+
const funcProto = Function.prototype;
|
|
111461
|
+
const funcToString = funcProto.toString;
|
|
111462
|
+
const objectCtorString = funcToString.call(Object);
|
|
111463
|
+
const getPrototypeOf = Object.getPrototypeOf;
|
|
111464
|
+
const objectProto$2 = Object.prototype;
|
|
111465
|
+
const hasOwnProperty$1 = objectProto$2.hasOwnProperty;
|
|
111466
|
+
const symToStringTag$2 = Symbol ? Symbol.toStringTag : undefined;
|
|
111467
|
+
const nativeObjectToString$2 = objectProto$2.toString;
|
|
111468
|
+
/**
|
|
111469
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
111470
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
111471
|
+
*
|
|
111472
|
+
* @static
|
|
111473
|
+
* @memberOf _
|
|
111474
|
+
* @since 0.8.0
|
|
111475
|
+
* @category Lang
|
|
111476
|
+
* @param {*} value The value to check.
|
|
111477
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
111478
|
+
* @example
|
|
111479
|
+
*
|
|
111480
|
+
* function Foo() {
|
|
111481
|
+
* this.a = 1;
|
|
111482
|
+
* }
|
|
111483
|
+
*
|
|
111484
|
+
* _.isPlainObject(new Foo);
|
|
111485
|
+
* // => false
|
|
111486
|
+
*
|
|
111487
|
+
* _.isPlainObject([1, 2, 3]);
|
|
111488
|
+
* // => false
|
|
111489
|
+
*
|
|
111490
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
111491
|
+
* // => true
|
|
111492
|
+
*
|
|
111493
|
+
* _.isPlainObject(Object.create(null));
|
|
111494
|
+
* // => true
|
|
111495
|
+
*/
|
|
111496
|
+
function isPlainObject(value) {
|
|
111497
|
+
if (!isObjectLike$1(value) || baseGetTag$1(value) !== objectTag) {
|
|
111498
|
+
return false;
|
|
111499
|
+
}
|
|
111500
|
+
const proto = getPrototypeOf(value);
|
|
111501
|
+
if (proto === null) {
|
|
111502
|
+
return true;
|
|
111503
|
+
}
|
|
111504
|
+
const Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor;
|
|
111505
|
+
return (typeof Ctor == 'function' &&
|
|
111506
|
+
Ctor instanceof Ctor &&
|
|
111507
|
+
funcToString.call(Ctor) === objectCtorString);
|
|
111508
|
+
}
|
|
111509
|
+
/**
|
|
111510
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
111511
|
+
* and has a `typeof` result of "object".
|
|
111512
|
+
*
|
|
111513
|
+
* @static
|
|
111514
|
+
* @memberOf _
|
|
111515
|
+
* @since 4.0.0
|
|
111516
|
+
* @category Lang
|
|
111517
|
+
* @param {*} value The value to check.
|
|
111518
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
111519
|
+
* @example
|
|
111520
|
+
*
|
|
111521
|
+
* _.isObjectLike({});
|
|
111522
|
+
* // => true
|
|
111523
|
+
*
|
|
111524
|
+
* _.isObjectLike([1, 2, 3]);
|
|
111525
|
+
* // => true
|
|
111526
|
+
*
|
|
111527
|
+
* _.isObjectLike(_.noop);
|
|
111528
|
+
* // => false
|
|
111529
|
+
*
|
|
111530
|
+
* _.isObjectLike(null);
|
|
111531
|
+
* // => false
|
|
111532
|
+
*/
|
|
111533
|
+
function isObjectLike$1(value) {
|
|
111534
|
+
return value != null && typeof value == 'object';
|
|
111535
|
+
}
|
|
111536
|
+
/**
|
|
111537
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
111538
|
+
*
|
|
111539
|
+
* @private
|
|
111540
|
+
* @param {*} value The value to query.
|
|
111541
|
+
* @returns {string} Returns the `toStringTag`.
|
|
111542
|
+
*/
|
|
111543
|
+
function baseGetTag$1(value) {
|
|
111544
|
+
if (value == null) {
|
|
111545
|
+
return value === undefined ? undefinedTag$1 : nullTag$1;
|
|
111546
|
+
}
|
|
111547
|
+
return symToStringTag$2 && symToStringTag$2 in Object(value)
|
|
111548
|
+
? getRawTag$1(value)
|
|
111549
|
+
: objectToString$1(value);
|
|
111550
|
+
}
|
|
111551
|
+
/**
|
|
111552
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
111553
|
+
*
|
|
111554
|
+
* @private
|
|
111555
|
+
* @param {*} value The value to query.
|
|
111556
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
111557
|
+
*/
|
|
111558
|
+
function getRawTag$1(value) {
|
|
111559
|
+
const isOwn = hasOwnProperty$1.call(value, symToStringTag$2), tag = value[symToStringTag$2];
|
|
111560
|
+
let unmasked = false;
|
|
111561
|
+
try {
|
|
111562
|
+
value[symToStringTag$2] = undefined;
|
|
111563
|
+
unmasked = true;
|
|
111564
|
+
}
|
|
111565
|
+
catch (e) {
|
|
111566
|
+
// silence
|
|
111567
|
+
}
|
|
111568
|
+
const result = nativeObjectToString$2.call(value);
|
|
111569
|
+
if (unmasked) {
|
|
111570
|
+
if (isOwn) {
|
|
111571
|
+
value[symToStringTag$2] = tag;
|
|
111572
|
+
}
|
|
111573
|
+
else {
|
|
111574
|
+
delete value[symToStringTag$2];
|
|
111575
|
+
}
|
|
111576
|
+
}
|
|
111577
|
+
return result;
|
|
111578
|
+
}
|
|
111579
|
+
/**
|
|
111580
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
111581
|
+
*
|
|
111582
|
+
* @private
|
|
111583
|
+
* @param {*} value The value to convert.
|
|
111584
|
+
* @returns {string} Returns the converted string.
|
|
111585
|
+
*/
|
|
111586
|
+
function objectToString$1(value) {
|
|
111587
|
+
return nativeObjectToString$2.call(value);
|
|
111588
|
+
}
|
|
111589
|
+
|
|
111590
|
+
/*
|
|
111591
|
+
* Copyright The OpenTelemetry Authors
|
|
111592
|
+
*
|
|
111593
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111594
|
+
* you may not use this file except in compliance with the License.
|
|
111595
|
+
* You may obtain a copy of the License at
|
|
111596
|
+
*
|
|
111597
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111598
|
+
*
|
|
111599
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111600
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111601
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111602
|
+
* See the License for the specific language governing permissions and
|
|
111603
|
+
* limitations under the License.
|
|
111604
|
+
*/
|
|
111605
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
111606
|
+
const MAX_LEVEL = 20;
|
|
111607
|
+
/**
|
|
111608
|
+
* Merges objects together
|
|
111609
|
+
* @param args - objects / values to be merged
|
|
111610
|
+
*/
|
|
111611
|
+
function merge(...args) {
|
|
111612
|
+
let result = args.shift();
|
|
111613
|
+
const objects = new WeakMap();
|
|
111614
|
+
while (args.length > 0) {
|
|
111615
|
+
result = mergeTwoObjects(result, args.shift(), 0, objects);
|
|
111616
|
+
}
|
|
111617
|
+
return result;
|
|
111618
|
+
}
|
|
111619
|
+
function takeValue(value) {
|
|
111620
|
+
if (isArray(value)) {
|
|
111621
|
+
return value.slice();
|
|
111622
|
+
}
|
|
111623
|
+
return value;
|
|
111624
|
+
}
|
|
111625
|
+
/**
|
|
111626
|
+
* Merges two objects
|
|
111627
|
+
* @param one - first object
|
|
111628
|
+
* @param two - second object
|
|
111629
|
+
* @param level - current deep level
|
|
111630
|
+
* @param objects - objects holder that has been already referenced - to prevent
|
|
111631
|
+
* cyclic dependency
|
|
111632
|
+
*/
|
|
111633
|
+
function mergeTwoObjects(one, two, level = 0, objects) {
|
|
111634
|
+
let result;
|
|
111635
|
+
if (level > MAX_LEVEL) {
|
|
111636
|
+
return undefined;
|
|
111637
|
+
}
|
|
111638
|
+
level++;
|
|
111639
|
+
if (isPrimitive(one) || isPrimitive(two) || isFunction$3(two)) {
|
|
111640
|
+
result = takeValue(two);
|
|
111641
|
+
}
|
|
111642
|
+
else if (isArray(one)) {
|
|
111643
|
+
result = one.slice();
|
|
111644
|
+
if (isArray(two)) {
|
|
111645
|
+
for (let i = 0, j = two.length; i < j; i++) {
|
|
111646
|
+
result.push(takeValue(two[i]));
|
|
111647
|
+
}
|
|
111648
|
+
}
|
|
111649
|
+
else if (isObject$4(two)) {
|
|
111650
|
+
const keys = Object.keys(two);
|
|
111651
|
+
for (let i = 0, j = keys.length; i < j; i++) {
|
|
111652
|
+
const key = keys[i];
|
|
111653
|
+
result[key] = takeValue(two[key]);
|
|
111654
|
+
}
|
|
111655
|
+
}
|
|
111656
|
+
}
|
|
111657
|
+
else if (isObject$4(one)) {
|
|
111658
|
+
if (isObject$4(two)) {
|
|
111659
|
+
if (!shouldMerge(one, two)) {
|
|
111660
|
+
return two;
|
|
111661
|
+
}
|
|
111662
|
+
result = Object.assign({}, one);
|
|
111663
|
+
const keys = Object.keys(two);
|
|
111664
|
+
for (let i = 0, j = keys.length; i < j; i++) {
|
|
111665
|
+
const key = keys[i];
|
|
111666
|
+
const twoValue = two[key];
|
|
111667
|
+
if (isPrimitive(twoValue)) {
|
|
111668
|
+
if (typeof twoValue === 'undefined') {
|
|
111669
|
+
delete result[key];
|
|
111670
|
+
}
|
|
111671
|
+
else {
|
|
111672
|
+
// result[key] = takeValue(twoValue);
|
|
111673
|
+
result[key] = twoValue;
|
|
111674
|
+
}
|
|
111675
|
+
}
|
|
111676
|
+
else {
|
|
111677
|
+
const obj1 = result[key];
|
|
111678
|
+
const obj2 = twoValue;
|
|
111679
|
+
if (wasObjectReferenced(one, key, objects) ||
|
|
111680
|
+
wasObjectReferenced(two, key, objects)) {
|
|
111681
|
+
delete result[key];
|
|
111682
|
+
}
|
|
111683
|
+
else {
|
|
111684
|
+
if (isObject$4(obj1) && isObject$4(obj2)) {
|
|
111685
|
+
const arr1 = objects.get(obj1) || [];
|
|
111686
|
+
const arr2 = objects.get(obj2) || [];
|
|
111687
|
+
arr1.push({ obj: one, key });
|
|
111688
|
+
arr2.push({ obj: two, key });
|
|
111689
|
+
objects.set(obj1, arr1);
|
|
111690
|
+
objects.set(obj2, arr2);
|
|
111691
|
+
}
|
|
111692
|
+
result[key] = mergeTwoObjects(result[key], twoValue, level, objects);
|
|
111693
|
+
}
|
|
111694
|
+
}
|
|
111695
|
+
}
|
|
111696
|
+
}
|
|
111697
|
+
else {
|
|
111698
|
+
result = two;
|
|
111699
|
+
}
|
|
111700
|
+
}
|
|
111701
|
+
return result;
|
|
111702
|
+
}
|
|
111703
|
+
/**
|
|
111704
|
+
* Function to check if object has been already reference
|
|
111705
|
+
* @param obj
|
|
111706
|
+
* @param key
|
|
111707
|
+
* @param objects
|
|
111708
|
+
*/
|
|
111709
|
+
function wasObjectReferenced(obj, key, objects) {
|
|
111710
|
+
const arr = objects.get(obj[key]) || [];
|
|
111711
|
+
for (let i = 0, j = arr.length; i < j; i++) {
|
|
111712
|
+
const info = arr[i];
|
|
111713
|
+
if (info.key === key && info.obj === obj) {
|
|
111714
|
+
return true;
|
|
111715
|
+
}
|
|
111716
|
+
}
|
|
111717
|
+
return false;
|
|
111718
|
+
}
|
|
111719
|
+
function isArray(value) {
|
|
111720
|
+
return Array.isArray(value);
|
|
111721
|
+
}
|
|
111722
|
+
function isFunction$3(value) {
|
|
111723
|
+
return typeof value === 'function';
|
|
111724
|
+
}
|
|
111725
|
+
function isObject$4(value) {
|
|
111726
|
+
return (!isPrimitive(value) &&
|
|
111727
|
+
!isArray(value) &&
|
|
111728
|
+
!isFunction$3(value) &&
|
|
111729
|
+
typeof value === 'object');
|
|
111730
|
+
}
|
|
111731
|
+
function isPrimitive(value) {
|
|
111732
|
+
return (typeof value === 'string' ||
|
|
111733
|
+
typeof value === 'number' ||
|
|
111734
|
+
typeof value === 'boolean' ||
|
|
111735
|
+
typeof value === 'undefined' ||
|
|
111736
|
+
value instanceof Date ||
|
|
111737
|
+
value instanceof RegExp ||
|
|
111738
|
+
value === null);
|
|
111739
|
+
}
|
|
111740
|
+
function shouldMerge(one, two) {
|
|
111741
|
+
if (!isPlainObject(one) || !isPlainObject(two)) {
|
|
111742
|
+
return false;
|
|
111743
|
+
}
|
|
111744
|
+
return true;
|
|
111745
|
+
}
|
|
111746
|
+
|
|
111747
|
+
/*
|
|
111748
|
+
* Copyright The OpenTelemetry Authors
|
|
111749
|
+
*
|
|
111750
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111751
|
+
* you may not use this file except in compliance with the License.
|
|
111752
|
+
* You may obtain a copy of the License at
|
|
111753
|
+
*
|
|
111754
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111755
|
+
*
|
|
111756
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111757
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111758
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111759
|
+
* See the License for the specific language governing permissions and
|
|
111760
|
+
* limitations under the License.
|
|
111761
|
+
*/
|
|
111762
|
+
/**
|
|
111763
|
+
* Error that is thrown on timeouts.
|
|
111764
|
+
*/
|
|
111765
|
+
class TimeoutError extends Error {
|
|
111766
|
+
constructor(message) {
|
|
111767
|
+
super(message);
|
|
111768
|
+
// manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:
|
|
111769
|
+
// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
111770
|
+
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
111771
|
+
}
|
|
111772
|
+
}
|
|
111773
|
+
/**
|
|
111774
|
+
* Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise
|
|
111775
|
+
* rejects, and resolves if the specified promise resolves.
|
|
111776
|
+
*
|
|
111777
|
+
* <p> NOTE: this operation will continue even after it throws a {@link TimeoutError}.
|
|
111778
|
+
*
|
|
111779
|
+
* @param promise promise to use with timeout.
|
|
111780
|
+
* @param timeout the timeout in milliseconds until the returned promise is rejected.
|
|
111781
|
+
*/
|
|
111782
|
+
function callWithTimeout(promise, timeout) {
|
|
111783
|
+
let timeoutHandle;
|
|
111784
|
+
const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {
|
|
111785
|
+
timeoutHandle = setTimeout(function timeoutHandler() {
|
|
111786
|
+
reject(new TimeoutError('Operation timed out.'));
|
|
111787
|
+
}, timeout);
|
|
111788
|
+
});
|
|
111789
|
+
return Promise.race([promise, timeoutPromise]).then(result => {
|
|
111790
|
+
clearTimeout(timeoutHandle);
|
|
111791
|
+
return result;
|
|
111792
|
+
}, reason => {
|
|
111793
|
+
clearTimeout(timeoutHandle);
|
|
111794
|
+
throw reason;
|
|
111795
|
+
});
|
|
111796
|
+
}
|
|
111797
|
+
|
|
111798
|
+
/*
|
|
111799
|
+
* Copyright The OpenTelemetry Authors
|
|
111800
|
+
*
|
|
111801
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111802
|
+
* you may not use this file except in compliance with the License.
|
|
111803
|
+
* You may obtain a copy of the License at
|
|
111804
|
+
*
|
|
111805
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111806
|
+
*
|
|
111807
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111808
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111809
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111810
|
+
* See the License for the specific language governing permissions and
|
|
111811
|
+
* limitations under the License.
|
|
111812
|
+
*/
|
|
111813
|
+
function urlMatches(url, urlToMatch) {
|
|
111814
|
+
if (typeof urlToMatch === 'string') {
|
|
111815
|
+
return url === urlToMatch;
|
|
111816
|
+
}
|
|
111817
|
+
else {
|
|
111818
|
+
return !!url.match(urlToMatch);
|
|
111819
|
+
}
|
|
111820
|
+
}
|
|
111821
|
+
/**
|
|
111822
|
+
* Check if {@param url} should be ignored when comparing against {@param ignoredUrls}
|
|
111823
|
+
* @param url
|
|
111824
|
+
* @param ignoredUrls
|
|
111825
|
+
*/
|
|
111826
|
+
function isUrlIgnored(url, ignoredUrls) {
|
|
111827
|
+
if (!ignoredUrls) {
|
|
111828
|
+
return false;
|
|
111829
|
+
}
|
|
111830
|
+
for (const ignoreUrl of ignoredUrls) {
|
|
111831
|
+
if (urlMatches(url, ignoreUrl)) {
|
|
111832
|
+
return true;
|
|
111833
|
+
}
|
|
111834
|
+
}
|
|
111835
|
+
return false;
|
|
111836
|
+
}
|
|
111837
|
+
|
|
111838
|
+
/*
|
|
111839
|
+
* Copyright The OpenTelemetry Authors
|
|
111840
|
+
*
|
|
111841
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111842
|
+
* you may not use this file except in compliance with the License.
|
|
111843
|
+
* You may obtain a copy of the License at
|
|
111844
|
+
*
|
|
111845
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111846
|
+
*
|
|
111847
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111848
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111849
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111850
|
+
* See the License for the specific language governing permissions and
|
|
111851
|
+
* limitations under the License.
|
|
111852
|
+
*/
|
|
111853
|
+
let Deferred$1 = class Deferred {
|
|
111854
|
+
_promise;
|
|
111855
|
+
_resolve;
|
|
111856
|
+
_reject;
|
|
111857
|
+
constructor() {
|
|
111858
|
+
this._promise = new Promise((resolve, reject) => {
|
|
111859
|
+
this._resolve = resolve;
|
|
111860
|
+
this._reject = reject;
|
|
111861
|
+
});
|
|
111862
|
+
}
|
|
111863
|
+
get promise() {
|
|
111864
|
+
return this._promise;
|
|
111865
|
+
}
|
|
111866
|
+
resolve(val) {
|
|
111867
|
+
this._resolve(val);
|
|
111868
|
+
}
|
|
111869
|
+
reject(err) {
|
|
111870
|
+
this._reject(err);
|
|
111871
|
+
}
|
|
111872
|
+
};
|
|
111873
|
+
|
|
111874
|
+
/*
|
|
111875
|
+
* Copyright The OpenTelemetry Authors
|
|
111876
|
+
*
|
|
111877
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111878
|
+
* you may not use this file except in compliance with the License.
|
|
111879
|
+
* You may obtain a copy of the License at
|
|
111880
|
+
*
|
|
111881
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111882
|
+
*
|
|
111883
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111884
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111885
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111886
|
+
* See the License for the specific language governing permissions and
|
|
111887
|
+
* limitations under the License.
|
|
111888
|
+
*/
|
|
111889
|
+
/**
|
|
111890
|
+
* Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.
|
|
111891
|
+
*/
|
|
111892
|
+
class BindOnceFuture {
|
|
111893
|
+
_callback;
|
|
111894
|
+
_that;
|
|
111895
|
+
_isCalled = false;
|
|
111896
|
+
_deferred = new Deferred$1();
|
|
111897
|
+
constructor(_callback, _that) {
|
|
111898
|
+
this._callback = _callback;
|
|
111899
|
+
this._that = _that;
|
|
111900
|
+
}
|
|
111901
|
+
get isCalled() {
|
|
111902
|
+
return this._isCalled;
|
|
111903
|
+
}
|
|
111904
|
+
get promise() {
|
|
111905
|
+
return this._deferred.promise;
|
|
111906
|
+
}
|
|
111907
|
+
call(...args) {
|
|
111908
|
+
if (!this._isCalled) {
|
|
111909
|
+
this._isCalled = true;
|
|
111910
|
+
try {
|
|
111911
|
+
Promise.resolve(this._callback.call(this._that, ...args)).then(val => this._deferred.resolve(val), err => this._deferred.reject(err));
|
|
111912
|
+
}
|
|
111913
|
+
catch (err) {
|
|
111914
|
+
this._deferred.reject(err);
|
|
111915
|
+
}
|
|
111916
|
+
}
|
|
111917
|
+
return this._deferred.promise;
|
|
111918
|
+
}
|
|
111919
|
+
}
|
|
111920
|
+
|
|
111921
|
+
/*
|
|
111922
|
+
* Copyright The OpenTelemetry Authors
|
|
111923
|
+
*
|
|
111924
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111925
|
+
* you may not use this file except in compliance with the License.
|
|
111926
|
+
* You may obtain a copy of the License at
|
|
111927
|
+
*
|
|
111928
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111929
|
+
*
|
|
111930
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111931
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111932
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111933
|
+
* See the License for the specific language governing permissions and
|
|
111934
|
+
* limitations under the License.
|
|
111935
|
+
*/
|
|
111936
|
+
const logLevelMap = {
|
|
111937
|
+
ALL: DiagLogLevel.ALL,
|
|
111938
|
+
VERBOSE: DiagLogLevel.VERBOSE,
|
|
111939
|
+
DEBUG: DiagLogLevel.DEBUG,
|
|
111940
|
+
INFO: DiagLogLevel.INFO,
|
|
111941
|
+
WARN: DiagLogLevel.WARN,
|
|
111942
|
+
ERROR: DiagLogLevel.ERROR,
|
|
111943
|
+
NONE: DiagLogLevel.NONE,
|
|
111944
|
+
};
|
|
111945
|
+
/**
|
|
111946
|
+
* Convert a string to a {@link DiagLogLevel}, defaults to {@link DiagLogLevel} if the log level does not exist or undefined if the input is undefined.
|
|
111947
|
+
* @param value
|
|
111948
|
+
*/
|
|
111949
|
+
function diagLogLevelFromString(value) {
|
|
111950
|
+
if (value == null) {
|
|
111951
|
+
// don't fall back to default - no value set has different semantics for ús than an incorrect value (do not set vs. fall back to default)
|
|
111952
|
+
return undefined;
|
|
111953
|
+
}
|
|
111954
|
+
const resolvedLogLevel = logLevelMap[value.toUpperCase()];
|
|
111955
|
+
if (resolvedLogLevel == null) {
|
|
111956
|
+
diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap)}, using default`);
|
|
111957
|
+
return DiagLogLevel.INFO;
|
|
111958
|
+
}
|
|
111959
|
+
return resolvedLogLevel;
|
|
111960
|
+
}
|
|
111961
|
+
|
|
111962
|
+
/*
|
|
111963
|
+
* Copyright The OpenTelemetry Authors
|
|
111964
|
+
*
|
|
111965
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111966
|
+
* you may not use this file except in compliance with the License.
|
|
111967
|
+
* You may obtain a copy of the License at
|
|
111968
|
+
*
|
|
111969
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
111970
|
+
*
|
|
111971
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111972
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
111973
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
111974
|
+
* See the License for the specific language governing permissions and
|
|
111975
|
+
* limitations under the License.
|
|
111976
|
+
*/
|
|
111977
|
+
/**
|
|
111978
|
+
* @internal
|
|
111979
|
+
* Shared functionality used by Exporters while exporting data, including suppression of Traces.
|
|
111980
|
+
*/
|
|
111981
|
+
function _export(exporter, arg) {
|
|
111982
|
+
return new Promise(resolve => {
|
|
111983
|
+
// prevent downstream exporter calls from generating spans
|
|
111984
|
+
context.with(suppressTracing(context.active()), () => {
|
|
111985
|
+
exporter.export(arg, (result) => {
|
|
111986
|
+
resolve(result);
|
|
111987
|
+
});
|
|
111988
|
+
});
|
|
111989
|
+
});
|
|
111990
|
+
}
|
|
111991
|
+
|
|
111992
|
+
const internal = {
|
|
111993
|
+
_export
|
|
111994
|
+
};
|
|
111995
|
+
|
|
111996
|
+
const esm = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
111997
|
+
__proto__: null,
|
|
111998
|
+
AnchoredClock,
|
|
111999
|
+
BindOnceFuture,
|
|
112000
|
+
CompositePropagator,
|
|
112001
|
+
get ExportResultCode () { return ExportResultCode; },
|
|
112002
|
+
get RPCType () { return RPCType; },
|
|
112003
|
+
SDK_INFO,
|
|
112004
|
+
TRACE_PARENT_HEADER,
|
|
112005
|
+
TRACE_STATE_HEADER,
|
|
112006
|
+
TimeoutError,
|
|
112007
|
+
TraceState,
|
|
112008
|
+
W3CBaggagePropagator,
|
|
112009
|
+
W3CTraceContextPropagator,
|
|
112010
|
+
_globalThis,
|
|
112011
|
+
addHrTimes,
|
|
112012
|
+
callWithTimeout,
|
|
112013
|
+
deleteRPCMetadata,
|
|
112014
|
+
diagLogLevelFromString,
|
|
112015
|
+
getBooleanFromEnv,
|
|
112016
|
+
getNumberFromEnv,
|
|
112017
|
+
getRPCMetadata,
|
|
112018
|
+
getStringFromEnv,
|
|
112019
|
+
getStringListFromEnv,
|
|
112020
|
+
getTimeOrigin,
|
|
112021
|
+
globalErrorHandler,
|
|
112022
|
+
hrTime,
|
|
112023
|
+
hrTimeDuration,
|
|
112024
|
+
hrTimeToMicroseconds,
|
|
112025
|
+
hrTimeToMilliseconds,
|
|
112026
|
+
hrTimeToNanoseconds,
|
|
112027
|
+
hrTimeToTimeStamp,
|
|
112028
|
+
internal,
|
|
112029
|
+
isAttributeValue,
|
|
112030
|
+
isTimeInput,
|
|
112031
|
+
isTimeInputHrTime,
|
|
112032
|
+
isTracingSuppressed,
|
|
112033
|
+
isUrlIgnored,
|
|
112034
|
+
loggingErrorHandler,
|
|
112035
|
+
merge,
|
|
112036
|
+
millisToHrTime,
|
|
112037
|
+
otperformance,
|
|
112038
|
+
parseKeyPairsIntoRecord,
|
|
112039
|
+
parseTraceParent,
|
|
112040
|
+
sanitizeAttributes,
|
|
112041
|
+
setGlobalErrorHandler,
|
|
112042
|
+
setRPCMetadata,
|
|
112043
|
+
suppressTracing,
|
|
112044
|
+
timeInputToHrTime,
|
|
112045
|
+
unrefTimer,
|
|
112046
|
+
unsuppressTracing,
|
|
112047
|
+
urlMatches
|
|
112048
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
112049
|
+
|
|
112050
|
+
const require$$7 = /*@__PURE__*/getAugmentedNamespace(esm);
|
|
112051
|
+
|
|
110394
112052
|
var hasRequiredInstrumentation;
|
|
110395
112053
|
|
|
110396
112054
|
function requireInstrumentation () {
|
|
@@ -110421,7 +112079,7 @@ function requireInstrumentation () {
|
|
|
110421
112079
|
/** @knipignore */
|
|
110422
112080
|
const version_1 = requireVersion();
|
|
110423
112081
|
const SpanNames_1 = requireSpanNames();
|
|
110424
|
-
const core_1 = require$$
|
|
112082
|
+
const core_1 = require$$7;
|
|
110425
112083
|
const semantic_conventions_1 = require$$8;
|
|
110426
112084
|
const semconv_1 = requireSemconv();
|
|
110427
112085
|
function extractModuleExports(module) {
|
|
@@ -122846,7 +124504,7 @@ const DropdownMenuSeparator = reactExports.forwardRef(({ className, ...props },
|
|
|
122846
124504
|
));
|
|
122847
124505
|
DropdownMenuSeparator.displayName = Separator2.displayName;
|
|
122848
124506
|
|
|
122849
|
-
const version = "1.0.
|
|
124507
|
+
const version = "1.0.1";
|
|
122850
124508
|
const info = {
|
|
122851
124509
|
version,
|
|
122852
124510
|
};
|
|
@@ -131586,6 +133244,7 @@ function Page$1({
|
|
|
131586
133244
|
reactExports.useEffect(() => {
|
|
131587
133245
|
socketIOManager.initialize(entityId, [agentId]);
|
|
131588
133246
|
socketIOManager.joinRoom(roomId);
|
|
133247
|
+
setInputDisabled(false);
|
|
131589
133248
|
console.log(`[Chat] Joined room ${roomId} with entityId ${entityId}`);
|
|
131590
133249
|
const handleMessageBroadcasting = (data) => {
|
|
131591
133250
|
console.log("[Chat] Received message broadcast:", data);
|
|
@@ -131971,10 +133630,10 @@ function Page$1({
|
|
|
131971
133630
|
),
|
|
131972
133631
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 pb-4 mt-auto flex-shrink-0", children: [
|
|
131973
133632
|
inputDisabled && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-2 pb-2 text-sm text-muted-foreground flex items-center gap-2", children: [
|
|
131974
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-
|
|
131975
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
131976
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
131977
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
133633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-0.5 items-center justify-center", children: [
|
|
133634
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-[6px] h-[6px] bg-white rounded-full animate-bounce [animation-delay:0s]" }),
|
|
133635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-[6px] h-[6px] bg-white rounded-full animate-bounce [animation-delay:0.2s]" }),
|
|
133636
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-[6px] h-[6px] bg-white rounded-full animate-bounce [animation-delay:0.4s]" })
|
|
131978
133637
|
] }),
|
|
131979
133638
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
131980
133639
|
agentData.name,
|
|
@@ -132035,7 +133694,7 @@ function Page$1({
|
|
|
132035
133694
|
onChange: ({ target }) => setInput(target.value),
|
|
132036
133695
|
placeholder: inputDisabled ? "Input disabled while agent is processing..." : "Type your message here...",
|
|
132037
133696
|
className: "min-h-12 resize-none rounded-md bg-card border-0 p-3 shadow-none focus-visible:ring-0",
|
|
132038
|
-
disabled: inputDisabled
|
|
133697
|
+
disabled: inputDisabled || agentData.status === "inactive"
|
|
132039
133698
|
}
|
|
132040
133699
|
),
|
|
132041
133700
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center p-3 pt-0", children: [
|
|
@@ -132081,7 +133740,7 @@ function Page$1({
|
|
|
132081
133740
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
132082
133741
|
Button,
|
|
132083
133742
|
{
|
|
132084
|
-
disabled: inputDisabled || selectedFiles.some((f) => f.isUploading),
|
|
133743
|
+
disabled: inputDisabled || agentData.status === "inactive" || selectedFiles.some((f) => f.isUploading),
|
|
132085
133744
|
type: "submit",
|
|
132086
133745
|
size: "sm",
|
|
132087
133746
|
className: "ml-auto gap-1.5 h-[30px]",
|
|
@@ -149464,4 +151123,4 @@ clientExports.createRoot(rootElement).render(
|
|
|
149464
151123
|
);
|
|
149465
151124
|
|
|
149466
151125
|
export { Buffer as B, requireString_decoder as a, requireUtil$3 as b, requireShams$1 as c, requireCallBound as d, requireEsObjectAtoms as e, requireCallBind as f, requireGetIntrinsic as g, requireDefineDataProperty as h, requireHasPropertyDescriptors as i, requireEvents as j, requireStreamBrowserify as r };
|
|
149467
|
-
//# sourceMappingURL=index-
|
|
151126
|
+
//# sourceMappingURL=index-BQEpBB33.js.map
|