@8wave/ai-elements 0.112.0-beta.10 → 0.112.0-beta.13
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/_chunks/{PkToolShowVideo-Djr8Ofsz.js → PkToolShowVideo-p6Y9j3-B.js} +3 -3
- package/dist/_chunks/PkToolShowVideo-p6Y9j3-B.js.map +1 -0
- package/dist/_chunks/{browser-B0Xnbqi7.js → browser-Ct5TRDgj.js} +521 -518
- package/dist/_chunks/{browser-B0Xnbqi7.js.map → browser-Ct5TRDgj.js.map} +1 -1
- package/dist/ai-elements.es.js +10 -6
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-CI9ucJ2M.js → PkChatbot-C0pf6xeZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbot-CI9ucJ2M.js.map → PkChatbot-C0pf6xeZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BsT48S-h.js → PkChatbotMessages-HbKhrhbg.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotMessages-BsT48S-h.js.map → PkChatbotMessages-HbKhrhbg.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-jEBBPmSo.js → PkChatbotViewChat-DdxvITNb.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-jEBBPmSo.js.map → PkChatbotViewChat-DdxvITNb.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CjJcLvWs.js → PkToolShowDiagram-BWCBuXH8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CjJcLvWs.js.map → PkToolShowDiagram-BWCBuXH8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-Bv9kMd88.js → PkToolShowVideo-BZOTu2Qe.js} +3 -3
- package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +1 -0
- package/dist-vue/index.js +8 -8
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/models/src/schema/Organization.d.ts +3 -3
- package/package.json +1 -1
- package/dist/_chunks/PkToolShowVideo-Djr8Ofsz.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowVideo-Bv9kMd88.js.map +0 -1
|
@@ -254,7 +254,7 @@ var Ae = {
|
|
|
254
254
|
disable() {
|
|
255
255
|
return this;
|
|
256
256
|
}
|
|
257
|
-
}, Ne = "context", Pe = new Me(),
|
|
257
|
+
}, Ne = "context", Pe = new Me(), Fe = class e {
|
|
258
258
|
constructor() {}
|
|
259
259
|
static getInstance() {
|
|
260
260
|
return this._instance ||= new e(), this._instance;
|
|
@@ -277,16 +277,16 @@ var Ae = {
|
|
|
277
277
|
disable() {
|
|
278
278
|
this._getContextManager().disable(), g(Ne, y.instance());
|
|
279
279
|
}
|
|
280
|
-
},
|
|
280
|
+
}, x;
|
|
281
281
|
(function(e) {
|
|
282
282
|
e[e.NONE = 0] = "NONE", e[e.SAMPLED = 1] = "SAMPLED";
|
|
283
|
-
})(
|
|
284
|
-
var
|
|
283
|
+
})(x ||= {});
|
|
284
|
+
var Ie = {
|
|
285
285
|
traceId: "00000000000000000000000000000000",
|
|
286
286
|
spanId: "0000000000000000",
|
|
287
|
-
traceFlags:
|
|
288
|
-
},
|
|
289
|
-
constructor(e =
|
|
287
|
+
traceFlags: x.NONE
|
|
288
|
+
}, S = class {
|
|
289
|
+
constructor(e = Ie) {
|
|
290
290
|
this._spanContext = e;
|
|
291
291
|
}
|
|
292
292
|
spanContext() {
|
|
@@ -318,28 +318,28 @@ var Fe = {
|
|
|
318
318
|
return !1;
|
|
319
319
|
}
|
|
320
320
|
recordException(e, t) {}
|
|
321
|
-
},
|
|
322
|
-
function
|
|
323
|
-
return e.getValue(
|
|
321
|
+
}, Le = ue("OpenTelemetry Context Key SPAN");
|
|
322
|
+
function Re(e) {
|
|
323
|
+
return e.getValue(Le) || void 0;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
return
|
|
325
|
+
function ze() {
|
|
326
|
+
return Re(Fe.getInstance().active());
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
return e.setValue(
|
|
328
|
+
function Be(e, t) {
|
|
329
|
+
return e.setValue(Le, t);
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return e.deleteValue(
|
|
331
|
+
function Ve(e) {
|
|
332
|
+
return e.deleteValue(Le);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
return
|
|
334
|
+
function He(e, t) {
|
|
335
|
+
return Be(e, new S(t));
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
return
|
|
337
|
+
function Ue(e) {
|
|
338
|
+
return Re(e)?.spanContext();
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
|
|
342
|
-
var
|
|
342
|
+
var C = new Uint8Array([
|
|
343
343
|
0,
|
|
344
344
|
0,
|
|
345
345
|
0,
|
|
@@ -447,7 +447,7 @@ var Ue = new Uint8Array([
|
|
|
447
447
|
function We(e, t) {
|
|
448
448
|
if (typeof e != "string" || e.length !== t) return !1;
|
|
449
449
|
let n = 0;
|
|
450
|
-
for (let t = 0; t < e.length; t += 4) n += (
|
|
450
|
+
for (let t = 0; t < e.length; t += 4) n += (C[e.charCodeAt(t)] | 0) + (C[e.charCodeAt(t + 1)] | 0) + (C[e.charCodeAt(t + 2)] | 0) + (C[e.charCodeAt(t + 3)] | 0);
|
|
451
451
|
return n === t;
|
|
452
452
|
}
|
|
453
453
|
function Ge(e) {
|
|
@@ -460,21 +460,21 @@ function qe(e) {
|
|
|
460
460
|
return Ge(e.traceId) && Ke(e.spanId);
|
|
461
461
|
}
|
|
462
462
|
function Je(e) {
|
|
463
|
-
return new
|
|
463
|
+
return new S(e);
|
|
464
464
|
}
|
|
465
465
|
//#endregion
|
|
466
466
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js
|
|
467
|
-
var Ye =
|
|
467
|
+
var Ye = Fe.getInstance(), Xe = class {
|
|
468
468
|
startSpan(e, t, n = Ye.active()) {
|
|
469
|
-
if (t?.root) return new
|
|
470
|
-
let r = n &&
|
|
471
|
-
return Ze(r) && qe(r) ? new
|
|
469
|
+
if (t?.root) return new S();
|
|
470
|
+
let r = n && Ue(n);
|
|
471
|
+
return Ze(r) && qe(r) ? new S(r) : new S();
|
|
472
472
|
}
|
|
473
473
|
startActiveSpan(e, t, n, r) {
|
|
474
474
|
let i, a, o;
|
|
475
475
|
if (arguments.length < 2) return;
|
|
476
476
|
arguments.length === 2 ? o = t : arguments.length === 3 ? (i = t, o = n) : (i = t, a = n, o = r);
|
|
477
|
-
let s = a ?? Ye.active(), c = this.startSpan(e, i, s), l =
|
|
477
|
+
let s = a ?? Ye.active(), c = this.startSpan(e, i, s), l = Be(s, c);
|
|
478
478
|
return Ye.with(l, o, void 0, c);
|
|
479
479
|
}
|
|
480
480
|
};
|
|
@@ -534,7 +534,7 @@ var w;
|
|
|
534
534
|
})(w ||= {});
|
|
535
535
|
//#endregion
|
|
536
536
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context-api.js
|
|
537
|
-
var T =
|
|
537
|
+
var T = Fe.getInstance(), E = y.instance(), it = new class {
|
|
538
538
|
getMeter(e, t, n) {
|
|
539
539
|
return xe;
|
|
540
540
|
}
|
|
@@ -568,7 +568,7 @@ function lt(e) {
|
|
|
568
568
|
return e.getValue(ct) || void 0;
|
|
569
569
|
}
|
|
570
570
|
function ut() {
|
|
571
|
-
return lt(
|
|
571
|
+
return lt(Fe.getInstance().active());
|
|
572
572
|
}
|
|
573
573
|
function dt(e, t) {
|
|
574
574
|
return e.setValue(ct, t);
|
|
@@ -605,7 +605,7 @@ var pt = "propagation", mt = new st(), D = class e {
|
|
|
605
605
|
}
|
|
606
606
|
}.getInstance(), ht = "trace", O = class e {
|
|
607
607
|
constructor() {
|
|
608
|
-
this._proxyTracerProvider = new tt(), this.wrapSpanContext = Je, this.isSpanContextValid = qe, this.deleteSpan =
|
|
608
|
+
this._proxyTracerProvider = new tt(), this.wrapSpanContext = Je, this.isSpanContextValid = qe, this.deleteSpan = Ve, this.getSpan = Re, this.getActiveSpan = ze, this.getSpanContext = Ue, this.setSpan = Be, this.setSpanContext = He;
|
|
609
609
|
}
|
|
610
610
|
static getInstance() {
|
|
611
611
|
return this._instance ||= new e(), this._instance;
|
|
@@ -793,49 +793,49 @@ var Pt = "2.11.0", Ft = "process.runtime.name", It = {
|
|
|
793
793
|
[Ft]: "browser",
|
|
794
794
|
[i]: a,
|
|
795
795
|
[s]: Pt
|
|
796
|
-
}, j = performance, Lt = 9, Rt = 10 ** 6,
|
|
797
|
-
function
|
|
796
|
+
}, j = performance, Lt = 9, Rt = 10 ** 6, M = 10 ** Lt;
|
|
797
|
+
function N(e) {
|
|
798
798
|
let t = e / 1e3;
|
|
799
799
|
return [Math.trunc(t), Math.round(e % 1e3 * Rt)];
|
|
800
800
|
}
|
|
801
|
-
function N(e) {
|
|
802
|
-
return Wt(M(j.timeOrigin), M(typeof e == "number" ? e : j.now()));
|
|
803
|
-
}
|
|
804
801
|
function P(e) {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
802
|
+
return Ut(N(j.timeOrigin), N(typeof e == "number" ? e : j.now()));
|
|
803
|
+
}
|
|
804
|
+
function F(e) {
|
|
805
|
+
if (Vt(e)) return e;
|
|
806
|
+
if (typeof e == "number") return e < j.timeOrigin / 2 ? P(e) : N(e);
|
|
807
|
+
if (e instanceof Date) return N(e.getTime());
|
|
808
808
|
throw TypeError("Invalid input type");
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function zt(e, t) {
|
|
811
811
|
let n = t[0] - e[0], r = t[1] - e[1];
|
|
812
|
-
return r < 0 && (--n, r +=
|
|
812
|
+
return r < 0 && (--n, r += M), [n, r];
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
return e[0] *
|
|
814
|
+
function I(e) {
|
|
815
|
+
return e[0] * M + e[1];
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Bt(e) {
|
|
818
818
|
return e[0] * 1e3 + e[1] / 1e6;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Vt(e) {
|
|
821
821
|
return Array.isArray(e) && e.length === 2 && typeof e[0] == "number" && typeof e[1] == "number";
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
return
|
|
823
|
+
function Ht(e) {
|
|
824
|
+
return Vt(e) || typeof e == "number" || e instanceof Date;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Ut(e, t) {
|
|
827
827
|
let n = [e[0] + t[0], e[1] + t[1]];
|
|
828
|
-
return n[1] >=
|
|
828
|
+
return n[1] >= M && (n[1] -= M, n[0] += 1), n;
|
|
829
829
|
}
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/ExportResult.js
|
|
832
|
-
var
|
|
832
|
+
var L;
|
|
833
833
|
(function(e) {
|
|
834
834
|
e[e.SUCCESS = 0] = "SUCCESS", e[e.FAILED = 1] = "FAILED";
|
|
835
|
-
})(
|
|
835
|
+
})(L ||= {});
|
|
836
836
|
//#endregion
|
|
837
837
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
838
|
-
var
|
|
838
|
+
var Wt = class {
|
|
839
839
|
_propagators;
|
|
840
840
|
_fields;
|
|
841
841
|
constructor(e = {}) {
|
|
@@ -867,16 +867,16 @@ var Gt = class {
|
|
|
867
867
|
fields() {
|
|
868
868
|
return this._fields.slice();
|
|
869
869
|
}
|
|
870
|
-
},
|
|
871
|
-
function
|
|
872
|
-
return
|
|
870
|
+
}, Gt = "[_0-9a-z-*/]", Kt = RegExp(`^(?:${`[a-z]${Gt}{0,255}`}|${`[a-z0-9]${Gt}{0,240}@[a-z]${Gt}{0,13}`})$`), qt = /^[ -~]{0,255}[!-~]$/, Jt = /,|=/;
|
|
871
|
+
function Yt(e) {
|
|
872
|
+
return Kt.test(e);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
874
|
+
function Xt(e) {
|
|
875
|
+
return qt.test(e) && !Jt.test(e);
|
|
876
876
|
}
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
879
|
-
var
|
|
879
|
+
var Zt = 32, Qt = 512, $t = ",", en = "=", tn = class e {
|
|
880
880
|
_length;
|
|
881
881
|
_rawTraceState;
|
|
882
882
|
_internalState;
|
|
@@ -884,9 +884,9 @@ var Qt = 32, $t = 512, en = ",", tn = "=", nn = class e {
|
|
|
884
884
|
this._rawTraceState = typeof e == "string" ? e : "", this._length = this._rawTraceState.length;
|
|
885
885
|
}
|
|
886
886
|
set(e, t) {
|
|
887
|
-
if (!
|
|
887
|
+
if (!Yt(e) || !Xt(t)) return this;
|
|
888
888
|
let n = this._getState(), r = n.get(e), i = this._length;
|
|
889
|
-
if (i += typeof r == "string" ? t.length - r.length : e.length + t.length + (n.size > 0 ? 2 : 1), i >
|
|
889
|
+
if (i += typeof r == "string" ? t.length - r.length : e.length + t.length + (n.size > 0 ? 2 : 1), i > Qt) return this;
|
|
890
890
|
let a = new Map(n);
|
|
891
891
|
return a.delete(e), a.set(e, t), this._fromState(a, i);
|
|
892
892
|
}
|
|
@@ -903,19 +903,19 @@ var Qt = 32, $t = 512, en = ",", tn = "=", nn = class e {
|
|
|
903
903
|
}
|
|
904
904
|
serialize() {
|
|
905
905
|
let e = "", t = 0;
|
|
906
|
-
for (let n of this._getState()) t > 0 && (e =
|
|
906
|
+
for (let n of this._getState()) t > 0 && (e = $t + e), e = `${n[0]}${en}${n[1]}` + e, t++;
|
|
907
907
|
return e;
|
|
908
908
|
}
|
|
909
909
|
_getState() {
|
|
910
910
|
if (this._internalState) return this._internalState;
|
|
911
|
-
let e = this._rawTraceState.split(
|
|
911
|
+
let e = this._rawTraceState.split($t), t = /* @__PURE__ */ new Map(), n = 0;
|
|
912
912
|
for (let r of e) {
|
|
913
|
-
let e = r.trim(), i = e.indexOf(
|
|
913
|
+
let e = r.trim(), i = e.indexOf(en);
|
|
914
914
|
if (i === -1) continue;
|
|
915
915
|
let a = e.slice(0, i), o = e.slice(i + 1);
|
|
916
|
-
if (!
|
|
916
|
+
if (!Yt(a) || !Xt(o)) continue;
|
|
917
917
|
let s = n + e.length + +(t.size > 0);
|
|
918
|
-
if (!(s >
|
|
918
|
+
if (!(s > Qt) && (t.set(a, o), n = s, t.size >= Zt)) break;
|
|
919
919
|
}
|
|
920
920
|
return this._length = n, this._internalState = new Map(Array.from(t.entries()).reverse()), this._internalState;
|
|
921
921
|
}
|
|
@@ -923,104 +923,104 @@ var Qt = 32, $t = 512, en = ",", tn = "=", nn = class e {
|
|
|
923
923
|
let r = Object.create(e.prototype);
|
|
924
924
|
return r._internalState = t, r._length = n, r;
|
|
925
925
|
}
|
|
926
|
-
},
|
|
927
|
-
function
|
|
928
|
-
let t =
|
|
926
|
+
}, nn = "traceparent", rn = "tracestate", an = "00", on = /* @__PURE__ */ RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");
|
|
927
|
+
function sn(e) {
|
|
928
|
+
let t = on.exec(e);
|
|
929
929
|
return !t || t[1] === "00" && t[5] ? null : {
|
|
930
930
|
traceId: t[2],
|
|
931
931
|
spanId: t[3],
|
|
932
932
|
traceFlags: parseInt(t[4], 16)
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
var
|
|
935
|
+
var cn = class {
|
|
936
936
|
inject(e, t, n) {
|
|
937
937
|
let r = O.getSpanContext(e);
|
|
938
938
|
if (!r || vt(e) || !qe(r)) return;
|
|
939
|
-
let i = `${
|
|
940
|
-
n.set(t,
|
|
939
|
+
let i = `${an}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags || x.NONE).toString(16)}`;
|
|
940
|
+
n.set(t, nn, i), r.traceState && n.set(t, rn, r.traceState.serialize());
|
|
941
941
|
}
|
|
942
942
|
extract(e, t, n) {
|
|
943
|
-
let r = n.get(t,
|
|
943
|
+
let r = n.get(t, nn);
|
|
944
944
|
if (!r) return e;
|
|
945
945
|
let i = Array.isArray(r) ? r[0] : r;
|
|
946
946
|
if (typeof i != "string") return e;
|
|
947
|
-
let a =
|
|
947
|
+
let a = sn(i);
|
|
948
948
|
if (!a) return e;
|
|
949
949
|
a.isRemote = !0;
|
|
950
|
-
let o = n.get(t,
|
|
950
|
+
let o = n.get(t, rn);
|
|
951
951
|
if (o) {
|
|
952
952
|
let e = Array.isArray(o) ? o.join(",") : o;
|
|
953
|
-
a.traceState = new
|
|
953
|
+
a.traceState = new tn(typeof e == "string" ? e : void 0);
|
|
954
954
|
}
|
|
955
955
|
return O.setSpanContext(e, a);
|
|
956
956
|
}
|
|
957
957
|
fields() {
|
|
958
|
-
return [
|
|
958
|
+
return [nn, rn];
|
|
959
959
|
}
|
|
960
|
-
},
|
|
961
|
-
function
|
|
962
|
-
if (!
|
|
963
|
-
let t =
|
|
960
|
+
}, ln = "[object Object]", un = "[object Null]", dn = "[object Undefined]", fn = Function.prototype.toString, pn = fn.call(Object), mn = Object.getPrototypeOf, hn = Object.prototype, gn = hn.hasOwnProperty, R = Symbol ? Symbol.toStringTag : void 0, _n = hn.toString;
|
|
961
|
+
function vn(e) {
|
|
962
|
+
if (!yn(e) || bn(e) !== ln) return !1;
|
|
963
|
+
let t = mn(e);
|
|
964
964
|
if (t === null) return !0;
|
|
965
|
-
let n =
|
|
966
|
-
return typeof n == "function" && n instanceof n &&
|
|
965
|
+
let n = gn.call(t, "constructor") && t.constructor;
|
|
966
|
+
return typeof n == "function" && n instanceof n && fn.call(n) === pn;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function yn(e) {
|
|
969
969
|
return typeof e == "object" && !!e;
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
return e == null ? e === void 0 ?
|
|
971
|
+
function bn(e) {
|
|
972
|
+
return e == null ? e === void 0 ? dn : un : R && R in Object(e) ? xn(e) : Sn(e);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
let t =
|
|
974
|
+
function xn(e) {
|
|
975
|
+
let t = gn.call(e, R), n = e[R], r = !1;
|
|
976
976
|
try {
|
|
977
|
-
e[
|
|
977
|
+
e[R] = void 0, r = !0;
|
|
978
978
|
} catch {}
|
|
979
|
-
let i =
|
|
980
|
-
return r && (t ? e[
|
|
979
|
+
let i = _n.call(e);
|
|
980
|
+
return r && (t ? e[R] = n : delete e[R]), i;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
983
|
-
return
|
|
982
|
+
function Sn(e) {
|
|
983
|
+
return _n.call(e);
|
|
984
984
|
}
|
|
985
985
|
//#endregion
|
|
986
986
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/merge.js
|
|
987
|
-
var
|
|
988
|
-
function
|
|
987
|
+
var Cn = 20;
|
|
988
|
+
function wn(...e) {
|
|
989
989
|
let t = e.shift(), n = /* @__PURE__ */ new WeakMap();
|
|
990
|
-
for (; e.length > 0;) t =
|
|
990
|
+
for (; e.length > 0;) t = En(t, e.shift(), 0, n);
|
|
991
991
|
return t;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
994
|
-
return
|
|
993
|
+
function Tn(e) {
|
|
994
|
+
return On(e) ? e.slice() : e;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function En(e, t, n = 0, r) {
|
|
997
997
|
let i;
|
|
998
|
-
if (!(n >
|
|
999
|
-
if (n++,
|
|
1000
|
-
else if (
|
|
1001
|
-
if (i = e.slice(),
|
|
1002
|
-
else if (
|
|
998
|
+
if (!(n > Cn)) {
|
|
999
|
+
if (n++, An(e) || An(t) || kn(t)) i = Tn(t);
|
|
1000
|
+
else if (On(e)) {
|
|
1001
|
+
if (i = e.slice(), On(t)) for (let e = 0, n = t.length; e < n; e++) i.push(Tn(t[e]));
|
|
1002
|
+
else if (z(t)) {
|
|
1003
1003
|
let e = Object.keys(t);
|
|
1004
1004
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
1005
1005
|
let r = e[n];
|
|
1006
|
-
r !== "__proto__" && r !== "constructor" && r !== "prototype" && (i[r] =
|
|
1006
|
+
r !== "__proto__" && r !== "constructor" && r !== "prototype" && (i[r] = Tn(t[r]));
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
} else if (
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1009
|
+
} else if (z(e)) {
|
|
1010
|
+
if (z(t)) {
|
|
1011
|
+
if (!jn(e, t)) return t;
|
|
1012
1012
|
i = Object.assign({}, e);
|
|
1013
1013
|
let a = Object.keys(t);
|
|
1014
1014
|
for (let o = 0, s = a.length; o < s; o++) {
|
|
1015
1015
|
let s = a[o];
|
|
1016
1016
|
if (s === "__proto__" || s === "constructor" || s === "prototype") continue;
|
|
1017
1017
|
let c = t[s];
|
|
1018
|
-
if (
|
|
1018
|
+
if (An(c)) c === void 0 ? delete i[s] : i[s] = c;
|
|
1019
1019
|
else {
|
|
1020
1020
|
let a = i[s], o = c;
|
|
1021
|
-
if (
|
|
1021
|
+
if (Dn(e, s, r) || Dn(t, s, r)) delete i[s];
|
|
1022
1022
|
else {
|
|
1023
|
-
if (
|
|
1023
|
+
if (z(a) && z(o)) {
|
|
1024
1024
|
let n = r.get(a) || [], i = r.get(o) || [];
|
|
1025
1025
|
n.push({
|
|
1026
1026
|
obj: e,
|
|
@@ -1030,7 +1030,7 @@ function Dn(e, t, n = 0, r) {
|
|
|
1030
1030
|
key: s
|
|
1031
1031
|
}), r.set(a, n), r.set(o, i);
|
|
1032
1032
|
}
|
|
1033
|
-
i[s] =
|
|
1033
|
+
i[s] = En(i[s], c, n, r);
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
@@ -1039,7 +1039,7 @@ function Dn(e, t, n = 0, r) {
|
|
|
1039
1039
|
return i;
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function Dn(e, t, n) {
|
|
1043
1043
|
let r = n.get(e[t]) || [];
|
|
1044
1044
|
for (let n = 0, i = r.length; n < i; n++) {
|
|
1045
1045
|
let i = r[n];
|
|
@@ -1047,34 +1047,34 @@ function On(e, t, n) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return !1;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function On(e) {
|
|
1051
1051
|
return Array.isArray(e);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function kn(e) {
|
|
1054
1054
|
return typeof e == "function";
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return !
|
|
1056
|
+
function z(e) {
|
|
1057
|
+
return !An(e) && !On(e) && !kn(e) && typeof e == "object";
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function An(e) {
|
|
1060
1060
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === void 0 || e instanceof Date || e instanceof RegExp || e === null;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return !(!
|
|
1062
|
+
function jn(e, t) {
|
|
1063
|
+
return !(!vn(e) || !vn(t));
|
|
1064
1064
|
}
|
|
1065
1065
|
//#endregion
|
|
1066
1066
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/url.js
|
|
1067
|
-
function
|
|
1067
|
+
function Mn(e, t) {
|
|
1068
1068
|
return typeof t == "string" ? e === t : !!e.match(t);
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function Nn(e, t) {
|
|
1071
1071
|
if (!t) return !1;
|
|
1072
|
-
for (let n of t) if (
|
|
1072
|
+
for (let n of t) if (Mn(e, n)) return !0;
|
|
1073
1073
|
return !1;
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/promise.js
|
|
1077
|
-
var
|
|
1077
|
+
var Pn = class {
|
|
1078
1078
|
_promise;
|
|
1079
1079
|
_resolve;
|
|
1080
1080
|
_reject;
|
|
@@ -1092,9 +1092,9 @@ var Fn = class {
|
|
|
1092
1092
|
reject(e) {
|
|
1093
1093
|
this._reject(e);
|
|
1094
1094
|
}
|
|
1095
|
-
},
|
|
1095
|
+
}, Fn = class {
|
|
1096
1096
|
_isCalled = !1;
|
|
1097
|
-
_deferred = new
|
|
1097
|
+
_deferred = new Pn();
|
|
1098
1098
|
_callback;
|
|
1099
1099
|
_that;
|
|
1100
1100
|
constructor(e, t) {
|
|
@@ -1117,30 +1117,30 @@ var Fn = class {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
return this._deferred.promise;
|
|
1119
1119
|
}
|
|
1120
|
-
},
|
|
1121
|
-
function
|
|
1122
|
-
if (
|
|
1120
|
+
}, In;
|
|
1121
|
+
function Ln() {
|
|
1122
|
+
if (In === void 0) try {
|
|
1123
1123
|
let e = globalThis.process.argv0;
|
|
1124
|
-
|
|
1124
|
+
In = e ? `unknown_service:${e}` : "unknown_service";
|
|
1125
1125
|
} catch {
|
|
1126
|
-
|
|
1126
|
+
In = "unknown_service";
|
|
1127
1127
|
}
|
|
1128
|
-
return
|
|
1128
|
+
return In;
|
|
1129
1129
|
}
|
|
1130
1130
|
//#endregion
|
|
1131
1131
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/esm/utils.js
|
|
1132
|
-
var
|
|
1132
|
+
var B = (e) => typeof e == "object" && !!e && typeof e.then == "function", Rn = class e {
|
|
1133
1133
|
_rawAttributes;
|
|
1134
1134
|
_asyncAttributesPending = !1;
|
|
1135
1135
|
_schemaUrl;
|
|
1136
1136
|
_memoizedAttributes;
|
|
1137
1137
|
static FromAttributeList(t, n) {
|
|
1138
1138
|
let r = new e({}, n);
|
|
1139
|
-
return r._rawAttributes =
|
|
1139
|
+
return r._rawAttributes = Vn(t), r._asyncAttributesPending = t.filter(([e, t]) => B(t)).length > 0, r;
|
|
1140
1140
|
}
|
|
1141
1141
|
constructor(e, t) {
|
|
1142
1142
|
let n = e.attributes ?? {};
|
|
1143
|
-
this._rawAttributes = Object.entries(n).map(([e, t]) => (
|
|
1143
|
+
this._rawAttributes = Object.entries(n).map(([e, t]) => (B(t) && (this._asyncAttributesPending = !0), [e, t])), this._rawAttributes = Vn(this._rawAttributes), this._schemaUrl = Hn(t?.schemaUrl);
|
|
1144
1144
|
}
|
|
1145
1145
|
get asyncAttributesPending() {
|
|
1146
1146
|
return this._asyncAttributesPending;
|
|
@@ -1149,7 +1149,7 @@ var z = (e) => typeof e == "object" && !!e && typeof e.then == "function", zn =
|
|
|
1149
1149
|
if (this.asyncAttributesPending) {
|
|
1150
1150
|
for (let e = 0; e < this._rawAttributes.length; e++) {
|
|
1151
1151
|
let [t, n] = this._rawAttributes[e];
|
|
1152
|
-
this._rawAttributes[e] = [t,
|
|
1152
|
+
this._rawAttributes[e] = [t, B(n) ? await n : n];
|
|
1153
1153
|
}
|
|
1154
1154
|
this._asyncAttributesPending = !1;
|
|
1155
1155
|
}
|
|
@@ -1158,7 +1158,7 @@ var z = (e) => typeof e == "object" && !!e && typeof e.then == "function", zn =
|
|
|
1158
1158
|
if (this.asyncAttributesPending && E.error("Accessing resource attributes before async attributes settled"), this._memoizedAttributes) return this._memoizedAttributes;
|
|
1159
1159
|
let e = {};
|
|
1160
1160
|
for (let [t, n] of this._rawAttributes) {
|
|
1161
|
-
if (
|
|
1161
|
+
if (B(n)) {
|
|
1162
1162
|
E.debug(`Unsettled resource attribute ${t} skipped`);
|
|
1163
1163
|
continue;
|
|
1164
1164
|
}
|
|
@@ -1174,31 +1174,31 @@ var z = (e) => typeof e == "object" && !!e && typeof e.then == "function", zn =
|
|
|
1174
1174
|
}
|
|
1175
1175
|
merge(t) {
|
|
1176
1176
|
if (t == null) return this;
|
|
1177
|
-
let n =
|
|
1177
|
+
let n = Un(this, t), r = n ? { schemaUrl: n } : void 0;
|
|
1178
1178
|
return e.FromAttributeList([...t.getRawAttributes(), ...this.getRawAttributes()], r);
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1181
|
+
function zn(e, t) {
|
|
1182
|
+
return Rn.FromAttributeList(Object.entries(e), t);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1186
|
-
[r]:
|
|
1184
|
+
function Bn() {
|
|
1185
|
+
return zn({
|
|
1186
|
+
[r]: Ln(),
|
|
1187
1187
|
[i]: It[i],
|
|
1188
1188
|
[o]: It[o],
|
|
1189
1189
|
[s]: It[s]
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return e.map(([e, t]) =>
|
|
1192
|
+
function Vn(e) {
|
|
1193
|
+
return e.map(([e, t]) => B(t) ? [e, t.catch((t) => {
|
|
1194
1194
|
E.debug("promise rejection for resource attribute: %s - %s", e, t);
|
|
1195
1195
|
})] : [e, t]);
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function Hn(e) {
|
|
1198
1198
|
if (typeof e == "string" || e === void 0) return e;
|
|
1199
1199
|
E.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.", e);
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Un(e, t) {
|
|
1202
1202
|
let n = e?.schemaUrl, r = t?.schemaUrl, i = n === void 0 || n === "", a = r === void 0 || r === "";
|
|
1203
1203
|
if (i) return r;
|
|
1204
1204
|
if (a || n === r) return n;
|
|
@@ -1206,13 +1206,13 @@ function Wn(e, t) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
//#endregion
|
|
1208
1208
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/enums.js
|
|
1209
|
-
var
|
|
1210
|
-
function
|
|
1209
|
+
var Wn = "exception", Gn = Symbol.for("nodejs.util.inspect.custom");
|
|
1210
|
+
function Kn(e) {
|
|
1211
1211
|
let t = {};
|
|
1212
1212
|
for (let [n, r] of e.getRawAttributes()) typeof r?.then != "function" && r != null && (t[n] ??= r);
|
|
1213
1213
|
return t;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function qn(e, t, n, r, i) {
|
|
1216
1216
|
if (typeof n == "number" && n < 0) {
|
|
1217
1217
|
let t = `[${e}]`;
|
|
1218
1218
|
return r?.stylize ? r.stylize(t, "special") : t;
|
|
@@ -1224,7 +1224,7 @@ function Jn(e, t, n, r, i) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
//#endregion
|
|
1226
1226
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/Span.js
|
|
1227
|
-
var
|
|
1227
|
+
var Jn = class {
|
|
1228
1228
|
_spanContext;
|
|
1229
1229
|
kind;
|
|
1230
1230
|
parentSpanContext;
|
|
@@ -1273,7 +1273,7 @@ var Yn = class {
|
|
|
1273
1273
|
if (this._isSpanEnded()) return this;
|
|
1274
1274
|
let { eventCountLimit: r } = this._spanLimits;
|
|
1275
1275
|
if (r === 0) return E.warn("No events allowed."), this._droppedEventsCount++, this;
|
|
1276
|
-
r !== void 0 && this.events.length >= r && (this._droppedEventsCount === 0 && E.debug("Dropping extra events."), this.events.shift(), this._droppedEventsCount++),
|
|
1276
|
+
r !== void 0 && this.events.length >= r && (this._droppedEventsCount === 0 && E.debug("Dropping extra events."), this.events.shift(), this._droppedEventsCount++), Ht(t) && (Ht(n) || (n = t), t = void 0);
|
|
1277
1277
|
let i = k(t), { attributePerEventCountLimit: a } = this._spanLimits, o = {}, s = 0, c = 0;
|
|
1278
1278
|
for (let e in i) {
|
|
1279
1279
|
if (!Object.prototype.hasOwnProperty.call(i, e)) continue;
|
|
@@ -1326,23 +1326,23 @@ var Yn = class {
|
|
|
1326
1326
|
E.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);
|
|
1327
1327
|
return;
|
|
1328
1328
|
}
|
|
1329
|
-
this.endTime = this._getTime(e), this._duration =
|
|
1329
|
+
this.endTime = this._getTime(e), this._duration = zt(this.startTime, this.endTime), this._duration[0] < 0 && (E.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.", this.startTime, this.endTime), this.endTime = this.startTime.slice(), this._duration = [0, 0]), this._droppedEventsCount > 0 && E.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`), this._droppedLinksCount > 0 && E.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`), this._spanProcessor.onEnding && this._spanProcessor.onEnding(this), this._recordEndMetrics?.(), this._ended = !0, this._spanProcessor.onEnd(this);
|
|
1330
1330
|
}
|
|
1331
1331
|
_getTime(e) {
|
|
1332
|
-
if (typeof e == "number" && e <= j.now()) return
|
|
1333
|
-
if (typeof e == "number") return
|
|
1334
|
-
if (e instanceof Date) return
|
|
1335
|
-
if (
|
|
1336
|
-
if (this._startTimeProvided) return
|
|
1332
|
+
if (typeof e == "number" && e <= j.now()) return P(e + this._performanceOffset);
|
|
1333
|
+
if (typeof e == "number") return N(e);
|
|
1334
|
+
if (e instanceof Date) return N(e.getTime());
|
|
1335
|
+
if (Vt(e)) return e;
|
|
1336
|
+
if (this._startTimeProvided) return N(Date.now());
|
|
1337
1337
|
let t = j.now() - this._performanceStartTime;
|
|
1338
|
-
return
|
|
1338
|
+
return Ut(this.startTime, N(t));
|
|
1339
1339
|
}
|
|
1340
1340
|
isRecording() {
|
|
1341
1341
|
return this._ended === !1;
|
|
1342
1342
|
}
|
|
1343
1343
|
recordException(e, r) {
|
|
1344
1344
|
let i = {};
|
|
1345
|
-
typeof e == "string" ? i[t] = e : e && (e.code ? i[n] = e.code.toString() : e.name && (i[n] = e.name), e.message && (i[t] = e.message), e.stack && (i["exception.stacktrace"] = e.stack)), i["exception.type"] || i["exception.message"] ? this.addEvent(
|
|
1345
|
+
typeof e == "string" ? i[t] = e : e && (e.code ? i[n] = e.code.toString() : e.name && (i[n] = e.name), e.message && (i[t] = e.message), e.stack && (i["exception.stacktrace"] = e.stack)), i["exception.type"] || i["exception.message"] ? this.addEvent(Wn, i, r) : E.warn(`Failed to record an exception ${e}`);
|
|
1346
1346
|
}
|
|
1347
1347
|
get duration() {
|
|
1348
1348
|
return this._duration;
|
|
@@ -1373,8 +1373,8 @@ var Yn = class {
|
|
|
1373
1373
|
let t = this._attributeValueLengthLimit;
|
|
1374
1374
|
return t <= 0 ? (E.warn(`Attribute value limit must be positive, got ${t}`), e) : typeof e == "string" ? this._truncateToLimitUtil(e, t) : Array.isArray(e) ? e.map((e) => typeof e == "string" ? this._truncateToLimitUtil(e, t) : e) : e;
|
|
1375
1375
|
}
|
|
1376
|
-
[
|
|
1377
|
-
return
|
|
1376
|
+
[Gn](e, t, n) {
|
|
1377
|
+
return qn("SpanImpl", {
|
|
1378
1378
|
name: this.name,
|
|
1379
1379
|
kind: this.kind,
|
|
1380
1380
|
spanContext: this._spanContext,
|
|
@@ -1391,52 +1391,52 @@ var Yn = class {
|
|
|
1391
1391
|
droppedEventsCount: this._droppedEventsCount,
|
|
1392
1392
|
droppedLinksCount: this._droppedLinksCount,
|
|
1393
1393
|
instrumentationScope: this.instrumentationScope,
|
|
1394
|
-
resource: { attributes:
|
|
1394
|
+
resource: { attributes: Kn(this.resource) }
|
|
1395
1395
|
}, e, t, n);
|
|
1396
1396
|
}
|
|
1397
|
-
},
|
|
1397
|
+
}, V;
|
|
1398
1398
|
(function(e) {
|
|
1399
1399
|
e[e.NOT_RECORD = 0] = "NOT_RECORD", e[e.RECORD = 1] = "RECORD", e[e.RECORD_AND_SAMPLED = 2] = "RECORD_AND_SAMPLED";
|
|
1400
|
-
})(
|
|
1400
|
+
})(V ||= {});
|
|
1401
1401
|
//#endregion
|
|
1402
1402
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/semconv.js
|
|
1403
|
-
var
|
|
1403
|
+
var Yn = "otel.component.name", Xn = "otel.component.type", Zn = "otel.span.parent.origin", Qn = "otel.span.sampling_result", $n = "otel.sdk.processor.span.processed", er = "otel.sdk.processor.span.queue.capacity", tr = "otel.sdk.processor.span.queue.size", nr = "otel.sdk.span.live", rr = "otel.sdk.span.started", ir = "batching_span_processor", ar = class {
|
|
1404
1404
|
startedSpans;
|
|
1405
1405
|
liveSpans;
|
|
1406
1406
|
constructor(e) {
|
|
1407
|
-
this.startedSpans = e.createCounter(
|
|
1407
|
+
this.startedSpans = e.createCounter(rr, {
|
|
1408
1408
|
unit: "{span}",
|
|
1409
1409
|
description: "The number of created spans."
|
|
1410
|
-
}), this.liveSpans = e.createUpDownCounter(
|
|
1410
|
+
}), this.liveSpans = e.createUpDownCounter(nr, {
|
|
1411
1411
|
unit: "{span}",
|
|
1412
1412
|
description: "The number of currently live spans."
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
1415
1415
|
startSpan(e, t) {
|
|
1416
|
-
let n =
|
|
1416
|
+
let n = sr(t);
|
|
1417
1417
|
if (this.startedSpans.add(1, {
|
|
1418
|
-
[
|
|
1419
|
-
[
|
|
1420
|
-
}), t ===
|
|
1421
|
-
let r = { [
|
|
1418
|
+
[Zn]: or(e),
|
|
1419
|
+
[Qn]: n
|
|
1420
|
+
}), t === V.NOT_RECORD) return () => {};
|
|
1421
|
+
let r = { [Qn]: n };
|
|
1422
1422
|
return this.liveSpans.add(1, r), () => {
|
|
1423
1423
|
this.liveSpans.add(-1, r);
|
|
1424
1424
|
};
|
|
1425
1425
|
}
|
|
1426
1426
|
};
|
|
1427
|
-
function
|
|
1427
|
+
function or(e) {
|
|
1428
1428
|
return e ? e.isRemote ? "remote" : "local" : "none";
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1430
|
+
function sr(e) {
|
|
1431
1431
|
switch (e) {
|
|
1432
|
-
case
|
|
1433
|
-
case
|
|
1434
|
-
case
|
|
1432
|
+
case V.RECORD_AND_SAMPLED: return "RECORD_AND_SAMPLE";
|
|
1433
|
+
case V.RECORD: return "RECORD_ONLY";
|
|
1434
|
+
case V.NOT_RECORD: return "DROP";
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
1437
|
//#endregion
|
|
1438
1438
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/version.js
|
|
1439
|
-
var
|
|
1439
|
+
var cr = "2.11.0", lr = class {
|
|
1440
1440
|
_sampler;
|
|
1441
1441
|
_spanLimits;
|
|
1442
1442
|
_idGenerator;
|
|
@@ -1446,13 +1446,13 @@ var lr = "2.11.0", ur = class {
|
|
|
1446
1446
|
_tracerMetrics;
|
|
1447
1447
|
constructor(e, t) {
|
|
1448
1448
|
this.instrumentationScope = e, this._sampler = t.sampler, this._spanLimits = t.spanLimits, this._resource = t.resource, this._idGenerator = t.idGenerator, this._spanProcessor = t.spanProcessor;
|
|
1449
|
-
let n = t.meterProvider.getMeter("@opentelemetry/sdk-trace",
|
|
1450
|
-
this._tracerMetrics = new
|
|
1449
|
+
let n = t.meterProvider.getMeter("@opentelemetry/sdk-trace", cr);
|
|
1450
|
+
this._tracerMetrics = new ar(n);
|
|
1451
1451
|
}
|
|
1452
1452
|
startSpan(e, t = {}, n = T.active()) {
|
|
1453
1453
|
t.root && (n = O.deleteSpan(n));
|
|
1454
1454
|
let r = O.getSpan(n);
|
|
1455
|
-
if (vt(n)) return E.debug("Instrumentation suppressed, returning Noop Span"), O.wrapSpanContext(
|
|
1455
|
+
if (vt(n)) return E.debug("Instrumentation suppressed, returning Noop Span"), O.wrapSpanContext(Ie);
|
|
1456
1456
|
let i = r?.spanContext(), a = this._idGenerator.generateSpanId(), o, s, c;
|
|
1457
1457
|
!i || !O.isSpanContextValid(i) ? s = this._idGenerator.generateTraceId() : (s = i.traceId, c = i.traceState, o = i);
|
|
1458
1458
|
let l = t.kind ?? rt.INTERNAL, u = (t.links ?? []).map((e) => ({
|
|
@@ -1460,7 +1460,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1460
1460
|
attributes: k(e.attributes)
|
|
1461
1461
|
})), ee = k(t.attributes), d = this._sampler.shouldSample(n, s, e, l, ee, u), te = this._tracerMetrics.startSpan(i, d.decision);
|
|
1462
1462
|
c = d.traceState ?? c;
|
|
1463
|
-
let f = d.decision === nt.RECORD_AND_SAMPLED ?
|
|
1463
|
+
let f = d.decision === nt.RECORD_AND_SAMPLED ? x.SAMPLED : x.NONE, p = {
|
|
1464
1464
|
traceId: s,
|
|
1465
1465
|
spanId: a,
|
|
1466
1466
|
traceFlags: f,
|
|
@@ -1468,7 +1468,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1468
1468
|
};
|
|
1469
1469
|
if (d.decision === nt.NOT_RECORD) return E.debug("Recording is off, propagating context in a non-recording span"), O.wrapSpanContext(p);
|
|
1470
1470
|
let m = k(Object.assign(ee, d.attributes));
|
|
1471
|
-
return new
|
|
1471
|
+
return new Jn({
|
|
1472
1472
|
resource: this._resource,
|
|
1473
1473
|
scope: this.instrumentationScope,
|
|
1474
1474
|
context: n,
|
|
@@ -1491,14 +1491,14 @@ var lr = "2.11.0", ur = class {
|
|
|
1491
1491
|
let s = a ?? T.active(), c = this.startSpan(e, i, s), l = O.setSpan(s, c);
|
|
1492
1492
|
return T.with(l, o, void 0, c);
|
|
1493
1493
|
}
|
|
1494
|
-
[
|
|
1495
|
-
return
|
|
1494
|
+
[Gn](e, t, n) {
|
|
1495
|
+
return qn("Tracer", {
|
|
1496
1496
|
instrumentationScope: this.instrumentationScope,
|
|
1497
|
-
resource: { attributes:
|
|
1497
|
+
resource: { attributes: Kn(this._resource) },
|
|
1498
1498
|
spanLimits: this._spanLimits
|
|
1499
1499
|
}, e, t, n);
|
|
1500
1500
|
}
|
|
1501
|
-
},
|
|
1501
|
+
}, ur = class {
|
|
1502
1502
|
_spanProcessors;
|
|
1503
1503
|
constructor(e) {
|
|
1504
1504
|
this._spanProcessors = e;
|
|
@@ -1532,59 +1532,59 @@ var lr = "2.11.0", ur = class {
|
|
|
1532
1532
|
}, n);
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
1535
|
-
},
|
|
1535
|
+
}, dr = class {
|
|
1536
1536
|
shouldSample() {
|
|
1537
|
-
return { decision:
|
|
1537
|
+
return { decision: V.NOT_RECORD };
|
|
1538
1538
|
}
|
|
1539
1539
|
toString() {
|
|
1540
1540
|
return "AlwaysOffSampler";
|
|
1541
1541
|
}
|
|
1542
|
-
},
|
|
1542
|
+
}, H = class {
|
|
1543
1543
|
shouldSample() {
|
|
1544
|
-
return { decision:
|
|
1544
|
+
return { decision: V.RECORD_AND_SAMPLED };
|
|
1545
1545
|
}
|
|
1546
1546
|
toString() {
|
|
1547
1547
|
return "AlwaysOnSampler";
|
|
1548
1548
|
}
|
|
1549
|
-
},
|
|
1549
|
+
}, U = class {
|
|
1550
1550
|
_root;
|
|
1551
1551
|
_remoteParentSampled;
|
|
1552
1552
|
_remoteParentNotSampled;
|
|
1553
1553
|
_localParentSampled;
|
|
1554
1554
|
_localParentNotSampled;
|
|
1555
1555
|
constructor(e) {
|
|
1556
|
-
this._root = e.root, this._root ||= (A(/* @__PURE__ */ Error("ParentBasedSampler must have a root sampler configured")), new
|
|
1556
|
+
this._root = e.root, this._root ||= (A(/* @__PURE__ */ Error("ParentBasedSampler must have a root sampler configured")), new H()), this._remoteParentSampled = e.remoteParentSampled ?? new H(), this._remoteParentNotSampled = e.remoteParentNotSampled ?? new dr(), this._localParentSampled = e.localParentSampled ?? new H(), this._localParentNotSampled = e.localParentNotSampled ?? new dr();
|
|
1557
1557
|
}
|
|
1558
1558
|
shouldSample(e, t, n, r, i, a) {
|
|
1559
1559
|
let o = O.getSpanContext(e);
|
|
1560
|
-
return !o || !qe(o) ? this._root.shouldSample(e, t, n, r, i, a) : o.isRemote ? o.traceFlags &
|
|
1560
|
+
return !o || !qe(o) ? this._root.shouldSample(e, t, n, r, i, a) : o.isRemote ? o.traceFlags & x.SAMPLED ? this._remoteParentSampled.shouldSample(e, t, n, r, i, a) : this._remoteParentNotSampled.shouldSample(e, t, n, r, i, a) : o.traceFlags & x.SAMPLED ? this._localParentSampled.shouldSample(e, t, n, r, i, a) : this._localParentNotSampled.shouldSample(e, t, n, r, i, a);
|
|
1561
1561
|
}
|
|
1562
1562
|
toString() {
|
|
1563
1563
|
return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
|
|
1564
1564
|
}
|
|
1565
|
-
},
|
|
1565
|
+
}, fr = /* @__PURE__ */ new Map(), pr = class {
|
|
1566
1566
|
processedSpans;
|
|
1567
1567
|
queueSize;
|
|
1568
1568
|
queueSizeCallback;
|
|
1569
1569
|
standardAttrs;
|
|
1570
1570
|
droppedAttrs;
|
|
1571
1571
|
constructor(t, n, r) {
|
|
1572
|
-
let i =
|
|
1573
|
-
if (
|
|
1574
|
-
[
|
|
1575
|
-
[
|
|
1572
|
+
let i = fr.get(t) ?? 0;
|
|
1573
|
+
if (fr.set(t, i + 1), this.standardAttrs = {
|
|
1574
|
+
[Xn]: t,
|
|
1575
|
+
[Yn]: `${t}/${i}`
|
|
1576
1576
|
}, this.droppedAttrs = {
|
|
1577
1577
|
...this.standardAttrs,
|
|
1578
1578
|
[e]: "queue_full"
|
|
1579
|
-
}, this.processedSpans = n.createCounter(
|
|
1579
|
+
}, this.processedSpans = n.createCounter($n, {
|
|
1580
1580
|
unit: "{span}",
|
|
1581
1581
|
description: "The number of spans for which the processing has finished, either successful or failed."
|
|
1582
1582
|
}), r) {
|
|
1583
1583
|
let { capacity: e, getQueueSize: t } = r;
|
|
1584
|
-
n.createUpDownCounter(
|
|
1584
|
+
n.createUpDownCounter(er, {
|
|
1585
1585
|
unit: "{span}",
|
|
1586
1586
|
description: "The maximum number of spans the queue of a given instance of an SDK span processor can hold."
|
|
1587
|
-
}).add(e, this.standardAttrs), this.queueSize = n.createObservableUpDownCounter(
|
|
1587
|
+
}).add(e, this.standardAttrs), this.queueSize = n.createObservableUpDownCounter(tr, {
|
|
1588
1588
|
unit: "{span}",
|
|
1589
1589
|
description: "The number of spans in the queue of a given instance of an SDK span processor."
|
|
1590
1590
|
}), this.queueSizeCallback = (e) => e.observe(t(), this.standardAttrs), this.queueSize.addCallback(this.queueSizeCallback);
|
|
@@ -1607,7 +1607,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1607
1607
|
shutdown() {
|
|
1608
1608
|
this.queueSize && this.queueSizeCallback && this.queueSize.removeCallback(this.queueSizeCallback);
|
|
1609
1609
|
}
|
|
1610
|
-
},
|
|
1610
|
+
}, mr = class {
|
|
1611
1611
|
_maxExportBatchSize;
|
|
1612
1612
|
_maxQueueSize;
|
|
1613
1613
|
_scheduledDelayMillis;
|
|
@@ -1620,9 +1620,9 @@ var lr = "2.11.0", ur = class {
|
|
|
1620
1620
|
_shutdownOnce;
|
|
1621
1621
|
_droppedSpansCount = 0;
|
|
1622
1622
|
constructor(e) {
|
|
1623
|
-
this._exporter = e.exporter, this._maxExportBatchSize = e.maxExportBatchSize ?? 512, this._maxQueueSize = e.maxQueueSize ?? 2048, this._scheduledDelayMillis = e.scheduledDelayMillis ?? 5e3, this._exportTimeoutMillis = e.exportTimeoutMillis ?? 3e4, this._shutdownOnce = new
|
|
1623
|
+
this._exporter = e.exporter, this._maxExportBatchSize = e.maxExportBatchSize ?? 512, this._maxQueueSize = e.maxQueueSize ?? 2048, this._scheduledDelayMillis = e.scheduledDelayMillis ?? 5e3, this._exportTimeoutMillis = e.exportTimeoutMillis ?? 3e4, this._shutdownOnce = new Fn(this._shutdown, this), this._maxExportBatchSize > this._maxQueueSize && (E.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"), this._maxExportBatchSize = this._maxQueueSize);
|
|
1624
1624
|
let t = e.selfObsMeterProvider ? e.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace") : ke();
|
|
1625
|
-
this._metrics = new
|
|
1625
|
+
this._metrics = new pr(ir, t, {
|
|
1626
1626
|
capacity: this._maxQueueSize,
|
|
1627
1627
|
getQueueSize: () => this._finishedSpans.length
|
|
1628
1628
|
});
|
|
@@ -1632,7 +1632,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
onStart(e, t) {}
|
|
1634
1634
|
onEnd(e) {
|
|
1635
|
-
this._shutdownOnce.isCalled || (e.spanContext().traceFlags &
|
|
1635
|
+
this._shutdownOnce.isCalled || (e.spanContext().traceFlags & x.SAMPLED) !== 0 && this._addToBuffer(e);
|
|
1636
1636
|
}
|
|
1637
1637
|
shutdown() {
|
|
1638
1638
|
return this._shutdownOnce.call();
|
|
@@ -1665,7 +1665,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1665
1665
|
let r;
|
|
1666
1666
|
this._finishedSpans.length <= this._maxExportBatchSize ? (r = this._finishedSpans, this._finishedSpans = []) : r = this._finishedSpans.splice(0, this._maxExportBatchSize);
|
|
1667
1667
|
let i = () => this._exporter.export(r, (i) => {
|
|
1668
|
-
clearTimeout(n), this._metrics.finishSpans(r.length, i.error), i.code ===
|
|
1668
|
+
clearTimeout(n), this._metrics.finishSpans(r.length, i.error), i.code === L.SUCCESS ? e() : t(i.error ?? /* @__PURE__ */ Error("BatchSpanProcessor: span export failed"));
|
|
1669
1669
|
}), a = null;
|
|
1670
1670
|
for (let e = 0, t = r.length; e < t; e++) {
|
|
1671
1671
|
let t = r[e];
|
|
@@ -1692,7 +1692,7 @@ var lr = "2.11.0", ur = class {
|
|
|
1692
1692
|
_clearTimer() {
|
|
1693
1693
|
this._timer !== void 0 && (clearTimeout(this._timer), this._timer = void 0);
|
|
1694
1694
|
}
|
|
1695
|
-
},
|
|
1695
|
+
}, hr = class extends mr {
|
|
1696
1696
|
_visibilityChangeListener;
|
|
1697
1697
|
_pageHideListener;
|
|
1698
1698
|
constructor(e) {
|
|
@@ -1712,40 +1712,40 @@ var lr = "2.11.0", ur = class {
|
|
|
1712
1712
|
onShutdown() {
|
|
1713
1713
|
typeof document < "u" && (this._visibilityChangeListener && document.removeEventListener("visibilitychange", this._visibilityChangeListener), this._pageHideListener && document.removeEventListener("pagehide", this._pageHideListener));
|
|
1714
1714
|
}
|
|
1715
|
-
},
|
|
1716
|
-
function
|
|
1715
|
+
}, gr = 16, _r = 8, vr = new Uint8Array(gr), yr = new Uint8Array(_r), br = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
1716
|
+
function xr(e) {
|
|
1717
1717
|
for (let t = 0; t < e.length; t++) e[t] = Math.random() * 256 >>> 0;
|
|
1718
1718
|
for (let t = 0; t < e.length; t++) if (e[t] > 0) return;
|
|
1719
1719
|
e[e.length - 1] = 1;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function Sr(e) {
|
|
1722
1722
|
let t = "";
|
|
1723
|
-
for (let n = 0; n < e.length; n++) t +=
|
|
1723
|
+
for (let n = 0; n < e.length; n++) t += br[e[n]];
|
|
1724
1724
|
return t;
|
|
1725
1725
|
}
|
|
1726
|
-
var
|
|
1726
|
+
var Cr = class {
|
|
1727
1727
|
generateTraceId() {
|
|
1728
|
-
return
|
|
1728
|
+
return xr(vr), Sr(vr);
|
|
1729
1729
|
}
|
|
1730
1730
|
generateSpanId() {
|
|
1731
|
-
return
|
|
1731
|
+
return xr(yr), Sr(yr);
|
|
1732
1732
|
}
|
|
1733
|
-
},
|
|
1733
|
+
}, W;
|
|
1734
1734
|
(function(e) {
|
|
1735
1735
|
e[e.resolved = 0] = "resolved", e[e.timeout = 1] = "timeout", e[e.error = 2] = "error", e[e.unresolved = 3] = "unresolved";
|
|
1736
|
-
})(
|
|
1737
|
-
var
|
|
1736
|
+
})(W ||= {});
|
|
1737
|
+
var wr = class {
|
|
1738
1738
|
_resource;
|
|
1739
1739
|
_activeSpanProcessor;
|
|
1740
1740
|
_forceFlushTimeoutMillis;
|
|
1741
1741
|
_tracerOptions;
|
|
1742
1742
|
_tracers = /* @__PURE__ */ new Map();
|
|
1743
1743
|
constructor(e = {}) {
|
|
1744
|
-
this._forceFlushTimeoutMillis = e.forceFlushTimeoutMillis ?? 3e4, this._resource = e.resource ??
|
|
1744
|
+
this._forceFlushTimeoutMillis = e.forceFlushTimeoutMillis ?? 3e4, this._resource = e.resource ?? Bn();
|
|
1745
1745
|
let t = e.spanProcessors ?? [];
|
|
1746
|
-
this._activeSpanProcessor = new
|
|
1746
|
+
this._activeSpanProcessor = new ur(t), this._tracerOptions = {
|
|
1747
1747
|
resource: this._resource,
|
|
1748
|
-
sampler: e.sampler ?? new
|
|
1748
|
+
sampler: e.sampler ?? new U({ root: new H() }),
|
|
1749
1749
|
spanLimits: {
|
|
1750
1750
|
attributeCountLimit: e.spanLimits?.attributeCountLimit ?? 128,
|
|
1751
1751
|
attributeValueLengthLimit: e.spanLimits?.attributeValueLengthLimit ?? Infinity,
|
|
@@ -1754,7 +1754,7 @@ var Tr = class {
|
|
|
1754
1754
|
attributePerEventCountLimit: e.spanLimits?.attributePerEventCountLimit ?? 128,
|
|
1755
1755
|
attributePerLinkCountLimit: e.spanLimits?.attributePerLinkCountLimit ?? 128
|
|
1756
1756
|
},
|
|
1757
|
-
idGenerator: e.idGenerator || new
|
|
1757
|
+
idGenerator: e.idGenerator || new Cr(),
|
|
1758
1758
|
spanProcessor: this._activeSpanProcessor,
|
|
1759
1759
|
meterProvider: e.meterProvider ?? { getMeter() {
|
|
1760
1760
|
return ke();
|
|
@@ -1763,7 +1763,7 @@ var Tr = class {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
getTracer(e, t, n) {
|
|
1765
1765
|
let r = `${e}@${t || ""}:${n?.schemaUrl || ""}`;
|
|
1766
|
-
return this._tracers.has(r) || this._tracers.set(r, new
|
|
1766
|
+
return this._tracers.has(r) || this._tracers.set(r, new lr({
|
|
1767
1767
|
name: e,
|
|
1768
1768
|
version: t,
|
|
1769
1769
|
schemaUrl: n?.schemaUrl
|
|
@@ -1772,17 +1772,17 @@ var Tr = class {
|
|
|
1772
1772
|
forceFlush(e) {
|
|
1773
1773
|
let t = e?.timeoutMillis ?? this._forceFlushTimeoutMillis, n = this._activeSpanProcessor._spanProcessors.map((e) => new Promise((n) => {
|
|
1774
1774
|
let r, i = setTimeout(() => {
|
|
1775
|
-
n(/* @__PURE__ */ Error(`Span processor did not completed within timeout period of ${t} ms`)), r =
|
|
1775
|
+
n(/* @__PURE__ */ Error(`Span processor did not completed within timeout period of ${t} ms`)), r = W.timeout;
|
|
1776
1776
|
}, t);
|
|
1777
1777
|
e.forceFlush().then(() => {
|
|
1778
|
-
clearTimeout(i), r !==
|
|
1778
|
+
clearTimeout(i), r !== W.timeout && (r = W.resolved, n(r));
|
|
1779
1779
|
}).catch((e) => {
|
|
1780
|
-
clearTimeout(i), r =
|
|
1780
|
+
clearTimeout(i), r = W.error, n(e);
|
|
1781
1781
|
});
|
|
1782
1782
|
}));
|
|
1783
1783
|
return new Promise((e, t) => {
|
|
1784
1784
|
Promise.all(n).then((n) => {
|
|
1785
|
-
let r = n.filter((e) => e !==
|
|
1785
|
+
let r = n.filter((e) => e !== W.resolved);
|
|
1786
1786
|
r.length > 0 ? t(r) : e();
|
|
1787
1787
|
}).catch((e) => t([e]));
|
|
1788
1788
|
});
|
|
@@ -1790,22 +1790,22 @@ var Tr = class {
|
|
|
1790
1790
|
shutdown() {
|
|
1791
1791
|
return this._activeSpanProcessor.shutdown();
|
|
1792
1792
|
}
|
|
1793
|
-
[
|
|
1793
|
+
[Gn](e, t, n) {
|
|
1794
1794
|
let r = this._activeSpanProcessor._spanProcessors;
|
|
1795
|
-
return
|
|
1796
|
-
resource: { attributes:
|
|
1795
|
+
return qn("TracerProvider", {
|
|
1796
|
+
resource: { attributes: Kn(this._resource) },
|
|
1797
1797
|
tracers: Array.from(this._tracers.keys()),
|
|
1798
1798
|
spanProcessors: r.map((e) => e.constructor?.name ?? "SpanProcessor")
|
|
1799
1799
|
}, e, t, n);
|
|
1800
1800
|
}
|
|
1801
|
-
},
|
|
1801
|
+
}, Tr = class {
|
|
1802
1802
|
_ratio;
|
|
1803
1803
|
_upperBound;
|
|
1804
1804
|
constructor(e = 0) {
|
|
1805
1805
|
this._ratio = this._normalize(e), this._upperBound = this._ratio === 1 ? 4294967296 : Math.floor(this._ratio * 4294967295);
|
|
1806
1806
|
}
|
|
1807
1807
|
shouldSample(e, t) {
|
|
1808
|
-
return { decision: Ge(t) && this._accumulate(t) < this._upperBound ?
|
|
1808
|
+
return { decision: Ge(t) && this._accumulate(t) < this._upperBound ? V.RECORD_AND_SAMPLED : V.NOT_RECORD };
|
|
1809
1809
|
}
|
|
1810
1810
|
toString() {
|
|
1811
1811
|
return `TraceIdRatioBased{${this._ratio}}`;
|
|
@@ -1825,14 +1825,14 @@ var Tr = class {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
return t;
|
|
1827
1827
|
}
|
|
1828
|
-
},
|
|
1828
|
+
}, G;
|
|
1829
1829
|
(function(e) {
|
|
1830
1830
|
e.AlwaysOff = "always_off", e.AlwaysOn = "always_on", e.ParentBasedAlwaysOff = "parentbased_always_off", e.ParentBasedAlwaysOn = "parentbased_always_on", e.ParentBasedTraceIdRatio = "parentbased_traceidratio", e.TraceIdRatio = "traceidratio";
|
|
1831
|
-
})(
|
|
1832
|
-
var
|
|
1833
|
-
function
|
|
1831
|
+
})(G ||= {});
|
|
1832
|
+
var Er = 1;
|
|
1833
|
+
function Dr() {
|
|
1834
1834
|
return {
|
|
1835
|
-
sampler:
|
|
1835
|
+
sampler: Or(),
|
|
1836
1836
|
forceFlushTimeoutMillis: 3e4,
|
|
1837
1837
|
generalLimits: {
|
|
1838
1838
|
attributeValueLengthLimit: Infinity,
|
|
@@ -1848,33 +1848,33 @@ function Or() {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
let e =
|
|
1851
|
+
function Or() {
|
|
1852
|
+
let e = G.ParentBasedAlwaysOn;
|
|
1853
1853
|
switch (e) {
|
|
1854
|
-
case
|
|
1855
|
-
case
|
|
1856
|
-
case
|
|
1857
|
-
case
|
|
1858
|
-
case
|
|
1859
|
-
case
|
|
1860
|
-
default: return E.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${
|
|
1854
|
+
case G.AlwaysOn: return new H();
|
|
1855
|
+
case G.AlwaysOff: return new dr();
|
|
1856
|
+
case G.ParentBasedAlwaysOn: return new U({ root: new H() });
|
|
1857
|
+
case G.ParentBasedAlwaysOff: return new U({ root: new dr() });
|
|
1858
|
+
case G.TraceIdRatio: return new Tr(kr());
|
|
1859
|
+
case G.ParentBasedTraceIdRatio: return new U({ root: new Tr(kr()) });
|
|
1860
|
+
default: return E.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${G.ParentBasedAlwaysOn}".`), new U({ root: new H() });
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1864
|
-
return E.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${
|
|
1863
|
+
function kr() {
|
|
1864
|
+
return E.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Er}.`), Er;
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1866
|
+
function Ar(e) {
|
|
1867
1867
|
let t = Object.assign({}, e.spanLimits);
|
|
1868
1868
|
return t.attributeCountLimit = e.spanLimits?.attributeCountLimit ?? e.generalLimits?.attributeCountLimit ?? void 0 ?? void 0 ?? 128, t.attributeValueLengthLimit = e.spanLimits?.attributeValueLengthLimit ?? e.generalLimits?.attributeValueLengthLimit ?? void 0 ?? void 0 ?? Infinity, Object.assign({}, e, { spanLimits: t });
|
|
1869
1869
|
}
|
|
1870
1870
|
//#endregion
|
|
1871
1871
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider-shim.js
|
|
1872
|
-
var
|
|
1872
|
+
var jr = class extends wr {
|
|
1873
1873
|
constructor(e = {}) {
|
|
1874
|
-
let t =
|
|
1874
|
+
let t = wn({}, Dr(), Ar(e));
|
|
1875
1875
|
delete t.generalLimits, super(t);
|
|
1876
1876
|
}
|
|
1877
|
-
},
|
|
1877
|
+
}, Mr = class extends hr {
|
|
1878
1878
|
constructor(e, t) {
|
|
1879
1879
|
t ||= {};
|
|
1880
1880
|
for (let [e, n] of [
|
|
@@ -1888,7 +1888,7 @@ var Mr = class extends Tr {
|
|
|
1888
1888
|
...t
|
|
1889
1889
|
});
|
|
1890
1890
|
}
|
|
1891
|
-
},
|
|
1891
|
+
}, Nr = class {
|
|
1892
1892
|
_enabled = !1;
|
|
1893
1893
|
_currentContext = b;
|
|
1894
1894
|
_bindFunction(e = b, t) {
|
|
@@ -1926,108 +1926,108 @@ var Mr = class extends Tr {
|
|
|
1926
1926
|
};
|
|
1927
1927
|
//#endregion
|
|
1928
1928
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-web/build/esm/WebTracerProvider.js
|
|
1929
|
-
function
|
|
1929
|
+
function Pr(e) {
|
|
1930
1930
|
if (e !== null) {
|
|
1931
1931
|
if (e === void 0) {
|
|
1932
|
-
let e = new
|
|
1932
|
+
let e = new Nr();
|
|
1933
1933
|
e.enable(), T.setGlobalContextManager(e);
|
|
1934
1934
|
return;
|
|
1935
1935
|
}
|
|
1936
1936
|
e.enable(), T.setGlobalContextManager(e);
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function Fr(e) {
|
|
1940
1940
|
if (e !== null) {
|
|
1941
1941
|
if (e === void 0) {
|
|
1942
|
-
D.setGlobalPropagator(new
|
|
1942
|
+
D.setGlobalPropagator(new Wt({ propagators: [new cn(), new Tt()] }));
|
|
1943
1943
|
return;
|
|
1944
1944
|
}
|
|
1945
1945
|
D.setGlobalPropagator(e);
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
|
-
var
|
|
1948
|
+
var Ir = class extends jr {
|
|
1949
1949
|
constructor(e = {}) {
|
|
1950
1950
|
super(e);
|
|
1951
1951
|
}
|
|
1952
1952
|
register(e = {}) {
|
|
1953
|
-
O.setGlobalTracerProvider(this),
|
|
1953
|
+
O.setGlobalTracerProvider(this), Fr(e.propagator), Pr(e.contextManager);
|
|
1954
1954
|
}
|
|
1955
|
-
},
|
|
1955
|
+
}, K;
|
|
1956
1956
|
(function(e) {
|
|
1957
1957
|
e.CONNECT_END = "connectEnd", e.CONNECT_START = "connectStart", e.DECODED_BODY_SIZE = "decodedBodySize", e.DOM_COMPLETE = "domComplete", e.DOM_CONTENT_LOADED_EVENT_END = "domContentLoadedEventEnd", e.DOM_CONTENT_LOADED_EVENT_START = "domContentLoadedEventStart", e.DOM_INTERACTIVE = "domInteractive", e.DOMAIN_LOOKUP_END = "domainLookupEnd", e.DOMAIN_LOOKUP_START = "domainLookupStart", e.ENCODED_BODY_SIZE = "encodedBodySize", e.FETCH_START = "fetchStart", e.LOAD_EVENT_END = "loadEventEnd", e.LOAD_EVENT_START = "loadEventStart", e.NAVIGATION_START = "navigationStart", e.REDIRECT_END = "redirectEnd", e.REDIRECT_START = "redirectStart", e.REQUEST_START = "requestStart", e.RESPONSE_END = "responseEnd", e.RESPONSE_START = "responseStart", e.SECURE_CONNECTION_START = "secureConnectionStart", e.START_TIME = "startTime", e.UNLOAD_EVENT_END = "unloadEventEnd", e.UNLOAD_EVENT_START = "unloadEventStart";
|
|
1958
|
-
})(
|
|
1958
|
+
})(K ||= {});
|
|
1959
1959
|
//#endregion
|
|
1960
1960
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace-web/build/esm/semconv.js
|
|
1961
|
-
var
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
1961
|
+
var Lr = "http.response_content_length", Rr = "http.response_content_length_uncompressed", zr;
|
|
1962
|
+
function Br() {
|
|
1963
|
+
return zr ||= document.createElement("a"), zr;
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function q(e, t) {
|
|
1966
1966
|
return t in e;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1969
|
-
if (
|
|
1968
|
+
function J(e, t, n, r = !0) {
|
|
1969
|
+
if (q(n, t) && typeof n[t] == "number" && !(r && n[t] === 0)) return e.addEvent(t, n[t]);
|
|
1970
1970
|
}
|
|
1971
|
-
function
|
|
1972
|
-
if (r === void 0 && (r = t[
|
|
1973
|
-
let n = t[
|
|
1974
|
-
n !== void 0 && e.setAttribute(
|
|
1975
|
-
let r = t[
|
|
1976
|
-
r !== void 0 && n !== r && e.setAttribute(
|
|
1971
|
+
function Vr(e, t, n = !1, r, i) {
|
|
1972
|
+
if (r === void 0 && (r = t[K.START_TIME] !== 0), n || (J(e, K.FETCH_START, t, r), J(e, K.DOMAIN_LOOKUP_START, t, r), J(e, K.DOMAIN_LOOKUP_END, t, r), J(e, K.CONNECT_START, t, r), J(e, K.SECURE_CONNECTION_START, t, r), J(e, K.CONNECT_END, t, r), J(e, K.REQUEST_START, t, r), J(e, K.RESPONSE_START, t, r), J(e, K.RESPONSE_END, t, r)), !i) {
|
|
1973
|
+
let n = t[K.ENCODED_BODY_SIZE];
|
|
1974
|
+
n !== void 0 && e.setAttribute(Lr, n);
|
|
1975
|
+
let r = t[K.DECODED_BODY_SIZE];
|
|
1976
|
+
r !== void 0 && n !== r && e.setAttribute(Rr, r);
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function Hr(e) {
|
|
1980
1980
|
return e.slice().sort((e, t) => {
|
|
1981
|
-
let n = e[
|
|
1981
|
+
let n = e[K.FETCH_START], r = t[K.FETCH_START];
|
|
1982
1982
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function Ur() {
|
|
1986
1986
|
return typeof location < "u" ? location.origin : void 0;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
let o =
|
|
1988
|
+
function Wr(e, t, n, r, i = /* @__PURE__ */ new WeakSet(), a) {
|
|
1989
|
+
let o = qr(e);
|
|
1990
1990
|
e = o.toString();
|
|
1991
|
-
let s =
|
|
1991
|
+
let s = Kr(e, t, n, r, i, a);
|
|
1992
1992
|
if (s.length === 0) return { mainRequest: void 0 };
|
|
1993
1993
|
if (s.length === 1) return { mainRequest: s[0] };
|
|
1994
|
-
let c =
|
|
1995
|
-
if (o.origin !==
|
|
1996
|
-
let e = c[0], t =
|
|
1997
|
-
return t[
|
|
1994
|
+
let c = Hr(s);
|
|
1995
|
+
if (o.origin !== Ur() && c.length > 1) {
|
|
1996
|
+
let e = c[0], t = Gr(c, e[K.RESPONSE_END], n), r = e[K.RESPONSE_END];
|
|
1997
|
+
return t[K.FETCH_START] < r && (t = e, e = void 0), {
|
|
1998
1998
|
corsPreFlightRequest: e,
|
|
1999
1999
|
mainRequest: t
|
|
2000
2000
|
};
|
|
2001
2001
|
}
|
|
2002
2002
|
return { mainRequest: s[0] };
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2005
|
-
let r =
|
|
2004
|
+
function Gr(e, t, n) {
|
|
2005
|
+
let r = I(n), i = I(F(t)), a = e[1], o, s = e.length;
|
|
2006
2006
|
for (let t = 1; t < s; t++) {
|
|
2007
|
-
let n = e[t], s = F(
|
|
2007
|
+
let n = e[t], s = I(F(n[K.FETCH_START])), c = r - I(F(n[K.RESPONSE_END]));
|
|
2008
2008
|
s >= i && (!o || c < o) && (o = c, a = n);
|
|
2009
2009
|
}
|
|
2010
2010
|
return a;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2013
|
-
let o =
|
|
2014
|
-
let n = F(
|
|
2012
|
+
function Kr(e, t, n, r, i, a) {
|
|
2013
|
+
let o = I(t), s = I(n), c = r.filter((t) => {
|
|
2014
|
+
let n = I(F(t[K.FETCH_START])), r = I(F(t[K.RESPONSE_END]));
|
|
2015
2015
|
return t.initiatorType.toLowerCase() === (a || "xmlhttprequest") && t.name === e && n >= o && r <= s;
|
|
2016
2016
|
});
|
|
2017
2017
|
return c.length > 0 && (c = c.filter((e) => !i.has(e))), c;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function qr(e) {
|
|
2020
2020
|
if (typeof URL == "function") return new URL(e, typeof document < "u" ? document.baseURI : typeof location < "u" ? location.href : void 0);
|
|
2021
|
-
let t =
|
|
2021
|
+
let t = Br();
|
|
2022
2022
|
return t.href = e, t;
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function Jr(e, t) {
|
|
2025
2025
|
let n = t || [];
|
|
2026
|
-
return (typeof n == "string" || n instanceof RegExp) && (n = [n]),
|
|
2026
|
+
return (typeof n == "string" || n instanceof RegExp) && (n = [n]), qr(e).origin === Ur() || n.some((t) => Mn(e, t));
|
|
2027
2027
|
}
|
|
2028
2028
|
//#endregion
|
|
2029
2029
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js
|
|
2030
|
-
var
|
|
2030
|
+
var Yr = class {
|
|
2031
2031
|
_delegate;
|
|
2032
2032
|
constructor(e) {
|
|
2033
2033
|
this._delegate = e;
|
|
@@ -2044,7 +2044,7 @@ var Xr = class {
|
|
|
2044
2044
|
setMetrics(e) {
|
|
2045
2045
|
this._delegate.setMetrics(e);
|
|
2046
2046
|
}
|
|
2047
|
-
},
|
|
2047
|
+
}, Xr = class extends Error {
|
|
2048
2048
|
code;
|
|
2049
2049
|
name = "OTLPExporterError";
|
|
2050
2050
|
data;
|
|
@@ -2054,21 +2054,21 @@ var Xr = class {
|
|
|
2054
2054
|
};
|
|
2055
2055
|
//#endregion
|
|
2056
2056
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-configuration.js
|
|
2057
|
-
function
|
|
2057
|
+
function Zr(e) {
|
|
2058
2058
|
if (Number.isFinite(e) && e > 0) return e;
|
|
2059
2059
|
throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`);
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2061
|
+
function Qr(e) {
|
|
2062
2062
|
if (e != null) return async () => e;
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function $r(e, t, n) {
|
|
2065
2065
|
return {
|
|
2066
|
-
timeoutMillis:
|
|
2066
|
+
timeoutMillis: Zr(e.timeoutMillis ?? t.timeoutMillis ?? n.timeoutMillis),
|
|
2067
2067
|
concurrencyLimit: e.concurrencyLimit ?? t.concurrencyLimit ?? n.concurrencyLimit,
|
|
2068
2068
|
compression: e.compression ?? t.compression ?? n.compression
|
|
2069
2069
|
};
|
|
2070
2070
|
}
|
|
2071
|
-
function
|
|
2071
|
+
function ei() {
|
|
2072
2072
|
return {
|
|
2073
2073
|
timeoutMillis: 1e4,
|
|
2074
2074
|
concurrencyLimit: 30,
|
|
@@ -2077,7 +2077,7 @@ function ti() {
|
|
|
2077
2077
|
}
|
|
2078
2078
|
//#endregion
|
|
2079
2079
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/bounded-queue-export-promise-handler.js
|
|
2080
|
-
var
|
|
2080
|
+
var ti = class {
|
|
2081
2081
|
_concurrencyLimit;
|
|
2082
2082
|
_sendingPromises = [];
|
|
2083
2083
|
constructor(e) {
|
|
@@ -2099,22 +2099,22 @@ var ni = class {
|
|
|
2099
2099
|
await Promise.all(this._sendingPromises);
|
|
2100
2100
|
}
|
|
2101
2101
|
};
|
|
2102
|
-
function
|
|
2103
|
-
return new
|
|
2102
|
+
function ni(e) {
|
|
2103
|
+
return new ti(e.concurrencyLimit);
|
|
2104
2104
|
}
|
|
2105
2105
|
//#endregion
|
|
2106
2106
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/logging-response-handler.js
|
|
2107
|
-
function
|
|
2107
|
+
function ri(e) {
|
|
2108
2108
|
return Object.prototype.hasOwnProperty.call(e, "partialSuccess");
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function ii() {
|
|
2111
2111
|
return { handleResponse(e) {
|
|
2112
|
-
e != null &&
|
|
2112
|
+
e != null && ri(e) && e.partialSuccess != null && Object.keys(e.partialSuccess).length !== 0 && E.warn("Received Partial Success response:", JSON.stringify(e.partialSuccess));
|
|
2113
2113
|
} };
|
|
2114
2114
|
}
|
|
2115
2115
|
//#endregion
|
|
2116
2116
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-export-delegate.js
|
|
2117
|
-
var
|
|
2117
|
+
var ai = class {
|
|
2118
2118
|
_metrics;
|
|
2119
2119
|
_diagLogger;
|
|
2120
2120
|
_transport;
|
|
@@ -2128,7 +2128,7 @@ var oi = class {
|
|
|
2128
2128
|
export(e, t) {
|
|
2129
2129
|
if (this._diagLogger.debug("items to be sent", e), this._promiseQueue.hasReachedLimit()) {
|
|
2130
2130
|
t({
|
|
2131
|
-
code:
|
|
2131
|
+
code: L.FAILED,
|
|
2132
2132
|
error: /* @__PURE__ */ Error("Concurrent export limit reached")
|
|
2133
2133
|
});
|
|
2134
2134
|
return;
|
|
@@ -2136,7 +2136,7 @@ var oi = class {
|
|
|
2136
2136
|
let n = this._serializer.serializeRequest(e);
|
|
2137
2137
|
if (n == null) {
|
|
2138
2138
|
t({
|
|
2139
|
-
code:
|
|
2139
|
+
code: L.FAILED,
|
|
2140
2140
|
error: /* @__PURE__ */ Error("Nothing to send")
|
|
2141
2141
|
});
|
|
2142
2142
|
return;
|
|
@@ -2149,26 +2149,26 @@ var oi = class {
|
|
|
2149
2149
|
} catch (t) {
|
|
2150
2150
|
this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?", t, e.data);
|
|
2151
2151
|
}
|
|
2152
|
-
t({ code:
|
|
2152
|
+
t({ code: L.SUCCESS });
|
|
2153
2153
|
return;
|
|
2154
2154
|
}
|
|
2155
2155
|
if (e.status === "failure" && e.error) {
|
|
2156
2156
|
r(e.error), t({
|
|
2157
|
-
code:
|
|
2157
|
+
code: L.FAILED,
|
|
2158
2158
|
error: e.error
|
|
2159
2159
|
});
|
|
2160
2160
|
return;
|
|
2161
2161
|
}
|
|
2162
2162
|
e.status === "retryable" ? (r("export_max_retries"), t({
|
|
2163
|
-
code:
|
|
2164
|
-
error: e.error ?? new
|
|
2163
|
+
code: L.FAILED,
|
|
2164
|
+
error: e.error ?? new Xr("Export failed with retryable status")
|
|
2165
2165
|
})) : (r("export_failed"), t({
|
|
2166
|
-
code:
|
|
2167
|
-
error: new
|
|
2166
|
+
code: L.FAILED,
|
|
2167
|
+
error: new Xr("Export failed with unknown error")
|
|
2168
2168
|
}));
|
|
2169
2169
|
}, (e) => {
|
|
2170
2170
|
r(e), t({
|
|
2171
|
-
code:
|
|
2171
|
+
code: L.FAILED,
|
|
2172
2172
|
error: e
|
|
2173
2173
|
});
|
|
2174
2174
|
}));
|
|
@@ -2183,22 +2183,22 @@ var oi = class {
|
|
|
2183
2183
|
this._diagLogger.debug("shutdown started"), await this.forceFlush(), this._transport.shutdown();
|
|
2184
2184
|
}
|
|
2185
2185
|
};
|
|
2186
|
-
function
|
|
2187
|
-
return new
|
|
2186
|
+
function oi(e, t) {
|
|
2187
|
+
return new ai(e.transport, e.serializer, ii(), e.promiseHandler, e.metrics, t.timeout);
|
|
2188
2188
|
}
|
|
2189
2189
|
//#endregion
|
|
2190
2190
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-network-export-delegate.js
|
|
2191
|
-
function
|
|
2192
|
-
return
|
|
2191
|
+
function si(e, t, n, r) {
|
|
2192
|
+
return oi({
|
|
2193
2193
|
transport: r,
|
|
2194
2194
|
serializer: t,
|
|
2195
|
-
promiseHandler:
|
|
2195
|
+
promiseHandler: ni(e),
|
|
2196
2196
|
metrics: n
|
|
2197
2197
|
}, { timeout: e.timeoutMillis });
|
|
2198
2198
|
}
|
|
2199
2199
|
//#endregion
|
|
2200
2200
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/semconv.js
|
|
2201
|
-
var
|
|
2201
|
+
var ci = "http.response.status_code", li = "otel.component.name", ui = "otel.component.type", di = "server.address", fi = "server.port", pi = "error.type", mi = "0.222.0", hi = /* @__PURE__ */ new Map(), gi = class {
|
|
2202
2202
|
inflight;
|
|
2203
2203
|
exported;
|
|
2204
2204
|
duration;
|
|
@@ -2208,18 +2208,18 @@ var li = "http.response.status_code", ui = "otel.component.name", di = "otel.com
|
|
|
2208
2208
|
constructor(e) {
|
|
2209
2209
|
let { componentType: t, metricsHelper: n, meterProvider: r, url: i, responseAttributesFromError: a } = e;
|
|
2210
2210
|
this.responseAttributesFromError = a;
|
|
2211
|
-
let o = r ? r.getMeter("@opentelemetry/otlp-exporter",
|
|
2212
|
-
if (
|
|
2213
|
-
[
|
|
2214
|
-
[
|
|
2211
|
+
let o = r ? r.getMeter("@opentelemetry/otlp-exporter", mi) : ke(), s = hi.get(t) ?? 0;
|
|
2212
|
+
if (hi.set(t, s + 1), this.standardAttrs = {
|
|
2213
|
+
[ui]: t,
|
|
2214
|
+
[li]: `${t}/${s}`
|
|
2215
2215
|
}, i) {
|
|
2216
2216
|
let e = i;
|
|
2217
2217
|
i.includes("://") || (e = `http://${i}`);
|
|
2218
2218
|
try {
|
|
2219
2219
|
let t = new URL(e);
|
|
2220
|
-
this.standardAttrs[
|
|
2220
|
+
this.standardAttrs[di] = t.hostname;
|
|
2221
2221
|
let n;
|
|
2222
|
-
t.port ? n = Number(t.port) : t.protocol === "http:" ? n = 80 : t.protocol === "https:" && (n = 443), typeof n == "number" && (this.standardAttrs[
|
|
2222
|
+
t.port ? n = Number(t.port) : t.protocol === "http:" ? n = 80 : t.protocol === "https:" && (n = 443), typeof n == "number" && (this.standardAttrs[fi] = n);
|
|
2223
2223
|
} catch {}
|
|
2224
2224
|
}
|
|
2225
2225
|
this.helper = n, this.inflight = o.createUpDownCounter(`otel.sdk.exporter.${this.helper.name}.inflight`, {
|
|
@@ -2235,39 +2235,39 @@ var li = "http.response.status_code", ui = "otel.component.name", di = "otel.com
|
|
|
2235
2235
|
});
|
|
2236
2236
|
}
|
|
2237
2237
|
startExport(e) {
|
|
2238
|
-
let t = this.helper.countItems(e), n =
|
|
2238
|
+
let t = this.helper.countItems(e), n = P();
|
|
2239
2239
|
return this.inflight.add(t, this.standardAttrs), (e) => {
|
|
2240
|
-
let r =
|
|
2240
|
+
let r = P();
|
|
2241
2241
|
this.inflight.add(-t, this.standardAttrs);
|
|
2242
2242
|
let i = e ? {
|
|
2243
2243
|
...this.standardAttrs,
|
|
2244
|
-
[
|
|
2244
|
+
[pi]: e instanceof Error ? e.name : "export_failed"
|
|
2245
2245
|
} : this.standardAttrs;
|
|
2246
2246
|
this.exported.add(t, i);
|
|
2247
2247
|
let a = {
|
|
2248
2248
|
...i,
|
|
2249
2249
|
...this.responseAttributesFromError(e)
|
|
2250
|
-
}, o =
|
|
2250
|
+
}, o = Bt(zt(n, r)) / 1e3;
|
|
2251
2251
|
this.duration.record(o, a);
|
|
2252
2252
|
};
|
|
2253
2253
|
}
|
|
2254
|
-
},
|
|
2254
|
+
}, _i = {
|
|
2255
2255
|
name: "span",
|
|
2256
2256
|
countItems: (e) => e.length
|
|
2257
|
-
},
|
|
2257
|
+
}, vi = class {
|
|
2258
2258
|
emit(e) {}
|
|
2259
2259
|
enabled() {
|
|
2260
2260
|
return !1;
|
|
2261
2261
|
}
|
|
2262
|
-
},
|
|
2263
|
-
function
|
|
2262
|
+
}, yi = new vi(), bi = Symbol.for("io.opentelemetry.js.api.logs"), Y = globalThis;
|
|
2263
|
+
function xi(e, t, n) {
|
|
2264
2264
|
return (r) => r === e ? t : n;
|
|
2265
2265
|
}
|
|
2266
|
-
var
|
|
2266
|
+
var Si = new class {
|
|
2267
2267
|
getLogger(e, t, n) {
|
|
2268
|
-
return new
|
|
2268
|
+
return new vi();
|
|
2269
2269
|
}
|
|
2270
|
-
}(),
|
|
2270
|
+
}(), Ci = class {
|
|
2271
2271
|
constructor(e, t, n, r) {
|
|
2272
2272
|
this._provider = e, this.name = t, this.version = n, this.options = r;
|
|
2273
2273
|
}
|
|
@@ -2280,14 +2280,14 @@ var Ci = new class {
|
|
|
2280
2280
|
_getLogger() {
|
|
2281
2281
|
if (this._delegate) return this._delegate;
|
|
2282
2282
|
let e = this._provider._getDelegateLogger(this.name, this.version, this.options);
|
|
2283
|
-
return e ? (this._delegate = e, this._delegate) :
|
|
2283
|
+
return e ? (this._delegate = e, this._delegate) : yi;
|
|
2284
2284
|
}
|
|
2285
|
-
},
|
|
2285
|
+
}, wi = class {
|
|
2286
2286
|
getLogger(e, t, n) {
|
|
2287
|
-
return this._getDelegateLogger(e, t, n) ?? new
|
|
2287
|
+
return this._getDelegateLogger(e, t, n) ?? new Ci(this, e, t, n);
|
|
2288
2288
|
}
|
|
2289
2289
|
_getDelegate() {
|
|
2290
|
-
return this._delegate ??
|
|
2290
|
+
return this._delegate ?? Si;
|
|
2291
2291
|
}
|
|
2292
2292
|
_setDelegate(e) {
|
|
2293
2293
|
this._delegate = e;
|
|
@@ -2295,52 +2295,52 @@ var Ci = new class {
|
|
|
2295
2295
|
_getDelegateLogger(e, t, n) {
|
|
2296
2296
|
return this._delegate?.getLogger(e, t, n);
|
|
2297
2297
|
}
|
|
2298
|
-
},
|
|
2298
|
+
}, Ti = class e {
|
|
2299
2299
|
constructor() {
|
|
2300
|
-
this._proxyLoggerProvider = new
|
|
2300
|
+
this._proxyLoggerProvider = new wi();
|
|
2301
2301
|
}
|
|
2302
2302
|
static getInstance() {
|
|
2303
2303
|
return this._instance ||= new e(), this._instance;
|
|
2304
2304
|
}
|
|
2305
2305
|
setGlobalLoggerProvider(e) {
|
|
2306
|
-
return
|
|
2306
|
+
return Y[bi] ? this.getLoggerProvider() : (Y[bi] = xi(1, e, Si), this._proxyLoggerProvider._setDelegate(e), e);
|
|
2307
2307
|
}
|
|
2308
2308
|
getLoggerProvider() {
|
|
2309
|
-
return
|
|
2309
|
+
return Y[bi]?.call(Y, 1) ?? this._proxyLoggerProvider;
|
|
2310
2310
|
}
|
|
2311
2311
|
getLogger(e, t, n) {
|
|
2312
2312
|
return this.getLoggerProvider().getLogger(e, t, n);
|
|
2313
2313
|
}
|
|
2314
2314
|
disable() {
|
|
2315
|
-
delete
|
|
2315
|
+
delete Y[bi], this._proxyLoggerProvider = new wi();
|
|
2316
2316
|
}
|
|
2317
2317
|
}.getInstance();
|
|
2318
2318
|
//#endregion
|
|
2319
2319
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js
|
|
2320
|
-
function
|
|
2320
|
+
function Ei(e, t) {
|
|
2321
2321
|
let n = {
|
|
2322
|
-
attributes:
|
|
2322
|
+
attributes: X(e.attributes, t),
|
|
2323
2323
|
droppedAttributesCount: 0
|
|
2324
2324
|
}, r = e.schemaUrl;
|
|
2325
2325
|
return r && r !== "" && (n.schemaUrl = r), n;
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function Di(e, t) {
|
|
2328
2328
|
let n = {
|
|
2329
2329
|
name: e.name,
|
|
2330
2330
|
version: e.version
|
|
2331
2331
|
};
|
|
2332
|
-
return e.attributes && Object.keys(e.attributes).length > 0 && (n.attributes =
|
|
2332
|
+
return e.attributes && Object.keys(e.attributes).length > 0 && (n.attributes = X(e.attributes, t), n.droppedAttributesCount = e.droppedAttributesCount ?? 0), n;
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2335
|
-
return Object.keys(e).map((n) =>
|
|
2334
|
+
function X(e, t) {
|
|
2335
|
+
return Object.keys(e).map((n) => Oi(n, e[n], t));
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function Oi(e, t, n) {
|
|
2338
2338
|
return {
|
|
2339
2339
|
key: e,
|
|
2340
|
-
value:
|
|
2340
|
+
value: ki(t, n)
|
|
2341
2341
|
};
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function ki(e, t) {
|
|
2344
2344
|
let n = typeof e;
|
|
2345
2345
|
if (n === "string") return { stringValue: e };
|
|
2346
2346
|
if (n === "number") return Number.isInteger(e) ? { intValue: e } : { doubleValue: e };
|
|
@@ -2348,14 +2348,14 @@ function Ai(e, t) {
|
|
|
2348
2348
|
if (e instanceof Uint8Array) return { bytesValue: t.encodeUint8Array(e) };
|
|
2349
2349
|
if (Array.isArray(e)) {
|
|
2350
2350
|
let n = Array(e.length);
|
|
2351
|
-
for (let r = 0; r < e.length; r++) n[r] =
|
|
2351
|
+
for (let r = 0; r < e.length; r++) n[r] = ki(e[r], t);
|
|
2352
2352
|
return { arrayValue: { values: n } };
|
|
2353
2353
|
}
|
|
2354
2354
|
if (n === "object" && e != null) {
|
|
2355
2355
|
let n = Object.keys(e), r = Array(n.length);
|
|
2356
2356
|
for (let i = 0; i < n.length; i++) r[i] = {
|
|
2357
2357
|
key: n[i],
|
|
2358
|
-
value:
|
|
2358
|
+
value: ki(e[n[i]], t)
|
|
2359
2359
|
};
|
|
2360
2360
|
return { kvlistValue: { values: r } };
|
|
2361
2361
|
}
|
|
@@ -2363,33 +2363,33 @@ function Ai(e, t) {
|
|
|
2363
2363
|
}
|
|
2364
2364
|
//#endregion
|
|
2365
2365
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js
|
|
2366
|
-
function
|
|
2366
|
+
function Ai(e) {
|
|
2367
2367
|
let t = BigInt(1e9);
|
|
2368
2368
|
return BigInt(Math.trunc(e[0])) * t + BigInt(Math.trunc(e[1]));
|
|
2369
2369
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return
|
|
2370
|
+
function ji(e) {
|
|
2371
|
+
return Ai(e).toString();
|
|
2372
2372
|
}
|
|
2373
|
-
var
|
|
2374
|
-
function
|
|
2373
|
+
var Mi = typeof BigInt < "u" ? ji : I;
|
|
2374
|
+
function Ni(e) {
|
|
2375
2375
|
return e;
|
|
2376
2376
|
}
|
|
2377
|
-
var
|
|
2378
|
-
encodeHrTime:
|
|
2379
|
-
encodeSpanContext:
|
|
2380
|
-
encodeOptionalSpanContext:
|
|
2377
|
+
var Pi = {
|
|
2378
|
+
encodeHrTime: Mi,
|
|
2379
|
+
encodeSpanContext: Ni,
|
|
2380
|
+
encodeOptionalSpanContext: Ni,
|
|
2381
2381
|
encodeUint8Array: (e) => {
|
|
2382
2382
|
if (typeof Buffer < "u") return Buffer.from(e).toString("base64");
|
|
2383
2383
|
let t = Array(e.length);
|
|
2384
2384
|
for (let n = 0; n < e.length; n++) t[n] = String.fromCharCode(e[n]);
|
|
2385
2385
|
return btoa(t.join(""));
|
|
2386
2386
|
}
|
|
2387
|
-
},
|
|
2388
|
-
function
|
|
2389
|
-
let n = e & 255 |
|
|
2390
|
-
return t && (n |=
|
|
2387
|
+
}, Fi = 256, Ii = 512;
|
|
2388
|
+
function Li(e, t) {
|
|
2389
|
+
let n = e & 255 | Fi;
|
|
2390
|
+
return t && (n |= Ii), n;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function Ri(e, t) {
|
|
2393
2393
|
let n = e.spanContext(), r = e.status, i = e.parentSpanContext?.spanId ? t.encodeSpanContext(e.parentSpanContext?.spanId) : void 0;
|
|
2394
2394
|
return {
|
|
2395
2395
|
traceId: t.encodeSpanContext(n.traceId),
|
|
@@ -2400,41 +2400,41 @@ function zi(e, t) {
|
|
|
2400
2400
|
kind: e.kind == null ? 0 : e.kind + 1,
|
|
2401
2401
|
startTimeUnixNano: t.encodeHrTime(e.startTime),
|
|
2402
2402
|
endTimeUnixNano: t.encodeHrTime(e.endTime),
|
|
2403
|
-
attributes:
|
|
2403
|
+
attributes: X(e.attributes, t),
|
|
2404
2404
|
droppedAttributesCount: e.droppedAttributesCount,
|
|
2405
|
-
events: e.events.map((e) =>
|
|
2405
|
+
events: e.events.map((e) => Bi(e, t)),
|
|
2406
2406
|
droppedEventsCount: e.droppedEventsCount,
|
|
2407
2407
|
status: {
|
|
2408
2408
|
code: r.code,
|
|
2409
2409
|
message: r.message
|
|
2410
2410
|
},
|
|
2411
|
-
links: e.links.map((e) =>
|
|
2411
|
+
links: e.links.map((e) => zi(e, t)),
|
|
2412
2412
|
droppedLinksCount: e.droppedLinksCount,
|
|
2413
|
-
flags:
|
|
2413
|
+
flags: Li(n.traceFlags, e.parentSpanContext?.isRemote)
|
|
2414
2414
|
};
|
|
2415
2415
|
}
|
|
2416
|
-
function
|
|
2416
|
+
function zi(e, t) {
|
|
2417
2417
|
return {
|
|
2418
|
-
attributes: e.attributes ?
|
|
2418
|
+
attributes: e.attributes ? X(e.attributes, t) : [],
|
|
2419
2419
|
spanId: t.encodeSpanContext(e.context.spanId),
|
|
2420
2420
|
traceId: t.encodeSpanContext(e.context.traceId),
|
|
2421
2421
|
traceState: e.context.traceState?.serialize(),
|
|
2422
2422
|
droppedAttributesCount: e.droppedAttributesCount || 0,
|
|
2423
|
-
flags:
|
|
2423
|
+
flags: Li(e.context.traceFlags, e.context.isRemote)
|
|
2424
2424
|
};
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function Bi(e, t) {
|
|
2427
2427
|
return {
|
|
2428
|
-
attributes: e.attributes ?
|
|
2428
|
+
attributes: e.attributes ? X(e.attributes, t) : [],
|
|
2429
2429
|
name: e.name,
|
|
2430
2430
|
timeUnixNano: t.encodeHrTime(e.time),
|
|
2431
2431
|
droppedAttributesCount: e.droppedAttributesCount || 0
|
|
2432
2432
|
};
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2435
|
-
return { resourceSpans:
|
|
2434
|
+
function Vi(e, t) {
|
|
2435
|
+
return { resourceSpans: Ui(e, t) };
|
|
2436
2436
|
}
|
|
2437
|
-
function
|
|
2437
|
+
function Hi(e) {
|
|
2438
2438
|
let t = /* @__PURE__ */ new Map();
|
|
2439
2439
|
for (let n of e) {
|
|
2440
2440
|
let e = t.get(n.resource);
|
|
@@ -2444,23 +2444,23 @@ function Ui(e) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
return t;
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2448
|
-
let n =
|
|
2447
|
+
function Ui(e, t) {
|
|
2448
|
+
let n = Hi(e), r = [], i = n.entries(), a = i.next();
|
|
2449
2449
|
for (; !a.done;) {
|
|
2450
2450
|
let [e, n] = a.value, o = [], s = n.values(), c = s.next();
|
|
2451
2451
|
for (; !c.done;) {
|
|
2452
2452
|
let e = c.value;
|
|
2453
2453
|
if (e.length > 0) {
|
|
2454
|
-
let n = e.map((e) =>
|
|
2454
|
+
let n = e.map((e) => Ri(e, t));
|
|
2455
2455
|
o.push({
|
|
2456
|
-
scope:
|
|
2456
|
+
scope: Di(e[0].instrumentationScope, t),
|
|
2457
2457
|
spans: n,
|
|
2458
2458
|
schemaUrl: e[0].instrumentationScope.schemaUrl
|
|
2459
2459
|
});
|
|
2460
2460
|
}
|
|
2461
2461
|
c = s.next();
|
|
2462
2462
|
}
|
|
2463
|
-
let l =
|
|
2463
|
+
let l = Ei(e, t), u = {
|
|
2464
2464
|
resource: l,
|
|
2465
2465
|
scopeSpans: o,
|
|
2466
2466
|
schemaUrl: l.schemaUrl
|
|
@@ -2471,9 +2471,9 @@ function Wi(e, t) {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
//#endregion
|
|
2473
2473
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js
|
|
2474
|
-
var
|
|
2474
|
+
var Wi = {
|
|
2475
2475
|
serializeRequest: (e) => {
|
|
2476
|
-
let t =
|
|
2476
|
+
let t = Vi(e, Pi);
|
|
2477
2477
|
return new TextEncoder().encode(JSON.stringify(t));
|
|
2478
2478
|
},
|
|
2479
2479
|
deserializeResponse: (e) => {
|
|
@@ -2485,11 +2485,11 @@ var Gi = {
|
|
|
2485
2485
|
return E.warn(`Failed to parse trace export response: ${e.message}. Returning empty response`), {};
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
|
-
},
|
|
2489
|
-
function
|
|
2490
|
-
return 2 *
|
|
2488
|
+
}, Gi = 5, Ki = 1e3, qi = 5e3, Ji = 1.5, Yi = .2;
|
|
2489
|
+
function Xi() {
|
|
2490
|
+
return 2 * Yi * Math.random() - Yi;
|
|
2491
2491
|
}
|
|
2492
|
-
var
|
|
2492
|
+
var Zi = class {
|
|
2493
2493
|
_transport;
|
|
2494
2494
|
constructor(e) {
|
|
2495
2495
|
this._transport = e;
|
|
@@ -2502,30 +2502,30 @@ var Qi = class {
|
|
|
2502
2502
|
});
|
|
2503
2503
|
}
|
|
2504
2504
|
async send(e, t) {
|
|
2505
|
-
let n =
|
|
2505
|
+
let n = Gi, r = Ki, i = Date.now() + t, a = await this._transport.send(e, t);
|
|
2506
2506
|
for (; a.status === "retryable" && n > 0;) {
|
|
2507
2507
|
n--;
|
|
2508
|
-
let t = Math.max(Math.min(r * (1 +
|
|
2509
|
-
r *=
|
|
2508
|
+
let t = Math.max(Math.min(r * (1 + Xi()), qi), 0);
|
|
2509
|
+
r *= Ji;
|
|
2510
2510
|
let o = a.retryInMillis ?? t, s = i - Date.now();
|
|
2511
2511
|
if (o > s) return E.info(`Export retry time ${Math.round(o)}ms exceeds remaining timeout ${Math.round(s)}ms, not retrying further.`), a;
|
|
2512
2512
|
E.verbose(`Scheduling export retry in ${Math.round(o)}ms`), a = await this.retry(e, s, o);
|
|
2513
2513
|
}
|
|
2514
|
-
return a.status === "success" ? E.verbose(`Export succeeded after ${
|
|
2514
|
+
return a.status === "success" ? E.verbose(`Export succeeded after ${Gi - n} retry attempts.`) : a.status === "retryable" ? E.info(`Export failed after maximum retry attempts (${Gi}).`) : E.info(`Export failed with non-retryable error: ${a.error}`), a;
|
|
2515
2515
|
}
|
|
2516
2516
|
shutdown() {
|
|
2517
2517
|
return this._transport.shutdown();
|
|
2518
2518
|
}
|
|
2519
2519
|
};
|
|
2520
|
-
function
|
|
2521
|
-
return new
|
|
2520
|
+
function Qi(e) {
|
|
2521
|
+
return new Zi(e.transport);
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
2524
2524
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/is-export-retryable.js
|
|
2525
|
-
function
|
|
2525
|
+
function $i(e) {
|
|
2526
2526
|
return e === 429 || e === 502 || e === 503 || e === 504;
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2528
|
+
function ea(e) {
|
|
2529
2529
|
if (e == null) return;
|
|
2530
2530
|
let t = Number.parseInt(e, 10);
|
|
2531
2531
|
if (Number.isInteger(t)) return t > 0 ? t * 1e3 : -1;
|
|
@@ -2534,7 +2534,7 @@ function ta(e) {
|
|
|
2534
2534
|
}
|
|
2535
2535
|
//#endregion
|
|
2536
2536
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/fetch-transport.js
|
|
2537
|
-
var
|
|
2537
|
+
var ta = 61440, na = 9, ra = 0, ia = 0, aa = class {
|
|
2538
2538
|
_parameters;
|
|
2539
2539
|
constructor(e) {
|
|
2540
2540
|
this._parameters = e;
|
|
@@ -2542,11 +2542,11 @@ var na = 61440, ra = 9, ia = 0, aa = 0, oa = class {
|
|
|
2542
2542
|
async send(e, t) {
|
|
2543
2543
|
let n = new AbortController(), r = setTimeout(() => n.abort(), t), i = globalThis.fetch;
|
|
2544
2544
|
typeof i.__original == "function" && (i = i.__original);
|
|
2545
|
-
let a = e.byteLength, o =
|
|
2546
|
-
if (s)
|
|
2545
|
+
let a = e.byteLength, o = ra + a > ta, s = !o && !(ia >= na);
|
|
2546
|
+
if (s) ra += a, ia++;
|
|
2547
2547
|
else {
|
|
2548
2548
|
let e = o ? "size limit" : "count limit";
|
|
2549
|
-
E.debug(`keepalive disabled: ${(a / 1024).toFixed(1)}KB payload, ${
|
|
2549
|
+
E.debug(`keepalive disabled: ${(a / 1024).toFixed(1)}KB payload, ${ia} pending (${e})`);
|
|
2550
2550
|
}
|
|
2551
2551
|
try {
|
|
2552
2552
|
let t = new URL(this._parameters.url), r = await i(t.href, {
|
|
@@ -2557,15 +2557,15 @@ var na = 61440, ra = 9, ia = 0, aa = 0, oa = class {
|
|
|
2557
2557
|
keepalive: s,
|
|
2558
2558
|
mode: globalThis.location ? globalThis.location.origin === t.origin ? "same-origin" : "cors" : "no-cors"
|
|
2559
2559
|
});
|
|
2560
|
-
return r.status >= 200 && r.status <= 299 ? (E.debug(`export response success (status: ${r.status})`), { status: "success" }) :
|
|
2560
|
+
return r.status >= 200 && r.status <= 299 ? (E.debug(`export response success (status: ${r.status})`), { status: "success" }) : $i(r.status) ? (E.warn(`export response retryable (status: ${r.status})`), {
|
|
2561
2561
|
status: "retryable",
|
|
2562
|
-
retryInMillis:
|
|
2562
|
+
retryInMillis: ea(r.headers.get("Retry-After"))
|
|
2563
2563
|
}) : (E.error(`export response failure (status: ${r.status})`), {
|
|
2564
2564
|
status: "failure",
|
|
2565
2565
|
error: /* @__PURE__ */ Error(`Fetch request failed with non-retryable status ${r.status}`)
|
|
2566
2566
|
});
|
|
2567
2567
|
} catch (e) {
|
|
2568
|
-
return
|
|
2568
|
+
return sa(e) ? (E.warn(`export request retryable (network error: ${e})`), {
|
|
2569
2569
|
status: "retryable",
|
|
2570
2570
|
error: Error("Fetch request encountered a network error", { cause: e })
|
|
2571
2571
|
}) : (E.error(`export request failure (error: ${e})`), {
|
|
@@ -2573,25 +2573,25 @@ var na = 61440, ra = 9, ia = 0, aa = 0, oa = class {
|
|
|
2573
2573
|
error: Error("Fetch request errored", { cause: e })
|
|
2574
2574
|
});
|
|
2575
2575
|
} finally {
|
|
2576
|
-
clearTimeout(r), s && (
|
|
2576
|
+
clearTimeout(r), s && (ra -= a, ia--);
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
2579
2579
|
shutdown() {}
|
|
2580
2580
|
};
|
|
2581
|
-
function
|
|
2582
|
-
return new
|
|
2581
|
+
function oa(e) {
|
|
2582
|
+
return new aa(e);
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function sa(e) {
|
|
2585
2585
|
return e instanceof TypeError && !e.cause;
|
|
2586
2586
|
}
|
|
2587
2587
|
//#endregion
|
|
2588
2588
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-browser-http-export-delegate.js
|
|
2589
|
-
function
|
|
2590
|
-
return
|
|
2589
|
+
function ca(e, t, n) {
|
|
2590
|
+
return si(e, t, n, Qi({ transport: oa(e) }));
|
|
2591
2591
|
}
|
|
2592
2592
|
//#endregion
|
|
2593
2593
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/util.js
|
|
2594
|
-
function
|
|
2594
|
+
function la(e) {
|
|
2595
2595
|
let t = {};
|
|
2596
2596
|
return Object.entries(e ?? {}).forEach(([e, n]) => {
|
|
2597
2597
|
n === void 0 ? E.warn(`Header "${e}" has invalid value (${n}) and will be ignored`) : t[e] = String(n);
|
|
@@ -2599,13 +2599,13 @@ function ua(e) {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
//#endregion
|
|
2601
2601
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-http-configuration.js
|
|
2602
|
-
function
|
|
2602
|
+
function ua(e, t, n) {
|
|
2603
2603
|
return async () => {
|
|
2604
2604
|
let r = { ...await n() }, i = {};
|
|
2605
|
-
return t != null && Object.assign(i, await t()), e != null && Object.assign(i,
|
|
2605
|
+
return t != null && Object.assign(i, await t()), e != null && Object.assign(i, la(await e())), Object.assign(i, r);
|
|
2606
2606
|
};
|
|
2607
2607
|
}
|
|
2608
|
-
function
|
|
2608
|
+
function da(e) {
|
|
2609
2609
|
if (e != null) try {
|
|
2610
2610
|
let t = globalThis.location?.href;
|
|
2611
2611
|
return new URL(e, t).href;
|
|
@@ -2613,66 +2613,66 @@ function fa(e) {
|
|
|
2613
2613
|
throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`);
|
|
2614
2614
|
}
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function fa(e, t, n) {
|
|
2617
2617
|
return {
|
|
2618
|
-
|
|
2619
|
-
headers:
|
|
2620
|
-
url:
|
|
2618
|
+
...$r(e, t, n),
|
|
2619
|
+
headers: ua(e.headers, t.headers, n.headers),
|
|
2620
|
+
url: da(e.url) ?? t.url ?? n.url
|
|
2621
2621
|
};
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function pa(e, t) {
|
|
2624
2624
|
return {
|
|
2625
|
-
...
|
|
2625
|
+
...ei(),
|
|
2626
2626
|
headers: async () => e,
|
|
2627
2627
|
url: "http://localhost:4318/" + t
|
|
2628
2628
|
};
|
|
2629
2629
|
}
|
|
2630
2630
|
//#endregion
|
|
2631
2631
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/convert-legacy-http-options.js
|
|
2632
|
-
function
|
|
2633
|
-
return typeof e.headers == "function" ? e.headers :
|
|
2632
|
+
function ma(e) {
|
|
2633
|
+
return typeof e.headers == "function" ? e.headers : Qr(e.headers);
|
|
2634
2634
|
}
|
|
2635
2635
|
//#endregion
|
|
2636
2636
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/convert-legacy-browser-http-options.js
|
|
2637
|
-
function
|
|
2638
|
-
return
|
|
2637
|
+
function ha(e, t, n) {
|
|
2638
|
+
return fa({
|
|
2639
2639
|
url: e.url,
|
|
2640
2640
|
timeoutMillis: e.timeoutMillis,
|
|
2641
|
-
headers:
|
|
2641
|
+
headers: ma(e),
|
|
2642
2642
|
concurrencyLimit: e.concurrencyLimit
|
|
2643
|
-
}, {},
|
|
2643
|
+
}, {}, pa(n, t));
|
|
2644
2644
|
}
|
|
2645
2645
|
//#endregion
|
|
2646
2646
|
//#region ../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/create-legacy-browser-delegate.js
|
|
2647
|
-
function
|
|
2648
|
-
return new
|
|
2647
|
+
function ga(e, t, n, r) {
|
|
2648
|
+
return new gi({
|
|
2649
2649
|
componentType: e,
|
|
2650
2650
|
metricsHelper: t,
|
|
2651
2651
|
url: n,
|
|
2652
2652
|
meterProvider: r,
|
|
2653
2653
|
responseAttributesFromError: (e) => {
|
|
2654
|
-
if (!e) return { [
|
|
2654
|
+
if (!e) return { [ci]: 200 };
|
|
2655
2655
|
if (!(e instanceof Error)) return {};
|
|
2656
2656
|
if (e.message.startsWith("Fetch request failed with non-retryable status ")) {
|
|
2657
2657
|
let t = e.message.substring(47);
|
|
2658
|
-
return { [
|
|
2658
|
+
return { [ci]: Number(t) };
|
|
2659
2659
|
}
|
|
2660
2660
|
return {};
|
|
2661
2661
|
}
|
|
2662
2662
|
});
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2665
|
-
let s =
|
|
2666
|
-
return
|
|
2664
|
+
function _a(e, t, n, r, i, a, o) {
|
|
2665
|
+
let s = ha(e, a, o);
|
|
2666
|
+
return ca(s, t, ga(n, r, s.url, e.selfObsMeterProvider));
|
|
2667
2667
|
}
|
|
2668
2668
|
//#endregion
|
|
2669
2669
|
//#region ../../node_modules/.pnpm/@opentelemetry+exporter-trace-otlp-http@0.222.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/semconv.js
|
|
2670
|
-
var
|
|
2670
|
+
var va = "otlp_http_span_exporter", ya = class extends Yr {
|
|
2671
2671
|
constructor(e = {}) {
|
|
2672
|
-
super(
|
|
2672
|
+
super(_a(e, Wi, va, _i, e.selfObsMeterProvider, "v1/traces", { "Content-Type": "application/json" }));
|
|
2673
2673
|
}
|
|
2674
|
-
},
|
|
2675
|
-
function
|
|
2674
|
+
}, Z = console.error.bind(console);
|
|
2675
|
+
function Q(e, t, n) {
|
|
2676
2676
|
let r = !!e[t] && Object.prototype.propertyIsEnumerable.call(e, t);
|
|
2677
2677
|
Object.defineProperty(e, t, {
|
|
2678
2678
|
configurable: !0,
|
|
@@ -2681,66 +2681,66 @@ function Z(e, t, n) {
|
|
|
2681
2681
|
value: n
|
|
2682
2682
|
});
|
|
2683
2683
|
}
|
|
2684
|
-
var
|
|
2684
|
+
var ba = (e, t, n) => {
|
|
2685
2685
|
if (!e || !e[t]) {
|
|
2686
|
-
|
|
2686
|
+
Z("no original function " + String(t) + " to wrap");
|
|
2687
2687
|
return;
|
|
2688
2688
|
}
|
|
2689
2689
|
if (!n) {
|
|
2690
|
-
|
|
2690
|
+
Z("no wrapper function"), Z((/* @__PURE__ */ Error()).stack);
|
|
2691
2691
|
return;
|
|
2692
2692
|
}
|
|
2693
2693
|
let r = e[t];
|
|
2694
2694
|
if (typeof r != "function" || typeof n != "function") {
|
|
2695
|
-
|
|
2695
|
+
Z("original object and wrapper must be functions");
|
|
2696
2696
|
return;
|
|
2697
2697
|
}
|
|
2698
2698
|
let i = n(r, t);
|
|
2699
|
-
return
|
|
2700
|
-
e[t] === i &&
|
|
2701
|
-
}),
|
|
2702
|
-
},
|
|
2699
|
+
return Q(i, "__original", r), Q(i, "__unwrap", () => {
|
|
2700
|
+
e[t] === i && Q(e, t, r);
|
|
2701
|
+
}), Q(i, "__wrapped", !0), Q(e, t, i), i;
|
|
2702
|
+
}, xa = (e, t, n) => {
|
|
2703
2703
|
if (e) Array.isArray(e) || (e = [e]);
|
|
2704
2704
|
else {
|
|
2705
|
-
|
|
2705
|
+
Z("must provide one or more modules to patch"), Z((/* @__PURE__ */ Error()).stack);
|
|
2706
2706
|
return;
|
|
2707
2707
|
}
|
|
2708
2708
|
if (!(t && Array.isArray(t))) {
|
|
2709
|
-
|
|
2709
|
+
Z("must provide one or more functions to wrap on modules");
|
|
2710
2710
|
return;
|
|
2711
2711
|
}
|
|
2712
2712
|
e.forEach((e) => {
|
|
2713
2713
|
t.forEach((t) => {
|
|
2714
|
-
|
|
2714
|
+
ba(e, t, n);
|
|
2715
2715
|
});
|
|
2716
2716
|
});
|
|
2717
|
-
},
|
|
2717
|
+
}, Sa = (e, t) => {
|
|
2718
2718
|
if (!e || !e[t]) {
|
|
2719
|
-
|
|
2719
|
+
Z("no function to unwrap."), Z((/* @__PURE__ */ Error()).stack);
|
|
2720
2720
|
return;
|
|
2721
2721
|
}
|
|
2722
2722
|
let n = e[t];
|
|
2723
|
-
if (!n.__unwrap)
|
|
2723
|
+
if (!n.__unwrap) Z("no original to unwrap to -- has " + String(t) + " already been unwrapped?");
|
|
2724
2724
|
else {
|
|
2725
2725
|
n.__unwrap();
|
|
2726
2726
|
return;
|
|
2727
2727
|
}
|
|
2728
|
-
},
|
|
2728
|
+
}, Ca = (e, t) => {
|
|
2729
2729
|
if (e) Array.isArray(e) || (e = [e]);
|
|
2730
2730
|
else {
|
|
2731
|
-
|
|
2731
|
+
Z("must provide one or more modules to patch"), Z((/* @__PURE__ */ Error()).stack);
|
|
2732
2732
|
return;
|
|
2733
2733
|
}
|
|
2734
2734
|
if (!(t && Array.isArray(t))) {
|
|
2735
|
-
|
|
2735
|
+
Z("must provide one or more functions to unwrap on modules");
|
|
2736
2736
|
return;
|
|
2737
2737
|
}
|
|
2738
2738
|
e.forEach((e) => {
|
|
2739
2739
|
t.forEach((t) => {
|
|
2740
|
-
|
|
2740
|
+
Sa(e, t);
|
|
2741
2741
|
});
|
|
2742
2742
|
});
|
|
2743
|
-
},
|
|
2743
|
+
}, wa = class {
|
|
2744
2744
|
_config = {};
|
|
2745
2745
|
_tracer;
|
|
2746
2746
|
_meter;
|
|
@@ -2749,12 +2749,12 @@ var xa = (e, t, n) => {
|
|
|
2749
2749
|
instrumentationName;
|
|
2750
2750
|
instrumentationVersion;
|
|
2751
2751
|
constructor(e, t, n) {
|
|
2752
|
-
this.instrumentationName = e, this.instrumentationVersion = t, this.setConfig(n), this._diag = E.createComponentLogger({ namespace: e }), this._tracer = O.getTracer(e, t), this._meter = ot.getMeter(e, t), this._logger =
|
|
2752
|
+
this.instrumentationName = e, this.instrumentationVersion = t, this.setConfig(n), this._diag = E.createComponentLogger({ namespace: e }), this._tracer = O.getTracer(e, t), this._meter = ot.getMeter(e, t), this._logger = Ti.getLogger(e, t), this._updateMetricInstruments();
|
|
2753
2753
|
}
|
|
2754
|
-
_wrap =
|
|
2755
|
-
_unwrap =
|
|
2756
|
-
_massWrap =
|
|
2757
|
-
_massUnwrap =
|
|
2754
|
+
_wrap = ba;
|
|
2755
|
+
_unwrap = Sa;
|
|
2756
|
+
_massWrap = xa;
|
|
2757
|
+
_massUnwrap = Ca;
|
|
2758
2758
|
get meter() {
|
|
2759
2759
|
return this._meter;
|
|
2760
2760
|
}
|
|
@@ -2794,14 +2794,14 @@ var xa = (e, t, n) => {
|
|
|
2794
2794
|
this._diag.error("Error running span customization hook due to exception in handler", { triggerName: t }, e);
|
|
2795
2795
|
}
|
|
2796
2796
|
}
|
|
2797
|
-
},
|
|
2797
|
+
}, Ta = class extends wa {
|
|
2798
2798
|
constructor(e, t, n) {
|
|
2799
2799
|
super(e, t, n), this._config.enabled && this.enable();
|
|
2800
2800
|
}
|
|
2801
2801
|
};
|
|
2802
2802
|
//#endregion
|
|
2803
2803
|
//#region ../../node_modules/.pnpm/@opentelemetry+instrumentation@0.222.0_@opentelemetry+api@1.9.1_supports-color@10.2.2/node_modules/@opentelemetry/instrumentation/build/esm/utils.js
|
|
2804
|
-
function
|
|
2804
|
+
function Ea(e, t, n) {
|
|
2805
2805
|
let r, i;
|
|
2806
2806
|
try {
|
|
2807
2807
|
i = e();
|
|
@@ -2902,7 +2902,7 @@ function Va(e) {
|
|
|
2902
2902
|
}
|
|
2903
2903
|
//#endregion
|
|
2904
2904
|
//#region ../../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.222.0_@opentelemetry+api@1.9.1_supports-color@10.2.2/node_modules/@opentelemetry/instrumentation-fetch/build/esm/version.js
|
|
2905
|
-
var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class extends
|
|
2905
|
+
var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class extends Ta {
|
|
2906
2906
|
component = "fetch";
|
|
2907
2907
|
version = Ha;
|
|
2908
2908
|
moduleName = this.component;
|
|
@@ -2913,17 +2913,17 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2913
2913
|
}
|
|
2914
2914
|
init() {}
|
|
2915
2915
|
_addChildSpan(e, t) {
|
|
2916
|
-
let n = this.tracer.startSpan("CORS Preflight", { startTime: t[
|
|
2917
|
-
|
|
2916
|
+
let n = this.tracer.startSpan("CORS Preflight", { startTime: t[K.FETCH_START] }, O.setSpan(T.active(), e));
|
|
2917
|
+
Vr(n, t, this.getConfig().ignoreNetworkEvents, void 0, !0), n.end(t[K.RESPONSE_END]);
|
|
2918
2918
|
}
|
|
2919
2919
|
_addFinalSpanAttributes(e, t) {
|
|
2920
|
-
let n =
|
|
2920
|
+
let n = qr(t.url);
|
|
2921
2921
|
e.setAttribute("http.response.status_code", t.status), e.setAttribute("server.address", n.hostname);
|
|
2922
2922
|
let r = Va(n);
|
|
2923
2923
|
r && e.setAttribute("server.port", r);
|
|
2924
2924
|
}
|
|
2925
2925
|
_addHeaders(e, t) {
|
|
2926
|
-
if (!
|
|
2926
|
+
if (!Jr(t, this.getConfig().propagateTraceHeaderCorsUrls)) {
|
|
2927
2927
|
let e = {};
|
|
2928
2928
|
D.inject(T.active(), e), Object.keys(e).length > 0 && this._diag.debug("headers inject skipped due to CORS policy");
|
|
2929
2929
|
return;
|
|
@@ -2938,7 +2938,7 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2938
2938
|
this._tasksCount === 0 && this.getConfig().clearTimingResources && (performance.clearResourceTimings(), this._usedResources = /* @__PURE__ */ new WeakSet());
|
|
2939
2939
|
}
|
|
2940
2940
|
_createSpan(e, t = {}) {
|
|
2941
|
-
if (
|
|
2941
|
+
if (Nn(e, this.getConfig().ignoreUrls)) {
|
|
2942
2942
|
this._diag.debug("ignoring span as url matches ignored url");
|
|
2943
2943
|
return;
|
|
2944
2944
|
}
|
|
@@ -2954,19 +2954,19 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2954
2954
|
if (!performance.getEntriesByType) return;
|
|
2955
2955
|
r = performance.getEntriesByType("resource");
|
|
2956
2956
|
}
|
|
2957
|
-
let i =
|
|
2957
|
+
let i = Wr(t.spanUrl, t.startTime, n, r, this._usedResources, "fetch");
|
|
2958
2958
|
if (i.mainRequest) {
|
|
2959
2959
|
let t = i.mainRequest;
|
|
2960
2960
|
this._markResourceAsUsed(t);
|
|
2961
2961
|
let n = i.corsPreFlightRequest;
|
|
2962
|
-
n && (this._addChildSpan(e, n), this._markResourceAsUsed(n)),
|
|
2962
|
+
n && (this._addChildSpan(e, n), this._markResourceAsUsed(n)), Vr(e, t, this.getConfig().ignoreNetworkEvents, void 0, !0);
|
|
2963
2963
|
}
|
|
2964
2964
|
}
|
|
2965
2965
|
_markResourceAsUsed(e) {
|
|
2966
2966
|
this._usedResources.add(e);
|
|
2967
2967
|
}
|
|
2968
2968
|
_endSpan(t, n, r) {
|
|
2969
|
-
let i =
|
|
2969
|
+
let i = N(Date.now()), a = P();
|
|
2970
2970
|
this._addFinalSpanAttributes(t, r), r.status >= 400 && (t.setStatus({ code: w.ERROR }), t.setAttribute(e, String(r.status))), setTimeout(() => {
|
|
2971
2971
|
n.observer?.disconnect(), this._findResourceAndAddNetworkEvents(t, n, a), this._tasksCount--, this._clearResources(), t.end(i);
|
|
2972
2972
|
}, Ua);
|
|
@@ -2976,7 +2976,7 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2976
2976
|
let t = this;
|
|
2977
2977
|
return function(...n) {
|
|
2978
2978
|
if (!t._isEnabled) return e.apply(this, n);
|
|
2979
|
-
let r = this, i =
|
|
2979
|
+
let r = this, i = qr(n[0] instanceof Request ? n[0].url : String(n[0])).href, a;
|
|
2980
2980
|
a = n[0] instanceof Request ? n[1] == null ? n[0] : new Request(n[0], n[1]) : n[1] || {};
|
|
2981
2981
|
let o = t._createSpan(i, a);
|
|
2982
2982
|
if (!o) return e.apply(this, n);
|
|
@@ -3038,18 +3038,18 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
3038
3038
|
}
|
|
3039
3039
|
_applyAttributesAfterFetch(e, t, n) {
|
|
3040
3040
|
let r = this.getConfig().applyCustomAttributesOnSpan;
|
|
3041
|
-
r &&
|
|
3041
|
+
r && Ea(() => r(e, t, n), (e) => {
|
|
3042
3042
|
e && this._diag.error("applyCustomAttributesOnSpan", e);
|
|
3043
3043
|
}, !0);
|
|
3044
3044
|
}
|
|
3045
3045
|
_callRequestHook(e, t) {
|
|
3046
3046
|
let n = this.getConfig().requestHook;
|
|
3047
|
-
n &&
|
|
3047
|
+
n && Ea(() => n(e, t), (e) => {
|
|
3048
3048
|
e && this._diag.error("requestHook", e);
|
|
3049
3049
|
}, !0);
|
|
3050
3050
|
}
|
|
3051
3051
|
_prepareSpanData(e) {
|
|
3052
|
-
let t =
|
|
3052
|
+
let t = P(), n = [];
|
|
3053
3053
|
if (typeof PerformanceObserver != "function") return {
|
|
3054
3054
|
entries: n,
|
|
3055
3055
|
startTime: t,
|
|
@@ -3101,16 +3101,16 @@ var Ka = "0.67.0", qa = "@opentelemetry/instrumentation-document-load", Ja;
|
|
|
3101
3101
|
//#region ../../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.67.0_@opentelemetry+api@1.9.1_supports-color@10.2.2/node_modules/@opentelemetry/instrumentation-document-load/build/esm/utils.js
|
|
3102
3102
|
var Ya = () => {
|
|
3103
3103
|
let e = {}, t = j.getEntriesByType?.("navigation")[0];
|
|
3104
|
-
if (t) Object.values(
|
|
3105
|
-
if (
|
|
3104
|
+
if (t) Object.values(K).forEach((n) => {
|
|
3105
|
+
if (q(t, n)) {
|
|
3106
3106
|
let r = t[n];
|
|
3107
3107
|
typeof r == "number" && (e[n] = r);
|
|
3108
3108
|
}
|
|
3109
3109
|
});
|
|
3110
3110
|
else {
|
|
3111
3111
|
let t = j.timing;
|
|
3112
|
-
t && Object.values(
|
|
3113
|
-
if (
|
|
3112
|
+
t && Object.values(K).forEach((n) => {
|
|
3113
|
+
if (q(t, n)) {
|
|
3114
3114
|
let r = t[n];
|
|
3115
3115
|
typeof r == "number" && (e[n] = r);
|
|
3116
3116
|
}
|
|
@@ -3123,9 +3123,9 @@ var Ya = () => {
|
|
|
3123
3123
|
}, Za = (e) => {
|
|
3124
3124
|
let t = j.getEntriesByType?.("paint");
|
|
3125
3125
|
t && t.forEach(({ name: t, startTime: n }) => {
|
|
3126
|
-
|
|
3126
|
+
q(Xa, t) && e.addEvent(Xa[t], n);
|
|
3127
3127
|
});
|
|
3128
|
-
}, Qa = class extends
|
|
3128
|
+
}, Qa = class extends Ta {
|
|
3129
3129
|
component = "document-load";
|
|
3130
3130
|
version = "1";
|
|
3131
3131
|
moduleName = this.component;
|
|
@@ -3145,37 +3145,37 @@ var Ya = () => {
|
|
|
3145
3145
|
});
|
|
3146
3146
|
}
|
|
3147
3147
|
_collectPerformance() {
|
|
3148
|
-
let e = Array.from(document.getElementsByTagName("meta")).find((e) => e.getAttribute("name") ===
|
|
3148
|
+
let e = Array.from(document.getElementsByTagName("meta")).find((e) => e.getAttribute("name") === nn), t = Ya(), n = e && e.content || "";
|
|
3149
3149
|
T.with(D.extract(b, { traceparent: n }), () => {
|
|
3150
|
-
let e = this._startSpan($.DOCUMENT_LOAD,
|
|
3150
|
+
let e = this._startSpan($.DOCUMENT_LOAD, K.FETCH_START, t);
|
|
3151
3151
|
e && (T.with(O.setSpan(T.active(), e), () => {
|
|
3152
|
-
let e = this._startSpan($.DOCUMENT_FETCH,
|
|
3152
|
+
let e = this._startSpan($.DOCUMENT_FETCH, K.FETCH_START, t);
|
|
3153
3153
|
e && (e.setAttribute(c, location.href), T.with(O.setSpan(T.active(), e), () => {
|
|
3154
|
-
|
|
3154
|
+
Vr(e, t, this.getConfig().ignoreNetworkEvents), this._addCustomAttributesOnSpan(e, this.getConfig().applyCustomAttributesOnSpan?.documentFetch), this._endSpan(e, K.RESPONSE_END, t);
|
|
3155
3155
|
}));
|
|
3156
|
-
}), e.setAttribute(c, location.href), e.setAttribute("user_agent.original", navigator.userAgent), this._addResourcesSpans(e), this.getConfig().ignoreNetworkEvents || (
|
|
3156
|
+
}), e.setAttribute(c, location.href), e.setAttribute("user_agent.original", navigator.userAgent), this._addResourcesSpans(e), this.getConfig().ignoreNetworkEvents || (J(e, K.FETCH_START, t), J(e, K.UNLOAD_EVENT_START, t), J(e, K.UNLOAD_EVENT_END, t), J(e, K.DOM_INTERACTIVE, t), J(e, K.DOM_CONTENT_LOADED_EVENT_START, t), J(e, K.DOM_CONTENT_LOADED_EVENT_END, t), J(e, K.DOM_COMPLETE, t), J(e, K.LOAD_EVENT_START, t), J(e, K.LOAD_EVENT_END, t)), this.getConfig().ignorePerformancePaintEvents || Za(e), this._addCustomAttributesOnSpan(e, this.getConfig().applyCustomAttributesOnSpan?.documentLoad), this._endSpan(e, K.LOAD_EVENT_END, t));
|
|
3157
3157
|
});
|
|
3158
3158
|
}
|
|
3159
3159
|
_endSpan(e, t, n) {
|
|
3160
|
-
e && (
|
|
3160
|
+
e && (q(n, t) ? e.end(n[t]) : e.end());
|
|
3161
3161
|
}
|
|
3162
3162
|
_initResourceSpan(e, t) {
|
|
3163
|
-
let n = this._startSpan($.RESOURCE_FETCH,
|
|
3164
|
-
n && (n.setAttribute(c, e.name),
|
|
3163
|
+
let n = this._startSpan($.RESOURCE_FETCH, K.FETCH_START, e, t);
|
|
3164
|
+
n && (n.setAttribute(c, e.name), Vr(n, e, this.getConfig().ignoreNetworkEvents), this._addCustomAttributesOnResourceSpan(n, e, this.getConfig().applyCustomAttributesOnSpan?.resourceFetch), this._endSpan(n, K.RESPONSE_END, e));
|
|
3165
3165
|
}
|
|
3166
3166
|
_startSpan(e, t, n, r) {
|
|
3167
|
-
if (
|
|
3167
|
+
if (q(n, t) && typeof n[t] == "number") return this.tracer.startSpan(e, { startTime: n[t] }, r ? O.setSpan(T.active(), r) : void 0);
|
|
3168
3168
|
}
|
|
3169
3169
|
_waitForPageLoad() {
|
|
3170
3170
|
window.document.readyState === "complete" ? this._onDocumentLoaded() : (this._onDocumentLoaded = this._onDocumentLoaded.bind(this), window.addEventListener("load", this._onDocumentLoaded));
|
|
3171
3171
|
}
|
|
3172
3172
|
_addCustomAttributesOnSpan(e, t) {
|
|
3173
|
-
t &&
|
|
3173
|
+
t && Ea(() => t(e), (e) => {
|
|
3174
3174
|
e && this._diag.error("addCustomAttributesOnSpan", e);
|
|
3175
3175
|
}, !0);
|
|
3176
3176
|
}
|
|
3177
3177
|
_addCustomAttributesOnResourceSpan(e, t, n) {
|
|
3178
|
-
n &&
|
|
3178
|
+
n && Ea(() => n(e, t), (e) => {
|
|
3179
3179
|
e && this._diag.error("addCustomAttributesOnResourceSpan", e);
|
|
3180
3180
|
}, !0);
|
|
3181
3181
|
}
|
|
@@ -3221,11 +3221,13 @@ function ro(e) {
|
|
|
3221
3221
|
});
|
|
3222
3222
|
}
|
|
3223
3223
|
function io(e) {
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3224
|
+
if (e?.enabled === !1) return null;
|
|
3225
|
+
let t = e?.serviceName ?? "frontend", n = e?.environment ?? "development";
|
|
3226
|
+
return {
|
|
3227
|
+
serviceName: t,
|
|
3228
|
+
environment: n,
|
|
3227
3229
|
exporterEndpoint: e?.exporterEndpoint ?? "http://localhost:4318",
|
|
3228
|
-
samplingRate:
|
|
3230
|
+
samplingRate: e?.samplingRate ?? eo(n),
|
|
3229
3231
|
otlpHeaders: e?.otlpHeaders ?? {},
|
|
3230
3232
|
signozApiKey: e?.signozApiKey ?? "",
|
|
3231
3233
|
logLevel: e?.logLevel ?? "info",
|
|
@@ -3238,28 +3240,29 @@ function ao(e) {
|
|
|
3238
3240
|
shutdown: async () => {},
|
|
3239
3241
|
flush: async () => {}
|
|
3240
3242
|
};
|
|
3241
|
-
let n =
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
}
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
})
|
|
3243
|
+
let n = zn({
|
|
3244
|
+
[r]: t.serviceName,
|
|
3245
|
+
"deployment.environment": t.environment,
|
|
3246
|
+
"service.version": "0.0.0"
|
|
3247
|
+
}), i = new ya({
|
|
3248
|
+
url: `${t.exporterEndpoint}/v1/traces`,
|
|
3249
|
+
headers: t.otlpHeaders
|
|
3250
|
+
}), a = new Ir({
|
|
3251
|
+
resource: n,
|
|
3252
|
+
sampler: new U({ root: new Tr(t.samplingRate) }),
|
|
3253
|
+
spanProcessors: [new Mr(i)]
|
|
3251
3254
|
});
|
|
3252
|
-
return
|
|
3255
|
+
return a.register(), D.setGlobalPropagator(new cn()), new Ga({ propagateTraceHeaderCorsUrls: t.propagateCorsUrls ? [t.propagateCorsUrls] : [] }).enable(), new Qa().enable(), ro(() => a.forceFlush()), {
|
|
3253
3256
|
shutdown: async () => {
|
|
3254
3257
|
try {
|
|
3255
|
-
await to(
|
|
3258
|
+
await to(a.shutdown(), 1e4, "browser shutdown");
|
|
3256
3259
|
} catch (e) {
|
|
3257
3260
|
console.error("[telemetry-browser] Error during shutdown", e);
|
|
3258
3261
|
}
|
|
3259
3262
|
},
|
|
3260
3263
|
flush: async () => {
|
|
3261
3264
|
try {
|
|
3262
|
-
await to(
|
|
3265
|
+
await to(a.forceFlush(), 1e4, "browser flush");
|
|
3263
3266
|
} catch (e) {
|
|
3264
3267
|
console.error("[telemetry-browser] Error during flush", e);
|
|
3265
3268
|
}
|
|
@@ -3269,4 +3272,4 @@ function ao(e) {
|
|
|
3269
3272
|
//#endregion
|
|
3270
3273
|
export { ao as initializeTelemetryBrowser };
|
|
3271
3274
|
|
|
3272
|
-
//# sourceMappingURL=browser-
|
|
3275
|
+
//# sourceMappingURL=browser-Ct5TRDgj.js.map
|