@8wave/ai-elements 0.117.0 → 0.118.0-beta.16
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/{Agent-DDAyL-4q.js → Agent-D8YrsP52.js} +15 -11
- package/dist/_chunks/Agent-D8YrsP52.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js → PkStreamingMarkdown--CcBvs19.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js.map → PkStreamingMarkdown--CcBvs19.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js → PkToolEditSpreadsheet-5vHzEy4P.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js.map → PkToolEditSpreadsheet-5vHzEy4P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js → PkToolRequestGeolocation-Cj8hTfNF.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js.map → PkToolRequestGeolocation-Cj8hTfNF.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js → PkToolRequestOAuthConnection-BWxR1hV4.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js.map → PkToolRequestOAuthConnection-BWxR1hV4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js → PkToolShowArtifact-BVGN7hV2.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js.map → PkToolShowArtifact-BVGN7hV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js → PkToolShowContactForm-Blrwqpl0.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js.map → PkToolShowContactForm-Blrwqpl0.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js → PkToolShowForm-BpGHaN6x.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js.map → PkToolShowForm-BpGHaN6x.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js → PkToolShowImageGallery-CIhIrIcY.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js.map → PkToolShowImageGallery-CIhIrIcY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js → PkToolShowProductList-BjWKnbyD.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js.map → PkToolShowProductList-BjWKnbyD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js → PkToolShowSources-8c9RvGV1.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js.map → PkToolShowSources-8c9RvGV1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js → PkToolShowSuggestedReply-0KahUIlw.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js.map → PkToolShowSuggestedReply-0KahUIlw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js → PkToolShowVideo-_V_d-PDr.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js.map → PkToolShowVideo-_V_d-PDr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js → PkToolShowWebPages-D55VEPjK.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js.map → PkToolShowWebPages-D55VEPjK.js.map} +1 -1
- package/dist/_chunks/{browser-BJcsjj9S.js → browser-CuMi3Hhg.js} +796 -701
- package/dist/_chunks/browser-CuMi3Hhg.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js → chatImagePolicy-DXkhb-N_.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js.map → chatImagePolicy-DXkhb-N_.js.map} +1 -1
- package/dist/_chunks/{markdown-lpamC2tL.js → markdown-c59ir6tw.js} +4 -3
- package/dist/_chunks/markdown-c59ir6tw.js.map +1 -0
- package/dist/ai-elements.es.js +245 -145
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/Agent-dGF8mkG9.js +758 -0
- package/dist-vue/_chunks/{Agent-Bd_4UVe4.js.map → Agent-dGF8mkG9.js.map} +1 -1
- package/dist-vue/_chunks/{Document-BrMThi12.js → Document-B-oyVh7v.js} +219 -218
- package/dist-vue/_chunks/Document-B-oyVh7v.js.map +1 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js +139 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js → PkChatbot-Cm45hwYw.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js.map → PkChatbot-Cm45hwYw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js → PkChatbotAuth-BMLLTSwK.js} +78 -78
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js.map → PkChatbotAuth-BMLLTSwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js → PkChatbotEmptyState-D2dhInfG.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js.map → PkChatbotEmptyState-D2dhInfG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js → PkChatbotFeedbackForm-CMFXjoKR.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js.map → PkChatbotFeedbackForm-CMFXjoKR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js → PkChatbotInput-CQdxFbBR.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js.map → PkChatbotInput-CQdxFbBR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js → PkChatbotMessages-coscJcpy.js} +29 -29
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js.map → PkChatbotMessages-coscJcpy.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js → PkChatbotStepPayload-DnqFluQZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js.map → PkChatbotStepPayload-DnqFluQZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js → PkChatbotStepToolDetail-BMslY_BG.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js.map → PkChatbotStepToolDetail-BMslY_BG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js → PkChatbotSteps-7FT6Ju6_.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js.map → PkChatbotSteps-7FT6Ju6_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-eXFjwNkz.js → PkChatbotViewChat-Cko-Cw6c.js} +205 -198
- package/dist-vue/_chunks/PkChatbotViewChat-Cko-Cw6c.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js → PkChatbotViewConversations-DHeFtAfN.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js.map → PkChatbotViewConversations-DHeFtAfN.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js → PkChatbotViewFiles-gqCumfod.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js.map → PkChatbotViewFiles-gqCumfod.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js → PkChatbotViewProfile-B57VRVaO.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js.map → PkChatbotViewProfile-B57VRVaO.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js → PkStreamingMarkdown-BtyWXY2k.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js.map → PkStreamingMarkdown-BtyWXY2k.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js → PkToolEditSpreadsheet-HAskd6d3.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js.map → PkToolEditSpreadsheet-HAskd6d3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js → PkToolRequestGeolocation-BE22qwxB.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js.map → PkToolRequestGeolocation-BE22qwxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js → PkToolRequestOAuthConnection-GfSalEJG.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js.map → PkToolRequestOAuthConnection-GfSalEJG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js → PkToolShowArtifact-Ritx54_X.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js.map → PkToolShowArtifact-Ritx54_X.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js → PkToolShowContactForm-D30IsZGy.js} +8 -8
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js.map → PkToolShowContactForm-D30IsZGy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js → PkToolShowDiagram-PEozSAqU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js.map → PkToolShowDiagram-PEozSAqU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js → PkToolShowForm-ZmdM9J9x.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js.map → PkToolShowForm-ZmdM9J9x.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js → PkToolShowImageGallery-Dkjf7Tw_.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js.map → PkToolShowImageGallery-Dkjf7Tw_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js → PkToolShowProductList-CsHYM8vl.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js.map → PkToolShowProductList-CsHYM8vl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js → PkToolShowSources-CKZkcPLA.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js.map → PkToolShowSources-CKZkcPLA.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js → PkToolShowSuggestedReply-DjutyiEi.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js.map → PkToolShowSuggestedReply-DjutyiEi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js → PkToolShowVideo-CKm1fVQs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js.map → PkToolShowVideo-CKm1fVQs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js → PkToolShowWebPages-DLEC9cuh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js.map → PkToolShowWebPages-DLEC9cuh.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js → createChatbotApiClient-DSLxswr4.js} +58 -55
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js.map → createChatbotApiClient-DSLxswr4.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-DWf6im7k.js → index.es-C1u3kP7i.js} +14 -14
- package/dist-vue/_chunks/{index.es-DWf6im7k.js.map → index.es-C1u3kP7i.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-Bt5eFdV0.js → schemas-Bu1lick6.js} +213 -204
- package/dist-vue/_chunks/schemas-Bu1lick6.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Dmxnn4xV.js → useChatbotStore-rtl-oKqU.js} +22 -22
- package/dist-vue/_chunks/useChatbotStore-rtl-oKqU.js.map +1 -0
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js → utils-fxHiCnzf.js} +2 -2
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js.map → utils-fxHiCnzf.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +97 -7
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5237 -5073
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/useWakeupWatch.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +16 -8
- package/dist-vue/packages/models/src/schema/Integration.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Media.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +94 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +35 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DDAyL-4q.js.map +0 -1
- package/dist/_chunks/browser-BJcsjj9S.js.map +0 -1
- package/dist/_chunks/markdown-lpamC2tL.js.map +0 -1
- package/dist-vue/_chunks/Agent-Bd_4UVe4.js +0 -758
- package/dist-vue/_chunks/Document-BrMThi12.js.map +0 -1
- package/dist-vue/_chunks/Media-Bzv3zEWR.js +0 -135
- package/dist-vue/_chunks/Media-Bzv3zEWR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-eXFjwNkz.js.map +0 -1
- package/dist-vue/_chunks/schemas-Bt5eFdV0.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Dmxnn4xV.js.map +0 -1
|
@@ -339,7 +339,7 @@ function Ue(e) {
|
|
|
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 We = new Uint8Array([
|
|
343
343
|
0,
|
|
344
344
|
0,
|
|
345
345
|
0,
|
|
@@ -444,46 +444,46 @@ var C = new Uint8Array([
|
|
|
444
444
|
1,
|
|
445
445
|
1
|
|
446
446
|
]);
|
|
447
|
-
function
|
|
447
|
+
function Ge(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 += (We[e.charCodeAt(t)] | 0) + (We[e.charCodeAt(t + 1)] | 0) + (We[e.charCodeAt(t + 2)] | 0) + (We[e.charCodeAt(t + 3)] | 0);
|
|
451
451
|
return n === t;
|
|
452
452
|
}
|
|
453
|
-
function Ge(e) {
|
|
454
|
-
return We(e, 32) && e !== "00000000000000000000000000000000";
|
|
455
|
-
}
|
|
456
453
|
function Ke(e) {
|
|
457
|
-
return
|
|
454
|
+
return Ge(e, 32) && e !== "00000000000000000000000000000000";
|
|
458
455
|
}
|
|
459
456
|
function qe(e) {
|
|
460
|
-
return Ge(e
|
|
457
|
+
return Ge(e, 16) && e !== "0000000000000000";
|
|
461
458
|
}
|
|
462
459
|
function Je(e) {
|
|
460
|
+
return Ke(e.traceId) && qe(e.spanId);
|
|
461
|
+
}
|
|
462
|
+
function Ye(e) {
|
|
463
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
|
|
468
|
-
startSpan(e, t, n =
|
|
467
|
+
var Xe = Fe.getInstance(), Ze = class {
|
|
468
|
+
startSpan(e, t, n = Xe.active()) {
|
|
469
469
|
if (t?.root) return new S();
|
|
470
470
|
let r = n && Ue(n);
|
|
471
|
-
return
|
|
471
|
+
return Qe(r) && Je(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 ??
|
|
478
|
-
return
|
|
477
|
+
let s = a ?? Xe.active(), c = this.startSpan(e, i, s), l = Be(s, c);
|
|
478
|
+
return Xe.with(l, o, void 0, c);
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
-
function
|
|
481
|
+
function Qe(e) {
|
|
482
482
|
return typeof e == "object" && !!e && "spanId" in e && typeof e.spanId == "string" && "traceId" in e && typeof e.traceId == "string" && "traceFlags" in e && typeof e.traceFlags == "number";
|
|
483
483
|
}
|
|
484
484
|
//#endregion
|
|
485
485
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js
|
|
486
|
-
var
|
|
486
|
+
var $e = new Ze(), et = class {
|
|
487
487
|
constructor(e, t, n, r) {
|
|
488
488
|
this._provider = e, this.name = t, this.version = n, this.options = r;
|
|
489
489
|
}
|
|
@@ -497,18 +497,18 @@ var Qe = new Xe(), $e = class {
|
|
|
497
497
|
_getTracer() {
|
|
498
498
|
if (this._delegate) return this._delegate;
|
|
499
499
|
let e = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
500
|
-
return e ? (this._delegate = e, this._delegate) :
|
|
500
|
+
return e ? (this._delegate = e, this._delegate) : $e;
|
|
501
501
|
}
|
|
502
|
-
},
|
|
502
|
+
}, tt = new class {
|
|
503
503
|
getTracer(e, t, n) {
|
|
504
|
-
return new
|
|
504
|
+
return new Ze();
|
|
505
505
|
}
|
|
506
|
-
}(),
|
|
506
|
+
}(), nt = class {
|
|
507
507
|
getTracer(e, t, n) {
|
|
508
|
-
return this.getDelegateTracer(e, t, n) ?? new
|
|
508
|
+
return this.getDelegateTracer(e, t, n) ?? new et(this, e, t, n);
|
|
509
509
|
}
|
|
510
510
|
getDelegate() {
|
|
511
|
-
return this._delegate ??
|
|
511
|
+
return this._delegate ?? tt;
|
|
512
512
|
}
|
|
513
513
|
setDelegate(e) {
|
|
514
514
|
this._delegate = e;
|
|
@@ -516,46 +516,46 @@ var Qe = new Xe(), $e = class {
|
|
|
516
516
|
getDelegateTracer(e, t, n) {
|
|
517
517
|
return this._delegate?.getTracer(e, t, n);
|
|
518
518
|
}
|
|
519
|
-
},
|
|
519
|
+
}, rt;
|
|
520
520
|
(function(e) {
|
|
521
521
|
e[e.NOT_RECORD = 0] = "NOT_RECORD", e[e.RECORD = 1] = "RECORD", e[e.RECORD_AND_SAMPLED = 2] = "RECORD_AND_SAMPLED";
|
|
522
|
-
})(
|
|
522
|
+
})(rt ||= {});
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js
|
|
525
|
-
var
|
|
525
|
+
var it;
|
|
526
526
|
(function(e) {
|
|
527
527
|
e[e.INTERNAL = 0] = "INTERNAL", e[e.SERVER = 1] = "SERVER", e[e.CLIENT = 2] = "CLIENT", e[e.PRODUCER = 3] = "PRODUCER", e[e.CONSUMER = 4] = "CONSUMER";
|
|
528
|
-
})(
|
|
528
|
+
})(it ||= {});
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/status.js
|
|
531
|
-
var
|
|
531
|
+
var C;
|
|
532
532
|
(function(e) {
|
|
533
533
|
e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
|
|
534
|
-
})(
|
|
534
|
+
})(C ||= {});
|
|
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
|
|
537
|
+
var w = Fe.getInstance(), T = y.instance(), at = new class {
|
|
538
538
|
getMeter(e, t, n) {
|
|
539
539
|
return xe;
|
|
540
540
|
}
|
|
541
|
-
}(),
|
|
541
|
+
}(), ot = "metrics", st = class e {
|
|
542
542
|
constructor() {}
|
|
543
543
|
static getInstance() {
|
|
544
544
|
return this._instance ||= new e(), this._instance;
|
|
545
545
|
}
|
|
546
546
|
setGlobalMeterProvider(e) {
|
|
547
|
-
return m(
|
|
547
|
+
return m(ot, e, y.instance());
|
|
548
548
|
}
|
|
549
549
|
getMeterProvider() {
|
|
550
|
-
return h(
|
|
550
|
+
return h(ot) || at;
|
|
551
551
|
}
|
|
552
552
|
getMeter(e, t, n) {
|
|
553
553
|
return this.getMeterProvider().getMeter(e, t, n);
|
|
554
554
|
}
|
|
555
555
|
disable() {
|
|
556
|
-
g(
|
|
556
|
+
g(ot, y.instance());
|
|
557
557
|
}
|
|
558
|
-
}.getInstance(),
|
|
558
|
+
}.getInstance(), ct = class {
|
|
559
559
|
inject(e, t) {}
|
|
560
560
|
extract(e, t) {
|
|
561
561
|
return e;
|
|
@@ -563,30 +563,30 @@ var T = Fe.getInstance(), E = y.instance(), it = new class {
|
|
|
563
563
|
fields() {
|
|
564
564
|
return [];
|
|
565
565
|
}
|
|
566
|
-
},
|
|
567
|
-
function
|
|
568
|
-
return e.getValue(
|
|
566
|
+
}, lt = ue("OpenTelemetry Baggage Key");
|
|
567
|
+
function ut(e) {
|
|
568
|
+
return e.getValue(lt) || void 0;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
return
|
|
570
|
+
function dt() {
|
|
571
|
+
return ut(Fe.getInstance().active());
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
return e.setValue(
|
|
573
|
+
function ft(e, t) {
|
|
574
|
+
return e.setValue(lt, t);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
return e.deleteValue(
|
|
576
|
+
function pt(e) {
|
|
577
|
+
return e.deleteValue(lt);
|
|
578
578
|
}
|
|
579
579
|
//#endregion
|
|
580
580
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/propagation.js
|
|
581
|
-
var
|
|
581
|
+
var mt = "propagation", ht = new ct(), E = class e {
|
|
582
582
|
constructor() {
|
|
583
|
-
this.createBaggage = ce, this.getBaggage =
|
|
583
|
+
this.createBaggage = ce, this.getBaggage = ut, this.getActiveBaggage = dt, this.setBaggage = ft, this.deleteBaggage = pt;
|
|
584
584
|
}
|
|
585
585
|
static getInstance() {
|
|
586
586
|
return this._instance ||= new e(), this._instance;
|
|
587
587
|
}
|
|
588
588
|
setGlobalPropagator(e) {
|
|
589
|
-
return m(
|
|
589
|
+
return m(mt, e, y.instance());
|
|
590
590
|
}
|
|
591
591
|
inject(e, t, n = je) {
|
|
592
592
|
return this._getGlobalPropagator().inject(e, t, n);
|
|
@@ -598,56 +598,56 @@ var pt = "propagation", mt = new st(), D = class e {
|
|
|
598
598
|
return this._getGlobalPropagator().fields();
|
|
599
599
|
}
|
|
600
600
|
disable() {
|
|
601
|
-
g(
|
|
601
|
+
g(mt, y.instance());
|
|
602
602
|
}
|
|
603
603
|
_getGlobalPropagator() {
|
|
604
|
-
return h(
|
|
604
|
+
return h(mt) || ht;
|
|
605
605
|
}
|
|
606
|
-
}.getInstance(),
|
|
606
|
+
}.getInstance(), gt = "trace", D = class e {
|
|
607
607
|
constructor() {
|
|
608
|
-
this._proxyTracerProvider = new
|
|
608
|
+
this._proxyTracerProvider = new nt(), this.wrapSpanContext = Ye, this.isSpanContextValid = Je, 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;
|
|
612
612
|
}
|
|
613
613
|
setGlobalTracerProvider(e) {
|
|
614
|
-
let t = m(
|
|
614
|
+
let t = m(gt, this._proxyTracerProvider, y.instance());
|
|
615
615
|
return t && this._proxyTracerProvider.setDelegate(e), t;
|
|
616
616
|
}
|
|
617
617
|
getTracerProvider() {
|
|
618
|
-
return h(
|
|
618
|
+
return h(gt) || this._proxyTracerProvider;
|
|
619
619
|
}
|
|
620
620
|
getTracer(e, t) {
|
|
621
621
|
return this.getTracerProvider().getTracer(e, t);
|
|
622
622
|
}
|
|
623
623
|
disable() {
|
|
624
|
-
g(
|
|
624
|
+
g(gt, y.instance()), this._proxyTracerProvider = new nt();
|
|
625
625
|
}
|
|
626
|
-
}.getInstance(),
|
|
627
|
-
function _t(e) {
|
|
628
|
-
return e.setValue(gt, !0);
|
|
629
|
-
}
|
|
626
|
+
}.getInstance(), _t = ue("OpenTelemetry SDK Context Key SUPPRESS_TRACING");
|
|
630
627
|
function vt(e) {
|
|
631
|
-
return e.
|
|
628
|
+
return e.setValue(_t, !0);
|
|
629
|
+
}
|
|
630
|
+
function yt(e) {
|
|
631
|
+
return e.getValue(_t) === !0;
|
|
632
632
|
}
|
|
633
633
|
//#endregion
|
|
634
634
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/baggage/constants.js
|
|
635
|
-
var
|
|
635
|
+
var bt = "baggage", xt = 4096;
|
|
636
636
|
//#endregion
|
|
637
637
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/baggage/utils.js
|
|
638
|
-
function
|
|
638
|
+
function St(e) {
|
|
639
639
|
return e.reduce((e, t) => {
|
|
640
640
|
let n = `${e}${e === "" ? "" : ","}${t}`;
|
|
641
641
|
return n.length > 8192 ? e : n;
|
|
642
642
|
}, "");
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Ct(e) {
|
|
645
645
|
return e.getAllEntries().map(([e, t]) => {
|
|
646
646
|
let n = `${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;
|
|
647
647
|
return t.metadata !== void 0 && (n += ";" + t.metadata.toString()), n;
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function wt(e) {
|
|
651
651
|
if (!e) return;
|
|
652
652
|
let t = e.indexOf(";"), n = t === -1 ? e : e.substring(0, t), r = n.indexOf("=");
|
|
653
653
|
if (r <= 0) return;
|
|
@@ -666,12 +666,12 @@ function Ct(e) {
|
|
|
666
666
|
metadata: c
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function Tt(e, t, n, r) {
|
|
670
670
|
let i = 0;
|
|
671
671
|
for (; i < e.length && n < 180;) {
|
|
672
672
|
let a = e.indexOf(",", i), o = a === -1 ? e.length : a, s = o - i;
|
|
673
673
|
if (s <= 4096) {
|
|
674
|
-
let a =
|
|
674
|
+
let a = wt(e.substring(i, o));
|
|
675
675
|
if (a) {
|
|
676
676
|
let e = (n === 0 ? 0 : 1) + s;
|
|
677
677
|
if (r + e > 8192) break;
|
|
@@ -688,55 +688,55 @@ function wt(e, t, n, r) {
|
|
|
688
688
|
}
|
|
689
689
|
//#endregion
|
|
690
690
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js
|
|
691
|
-
var
|
|
691
|
+
var Et = class {
|
|
692
692
|
inject(e, t, n) {
|
|
693
|
-
let r =
|
|
694
|
-
if (!r ||
|
|
695
|
-
let i =
|
|
696
|
-
i.length > 0 && n.set(t,
|
|
693
|
+
let r = E.getBaggage(e);
|
|
694
|
+
if (!r || yt(e)) return;
|
|
695
|
+
let i = St(Ct(r).filter((e) => e.length <= xt).slice(0, 180));
|
|
696
|
+
i.length > 0 && n.set(t, bt, i);
|
|
697
697
|
}
|
|
698
698
|
extract(e, t, n) {
|
|
699
|
-
let r = n.get(t,
|
|
699
|
+
let r = n.get(t, bt);
|
|
700
700
|
if (!r) return e;
|
|
701
701
|
let i = {}, a = 0, o = 0;
|
|
702
|
-
if (Array.isArray(r)) for (let e = 0; e < r.length; e++) [a, o] =
|
|
703
|
-
else [a] =
|
|
704
|
-
return a === 0 ? e :
|
|
702
|
+
if (Array.isArray(r)) for (let e = 0; e < r.length; e++) [a, o] = Tt(r[e], i, a, o);
|
|
703
|
+
else [a] = Tt(r, i, a, o);
|
|
704
|
+
return a === 0 ? e : E.setBaggage(e, E.createBaggage(i));
|
|
705
705
|
}
|
|
706
706
|
fields() {
|
|
707
|
-
return [
|
|
707
|
+
return [bt];
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/common/attributes.js
|
|
712
|
-
function
|
|
712
|
+
function O(e) {
|
|
713
713
|
let t = {};
|
|
714
714
|
if (typeof e != "object" || !e) return t;
|
|
715
715
|
for (let n in e) {
|
|
716
716
|
if (!Object.prototype.hasOwnProperty.call(e, n)) continue;
|
|
717
|
-
if (!
|
|
718
|
-
|
|
717
|
+
if (!Dt(n)) {
|
|
718
|
+
T.warn(`Invalid attribute key: ${n}`);
|
|
719
719
|
continue;
|
|
720
720
|
}
|
|
721
721
|
let r = e[n];
|
|
722
|
-
|
|
722
|
+
Ot(r) ? t[n] = Array.isArray(r) ? r.slice() : r : T.warn(`Invalid attribute value set for key: ${n}`);
|
|
723
723
|
}
|
|
724
724
|
return t;
|
|
725
725
|
}
|
|
726
|
-
function Et(e) {
|
|
727
|
-
return typeof e == "string" && e !== "";
|
|
728
|
-
}
|
|
729
726
|
function Dt(e) {
|
|
730
|
-
return e ==
|
|
727
|
+
return typeof e == "string" && e !== "";
|
|
731
728
|
}
|
|
732
729
|
function Ot(e) {
|
|
730
|
+
return e == null ? !0 : Array.isArray(e) ? kt(e) : At(typeof e);
|
|
731
|
+
}
|
|
732
|
+
function kt(e) {
|
|
733
733
|
let t;
|
|
734
734
|
for (let n of e) {
|
|
735
735
|
if (n == null) continue;
|
|
736
736
|
let e = typeof n;
|
|
737
737
|
if (e !== t) {
|
|
738
738
|
if (!t) {
|
|
739
|
-
if (
|
|
739
|
+
if (At(e)) {
|
|
740
740
|
t = e;
|
|
741
741
|
continue;
|
|
742
742
|
}
|
|
@@ -747,7 +747,7 @@ function Ot(e) {
|
|
|
747
747
|
}
|
|
748
748
|
return !0;
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function At(e) {
|
|
751
751
|
switch (e) {
|
|
752
752
|
case "number":
|
|
753
753
|
case "boolean":
|
|
@@ -757,15 +757,15 @@ function kt(e) {
|
|
|
757
757
|
}
|
|
758
758
|
//#endregion
|
|
759
759
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js
|
|
760
|
-
function
|
|
760
|
+
function jt() {
|
|
761
761
|
return (e) => {
|
|
762
|
-
|
|
762
|
+
T.error(Mt(e));
|
|
763
763
|
};
|
|
764
764
|
}
|
|
765
|
-
function jt(e) {
|
|
766
|
-
return typeof e == "string" ? e : JSON.stringify(Mt(e));
|
|
767
|
-
}
|
|
768
765
|
function Mt(e) {
|
|
766
|
+
return typeof e == "string" ? e : JSON.stringify(Nt(e));
|
|
767
|
+
}
|
|
768
|
+
function Nt(e) {
|
|
769
769
|
let t = {}, n = e;
|
|
770
770
|
for (; n !== null;) Object.getOwnPropertyNames(n).forEach((e) => {
|
|
771
771
|
if (t[e]) return;
|
|
@@ -776,62 +776,62 @@ function Mt(e) {
|
|
|
776
776
|
}
|
|
777
777
|
//#endregion
|
|
778
778
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js
|
|
779
|
-
var
|
|
780
|
-
function
|
|
779
|
+
var Pt = jt();
|
|
780
|
+
function k(e) {
|
|
781
781
|
try {
|
|
782
|
-
|
|
782
|
+
Pt(e);
|
|
783
783
|
} catch {}
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/version.js
|
|
787
|
-
var
|
|
787
|
+
var Ft = "2.11.0", It = "process.runtime.name", Lt = {
|
|
788
788
|
[o]: "opentelemetry",
|
|
789
|
-
[
|
|
789
|
+
[It]: "browser",
|
|
790
790
|
[i]: a,
|
|
791
|
-
[s]:
|
|
792
|
-
},
|
|
793
|
-
function
|
|
791
|
+
[s]: Ft
|
|
792
|
+
}, A = performance, Rt = 9, zt = 10 ** 6, Bt = 10 ** Rt;
|
|
793
|
+
function j(e) {
|
|
794
794
|
let t = e / 1e3;
|
|
795
|
-
return [Math.trunc(t), Math.round(e % 1e3 *
|
|
795
|
+
return [Math.trunc(t), Math.round(e % 1e3 * zt)];
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
return
|
|
797
|
+
function M(e) {
|
|
798
|
+
return Gt(j(A.timeOrigin), j(typeof e == "number" ? e : A.now()));
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
if (
|
|
802
|
-
if (typeof e == "number") return e <
|
|
803
|
-
if (e instanceof Date) return
|
|
800
|
+
function N(e) {
|
|
801
|
+
if (Ut(e)) return e;
|
|
802
|
+
if (typeof e == "number") return e < A.timeOrigin / 2 ? M(e) : j(e);
|
|
803
|
+
if (e instanceof Date) return j(e.getTime());
|
|
804
804
|
throw TypeError("Invalid input type");
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function Vt(e, t) {
|
|
807
807
|
let n = t[0] - e[0], r = t[1] - e[1];
|
|
808
|
-
return r < 0 && (--n, r +=
|
|
808
|
+
return r < 0 && (--n, r += Bt), [n, r];
|
|
809
809
|
}
|
|
810
|
-
function
|
|
811
|
-
return e[0] *
|
|
810
|
+
function P(e) {
|
|
811
|
+
return e[0] * Bt + e[1];
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Ht(e) {
|
|
814
814
|
return e[0] * 1e3 + e[1] / 1e6;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function Ut(e) {
|
|
817
817
|
return Array.isArray(e) && e.length === 2 && typeof e[0] == "number" && typeof e[1] == "number";
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
return
|
|
819
|
+
function Wt(e) {
|
|
820
|
+
return Ut(e) || typeof e == "number" || e instanceof Date;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function Gt(e, t) {
|
|
823
823
|
let n = [e[0] + t[0], e[1] + t[1]];
|
|
824
|
-
return n[1] >=
|
|
824
|
+
return n[1] >= Bt && (n[1] -= Bt, n[0] += 1), n;
|
|
825
825
|
}
|
|
826
826
|
//#endregion
|
|
827
827
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/ExportResult.js
|
|
828
|
-
var
|
|
828
|
+
var F;
|
|
829
829
|
(function(e) {
|
|
830
830
|
e[e.SUCCESS = 0] = "SUCCESS", e[e.FAILED = 1] = "FAILED";
|
|
831
|
-
})(
|
|
831
|
+
})(F ||= {});
|
|
832
832
|
//#endregion
|
|
833
833
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/propagation/composite.js
|
|
834
|
-
var
|
|
834
|
+
var Kt = class {
|
|
835
835
|
_propagators;
|
|
836
836
|
_fields;
|
|
837
837
|
constructor(e = {}) {
|
|
@@ -847,7 +847,7 @@ var Wt = class {
|
|
|
847
847
|
for (let r of this._propagators) try {
|
|
848
848
|
r.inject(e, t, n);
|
|
849
849
|
} catch (e) {
|
|
850
|
-
|
|
850
|
+
T.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
853
|
extract(e, t, n) {
|
|
@@ -855,7 +855,7 @@ var Wt = class {
|
|
|
855
855
|
try {
|
|
856
856
|
return r.extract(e, t, n);
|
|
857
857
|
} catch (e) {
|
|
858
|
-
|
|
858
|
+
T.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`);
|
|
859
859
|
}
|
|
860
860
|
return e;
|
|
861
861
|
}, e);
|
|
@@ -863,16 +863,16 @@ var Wt = class {
|
|
|
863
863
|
fields() {
|
|
864
864
|
return this._fields.slice();
|
|
865
865
|
}
|
|
866
|
-
},
|
|
867
|
-
function
|
|
868
|
-
return
|
|
866
|
+
}, qt = "[_0-9a-z-*/]", Jt = RegExp(`^(?:${`[a-z]${qt}{0,255}`}|${`[a-z0-9]${qt}{0,240}@[a-z]${qt}{0,13}`})$`), Yt = /^[ -~]{0,255}[!-~]$/, Xt = /,|=/;
|
|
867
|
+
function Zt(e) {
|
|
868
|
+
return Jt.test(e);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
870
|
+
function Qt(e) {
|
|
871
|
+
return Yt.test(e) && !Xt.test(e);
|
|
872
872
|
}
|
|
873
873
|
//#endregion
|
|
874
874
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js
|
|
875
|
-
var
|
|
875
|
+
var $t = 32, en = 512, tn = ",", nn = "=", rn = class e {
|
|
876
876
|
_length;
|
|
877
877
|
_rawTraceState;
|
|
878
878
|
_internalState;
|
|
@@ -880,9 +880,9 @@ var Zt = 32, Qt = 512, $t = ",", en = "=", tn = class e {
|
|
|
880
880
|
this._rawTraceState = typeof e == "string" ? e : "", this._length = this._rawTraceState.length;
|
|
881
881
|
}
|
|
882
882
|
set(e, t) {
|
|
883
|
-
if (!
|
|
883
|
+
if (!Zt(e) || !Qt(t)) return this;
|
|
884
884
|
let n = this._getState(), r = n.get(e), i = this._length;
|
|
885
|
-
if (i += typeof r == "string" ? t.length - r.length : e.length + t.length + (n.size > 0 ? 2 : 1), i >
|
|
885
|
+
if (i += typeof r == "string" ? t.length - r.length : e.length + t.length + (n.size > 0 ? 2 : 1), i > en) return this;
|
|
886
886
|
let a = new Map(n);
|
|
887
887
|
return a.delete(e), a.set(e, t), this._fromState(a, i);
|
|
888
888
|
}
|
|
@@ -899,19 +899,19 @@ var Zt = 32, Qt = 512, $t = ",", en = "=", tn = class e {
|
|
|
899
899
|
}
|
|
900
900
|
serialize() {
|
|
901
901
|
let e = "", t = 0;
|
|
902
|
-
for (let n of this._getState()) t > 0 && (e =
|
|
902
|
+
for (let n of this._getState()) t > 0 && (e = tn + e), e = `${n[0]}${nn}${n[1]}` + e, t++;
|
|
903
903
|
return e;
|
|
904
904
|
}
|
|
905
905
|
_getState() {
|
|
906
906
|
if (this._internalState) return this._internalState;
|
|
907
|
-
let e = this._rawTraceState.split(
|
|
907
|
+
let e = this._rawTraceState.split(tn), t = /* @__PURE__ */ new Map(), n = 0;
|
|
908
908
|
for (let r of e) {
|
|
909
|
-
let e = r.trim(), i = e.indexOf(
|
|
909
|
+
let e = r.trim(), i = e.indexOf(nn);
|
|
910
910
|
if (i === -1) continue;
|
|
911
911
|
let a = e.slice(0, i), o = e.slice(i + 1);
|
|
912
|
-
if (!
|
|
912
|
+
if (!Zt(a) || !Qt(o)) continue;
|
|
913
913
|
let s = n + e.length + +(t.size > 0);
|
|
914
|
-
if (!(s >
|
|
914
|
+
if (!(s > en) && (t.set(a, o), n = s, t.size >= $t)) break;
|
|
915
915
|
}
|
|
916
916
|
return this._length = n, this._internalState = new Map(Array.from(t.entries()).reverse()), this._internalState;
|
|
917
917
|
}
|
|
@@ -919,104 +919,104 @@ var Zt = 32, Qt = 512, $t = ",", en = "=", tn = class e {
|
|
|
919
919
|
let r = Object.create(e.prototype);
|
|
920
920
|
return r._internalState = t, r._length = n, r;
|
|
921
921
|
}
|
|
922
|
-
},
|
|
923
|
-
function
|
|
924
|
-
let t =
|
|
922
|
+
}, an = "traceparent", on = "tracestate", sn = "00", cn = /* @__PURE__ */ RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");
|
|
923
|
+
function ln(e) {
|
|
924
|
+
let t = cn.exec(e);
|
|
925
925
|
return !t || t[1] === "00" && t[5] ? null : {
|
|
926
926
|
traceId: t[2],
|
|
927
927
|
spanId: t[3],
|
|
928
928
|
traceFlags: parseInt(t[4], 16)
|
|
929
929
|
};
|
|
930
930
|
}
|
|
931
|
-
var
|
|
931
|
+
var un = class {
|
|
932
932
|
inject(e, t, n) {
|
|
933
|
-
let r =
|
|
934
|
-
if (!r ||
|
|
935
|
-
let i = `${
|
|
936
|
-
n.set(t,
|
|
933
|
+
let r = D.getSpanContext(e);
|
|
934
|
+
if (!r || yt(e) || !Je(r)) return;
|
|
935
|
+
let i = `${sn}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags || x.NONE).toString(16)}`;
|
|
936
|
+
n.set(t, an, i), r.traceState && n.set(t, on, r.traceState.serialize());
|
|
937
937
|
}
|
|
938
938
|
extract(e, t, n) {
|
|
939
|
-
let r = n.get(t,
|
|
939
|
+
let r = n.get(t, an);
|
|
940
940
|
if (!r) return e;
|
|
941
941
|
let i = Array.isArray(r) ? r[0] : r;
|
|
942
942
|
if (typeof i != "string") return e;
|
|
943
|
-
let a =
|
|
943
|
+
let a = ln(i);
|
|
944
944
|
if (!a) return e;
|
|
945
945
|
a.isRemote = !0;
|
|
946
|
-
let o = n.get(t,
|
|
946
|
+
let o = n.get(t, on);
|
|
947
947
|
if (o) {
|
|
948
948
|
let e = Array.isArray(o) ? o.join(",") : o;
|
|
949
|
-
a.traceState = new
|
|
949
|
+
a.traceState = new rn(typeof e == "string" ? e : void 0);
|
|
950
950
|
}
|
|
951
|
-
return
|
|
951
|
+
return D.setSpanContext(e, a);
|
|
952
952
|
}
|
|
953
953
|
fields() {
|
|
954
|
-
return [
|
|
954
|
+
return [an, on];
|
|
955
955
|
}
|
|
956
|
-
},
|
|
957
|
-
function
|
|
958
|
-
if (!
|
|
959
|
-
let t =
|
|
956
|
+
}, dn = "[object Object]", fn = "[object Null]", pn = "[object Undefined]", mn = Function.prototype.toString, hn = mn.call(Object), gn = Object.getPrototypeOf, _n = Object.prototype, vn = _n.hasOwnProperty, I = Symbol ? Symbol.toStringTag : void 0, yn = _n.toString;
|
|
957
|
+
function bn(e) {
|
|
958
|
+
if (!xn(e) || Sn(e) !== dn) return !1;
|
|
959
|
+
let t = gn(e);
|
|
960
960
|
if (t === null) return !0;
|
|
961
|
-
let n =
|
|
962
|
-
return typeof n == "function" && n instanceof n &&
|
|
961
|
+
let n = vn.call(t, "constructor") && t.constructor;
|
|
962
|
+
return typeof n == "function" && n instanceof n && mn.call(n) === hn;
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function xn(e) {
|
|
965
965
|
return typeof e == "object" && !!e;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
return e == null ? e === void 0 ?
|
|
967
|
+
function Sn(e) {
|
|
968
|
+
return e == null ? e === void 0 ? pn : fn : I && I in Object(e) ? Cn(e) : wn(e);
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
let t =
|
|
970
|
+
function Cn(e) {
|
|
971
|
+
let t = vn.call(e, I), n = e[I], r = !1;
|
|
972
972
|
try {
|
|
973
|
-
e[
|
|
973
|
+
e[I] = void 0, r = !0;
|
|
974
974
|
} catch {}
|
|
975
|
-
let i =
|
|
976
|
-
return r && (t ? e[
|
|
975
|
+
let i = yn.call(e);
|
|
976
|
+
return r && (t ? e[I] = n : delete e[I]), i;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
return
|
|
978
|
+
function wn(e) {
|
|
979
|
+
return yn.call(e);
|
|
980
980
|
}
|
|
981
981
|
//#endregion
|
|
982
982
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/merge.js
|
|
983
|
-
var
|
|
984
|
-
function
|
|
983
|
+
var Tn = 20;
|
|
984
|
+
function En(...e) {
|
|
985
985
|
let t = e.shift(), n = /* @__PURE__ */ new WeakMap();
|
|
986
|
-
for (; e.length > 0;) t =
|
|
986
|
+
for (; e.length > 0;) t = On(t, e.shift(), 0, n);
|
|
987
987
|
return t;
|
|
988
988
|
}
|
|
989
|
-
function
|
|
990
|
-
return
|
|
989
|
+
function Dn(e) {
|
|
990
|
+
return An(e) ? e.slice() : e;
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function On(e, t, n = 0, r) {
|
|
993
993
|
let i;
|
|
994
|
-
if (!(n >
|
|
995
|
-
if (n++,
|
|
996
|
-
else if (
|
|
997
|
-
if (i = e.slice(),
|
|
998
|
-
else if (
|
|
994
|
+
if (!(n > Tn)) {
|
|
995
|
+
if (n++, Mn(e) || Mn(t) || jn(t)) i = Dn(t);
|
|
996
|
+
else if (An(e)) {
|
|
997
|
+
if (i = e.slice(), An(t)) for (let e = 0, n = t.length; e < n; e++) i.push(Dn(t[e]));
|
|
998
|
+
else if (L(t)) {
|
|
999
999
|
let e = Object.keys(t);
|
|
1000
1000
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
1001
1001
|
let r = e[n];
|
|
1002
|
-
r !== "__proto__" && r !== "constructor" && r !== "prototype" && (i[r] =
|
|
1002
|
+
r !== "__proto__" && r !== "constructor" && r !== "prototype" && (i[r] = Dn(t[r]));
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
} else if (
|
|
1006
|
-
if (
|
|
1007
|
-
if (!
|
|
1005
|
+
} else if (L(e)) {
|
|
1006
|
+
if (L(t)) {
|
|
1007
|
+
if (!Nn(e, t)) return t;
|
|
1008
1008
|
i = Object.assign({}, e);
|
|
1009
1009
|
let a = Object.keys(t);
|
|
1010
1010
|
for (let o = 0, s = a.length; o < s; o++) {
|
|
1011
1011
|
let s = a[o];
|
|
1012
1012
|
if (s === "__proto__" || s === "constructor" || s === "prototype") continue;
|
|
1013
1013
|
let c = t[s];
|
|
1014
|
-
if (
|
|
1014
|
+
if (Mn(c)) c === void 0 ? delete i[s] : i[s] = c;
|
|
1015
1015
|
else {
|
|
1016
1016
|
let a = i[s], o = c;
|
|
1017
|
-
if (
|
|
1017
|
+
if (kn(e, s, r) || kn(t, s, r)) delete i[s];
|
|
1018
1018
|
else {
|
|
1019
|
-
if (
|
|
1019
|
+
if (L(a) && L(o)) {
|
|
1020
1020
|
let n = r.get(a) || [], i = r.get(o) || [];
|
|
1021
1021
|
n.push({
|
|
1022
1022
|
obj: e,
|
|
@@ -1026,7 +1026,7 @@ function En(e, t, n = 0, r) {
|
|
|
1026
1026
|
key: s
|
|
1027
1027
|
}), r.set(a, n), r.set(o, i);
|
|
1028
1028
|
}
|
|
1029
|
-
i[s] =
|
|
1029
|
+
i[s] = On(i[s], c, n, r);
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
@@ -1035,7 +1035,7 @@ function En(e, t, n = 0, r) {
|
|
|
1035
1035
|
return i;
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function kn(e, t, n) {
|
|
1039
1039
|
let r = n.get(e[t]) || [];
|
|
1040
1040
|
for (let n = 0, i = r.length; n < i; n++) {
|
|
1041
1041
|
let i = r[n];
|
|
@@ -1043,34 +1043,34 @@ function Dn(e, t, n) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
return !1;
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function An(e) {
|
|
1047
1047
|
return Array.isArray(e);
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function jn(e) {
|
|
1050
1050
|
return typeof e == "function";
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
return !
|
|
1052
|
+
function L(e) {
|
|
1053
|
+
return !Mn(e) && !An(e) && !jn(e) && typeof e == "object";
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function Mn(e) {
|
|
1056
1056
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === void 0 || e instanceof Date || e instanceof RegExp || e === null;
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return !(!
|
|
1058
|
+
function Nn(e, t) {
|
|
1059
|
+
return !(!bn(e) || !bn(t));
|
|
1060
1060
|
}
|
|
1061
1061
|
//#endregion
|
|
1062
1062
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/url.js
|
|
1063
|
-
function
|
|
1063
|
+
function Pn(e, t) {
|
|
1064
1064
|
return typeof t == "string" ? e === t : !!e.match(t);
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function Fn(e, t) {
|
|
1067
1067
|
if (!t) return !1;
|
|
1068
|
-
for (let n of t) if (
|
|
1068
|
+
for (let n of t) if (Pn(e, n)) return !0;
|
|
1069
1069
|
return !1;
|
|
1070
1070
|
}
|
|
1071
1071
|
//#endregion
|
|
1072
1072
|
//#region ../../node_modules/.pnpm/@opentelemetry+core@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/core/build/esm/utils/promise.js
|
|
1073
|
-
var
|
|
1073
|
+
var In = class {
|
|
1074
1074
|
_promise;
|
|
1075
1075
|
_resolve;
|
|
1076
1076
|
_reject;
|
|
@@ -1088,9 +1088,9 @@ var Pn = class {
|
|
|
1088
1088
|
reject(e) {
|
|
1089
1089
|
this._reject(e);
|
|
1090
1090
|
}
|
|
1091
|
-
},
|
|
1091
|
+
}, Ln = class {
|
|
1092
1092
|
_isCalled = !1;
|
|
1093
|
-
_deferred = new
|
|
1093
|
+
_deferred = new In();
|
|
1094
1094
|
_callback;
|
|
1095
1095
|
_that;
|
|
1096
1096
|
constructor(e, t) {
|
|
@@ -1113,30 +1113,30 @@ var Pn = class {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
return this._deferred.promise;
|
|
1115
1115
|
}
|
|
1116
|
-
},
|
|
1117
|
-
function
|
|
1118
|
-
if (
|
|
1116
|
+
}, Rn;
|
|
1117
|
+
function zn() {
|
|
1118
|
+
if (Rn === void 0) try {
|
|
1119
1119
|
let e = globalThis.process.argv0;
|
|
1120
|
-
|
|
1120
|
+
Rn = e ? `unknown_service:${e}` : "unknown_service";
|
|
1121
1121
|
} catch {
|
|
1122
|
-
|
|
1122
|
+
Rn = "unknown_service";
|
|
1123
1123
|
}
|
|
1124
|
-
return
|
|
1124
|
+
return Rn;
|
|
1125
1125
|
}
|
|
1126
1126
|
//#endregion
|
|
1127
1127
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/esm/utils.js
|
|
1128
|
-
var
|
|
1128
|
+
var R = (e) => typeof e == "object" && !!e && typeof e.then == "function", Bn = class e {
|
|
1129
1129
|
_rawAttributes;
|
|
1130
1130
|
_asyncAttributesPending = !1;
|
|
1131
1131
|
_schemaUrl;
|
|
1132
1132
|
_memoizedAttributes;
|
|
1133
1133
|
static FromAttributeList(t, n) {
|
|
1134
1134
|
let r = new e({}, n);
|
|
1135
|
-
return r._rawAttributes =
|
|
1135
|
+
return r._rawAttributes = Un(t), r._asyncAttributesPending = t.filter(([e, t]) => R(t)).length > 0, r;
|
|
1136
1136
|
}
|
|
1137
1137
|
constructor(e, t) {
|
|
1138
1138
|
let n = e.attributes ?? {};
|
|
1139
|
-
this._rawAttributes = Object.entries(n).map(([e, t]) => (
|
|
1139
|
+
this._rawAttributes = Object.entries(n).map(([e, t]) => (R(t) && (this._asyncAttributesPending = !0), [e, t])), this._rawAttributes = Un(this._rawAttributes), this._schemaUrl = Wn(t?.schemaUrl);
|
|
1140
1140
|
}
|
|
1141
1141
|
get asyncAttributesPending() {
|
|
1142
1142
|
return this._asyncAttributesPending;
|
|
@@ -1145,15 +1145,15 @@ var B = (e) => typeof e == "object" && !!e && typeof e.then == "function", Rn =
|
|
|
1145
1145
|
if (this.asyncAttributesPending) {
|
|
1146
1146
|
for (let e = 0; e < this._rawAttributes.length; e++) {
|
|
1147
1147
|
let [t, n] = this._rawAttributes[e];
|
|
1148
|
-
this._rawAttributes[e] = [t,
|
|
1148
|
+
this._rawAttributes[e] = [t, R(n) ? await n : n];
|
|
1149
1149
|
}
|
|
1150
1150
|
this._asyncAttributesPending = !1;
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
get attributes() {
|
|
1154
|
-
if (this.asyncAttributesPending &&
|
|
1154
|
+
if (this.asyncAttributesPending && T.error("Accessing resource attributes before async attributes settled"), this._memoizedAttributes) return this._memoizedAttributes;
|
|
1155
1155
|
let e = {};
|
|
1156
|
-
for (let [t, n] of this._rawAttributes)
|
|
1156
|
+
for (let [t, n] of this._rawAttributes) R(n) ? T.debug(`Unsettled resource attribute ${t} skipped`) : n != null && (e[t] ??= n);
|
|
1157
1157
|
return this._asyncAttributesPending || (this._memoizedAttributes = e), e;
|
|
1158
1158
|
}
|
|
1159
1159
|
getRawAttributes() {
|
|
@@ -1164,45 +1164,45 @@ var B = (e) => typeof e == "object" && !!e && typeof e.then == "function", Rn =
|
|
|
1164
1164
|
}
|
|
1165
1165
|
merge(t) {
|
|
1166
1166
|
if (t == null) return this;
|
|
1167
|
-
let n =
|
|
1167
|
+
let n = Gn(this, t), r = n ? { schemaUrl: n } : void 0;
|
|
1168
1168
|
return e.FromAttributeList([...t.getRawAttributes(), ...this.getRawAttributes()], r);
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1173
|
-
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1176
|
-
[r]:
|
|
1177
|
-
[i]:
|
|
1178
|
-
[o]:
|
|
1179
|
-
[s]:
|
|
1171
|
+
function Vn(e, t) {
|
|
1172
|
+
return Bn.FromAttributeList(Object.entries(e), t);
|
|
1173
|
+
}
|
|
1174
|
+
function Hn() {
|
|
1175
|
+
return Vn({
|
|
1176
|
+
[r]: zn(),
|
|
1177
|
+
[i]: Lt[i],
|
|
1178
|
+
[o]: Lt[o],
|
|
1179
|
+
[s]: Lt[s]
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return e.map(([e, t]) =>
|
|
1184
|
-
|
|
1182
|
+
function Un(e) {
|
|
1183
|
+
return e.map(([e, t]) => R(t) ? [e, t.catch((t) => {
|
|
1184
|
+
T.debug("promise rejection for resource attribute: %s - %s", e, t);
|
|
1185
1185
|
})] : [e, t]);
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function Wn(e) {
|
|
1188
1188
|
if (typeof e == "string" || e === void 0) return e;
|
|
1189
|
-
|
|
1189
|
+
T.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.", e);
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Gn(e, t) {
|
|
1192
1192
|
let n = e?.schemaUrl, r = t?.schemaUrl, i = n === void 0 || n === "", a = r === void 0 || r === "";
|
|
1193
1193
|
if (i) return r;
|
|
1194
1194
|
if (a || n === r) return n;
|
|
1195
|
-
|
|
1195
|
+
T.warn("Schema URL merge conflict: old resource has \"%s\", updating resource has \"%s\". Resulting resource will have undefined Schema URL.", n, r);
|
|
1196
1196
|
}
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/enums.js
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1199
|
+
var Kn = "exception", qn = Symbol.for("nodejs.util.inspect.custom");
|
|
1200
|
+
function Jn(e) {
|
|
1201
1201
|
let t = {};
|
|
1202
1202
|
for (let [n, r] of e.getRawAttributes()) typeof r?.then != "function" && r != null && (t[n] ??= r);
|
|
1203
1203
|
return t;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Yn(e, t, n, r, i) {
|
|
1206
1206
|
if (typeof n == "number" && n < 0) {
|
|
1207
1207
|
let t = `[${e}]`;
|
|
1208
1208
|
return r?.stylize ? r.stylize(t, "special") : t;
|
|
@@ -1214,7 +1214,7 @@ function qn(e, t, n, r, i) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
//#endregion
|
|
1216
1216
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/Span.js
|
|
1217
|
-
var
|
|
1217
|
+
var Xn = class {
|
|
1218
1218
|
_spanContext;
|
|
1219
1219
|
kind;
|
|
1220
1220
|
parentSpanContext;
|
|
@@ -1229,7 +1229,7 @@ var Jn = class {
|
|
|
1229
1229
|
_droppedLinksCount = 0;
|
|
1230
1230
|
_attributesCount = 0;
|
|
1231
1231
|
name;
|
|
1232
|
-
status = { code:
|
|
1232
|
+
status = { code: C.UNSET };
|
|
1233
1233
|
endTime = [0, 0];
|
|
1234
1234
|
_ended = !1;
|
|
1235
1235
|
_duration = [-1, -1];
|
|
@@ -1242,7 +1242,7 @@ var Jn = class {
|
|
|
1242
1242
|
_startTimeProvided;
|
|
1243
1243
|
constructor(e) {
|
|
1244
1244
|
let t = Date.now();
|
|
1245
|
-
if (this._spanContext = e.spanContext, this._performanceStartTime =
|
|
1245
|
+
if (this._spanContext = e.spanContext, this._performanceStartTime = A.now(), this._performanceOffset = t - (this._performanceStartTime + A.timeOrigin), this._startTimeProvided = e.startTime != null, this._spanLimits = e.spanLimits, this._attributeValueLengthLimit = this._spanLimits.attributeValueLengthLimit ?? 0, this._spanProcessor = e.spanProcessor, this.name = e.name, this.parentSpanContext = e.parentSpanContext, this.kind = e.kind, e.links) for (let t of e.links) this.addLink(t);
|
|
1246
1246
|
this.startTime = this._getTime(e.startTime ?? t), this.resource = e.resource, this.instrumentationScope = e.scope, this._recordEndMetrics = e.recordEndMetrics, e.attributes != null && this.setAttributes(e.attributes), this._spanProcessor.onStart(this, e.context);
|
|
1247
1247
|
}
|
|
1248
1248
|
spanContext() {
|
|
@@ -1250,8 +1250,8 @@ var Jn = class {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
setAttribute(e, t) {
|
|
1252
1252
|
if (t == null || this._isSpanEnded()) return this;
|
|
1253
|
-
if (e.length === 0) return
|
|
1254
|
-
if (!
|
|
1253
|
+
if (e.length === 0) return T.warn(`Invalid attribute key: ${e}`), this;
|
|
1254
|
+
if (!Ot(t)) return T.warn(`Invalid attribute value set for key: ${e}`), this;
|
|
1255
1255
|
let { attributeCountLimit: n } = this._spanLimits, r = !Object.prototype.hasOwnProperty.call(this.attributes, e);
|
|
1256
1256
|
return n !== void 0 && this._attributesCount >= n && r ? (this._droppedAttributesCount++, this) : (this.attributes[e] = this._truncateToSize(t), r && this._attributesCount++, this);
|
|
1257
1257
|
}
|
|
@@ -1262,9 +1262,9 @@ var Jn = class {
|
|
|
1262
1262
|
addEvent(e, t, n) {
|
|
1263
1263
|
if (this._isSpanEnded()) return this;
|
|
1264
1264
|
let { eventCountLimit: r } = this._spanLimits;
|
|
1265
|
-
if (r === 0) return
|
|
1266
|
-
r !== void 0 && this.events.length >= r && (this._droppedEventsCount === 0 &&
|
|
1267
|
-
let i =
|
|
1265
|
+
if (r === 0) return T.warn("No events allowed."), this._droppedEventsCount++, this;
|
|
1266
|
+
r !== void 0 && this.events.length >= r && (this._droppedEventsCount === 0 && T.debug("Dropping extra events."), this.events.shift(), this._droppedEventsCount++), Wt(t) && (Wt(n) || (n = t), t = void 0);
|
|
1267
|
+
let i = O(t), { attributePerEventCountLimit: a } = this._spanLimits, o = {}, s = 0, c = 0;
|
|
1268
1268
|
for (let e in i) {
|
|
1269
1269
|
if (!Object.prototype.hasOwnProperty.call(i, e)) continue;
|
|
1270
1270
|
let t = i[e];
|
|
@@ -1281,8 +1281,8 @@ var Jn = class {
|
|
|
1281
1281
|
if (this._isSpanEnded()) return this;
|
|
1282
1282
|
let { linkCountLimit: t } = this._spanLimits;
|
|
1283
1283
|
if (t === 0) return this._droppedLinksCount++, this;
|
|
1284
|
-
t !== void 0 && this.links.length >= t && (this._droppedLinksCount === 0 &&
|
|
1285
|
-
let { attributePerLinkCountLimit: n } = this._spanLimits, r =
|
|
1284
|
+
t !== void 0 && this.links.length >= t && (this._droppedLinksCount === 0 && T.debug("Dropping extra links."), this.links.shift(), this._droppedLinksCount++);
|
|
1285
|
+
let { attributePerLinkCountLimit: n } = this._spanLimits, r = O(e.attributes), i = {}, a = 0, o = 0;
|
|
1286
1286
|
for (let e in r) {
|
|
1287
1287
|
if (!Object.prototype.hasOwnProperty.call(r, e)) continue;
|
|
1288
1288
|
let t = r[e];
|
|
@@ -1296,31 +1296,31 @@ var Jn = class {
|
|
|
1296
1296
|
return this;
|
|
1297
1297
|
}
|
|
1298
1298
|
setStatus(e) {
|
|
1299
|
-
if (this._isSpanEnded() || e.code ===
|
|
1299
|
+
if (this._isSpanEnded() || e.code === C.UNSET || this.status.code === C.OK) return this;
|
|
1300
1300
|
let t = { code: e.code };
|
|
1301
|
-
return e.code ===
|
|
1301
|
+
return e.code === C.ERROR && (typeof e.message == "string" ? t.message = e.message : e.message != null && T.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)), this.status = t, this;
|
|
1302
1302
|
}
|
|
1303
1303
|
updateName(e) {
|
|
1304
1304
|
return this._isSpanEnded() || (this.name = e), this;
|
|
1305
1305
|
}
|
|
1306
1306
|
end(e) {
|
|
1307
|
-
this._isSpanEnded() ?
|
|
1307
|
+
this._isSpanEnded() ? T.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`) : (this.endTime = this._getTime(e), this._duration = Vt(this.startTime, this.endTime), this._duration[0] < 0 && (T.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 && T.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`), this._droppedLinksCount > 0 && T.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`), this._spanProcessor.onEnding && this._spanProcessor.onEnding(this), this._recordEndMetrics?.(), this._ended = !0, this._spanProcessor.onEnd(this));
|
|
1308
1308
|
}
|
|
1309
1309
|
_getTime(e) {
|
|
1310
|
-
if (typeof e == "number" && e <=
|
|
1311
|
-
if (typeof e == "number") return
|
|
1312
|
-
if (e instanceof Date) return
|
|
1313
|
-
if (
|
|
1314
|
-
if (this._startTimeProvided) return
|
|
1315
|
-
let t =
|
|
1316
|
-
return
|
|
1310
|
+
if (typeof e == "number" && e <= A.now()) return M(e + this._performanceOffset);
|
|
1311
|
+
if (typeof e == "number") return j(e);
|
|
1312
|
+
if (e instanceof Date) return j(e.getTime());
|
|
1313
|
+
if (Ut(e)) return e;
|
|
1314
|
+
if (this._startTimeProvided) return j(Date.now());
|
|
1315
|
+
let t = A.now() - this._performanceStartTime;
|
|
1316
|
+
return Gt(this.startTime, j(t));
|
|
1317
1317
|
}
|
|
1318
1318
|
isRecording() {
|
|
1319
1319
|
return this._ended === !1;
|
|
1320
1320
|
}
|
|
1321
1321
|
recordException(e, r) {
|
|
1322
1322
|
let i = {};
|
|
1323
|
-
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(
|
|
1323
|
+
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(Kn, i, r) : T.warn(`Failed to record an exception ${e}`);
|
|
1324
1324
|
}
|
|
1325
1325
|
get duration() {
|
|
1326
1326
|
return this._duration;
|
|
@@ -1340,7 +1340,7 @@ var Jn = class {
|
|
|
1340
1340
|
_isSpanEnded() {
|
|
1341
1341
|
if (this._ended) {
|
|
1342
1342
|
let e = /* @__PURE__ */ Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);
|
|
1343
|
-
|
|
1343
|
+
T.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, e);
|
|
1344
1344
|
}
|
|
1345
1345
|
return this._ended;
|
|
1346
1346
|
}
|
|
@@ -1349,10 +1349,10 @@ var Jn = class {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
_truncateToSize(e) {
|
|
1351
1351
|
let t = this._attributeValueLengthLimit;
|
|
1352
|
-
return t <= 0 ? (
|
|
1352
|
+
return t <= 0 ? (T.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;
|
|
1353
1353
|
}
|
|
1354
|
-
[
|
|
1355
|
-
return
|
|
1354
|
+
[qn](e, t, n) {
|
|
1355
|
+
return Yn("SpanImpl", {
|
|
1356
1356
|
name: this.name,
|
|
1357
1357
|
kind: this.kind,
|
|
1358
1358
|
spanContext: this._spanContext,
|
|
@@ -1369,52 +1369,52 @@ var Jn = class {
|
|
|
1369
1369
|
droppedEventsCount: this._droppedEventsCount,
|
|
1370
1370
|
droppedLinksCount: this._droppedLinksCount,
|
|
1371
1371
|
instrumentationScope: this.instrumentationScope,
|
|
1372
|
-
resource: { attributes:
|
|
1372
|
+
resource: { attributes: Jn(this.resource) }
|
|
1373
1373
|
}, e, t, n);
|
|
1374
1374
|
}
|
|
1375
|
-
},
|
|
1375
|
+
}, z;
|
|
1376
1376
|
(function(e) {
|
|
1377
1377
|
e[e.NOT_RECORD = 0] = "NOT_RECORD", e[e.RECORD = 1] = "RECORD", e[e.RECORD_AND_SAMPLED = 2] = "RECORD_AND_SAMPLED";
|
|
1378
|
-
})(
|
|
1378
|
+
})(z ||= {});
|
|
1379
1379
|
//#endregion
|
|
1380
1380
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/semconv.js
|
|
1381
|
-
var
|
|
1381
|
+
var Zn = "otel.component.name", Qn = "otel.component.type", $n = "otel.span.parent.origin", er = "otel.span.sampling_result", tr = "otel.sdk.processor.span.processed", nr = "otel.sdk.processor.span.queue.capacity", rr = "otel.sdk.processor.span.queue.size", ir = "otel.sdk.span.live", ar = "otel.sdk.span.started", or = "batching_span_processor", sr = class {
|
|
1382
1382
|
startedSpans;
|
|
1383
1383
|
liveSpans;
|
|
1384
1384
|
constructor(e) {
|
|
1385
|
-
this.startedSpans = e.createCounter(
|
|
1385
|
+
this.startedSpans = e.createCounter(ar, {
|
|
1386
1386
|
unit: "{span}",
|
|
1387
1387
|
description: "The number of created spans."
|
|
1388
|
-
}), this.liveSpans = e.createUpDownCounter(
|
|
1388
|
+
}), this.liveSpans = e.createUpDownCounter(ir, {
|
|
1389
1389
|
unit: "{span}",
|
|
1390
1390
|
description: "The number of currently live spans."
|
|
1391
1391
|
});
|
|
1392
1392
|
}
|
|
1393
1393
|
startSpan(e, t) {
|
|
1394
|
-
let n =
|
|
1394
|
+
let n = lr(t);
|
|
1395
1395
|
if (this.startedSpans.add(1, {
|
|
1396
|
-
[
|
|
1397
|
-
[
|
|
1398
|
-
}), t ===
|
|
1399
|
-
let r = { [
|
|
1396
|
+
[$n]: cr(e),
|
|
1397
|
+
[er]: n
|
|
1398
|
+
}), t === z.NOT_RECORD) return () => {};
|
|
1399
|
+
let r = { [er]: n };
|
|
1400
1400
|
return this.liveSpans.add(1, r), () => {
|
|
1401
1401
|
this.liveSpans.add(-1, r);
|
|
1402
1402
|
};
|
|
1403
1403
|
}
|
|
1404
1404
|
};
|
|
1405
|
-
function
|
|
1405
|
+
function cr(e) {
|
|
1406
1406
|
return e ? e.isRemote ? "remote" : "local" : "none";
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function lr(e) {
|
|
1409
1409
|
switch (e) {
|
|
1410
|
-
case
|
|
1411
|
-
case
|
|
1412
|
-
case
|
|
1410
|
+
case z.RECORD_AND_SAMPLED: return "RECORD_AND_SAMPLE";
|
|
1411
|
+
case z.RECORD: return "RECORD_ONLY";
|
|
1412
|
+
case z.NOT_RECORD: return "DROP";
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
//#endregion
|
|
1416
1416
|
//#region ../../node_modules/.pnpm/@opentelemetry+sdk-trace@2.11.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/sdk-trace/build/esm/version.js
|
|
1417
|
-
var
|
|
1417
|
+
var ur = "2.11.0", dr = class {
|
|
1418
1418
|
_sampler;
|
|
1419
1419
|
_spanLimits;
|
|
1420
1420
|
_idGenerator;
|
|
@@ -1424,29 +1424,29 @@ var cr = "2.11.0", lr = class {
|
|
|
1424
1424
|
_tracerMetrics;
|
|
1425
1425
|
constructor(e, t) {
|
|
1426
1426
|
this.instrumentationScope = e, this._sampler = t.sampler, this._spanLimits = t.spanLimits, this._resource = t.resource, this._idGenerator = t.idGenerator, this._spanProcessor = t.spanProcessor;
|
|
1427
|
-
let n = t.meterProvider.getMeter("@opentelemetry/sdk-trace",
|
|
1428
|
-
this._tracerMetrics = new
|
|
1427
|
+
let n = t.meterProvider.getMeter("@opentelemetry/sdk-trace", ur);
|
|
1428
|
+
this._tracerMetrics = new sr(n);
|
|
1429
1429
|
}
|
|
1430
|
-
startSpan(e, t = {}, n =
|
|
1431
|
-
t.root && (n =
|
|
1432
|
-
let r =
|
|
1433
|
-
if (
|
|
1430
|
+
startSpan(e, t = {}, n = w.active()) {
|
|
1431
|
+
t.root && (n = D.deleteSpan(n));
|
|
1432
|
+
let r = D.getSpan(n);
|
|
1433
|
+
if (yt(n)) return T.debug("Instrumentation suppressed, returning Noop Span"), D.wrapSpanContext(Ie);
|
|
1434
1434
|
let i = r?.spanContext(), a = this._idGenerator.generateSpanId(), o, s, c;
|
|
1435
|
-
!i || !
|
|
1436
|
-
let l = t.kind ??
|
|
1435
|
+
!i || !D.isSpanContextValid(i) ? s = this._idGenerator.generateTraceId() : (s = i.traceId, c = i.traceState, o = i);
|
|
1436
|
+
let l = t.kind ?? it.INTERNAL, u = (t.links ?? []).map((e) => ({
|
|
1437
1437
|
context: e.context,
|
|
1438
|
-
attributes:
|
|
1439
|
-
})), ee =
|
|
1438
|
+
attributes: O(e.attributes)
|
|
1439
|
+
})), ee = O(t.attributes), d = this._sampler.shouldSample(n, s, e, l, ee, u), te = this._tracerMetrics.startSpan(i, d.decision);
|
|
1440
1440
|
c = d.traceState ?? c;
|
|
1441
|
-
let f = d.decision ===
|
|
1441
|
+
let f = d.decision === rt.RECORD_AND_SAMPLED ? x.SAMPLED : x.NONE, p = {
|
|
1442
1442
|
traceId: s,
|
|
1443
1443
|
spanId: a,
|
|
1444
1444
|
traceFlags: f,
|
|
1445
1445
|
traceState: c
|
|
1446
1446
|
};
|
|
1447
|
-
if (d.decision ===
|
|
1448
|
-
let m =
|
|
1449
|
-
return new
|
|
1447
|
+
if (d.decision === rt.NOT_RECORD) return T.debug("Recording is off, propagating context in a non-recording span"), D.wrapSpanContext(p);
|
|
1448
|
+
let m = O(Object.assign(ee, d.attributes));
|
|
1449
|
+
return new Xn({
|
|
1450
1450
|
resource: this._resource,
|
|
1451
1451
|
scope: this.instrumentationScope,
|
|
1452
1452
|
context: n,
|
|
@@ -1466,17 +1466,17 @@ var cr = "2.11.0", lr = class {
|
|
|
1466
1466
|
let i, a, o;
|
|
1467
1467
|
if (arguments.length < 2) return;
|
|
1468
1468
|
arguments.length === 2 ? o = t : arguments.length === 3 ? (i = t, o = n) : (i = t, a = n, o = r);
|
|
1469
|
-
let s = a ??
|
|
1470
|
-
return
|
|
1469
|
+
let s = a ?? w.active(), c = this.startSpan(e, i, s), l = D.setSpan(s, c);
|
|
1470
|
+
return w.with(l, o, void 0, c);
|
|
1471
1471
|
}
|
|
1472
|
-
[
|
|
1473
|
-
return
|
|
1472
|
+
[qn](e, t, n) {
|
|
1473
|
+
return Yn("Tracer", {
|
|
1474
1474
|
instrumentationScope: this.instrumentationScope,
|
|
1475
|
-
resource: { attributes:
|
|
1475
|
+
resource: { attributes: Jn(this._resource) },
|
|
1476
1476
|
spanLimits: this._spanLimits
|
|
1477
1477
|
}, e, t, n);
|
|
1478
1478
|
}
|
|
1479
|
-
},
|
|
1479
|
+
}, fr = class {
|
|
1480
1480
|
_spanProcessors;
|
|
1481
1481
|
constructor(e) {
|
|
1482
1482
|
this._spanProcessors = e;
|
|
@@ -1488,7 +1488,7 @@ var cr = "2.11.0", lr = class {
|
|
|
1488
1488
|
Promise.all(e).then(() => {
|
|
1489
1489
|
t();
|
|
1490
1490
|
}).catch((e) => {
|
|
1491
|
-
|
|
1491
|
+
k(e || /* @__PURE__ */ Error("MultiSpanProcessor: forceFlush failed")), t();
|
|
1492
1492
|
});
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
@@ -1510,59 +1510,59 @@ var cr = "2.11.0", lr = class {
|
|
|
1510
1510
|
}, n);
|
|
1511
1511
|
});
|
|
1512
1512
|
}
|
|
1513
|
-
},
|
|
1513
|
+
}, pr = class {
|
|
1514
1514
|
shouldSample() {
|
|
1515
|
-
return { decision:
|
|
1515
|
+
return { decision: z.NOT_RECORD };
|
|
1516
1516
|
}
|
|
1517
1517
|
toString() {
|
|
1518
1518
|
return "AlwaysOffSampler";
|
|
1519
1519
|
}
|
|
1520
|
-
},
|
|
1520
|
+
}, B = class {
|
|
1521
1521
|
shouldSample() {
|
|
1522
|
-
return { decision:
|
|
1522
|
+
return { decision: z.RECORD_AND_SAMPLED };
|
|
1523
1523
|
}
|
|
1524
1524
|
toString() {
|
|
1525
1525
|
return "AlwaysOnSampler";
|
|
1526
1526
|
}
|
|
1527
|
-
},
|
|
1527
|
+
}, V = class {
|
|
1528
1528
|
_root;
|
|
1529
1529
|
_remoteParentSampled;
|
|
1530
1530
|
_remoteParentNotSampled;
|
|
1531
1531
|
_localParentSampled;
|
|
1532
1532
|
_localParentNotSampled;
|
|
1533
1533
|
constructor(e) {
|
|
1534
|
-
this._root = e.root, this._root ||= (
|
|
1534
|
+
this._root = e.root, this._root ||= (k(/* @__PURE__ */ Error("ParentBasedSampler must have a root sampler configured")), new B()), this._remoteParentSampled = e.remoteParentSampled ?? new B(), this._remoteParentNotSampled = e.remoteParentNotSampled ?? new pr(), this._localParentSampled = e.localParentSampled ?? new B(), this._localParentNotSampled = e.localParentNotSampled ?? new pr();
|
|
1535
1535
|
}
|
|
1536
1536
|
shouldSample(e, t, n, r, i, a) {
|
|
1537
|
-
let o =
|
|
1538
|
-
return !o || !
|
|
1537
|
+
let o = D.getSpanContext(e);
|
|
1538
|
+
return !o || !Je(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);
|
|
1539
1539
|
}
|
|
1540
1540
|
toString() {
|
|
1541
1541
|
return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
|
|
1542
1542
|
}
|
|
1543
|
-
},
|
|
1543
|
+
}, mr = /* @__PURE__ */ new Map(), hr = class {
|
|
1544
1544
|
processedSpans;
|
|
1545
1545
|
queueSize;
|
|
1546
1546
|
queueSizeCallback;
|
|
1547
1547
|
standardAttrs;
|
|
1548
1548
|
droppedAttrs;
|
|
1549
1549
|
constructor(t, n, r) {
|
|
1550
|
-
let i =
|
|
1551
|
-
if (
|
|
1552
|
-
[
|
|
1553
|
-
[
|
|
1550
|
+
let i = mr.get(t) ?? 0;
|
|
1551
|
+
if (mr.set(t, i + 1), this.standardAttrs = {
|
|
1552
|
+
[Qn]: t,
|
|
1553
|
+
[Zn]: `${t}/${i}`
|
|
1554
1554
|
}, this.droppedAttrs = {
|
|
1555
1555
|
...this.standardAttrs,
|
|
1556
1556
|
[e]: "queue_full"
|
|
1557
|
-
}, this.processedSpans = n.createCounter(
|
|
1557
|
+
}, this.processedSpans = n.createCounter(tr, {
|
|
1558
1558
|
unit: "{span}",
|
|
1559
1559
|
description: "The number of spans for which the processing has finished, either successful or failed."
|
|
1560
1560
|
}), r) {
|
|
1561
1561
|
let { capacity: e, getQueueSize: t } = r;
|
|
1562
|
-
n.createUpDownCounter(
|
|
1562
|
+
n.createUpDownCounter(nr, {
|
|
1563
1563
|
unit: "{span}",
|
|
1564
1564
|
description: "The maximum number of spans the queue of a given instance of an SDK span processor can hold."
|
|
1565
|
-
}).add(e, this.standardAttrs), this.queueSize = n.createObservableUpDownCounter(
|
|
1565
|
+
}).add(e, this.standardAttrs), this.queueSize = n.createObservableUpDownCounter(rr, {
|
|
1566
1566
|
unit: "{span}",
|
|
1567
1567
|
description: "The number of spans in the queue of a given instance of an SDK span processor."
|
|
1568
1568
|
}), this.queueSizeCallback = (e) => e.observe(t(), this.standardAttrs), this.queueSize.addCallback(this.queueSizeCallback);
|
|
@@ -1585,7 +1585,7 @@ var cr = "2.11.0", lr = class {
|
|
|
1585
1585
|
shutdown() {
|
|
1586
1586
|
this.queueSize && this.queueSizeCallback && this.queueSize.removeCallback(this.queueSizeCallback);
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1588
|
+
}, gr = class {
|
|
1589
1589
|
_maxExportBatchSize;
|
|
1590
1590
|
_maxQueueSize;
|
|
1591
1591
|
_scheduledDelayMillis;
|
|
@@ -1598,9 +1598,9 @@ var cr = "2.11.0", lr = class {
|
|
|
1598
1598
|
_shutdownOnce;
|
|
1599
1599
|
_droppedSpansCount = 0;
|
|
1600
1600
|
constructor(e) {
|
|
1601
|
-
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
|
|
1601
|
+
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 Ln(this._shutdown, this), this._maxExportBatchSize > this._maxQueueSize && (T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"), this._maxExportBatchSize = this._maxQueueSize);
|
|
1602
1602
|
let t = e.selfObsMeterProvider ? e.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace") : ke();
|
|
1603
|
-
this._metrics = new
|
|
1603
|
+
this._metrics = new hr(or, t, {
|
|
1604
1604
|
capacity: this._maxQueueSize,
|
|
1605
1605
|
getQueueSize: () => this._finishedSpans.length
|
|
1606
1606
|
});
|
|
@@ -1619,7 +1619,7 @@ var cr = "2.11.0", lr = class {
|
|
|
1619
1619
|
return Promise.resolve().then(() => this.onShutdown()).then(() => this._flushAll()).then(() => (this._metrics.shutdown(), this._exporter.shutdown()));
|
|
1620
1620
|
}
|
|
1621
1621
|
_addToBuffer(e) {
|
|
1622
|
-
this._finishedSpans.length >= this._maxQueueSize ? (this._droppedSpansCount === 0 &&
|
|
1622
|
+
this._finishedSpans.length >= this._maxQueueSize ? (this._droppedSpansCount === 0 && T.debug("maxQueueSize reached, dropping spans"), this._droppedSpansCount++, this._metrics.dropSpans(1)) : (this._droppedSpansCount > 0 && (T.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`), this._droppedSpansCount = 0), this._finishedSpans.push(e), this._maybeStartTimer());
|
|
1623
1623
|
}
|
|
1624
1624
|
_flushAll() {
|
|
1625
1625
|
return new Promise((e, t) => {
|
|
@@ -1635,18 +1635,18 @@ var cr = "2.11.0", lr = class {
|
|
|
1635
1635
|
let n = setTimeout(() => {
|
|
1636
1636
|
t(/* @__PURE__ */ Error("Timeout"));
|
|
1637
1637
|
}, this._exportTimeoutMillis);
|
|
1638
|
-
|
|
1638
|
+
w.with(vt(w.active()), () => {
|
|
1639
1639
|
let r;
|
|
1640
1640
|
this._finishedSpans.length <= this._maxExportBatchSize ? (r = this._finishedSpans, this._finishedSpans = []) : r = this._finishedSpans.splice(0, this._maxExportBatchSize);
|
|
1641
1641
|
let i = () => this._exporter.export(r, (i) => {
|
|
1642
|
-
clearTimeout(n), this._metrics.finishSpans(r.length, i.error), i.code ===
|
|
1642
|
+
clearTimeout(n), this._metrics.finishSpans(r.length, i.error), i.code === F.SUCCESS ? e() : t(i.error ?? /* @__PURE__ */ Error("BatchSpanProcessor: span export failed"));
|
|
1643
1643
|
}), a = null;
|
|
1644
1644
|
for (let e = 0, t = r.length; e < t; e++) {
|
|
1645
1645
|
let t = r[e];
|
|
1646
1646
|
t.resource.asyncAttributesPending && t.resource.waitForAsyncAttributes && (a ??= [], a.push(t.resource.waitForAsyncAttributes()));
|
|
1647
1647
|
}
|
|
1648
1648
|
a === null ? i() : Promise.all(a).then(i, (e) => {
|
|
1649
|
-
|
|
1649
|
+
k(e), t(e);
|
|
1650
1650
|
});
|
|
1651
1651
|
});
|
|
1652
1652
|
});
|
|
@@ -1657,7 +1657,7 @@ var cr = "2.11.0", lr = class {
|
|
|
1657
1657
|
this._isExporting = !0, this._flushOneBatch().finally(() => {
|
|
1658
1658
|
this._isExporting = !1, this._finishedSpans.length > 0 && (this._clearTimer(), this._maybeStartTimer());
|
|
1659
1659
|
}).catch((e) => {
|
|
1660
|
-
this._isExporting = !1,
|
|
1660
|
+
this._isExporting = !1, k(e);
|
|
1661
1661
|
});
|
|
1662
1662
|
};
|
|
1663
1663
|
if (this._finishedSpans.length >= this._maxExportBatchSize) return e();
|
|
@@ -1666,7 +1666,7 @@ var cr = "2.11.0", lr = class {
|
|
|
1666
1666
|
_clearTimer() {
|
|
1667
1667
|
this._timer !== void 0 && (clearTimeout(this._timer), this._timer = void 0);
|
|
1668
1668
|
}
|
|
1669
|
-
},
|
|
1669
|
+
}, _r = class extends gr {
|
|
1670
1670
|
_visibilityChangeListener;
|
|
1671
1671
|
_pageHideListener;
|
|
1672
1672
|
constructor(e) {
|
|
@@ -1675,51 +1675,51 @@ var cr = "2.11.0", lr = class {
|
|
|
1675
1675
|
onInit(e) {
|
|
1676
1676
|
e.disableAutoFlushOnDocumentHide !== !0 && typeof document < "u" && (this._visibilityChangeListener = () => {
|
|
1677
1677
|
document.visibilityState === "hidden" && this.forceFlush().catch((e) => {
|
|
1678
|
-
|
|
1678
|
+
k(e);
|
|
1679
1679
|
});
|
|
1680
1680
|
}, this._pageHideListener = () => {
|
|
1681
1681
|
this.forceFlush().catch((e) => {
|
|
1682
|
-
|
|
1682
|
+
k(e);
|
|
1683
1683
|
});
|
|
1684
1684
|
}, document.addEventListener("visibilitychange", this._visibilityChangeListener), document.addEventListener("pagehide", this._pageHideListener));
|
|
1685
1685
|
}
|
|
1686
1686
|
onShutdown() {
|
|
1687
1687
|
typeof document < "u" && (this._visibilityChangeListener && document.removeEventListener("visibilitychange", this._visibilityChangeListener), this._pageHideListener && document.removeEventListener("pagehide", this._pageHideListener));
|
|
1688
1688
|
}
|
|
1689
|
-
},
|
|
1690
|
-
function
|
|
1689
|
+
}, vr = 16, yr = 8, br = new Uint8Array(vr), xr = new Uint8Array(yr), Sr = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
1690
|
+
function Cr(e) {
|
|
1691
1691
|
for (let t = 0; t < e.length; t++) e[t] = Math.random() * 256 >>> 0;
|
|
1692
1692
|
for (let t = 0; t < e.length; t++) if (e[t] > 0) return;
|
|
1693
1693
|
e[e.length - 1] = 1;
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1695
|
+
function wr(e) {
|
|
1696
1696
|
let t = "";
|
|
1697
|
-
for (let n = 0; n < e.length; n++) t +=
|
|
1697
|
+
for (let n = 0; n < e.length; n++) t += Sr[e[n]];
|
|
1698
1698
|
return t;
|
|
1699
1699
|
}
|
|
1700
|
-
var
|
|
1700
|
+
var Tr = class {
|
|
1701
1701
|
generateTraceId() {
|
|
1702
|
-
return
|
|
1702
|
+
return Cr(br), wr(br);
|
|
1703
1703
|
}
|
|
1704
1704
|
generateSpanId() {
|
|
1705
|
-
return xr
|
|
1705
|
+
return Cr(xr), wr(xr);
|
|
1706
1706
|
}
|
|
1707
|
-
},
|
|
1707
|
+
}, H;
|
|
1708
1708
|
(function(e) {
|
|
1709
1709
|
e[e.resolved = 0] = "resolved", e[e.timeout = 1] = "timeout", e[e.error = 2] = "error", e[e.unresolved = 3] = "unresolved";
|
|
1710
|
-
})(
|
|
1711
|
-
var
|
|
1710
|
+
})(H ||= {});
|
|
1711
|
+
var Er = class {
|
|
1712
1712
|
_resource;
|
|
1713
1713
|
_activeSpanProcessor;
|
|
1714
1714
|
_forceFlushTimeoutMillis;
|
|
1715
1715
|
_tracerOptions;
|
|
1716
1716
|
_tracers = /* @__PURE__ */ new Map();
|
|
1717
1717
|
constructor(e = {}) {
|
|
1718
|
-
this._forceFlushTimeoutMillis = e.forceFlushTimeoutMillis ?? 3e4, this._resource = e.resource ??
|
|
1718
|
+
this._forceFlushTimeoutMillis = e.forceFlushTimeoutMillis ?? 3e4, this._resource = e.resource ?? Hn();
|
|
1719
1719
|
let t = e.spanProcessors ?? [];
|
|
1720
|
-
this._activeSpanProcessor = new
|
|
1720
|
+
this._activeSpanProcessor = new fr(t), this._tracerOptions = {
|
|
1721
1721
|
resource: this._resource,
|
|
1722
|
-
sampler: e.sampler ?? new
|
|
1722
|
+
sampler: e.sampler ?? new V({ root: new B() }),
|
|
1723
1723
|
spanLimits: {
|
|
1724
1724
|
attributeCountLimit: e.spanLimits?.attributeCountLimit ?? 128,
|
|
1725
1725
|
attributeValueLengthLimit: e.spanLimits?.attributeValueLengthLimit ?? Infinity,
|
|
@@ -1728,7 +1728,7 @@ var wr = class {
|
|
|
1728
1728
|
attributePerEventCountLimit: e.spanLimits?.attributePerEventCountLimit ?? 128,
|
|
1729
1729
|
attributePerLinkCountLimit: e.spanLimits?.attributePerLinkCountLimit ?? 128
|
|
1730
1730
|
},
|
|
1731
|
-
idGenerator: e.idGenerator || new
|
|
1731
|
+
idGenerator: e.idGenerator || new Tr(),
|
|
1732
1732
|
spanProcessor: this._activeSpanProcessor,
|
|
1733
1733
|
meterProvider: e.meterProvider ?? { getMeter() {
|
|
1734
1734
|
return ke();
|
|
@@ -1737,7 +1737,7 @@ var wr = class {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
getTracer(e, t, n) {
|
|
1739
1739
|
let r = `${e}@${t || ""}:${n?.schemaUrl || ""}`;
|
|
1740
|
-
return this._tracers.has(r) || this._tracers.set(r, new
|
|
1740
|
+
return this._tracers.has(r) || this._tracers.set(r, new dr({
|
|
1741
1741
|
name: e,
|
|
1742
1742
|
version: t,
|
|
1743
1743
|
schemaUrl: n?.schemaUrl
|
|
@@ -1746,17 +1746,17 @@ var wr = class {
|
|
|
1746
1746
|
forceFlush(e) {
|
|
1747
1747
|
let t = e?.timeoutMillis ?? this._forceFlushTimeoutMillis, n = this._activeSpanProcessor._spanProcessors.map((e) => new Promise((n) => {
|
|
1748
1748
|
let r, i = setTimeout(() => {
|
|
1749
|
-
n(/* @__PURE__ */ Error(`Span processor did not completed within timeout period of ${t} ms`)), r =
|
|
1749
|
+
n(/* @__PURE__ */ Error(`Span processor did not completed within timeout period of ${t} ms`)), r = H.timeout;
|
|
1750
1750
|
}, t);
|
|
1751
1751
|
e.forceFlush().then(() => {
|
|
1752
|
-
clearTimeout(i), r !==
|
|
1752
|
+
clearTimeout(i), r !== H.timeout && (r = H.resolved, n(r));
|
|
1753
1753
|
}).catch((e) => {
|
|
1754
|
-
clearTimeout(i), r =
|
|
1754
|
+
clearTimeout(i), r = H.error, n(e);
|
|
1755
1755
|
});
|
|
1756
1756
|
}));
|
|
1757
1757
|
return new Promise((e, t) => {
|
|
1758
1758
|
Promise.all(n).then((n) => {
|
|
1759
|
-
let r = n.filter((e) => e !==
|
|
1759
|
+
let r = n.filter((e) => e !== H.resolved);
|
|
1760
1760
|
r.length > 0 ? t(r) : e();
|
|
1761
1761
|
}).catch((e) => t([e]));
|
|
1762
1762
|
});
|
|
@@ -1764,22 +1764,22 @@ var wr = class {
|
|
|
1764
1764
|
shutdown() {
|
|
1765
1765
|
return this._activeSpanProcessor.shutdown();
|
|
1766
1766
|
}
|
|
1767
|
-
[
|
|
1767
|
+
[qn](e, t, n) {
|
|
1768
1768
|
let r = this._activeSpanProcessor._spanProcessors;
|
|
1769
|
-
return
|
|
1770
|
-
resource: { attributes:
|
|
1769
|
+
return Yn("TracerProvider", {
|
|
1770
|
+
resource: { attributes: Jn(this._resource) },
|
|
1771
1771
|
tracers: Array.from(this._tracers.keys()),
|
|
1772
1772
|
spanProcessors: r.map((e) => e.constructor?.name ?? "SpanProcessor")
|
|
1773
1773
|
}, e, t, n);
|
|
1774
1774
|
}
|
|
1775
|
-
},
|
|
1775
|
+
}, Dr = class {
|
|
1776
1776
|
_ratio;
|
|
1777
1777
|
_upperBound;
|
|
1778
1778
|
constructor(e = 0) {
|
|
1779
1779
|
this._ratio = this._normalize(e), this._upperBound = this._ratio === 1 ? 4294967296 : Math.floor(this._ratio * 4294967295);
|
|
1780
1780
|
}
|
|
1781
1781
|
shouldSample(e, t) {
|
|
1782
|
-
return { decision:
|
|
1782
|
+
return { decision: Ke(t) && this._accumulate(t) < this._upperBound ? z.RECORD_AND_SAMPLED : z.NOT_RECORD };
|
|
1783
1783
|
}
|
|
1784
1784
|
toString() {
|
|
1785
1785
|
return `TraceIdRatioBased{${this._ratio}}`;
|
|
@@ -1799,14 +1799,14 @@ var wr = class {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
return t;
|
|
1801
1801
|
}
|
|
1802
|
-
},
|
|
1802
|
+
}, U;
|
|
1803
1803
|
(function(e) {
|
|
1804
1804
|
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";
|
|
1805
|
-
})(
|
|
1806
|
-
var
|
|
1807
|
-
function
|
|
1805
|
+
})(U ||= {});
|
|
1806
|
+
var Or = 1;
|
|
1807
|
+
function kr() {
|
|
1808
1808
|
return {
|
|
1809
|
-
sampler:
|
|
1809
|
+
sampler: Ar(),
|
|
1810
1810
|
forceFlushTimeoutMillis: 3e4,
|
|
1811
1811
|
generalLimits: {
|
|
1812
1812
|
attributeValueLengthLimit: Infinity,
|
|
@@ -1822,33 +1822,33 @@ function Dr() {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1826
|
-
let e =
|
|
1825
|
+
function Ar() {
|
|
1826
|
+
let e = U.ParentBasedAlwaysOn;
|
|
1827
1827
|
switch (e) {
|
|
1828
|
-
case
|
|
1829
|
-
case
|
|
1830
|
-
case
|
|
1831
|
-
case
|
|
1832
|
-
case
|
|
1833
|
-
case
|
|
1834
|
-
default: return
|
|
1828
|
+
case U.AlwaysOn: return new B();
|
|
1829
|
+
case U.AlwaysOff: return new pr();
|
|
1830
|
+
case U.ParentBasedAlwaysOn: return new V({ root: new B() });
|
|
1831
|
+
case U.ParentBasedAlwaysOff: return new V({ root: new pr() });
|
|
1832
|
+
case U.TraceIdRatio: return new Dr(jr());
|
|
1833
|
+
case U.ParentBasedTraceIdRatio: return new V({ root: new Dr(jr()) });
|
|
1834
|
+
default: return T.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${U.ParentBasedAlwaysOn}".`), new V({ root: new B() });
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1838
|
-
return
|
|
1837
|
+
function jr() {
|
|
1838
|
+
return T.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Or}.`), Or;
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function Mr(e) {
|
|
1841
1841
|
let t = Object.assign({}, e.spanLimits);
|
|
1842
1842
|
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 });
|
|
1843
1843
|
}
|
|
1844
1844
|
//#endregion
|
|
1845
1845
|
//#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
|
|
1846
|
-
var
|
|
1846
|
+
var Nr = class extends Er {
|
|
1847
1847
|
constructor(e = {}) {
|
|
1848
|
-
let t =
|
|
1848
|
+
let t = En({}, kr(), Mr(e));
|
|
1849
1849
|
delete t.generalLimits, super(t);
|
|
1850
1850
|
}
|
|
1851
|
-
},
|
|
1851
|
+
}, Pr = class extends _r {
|
|
1852
1852
|
constructor(e, t) {
|
|
1853
1853
|
t ||= {};
|
|
1854
1854
|
for (let [e, n] of [
|
|
@@ -1862,7 +1862,7 @@ var jr = class extends wr {
|
|
|
1862
1862
|
...t
|
|
1863
1863
|
});
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1865
|
+
}, Fr = class {
|
|
1866
1866
|
_enabled = !1;
|
|
1867
1867
|
_currentContext = b;
|
|
1868
1868
|
_bindFunction(e = b, t) {
|
|
@@ -1900,100 +1900,100 @@ var jr = class extends wr {
|
|
|
1900
1900
|
};
|
|
1901
1901
|
//#endregion
|
|
1902
1902
|
//#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
|
|
1903
|
-
function
|
|
1903
|
+
function Ir(e) {
|
|
1904
1904
|
if (e !== null) {
|
|
1905
1905
|
if (e === void 0) {
|
|
1906
|
-
let e = new
|
|
1907
|
-
e.enable(),
|
|
1908
|
-
} else e.enable(),
|
|
1906
|
+
let e = new Fr();
|
|
1907
|
+
e.enable(), w.setGlobalContextManager(e);
|
|
1908
|
+
} else e.enable(), w.setGlobalContextManager(e);
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
e !== null && (e === void 0 ?
|
|
1911
|
+
function Lr(e) {
|
|
1912
|
+
e !== null && (e === void 0 ? E.setGlobalPropagator(new Kt({ propagators: [new un(), new Et()] })) : E.setGlobalPropagator(e));
|
|
1913
1913
|
}
|
|
1914
|
-
var
|
|
1914
|
+
var Rr = class extends Nr {
|
|
1915
1915
|
constructor(e = {}) {
|
|
1916
1916
|
super(e);
|
|
1917
1917
|
}
|
|
1918
1918
|
register(e = {}) {
|
|
1919
|
-
|
|
1919
|
+
D.setGlobalTracerProvider(this), Lr(e.propagator), Ir(e.contextManager);
|
|
1920
1920
|
}
|
|
1921
|
-
},
|
|
1921
|
+
}, W;
|
|
1922
1922
|
(function(e) {
|
|
1923
1923
|
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";
|
|
1924
|
-
})(
|
|
1924
|
+
})(W ||= {});
|
|
1925
1925
|
//#endregion
|
|
1926
1926
|
//#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
|
|
1927
|
-
var
|
|
1928
|
-
function
|
|
1929
|
-
return
|
|
1927
|
+
var zr = "http.response_content_length", Br = "http.response_content_length_uncompressed", Vr;
|
|
1928
|
+
function Hr() {
|
|
1929
|
+
return Vr ||= document.createElement("a"), Vr;
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1931
|
+
function G(e, t) {
|
|
1932
1932
|
return t in e;
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1935
|
-
if (
|
|
1934
|
+
function K(e, t, n, r = !0) {
|
|
1935
|
+
if (G(n, t) && typeof n[t] == "number" && !(r && n[t] === 0)) return e.addEvent(t, n[t]);
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1938
|
-
if (r === void 0 && (r = t[
|
|
1939
|
-
let n = t[
|
|
1940
|
-
n !== void 0 && e.setAttribute(
|
|
1941
|
-
let r = t[
|
|
1942
|
-
r !== void 0 && n !== r && e.setAttribute(
|
|
1937
|
+
function Ur(e, t, n = !1, r, i) {
|
|
1938
|
+
if (r === void 0 && (r = t[W.START_TIME] !== 0), n || (K(e, W.FETCH_START, t, r), K(e, W.DOMAIN_LOOKUP_START, t, r), K(e, W.DOMAIN_LOOKUP_END, t, r), K(e, W.CONNECT_START, t, r), K(e, W.SECURE_CONNECTION_START, t, r), K(e, W.CONNECT_END, t, r), K(e, W.REQUEST_START, t, r), K(e, W.RESPONSE_START, t, r), K(e, W.RESPONSE_END, t, r)), !i) {
|
|
1939
|
+
let n = t[W.ENCODED_BODY_SIZE];
|
|
1940
|
+
n !== void 0 && e.setAttribute(zr, n);
|
|
1941
|
+
let r = t[W.DECODED_BODY_SIZE];
|
|
1942
|
+
r !== void 0 && n !== r && e.setAttribute(Br, r);
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function Wr(e) {
|
|
1946
1946
|
return e.slice().sort((e, t) => {
|
|
1947
|
-
let n = e[
|
|
1947
|
+
let n = e[W.FETCH_START], r = t[W.FETCH_START];
|
|
1948
1948
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1951
|
+
function Gr() {
|
|
1952
1952
|
return typeof location < "u" ? location.origin : void 0;
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1955
|
-
let o =
|
|
1954
|
+
function Kr(e, t, n, r, i = /* @__PURE__ */ new WeakSet(), a) {
|
|
1955
|
+
let o = Yr(e);
|
|
1956
1956
|
e = o.toString();
|
|
1957
|
-
let s =
|
|
1957
|
+
let s = Jr(e, t, n, r, i, a);
|
|
1958
1958
|
if (s.length === 0) return { mainRequest: void 0 };
|
|
1959
1959
|
if (s.length === 1) return { mainRequest: s[0] };
|
|
1960
|
-
let c =
|
|
1961
|
-
if (o.origin !==
|
|
1962
|
-
let e = c[0], t =
|
|
1963
|
-
return t[
|
|
1960
|
+
let c = Wr(s);
|
|
1961
|
+
if (o.origin !== Gr() && c.length > 1) {
|
|
1962
|
+
let e = c[0], t = qr(c, e[W.RESPONSE_END], n), r = e[W.RESPONSE_END];
|
|
1963
|
+
return t[W.FETCH_START] < r && (t = e, e = void 0), {
|
|
1964
1964
|
corsPreFlightRequest: e,
|
|
1965
1965
|
mainRequest: t
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
1968
1968
|
return { mainRequest: s[0] };
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1971
|
-
let r =
|
|
1970
|
+
function qr(e, t, n) {
|
|
1971
|
+
let r = P(n), i = P(N(t)), a = e[1], o, s = e.length;
|
|
1972
1972
|
for (let t = 1; t < s; t++) {
|
|
1973
|
-
let n = e[t], s =
|
|
1973
|
+
let n = e[t], s = P(N(n[W.FETCH_START])), c = r - P(N(n[W.RESPONSE_END]));
|
|
1974
1974
|
s >= i && (!o || c < o) && (o = c, a = n);
|
|
1975
1975
|
}
|
|
1976
1976
|
return a;
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1979
|
-
let o =
|
|
1980
|
-
let n =
|
|
1978
|
+
function Jr(e, t, n, r, i, a) {
|
|
1979
|
+
let o = P(t), s = P(n), c = r.filter((t) => {
|
|
1980
|
+
let n = P(N(t[W.FETCH_START])), r = P(N(t[W.RESPONSE_END]));
|
|
1981
1981
|
return t.initiatorType.toLowerCase() === (a || "xmlhttprequest") && t.name === e && n >= o && r <= s;
|
|
1982
1982
|
});
|
|
1983
1983
|
return c.length > 0 && (c = c.filter((e) => !i.has(e))), c;
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function Yr(e) {
|
|
1986
1986
|
if (typeof URL == "function") return new URL(e, typeof document < "u" ? document.baseURI : typeof location < "u" ? location.href : void 0);
|
|
1987
|
-
let t =
|
|
1987
|
+
let t = Hr();
|
|
1988
1988
|
return t.href = e, t;
|
|
1989
1989
|
}
|
|
1990
|
-
function
|
|
1990
|
+
function Xr(e, t) {
|
|
1991
1991
|
let n = t || [];
|
|
1992
|
-
return (typeof n == "string" || n instanceof RegExp) && (n = [n]),
|
|
1992
|
+
return (typeof n == "string" || n instanceof RegExp) && (n = [n]), Yr(e).origin === Gr() || n.some((t) => Pn(e, t));
|
|
1993
1993
|
}
|
|
1994
1994
|
//#endregion
|
|
1995
1995
|
//#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
|
|
1996
|
-
var
|
|
1996
|
+
var Zr = class {
|
|
1997
1997
|
_delegate;
|
|
1998
1998
|
constructor(e) {
|
|
1999
1999
|
this._delegate = e;
|
|
@@ -2010,7 +2010,7 @@ var Yr = class {
|
|
|
2010
2010
|
setMetrics(e) {
|
|
2011
2011
|
this._delegate.setMetrics(e);
|
|
2012
2012
|
}
|
|
2013
|
-
},
|
|
2013
|
+
}, Qr = class extends Error {
|
|
2014
2014
|
code;
|
|
2015
2015
|
name = "OTLPExporterError";
|
|
2016
2016
|
data;
|
|
@@ -2020,21 +2020,21 @@ var Yr = class {
|
|
|
2020
2020
|
};
|
|
2021
2021
|
//#endregion
|
|
2022
2022
|
//#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
|
|
2023
|
-
function
|
|
2023
|
+
function $r(e) {
|
|
2024
2024
|
if (Number.isFinite(e) && e > 0) return e;
|
|
2025
2025
|
throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function ei(e) {
|
|
2028
2028
|
if (e != null) return async () => e;
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function ti(e, t, n) {
|
|
2031
2031
|
return {
|
|
2032
|
-
timeoutMillis:
|
|
2032
|
+
timeoutMillis: $r(e.timeoutMillis ?? t.timeoutMillis ?? n.timeoutMillis),
|
|
2033
2033
|
concurrencyLimit: e.concurrencyLimit ?? t.concurrencyLimit ?? n.concurrencyLimit,
|
|
2034
2034
|
compression: e.compression ?? t.compression ?? n.compression
|
|
2035
2035
|
};
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function ni() {
|
|
2038
2038
|
return {
|
|
2039
2039
|
timeoutMillis: 1e4,
|
|
2040
2040
|
concurrencyLimit: 30,
|
|
@@ -2043,7 +2043,7 @@ function ei() {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
//#endregion
|
|
2045
2045
|
//#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
|
|
2046
|
-
var
|
|
2046
|
+
var ri = class {
|
|
2047
2047
|
_concurrencyLimit;
|
|
2048
2048
|
_sendingPromises = [];
|
|
2049
2049
|
constructor(e) {
|
|
@@ -2065,22 +2065,22 @@ var ti = class {
|
|
|
2065
2065
|
await Promise.all(this._sendingPromises);
|
|
2066
2066
|
}
|
|
2067
2067
|
};
|
|
2068
|
-
function
|
|
2069
|
-
return new
|
|
2068
|
+
function ii(e) {
|
|
2069
|
+
return new ri(e.concurrencyLimit);
|
|
2070
2070
|
}
|
|
2071
2071
|
//#endregion
|
|
2072
2072
|
//#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
|
|
2073
|
-
function
|
|
2073
|
+
function ai(e) {
|
|
2074
2074
|
return Object.prototype.hasOwnProperty.call(e, "partialSuccess");
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function oi() {
|
|
2077
2077
|
return { handleResponse(e) {
|
|
2078
|
-
e != null &&
|
|
2078
|
+
e != null && ai(e) && e.partialSuccess != null && Object.keys(e.partialSuccess).length !== 0 && T.warn("Received Partial Success response:", JSON.stringify(e.partialSuccess));
|
|
2079
2079
|
} };
|
|
2080
2080
|
}
|
|
2081
2081
|
//#endregion
|
|
2082
2082
|
//#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
|
|
2083
|
-
var
|
|
2083
|
+
var si = class {
|
|
2084
2084
|
_metrics;
|
|
2085
2085
|
_diagLogger;
|
|
2086
2086
|
_transport;
|
|
@@ -2089,12 +2089,12 @@ var ai = class {
|
|
|
2089
2089
|
_promiseQueue;
|
|
2090
2090
|
_timeout;
|
|
2091
2091
|
constructor(e, t, n, r, i, a) {
|
|
2092
|
-
this._transport = e, this._serializer = t, this._responseHandler = n, this._promiseQueue = r, this._timeout = a, this._diagLogger =
|
|
2092
|
+
this._transport = e, this._serializer = t, this._responseHandler = n, this._promiseQueue = r, this._timeout = a, this._diagLogger = T.createComponentLogger({ namespace: "OTLPExportDelegate" }), this._metrics = i;
|
|
2093
2093
|
}
|
|
2094
2094
|
export(e, t) {
|
|
2095
2095
|
if (this._diagLogger.debug("items to be sent", e), this._promiseQueue.hasReachedLimit()) {
|
|
2096
2096
|
t({
|
|
2097
|
-
code:
|
|
2097
|
+
code: F.FAILED,
|
|
2098
2098
|
error: /* @__PURE__ */ Error("Concurrent export limit reached")
|
|
2099
2099
|
});
|
|
2100
2100
|
return;
|
|
@@ -2102,7 +2102,7 @@ var ai = class {
|
|
|
2102
2102
|
let n = this._serializer.serializeRequest(e);
|
|
2103
2103
|
if (n == null) {
|
|
2104
2104
|
t({
|
|
2105
|
-
code:
|
|
2105
|
+
code: F.FAILED,
|
|
2106
2106
|
error: /* @__PURE__ */ Error("Nothing to send")
|
|
2107
2107
|
});
|
|
2108
2108
|
return;
|
|
@@ -2115,20 +2115,20 @@ var ai = class {
|
|
|
2115
2115
|
} catch (t) {
|
|
2116
2116
|
this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?", t, e.data);
|
|
2117
2117
|
}
|
|
2118
|
-
t({ code:
|
|
2118
|
+
t({ code: F.SUCCESS });
|
|
2119
2119
|
} else e.status === "failure" && e.error ? (r(e.error), t({
|
|
2120
|
-
code:
|
|
2120
|
+
code: F.FAILED,
|
|
2121
2121
|
error: e.error
|
|
2122
2122
|
})) : e.status === "retryable" ? (r("export_max_retries"), t({
|
|
2123
|
-
code:
|
|
2124
|
-
error: e.error ?? new
|
|
2123
|
+
code: F.FAILED,
|
|
2124
|
+
error: e.error ?? new Qr("Export failed with retryable status")
|
|
2125
2125
|
})) : (r("export_failed"), t({
|
|
2126
|
-
code:
|
|
2127
|
-
error: new
|
|
2126
|
+
code: F.FAILED,
|
|
2127
|
+
error: new Qr("Export failed with unknown error")
|
|
2128
2128
|
}));
|
|
2129
2129
|
}, (e) => {
|
|
2130
2130
|
r(e), t({
|
|
2131
|
-
code:
|
|
2131
|
+
code: F.FAILED,
|
|
2132
2132
|
error: e
|
|
2133
2133
|
});
|
|
2134
2134
|
}));
|
|
@@ -2143,22 +2143,22 @@ var ai = class {
|
|
|
2143
2143
|
this._diagLogger.debug("shutdown started"), await this.forceFlush(), this._transport.shutdown();
|
|
2144
2144
|
}
|
|
2145
2145
|
};
|
|
2146
|
-
function
|
|
2147
|
-
return new
|
|
2146
|
+
function ci(e, t) {
|
|
2147
|
+
return new si(e.transport, e.serializer, oi(), e.promiseHandler, e.metrics, t.timeout);
|
|
2148
2148
|
}
|
|
2149
2149
|
//#endregion
|
|
2150
2150
|
//#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
|
|
2151
|
-
function
|
|
2152
|
-
return
|
|
2151
|
+
function li(e, t, n, r) {
|
|
2152
|
+
return ci({
|
|
2153
2153
|
transport: r,
|
|
2154
2154
|
serializer: t,
|
|
2155
|
-
promiseHandler:
|
|
2155
|
+
promiseHandler: ii(e),
|
|
2156
2156
|
metrics: n
|
|
2157
2157
|
}, { timeout: e.timeoutMillis });
|
|
2158
2158
|
}
|
|
2159
2159
|
//#endregion
|
|
2160
2160
|
//#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
|
|
2161
|
-
var
|
|
2161
|
+
var ui = "http.response.status_code", di = "otel.component.name", fi = "otel.component.type", pi = "server.address", mi = "server.port", hi = "error.type", gi = "0.222.0", _i = /* @__PURE__ */ new Map(), vi = class {
|
|
2162
2162
|
inflight;
|
|
2163
2163
|
exported;
|
|
2164
2164
|
duration;
|
|
@@ -2168,18 +2168,18 @@ var ci = "http.response.status_code", li = "otel.component.name", ui = "otel.com
|
|
|
2168
2168
|
constructor(e) {
|
|
2169
2169
|
let { componentType: t, metricsHelper: n, meterProvider: r, url: i, responseAttributesFromError: a } = e;
|
|
2170
2170
|
this.responseAttributesFromError = a;
|
|
2171
|
-
let o = r ? r.getMeter("@opentelemetry/otlp-exporter",
|
|
2172
|
-
if (
|
|
2173
|
-
[
|
|
2174
|
-
[
|
|
2171
|
+
let o = r ? r.getMeter("@opentelemetry/otlp-exporter", gi) : ke(), s = _i.get(t) ?? 0;
|
|
2172
|
+
if (_i.set(t, s + 1), this.standardAttrs = {
|
|
2173
|
+
[fi]: t,
|
|
2174
|
+
[di]: `${t}/${s}`
|
|
2175
2175
|
}, i) {
|
|
2176
2176
|
let e = i;
|
|
2177
2177
|
i.includes("://") || (e = `http://${i}`);
|
|
2178
2178
|
try {
|
|
2179
2179
|
let t = new URL(e);
|
|
2180
|
-
this.standardAttrs[
|
|
2180
|
+
this.standardAttrs[pi] = t.hostname;
|
|
2181
2181
|
let n;
|
|
2182
|
-
t.port ? n = Number(t.port) : t.protocol === "http:" ? n = 80 : t.protocol === "https:" && (n = 443), typeof n == "number" && (this.standardAttrs[
|
|
2182
|
+
t.port ? n = Number(t.port) : t.protocol === "http:" ? n = 80 : t.protocol === "https:" && (n = 443), typeof n == "number" && (this.standardAttrs[mi] = n);
|
|
2183
2183
|
} catch {}
|
|
2184
2184
|
}
|
|
2185
2185
|
this.helper = n, this.inflight = o.createUpDownCounter(`otel.sdk.exporter.${this.helper.name}.inflight`, {
|
|
@@ -2195,39 +2195,39 @@ var ci = "http.response.status_code", li = "otel.component.name", ui = "otel.com
|
|
|
2195
2195
|
});
|
|
2196
2196
|
}
|
|
2197
2197
|
startExport(e) {
|
|
2198
|
-
let t = this.helper.countItems(e), n =
|
|
2198
|
+
let t = this.helper.countItems(e), n = M();
|
|
2199
2199
|
return this.inflight.add(t, this.standardAttrs), (e) => {
|
|
2200
|
-
let r =
|
|
2200
|
+
let r = M();
|
|
2201
2201
|
this.inflight.add(-t, this.standardAttrs);
|
|
2202
2202
|
let i = e ? {
|
|
2203
2203
|
...this.standardAttrs,
|
|
2204
|
-
[
|
|
2204
|
+
[hi]: e instanceof Error ? e.name : "export_failed"
|
|
2205
2205
|
} : this.standardAttrs;
|
|
2206
2206
|
this.exported.add(t, i);
|
|
2207
2207
|
let a = {
|
|
2208
2208
|
...i,
|
|
2209
2209
|
...this.responseAttributesFromError(e)
|
|
2210
|
-
}, o =
|
|
2210
|
+
}, o = Ht(Vt(n, r)) / 1e3;
|
|
2211
2211
|
this.duration.record(o, a);
|
|
2212
2212
|
};
|
|
2213
2213
|
}
|
|
2214
|
-
},
|
|
2214
|
+
}, yi = {
|
|
2215
2215
|
name: "span",
|
|
2216
2216
|
countItems: (e) => e.length
|
|
2217
|
-
},
|
|
2217
|
+
}, bi = class {
|
|
2218
2218
|
emit(e) {}
|
|
2219
2219
|
enabled() {
|
|
2220
2220
|
return !1;
|
|
2221
2221
|
}
|
|
2222
|
-
},
|
|
2223
|
-
function
|
|
2222
|
+
}, xi = new bi(), Si = Symbol.for("io.opentelemetry.js.api.logs"), q = globalThis;
|
|
2223
|
+
function Ci(e, t, n) {
|
|
2224
2224
|
return (r) => r === e ? t : n;
|
|
2225
2225
|
}
|
|
2226
|
-
var
|
|
2226
|
+
var wi = new class {
|
|
2227
2227
|
getLogger(e, t, n) {
|
|
2228
|
-
return new
|
|
2228
|
+
return new bi();
|
|
2229
2229
|
}
|
|
2230
|
-
}(),
|
|
2230
|
+
}(), Ti = class {
|
|
2231
2231
|
constructor(e, t, n, r) {
|
|
2232
2232
|
this._provider = e, this.name = t, this.version = n, this.options = r;
|
|
2233
2233
|
}
|
|
@@ -2240,14 +2240,14 @@ var Si = new class {
|
|
|
2240
2240
|
_getLogger() {
|
|
2241
2241
|
if (this._delegate) return this._delegate;
|
|
2242
2242
|
let e = this._provider._getDelegateLogger(this.name, this.version, this.options);
|
|
2243
|
-
return e ? (this._delegate = e, this._delegate) :
|
|
2243
|
+
return e ? (this._delegate = e, this._delegate) : xi;
|
|
2244
2244
|
}
|
|
2245
|
-
},
|
|
2245
|
+
}, Ei = class {
|
|
2246
2246
|
getLogger(e, t, n) {
|
|
2247
|
-
return this._getDelegateLogger(e, t, n) ?? new
|
|
2247
|
+
return this._getDelegateLogger(e, t, n) ?? new Ti(this, e, t, n);
|
|
2248
2248
|
}
|
|
2249
2249
|
_getDelegate() {
|
|
2250
|
-
return this._delegate ??
|
|
2250
|
+
return this._delegate ?? wi;
|
|
2251
2251
|
}
|
|
2252
2252
|
_setDelegate(e) {
|
|
2253
2253
|
this._delegate = e;
|
|
@@ -2255,52 +2255,52 @@ var Si = new class {
|
|
|
2255
2255
|
_getDelegateLogger(e, t, n) {
|
|
2256
2256
|
return this._delegate?.getLogger(e, t, n);
|
|
2257
2257
|
}
|
|
2258
|
-
},
|
|
2258
|
+
}, Di = class e {
|
|
2259
2259
|
constructor() {
|
|
2260
|
-
this._proxyLoggerProvider = new
|
|
2260
|
+
this._proxyLoggerProvider = new Ei();
|
|
2261
2261
|
}
|
|
2262
2262
|
static getInstance() {
|
|
2263
2263
|
return this._instance ||= new e(), this._instance;
|
|
2264
2264
|
}
|
|
2265
2265
|
setGlobalLoggerProvider(e) {
|
|
2266
|
-
return
|
|
2266
|
+
return q[Si] ? this.getLoggerProvider() : (q[Si] = Ci(1, e, wi), this._proxyLoggerProvider._setDelegate(e), e);
|
|
2267
2267
|
}
|
|
2268
2268
|
getLoggerProvider() {
|
|
2269
|
-
return
|
|
2269
|
+
return q[Si]?.call(q, 1) ?? this._proxyLoggerProvider;
|
|
2270
2270
|
}
|
|
2271
2271
|
getLogger(e, t, n) {
|
|
2272
2272
|
return this.getLoggerProvider().getLogger(e, t, n);
|
|
2273
2273
|
}
|
|
2274
2274
|
disable() {
|
|
2275
|
-
delete
|
|
2275
|
+
delete q[Si], this._proxyLoggerProvider = new Ei();
|
|
2276
2276
|
}
|
|
2277
2277
|
}.getInstance();
|
|
2278
2278
|
//#endregion
|
|
2279
2279
|
//#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
|
|
2280
|
-
function
|
|
2280
|
+
function Oi(e, t) {
|
|
2281
2281
|
let n = {
|
|
2282
|
-
attributes:
|
|
2282
|
+
attributes: J(e.attributes, t),
|
|
2283
2283
|
droppedAttributesCount: 0
|
|
2284
2284
|
}, r = e.schemaUrl;
|
|
2285
2285
|
return r && r !== "" && (n.schemaUrl = r), n;
|
|
2286
2286
|
}
|
|
2287
|
-
function
|
|
2287
|
+
function ki(e, t) {
|
|
2288
2288
|
let n = {
|
|
2289
2289
|
name: e.name,
|
|
2290
2290
|
version: e.version
|
|
2291
2291
|
};
|
|
2292
|
-
return e.attributes && Object.keys(e.attributes).length > 0 && (n.attributes =
|
|
2292
|
+
return e.attributes && Object.keys(e.attributes).length > 0 && (n.attributes = J(e.attributes, t), n.droppedAttributesCount = e.droppedAttributesCount ?? 0), n;
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return Object.keys(e).map((n) =>
|
|
2294
|
+
function J(e, t) {
|
|
2295
|
+
return Object.keys(e).map((n) => Ai(n, e[n], t));
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function Ai(e, t, n) {
|
|
2298
2298
|
return {
|
|
2299
2299
|
key: e,
|
|
2300
|
-
value:
|
|
2300
|
+
value: ji(t, n)
|
|
2301
2301
|
};
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2303
|
+
function ji(e, t) {
|
|
2304
2304
|
let n = typeof e;
|
|
2305
2305
|
if (n === "string") return { stringValue: e };
|
|
2306
2306
|
if (n === "number") return Number.isInteger(e) ? { intValue: e } : { doubleValue: e };
|
|
@@ -2308,14 +2308,14 @@ function ki(e, t) {
|
|
|
2308
2308
|
if (e instanceof Uint8Array) return { bytesValue: t.encodeUint8Array(e) };
|
|
2309
2309
|
if (Array.isArray(e)) {
|
|
2310
2310
|
let n = Array(e.length);
|
|
2311
|
-
for (let r = 0; r < e.length; r++) n[r] =
|
|
2311
|
+
for (let r = 0; r < e.length; r++) n[r] = ji(e[r], t);
|
|
2312
2312
|
return { arrayValue: { values: n } };
|
|
2313
2313
|
}
|
|
2314
2314
|
if (n === "object" && e != null) {
|
|
2315
2315
|
let n = Object.keys(e), r = Array(n.length);
|
|
2316
2316
|
for (let i = 0; i < n.length; i++) r[i] = {
|
|
2317
2317
|
key: n[i],
|
|
2318
|
-
value:
|
|
2318
|
+
value: ji(e[n[i]], t)
|
|
2319
2319
|
};
|
|
2320
2320
|
return { kvlistValue: { values: r } };
|
|
2321
2321
|
}
|
|
@@ -2323,33 +2323,33 @@ function ki(e, t) {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
//#endregion
|
|
2325
2325
|
//#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
|
|
2326
|
-
function
|
|
2326
|
+
function Mi(e) {
|
|
2327
2327
|
let t = BigInt(1e9);
|
|
2328
2328
|
return BigInt(Math.trunc(e[0])) * t + BigInt(Math.trunc(e[1]));
|
|
2329
2329
|
}
|
|
2330
|
-
function ji(e) {
|
|
2331
|
-
return Ai(e).toString();
|
|
2332
|
-
}
|
|
2333
|
-
var Mi = typeof BigInt < "u" ? ji : I;
|
|
2334
2330
|
function Ni(e) {
|
|
2331
|
+
return Mi(e).toString();
|
|
2332
|
+
}
|
|
2333
|
+
var Pi = typeof BigInt < "u" ? Ni : P;
|
|
2334
|
+
function Fi(e) {
|
|
2335
2335
|
return e;
|
|
2336
2336
|
}
|
|
2337
|
-
var
|
|
2338
|
-
encodeHrTime:
|
|
2339
|
-
encodeSpanContext:
|
|
2340
|
-
encodeOptionalSpanContext:
|
|
2337
|
+
var Ii = {
|
|
2338
|
+
encodeHrTime: Pi,
|
|
2339
|
+
encodeSpanContext: Fi,
|
|
2340
|
+
encodeOptionalSpanContext: Fi,
|
|
2341
2341
|
encodeUint8Array: (e) => {
|
|
2342
2342
|
if (typeof Buffer < "u") return Buffer.from(e).toString("base64");
|
|
2343
2343
|
let t = Array(e.length);
|
|
2344
2344
|
for (let n = 0; n < e.length; n++) t[n] = String.fromCharCode(e[n]);
|
|
2345
2345
|
return btoa(t.join(""));
|
|
2346
2346
|
}
|
|
2347
|
-
},
|
|
2348
|
-
function
|
|
2349
|
-
let n = e & 255 |
|
|
2350
|
-
return t && (n |=
|
|
2347
|
+
}, Li = 256, Ri = 512;
|
|
2348
|
+
function zi(e, t) {
|
|
2349
|
+
let n = e & 255 | Li;
|
|
2350
|
+
return t && (n |= Ri), n;
|
|
2351
2351
|
}
|
|
2352
|
-
function
|
|
2352
|
+
function Bi(e, t) {
|
|
2353
2353
|
let n = e.spanContext(), r = e.status, i = e.parentSpanContext?.spanId ? t.encodeSpanContext(e.parentSpanContext?.spanId) : void 0;
|
|
2354
2354
|
return {
|
|
2355
2355
|
traceId: t.encodeSpanContext(n.traceId),
|
|
@@ -2360,41 +2360,41 @@ function Ri(e, t) {
|
|
|
2360
2360
|
kind: e.kind == null ? 0 : e.kind + 1,
|
|
2361
2361
|
startTimeUnixNano: t.encodeHrTime(e.startTime),
|
|
2362
2362
|
endTimeUnixNano: t.encodeHrTime(e.endTime),
|
|
2363
|
-
attributes:
|
|
2363
|
+
attributes: J(e.attributes, t),
|
|
2364
2364
|
droppedAttributesCount: e.droppedAttributesCount,
|
|
2365
|
-
events: e.events.map((e) =>
|
|
2365
|
+
events: e.events.map((e) => Hi(e, t)),
|
|
2366
2366
|
droppedEventsCount: e.droppedEventsCount,
|
|
2367
2367
|
status: {
|
|
2368
2368
|
code: r.code,
|
|
2369
2369
|
message: r.message
|
|
2370
2370
|
},
|
|
2371
|
-
links: e.links.map((e) =>
|
|
2371
|
+
links: e.links.map((e) => Vi(e, t)),
|
|
2372
2372
|
droppedLinksCount: e.droppedLinksCount,
|
|
2373
|
-
flags:
|
|
2373
|
+
flags: zi(n.traceFlags, e.parentSpanContext?.isRemote)
|
|
2374
2374
|
};
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2376
|
+
function Vi(e, t) {
|
|
2377
2377
|
return {
|
|
2378
|
-
attributes: e.attributes ?
|
|
2378
|
+
attributes: e.attributes ? J(e.attributes, t) : [],
|
|
2379
2379
|
spanId: t.encodeSpanContext(e.context.spanId),
|
|
2380
2380
|
traceId: t.encodeSpanContext(e.context.traceId),
|
|
2381
2381
|
traceState: e.context.traceState?.serialize(),
|
|
2382
2382
|
droppedAttributesCount: e.droppedAttributesCount || 0,
|
|
2383
|
-
flags:
|
|
2383
|
+
flags: zi(e.context.traceFlags, e.context.isRemote)
|
|
2384
2384
|
};
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function Hi(e, t) {
|
|
2387
2387
|
return {
|
|
2388
|
-
attributes: e.attributes ?
|
|
2388
|
+
attributes: e.attributes ? J(e.attributes, t) : [],
|
|
2389
2389
|
name: e.name,
|
|
2390
2390
|
timeUnixNano: t.encodeHrTime(e.time),
|
|
2391
2391
|
droppedAttributesCount: e.droppedAttributesCount || 0
|
|
2392
2392
|
};
|
|
2393
2393
|
}
|
|
2394
|
-
function
|
|
2395
|
-
return { resourceSpans:
|
|
2394
|
+
function Ui(e, t) {
|
|
2395
|
+
return { resourceSpans: Gi(e, t) };
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function Wi(e) {
|
|
2398
2398
|
let t = /* @__PURE__ */ new Map();
|
|
2399
2399
|
for (let n of e) {
|
|
2400
2400
|
let e = t.get(n.resource);
|
|
@@ -2404,23 +2404,23 @@ function Hi(e) {
|
|
|
2404
2404
|
}
|
|
2405
2405
|
return t;
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2408
|
-
let n =
|
|
2407
|
+
function Gi(e, t) {
|
|
2408
|
+
let n = Wi(e), r = [], i = n.entries(), a = i.next();
|
|
2409
2409
|
for (; !a.done;) {
|
|
2410
2410
|
let [e, n] = a.value, o = [], s = n.values(), c = s.next();
|
|
2411
2411
|
for (; !c.done;) {
|
|
2412
2412
|
let e = c.value;
|
|
2413
2413
|
if (e.length > 0) {
|
|
2414
|
-
let n = e.map((e) =>
|
|
2414
|
+
let n = e.map((e) => Bi(e, t));
|
|
2415
2415
|
o.push({
|
|
2416
|
-
scope:
|
|
2416
|
+
scope: ki(e[0].instrumentationScope, t),
|
|
2417
2417
|
spans: n,
|
|
2418
2418
|
schemaUrl: e[0].instrumentationScope.schemaUrl
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
2421
|
c = s.next();
|
|
2422
2422
|
}
|
|
2423
|
-
let l =
|
|
2423
|
+
let l = Oi(e, t), u = {
|
|
2424
2424
|
resource: l,
|
|
2425
2425
|
scopeSpans: o,
|
|
2426
2426
|
schemaUrl: l.schemaUrl
|
|
@@ -2431,9 +2431,9 @@ function Ui(e, t) {
|
|
|
2431
2431
|
}
|
|
2432
2432
|
//#endregion
|
|
2433
2433
|
//#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
|
|
2434
|
-
var
|
|
2434
|
+
var Ki = {
|
|
2435
2435
|
serializeRequest: (e) => {
|
|
2436
|
-
let t =
|
|
2436
|
+
let t = Ui(e, Ii);
|
|
2437
2437
|
return new TextEncoder().encode(JSON.stringify(t));
|
|
2438
2438
|
},
|
|
2439
2439
|
deserializeResponse: (e) => {
|
|
@@ -2442,14 +2442,14 @@ var Wi = {
|
|
|
2442
2442
|
try {
|
|
2443
2443
|
return JSON.parse(t.decode(e));
|
|
2444
2444
|
} catch (e) {
|
|
2445
|
-
return
|
|
2445
|
+
return T.warn(`Failed to parse trace export response: ${e.message}. Returning empty response`), {};
|
|
2446
2446
|
}
|
|
2447
2447
|
}
|
|
2448
|
-
},
|
|
2449
|
-
function
|
|
2450
|
-
return 2 *
|
|
2448
|
+
}, qi = 5, Ji = 1e3, Yi = 5e3, Xi = 1.5, Zi = .2;
|
|
2449
|
+
function Qi() {
|
|
2450
|
+
return 2 * Zi * Math.random() - Zi;
|
|
2451
2451
|
}
|
|
2452
|
-
var
|
|
2452
|
+
var $i = class {
|
|
2453
2453
|
_transport;
|
|
2454
2454
|
constructor(e) {
|
|
2455
2455
|
this._transport = e;
|
|
@@ -2462,30 +2462,30 @@ var Zi = class {
|
|
|
2462
2462
|
});
|
|
2463
2463
|
}
|
|
2464
2464
|
async send(e, t) {
|
|
2465
|
-
let n =
|
|
2465
|
+
let n = qi, r = Ji, i = Date.now() + t, a = await this._transport.send(e, t);
|
|
2466
2466
|
for (; a.status === "retryable" && n > 0;) {
|
|
2467
2467
|
n--;
|
|
2468
|
-
let t = Math.max(Math.min(r * (1 +
|
|
2469
|
-
r *=
|
|
2468
|
+
let t = Math.max(Math.min(r * (1 + Qi()), Yi), 0);
|
|
2469
|
+
r *= Xi;
|
|
2470
2470
|
let o = a.retryInMillis ?? t, s = i - Date.now();
|
|
2471
|
-
if (o > s) return
|
|
2472
|
-
|
|
2471
|
+
if (o > s) return T.info(`Export retry time ${Math.round(o)}ms exceeds remaining timeout ${Math.round(s)}ms, not retrying further.`), a;
|
|
2472
|
+
T.verbose(`Scheduling export retry in ${Math.round(o)}ms`), a = await this.retry(e, s, o);
|
|
2473
2473
|
}
|
|
2474
|
-
return a.status === "success" ?
|
|
2474
|
+
return a.status === "success" ? T.verbose(`Export succeeded after ${qi - n} retry attempts.`) : a.status === "retryable" ? T.info(`Export failed after maximum retry attempts (${qi}).`) : T.info(`Export failed with non-retryable error: ${a.error}`), a;
|
|
2475
2475
|
}
|
|
2476
2476
|
shutdown() {
|
|
2477
2477
|
return this._transport.shutdown();
|
|
2478
2478
|
}
|
|
2479
2479
|
};
|
|
2480
|
-
function
|
|
2481
|
-
return new
|
|
2480
|
+
function ea(e) {
|
|
2481
|
+
return new $i(e.transport);
|
|
2482
2482
|
}
|
|
2483
2483
|
//#endregion
|
|
2484
2484
|
//#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
|
|
2485
|
-
function
|
|
2485
|
+
function ta(e) {
|
|
2486
2486
|
return e === 429 || e === 502 || e === 503 || e === 504;
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function na(e) {
|
|
2489
2489
|
if (e == null) return;
|
|
2490
2490
|
let t = Number.parseInt(e, 10);
|
|
2491
2491
|
if (Number.isInteger(t)) return t > 0 ? t * 1e3 : -1;
|
|
@@ -2494,7 +2494,7 @@ function ea(e) {
|
|
|
2494
2494
|
}
|
|
2495
2495
|
//#endregion
|
|
2496
2496
|
//#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
|
|
2497
|
-
var
|
|
2497
|
+
var ra = 61440, ia = 9, aa = 0, oa = 0, sa = class {
|
|
2498
2498
|
_parameters;
|
|
2499
2499
|
constructor(e) {
|
|
2500
2500
|
this._parameters = e;
|
|
@@ -2502,11 +2502,11 @@ var ta = 61440, na = 9, ra = 0, ia = 0, aa = class {
|
|
|
2502
2502
|
async send(e, t) {
|
|
2503
2503
|
let n = new AbortController(), r = setTimeout(() => n.abort(), t), i = globalThis.fetch;
|
|
2504
2504
|
typeof i.__original == "function" && (i = i.__original);
|
|
2505
|
-
let a = e.byteLength, o =
|
|
2506
|
-
if (s)
|
|
2505
|
+
let a = e.byteLength, o = aa + a > ra, s = !o && !(oa >= ia);
|
|
2506
|
+
if (s) aa += a, oa++;
|
|
2507
2507
|
else {
|
|
2508
2508
|
let e = o ? "size limit" : "count limit";
|
|
2509
|
-
|
|
2509
|
+
T.debug(`keepalive disabled: ${(a / 1024).toFixed(1)}KB payload, ${oa} pending (${e})`);
|
|
2510
2510
|
}
|
|
2511
2511
|
try {
|
|
2512
2512
|
let t = new URL(this._parameters.url), r = await i(t.href, {
|
|
@@ -2517,55 +2517,55 @@ var ta = 61440, na = 9, ra = 0, ia = 0, aa = class {
|
|
|
2517
2517
|
keepalive: s,
|
|
2518
2518
|
mode: globalThis.location ? globalThis.location.origin === t.origin ? "same-origin" : "cors" : "no-cors"
|
|
2519
2519
|
});
|
|
2520
|
-
return r.status >= 200 && r.status <= 299 ? (
|
|
2520
|
+
return r.status >= 200 && r.status <= 299 ? (T.debug(`export response success (status: ${r.status})`), { status: "success" }) : ta(r.status) ? (T.warn(`export response retryable (status: ${r.status})`), {
|
|
2521
2521
|
status: "retryable",
|
|
2522
|
-
retryInMillis:
|
|
2523
|
-
}) : (
|
|
2522
|
+
retryInMillis: na(r.headers.get("Retry-After"))
|
|
2523
|
+
}) : (T.error(`export response failure (status: ${r.status})`), {
|
|
2524
2524
|
status: "failure",
|
|
2525
2525
|
error: /* @__PURE__ */ Error(`Fetch request failed with non-retryable status ${r.status}`)
|
|
2526
2526
|
});
|
|
2527
2527
|
} catch (e) {
|
|
2528
|
-
return
|
|
2528
|
+
return la(e) ? (T.warn(`export request retryable (network error: ${e})`), {
|
|
2529
2529
|
status: "retryable",
|
|
2530
2530
|
error: Error("Fetch request encountered a network error", { cause: e })
|
|
2531
|
-
}) : (
|
|
2531
|
+
}) : (T.error(`export request failure (error: ${e})`), {
|
|
2532
2532
|
status: "failure",
|
|
2533
2533
|
error: Error("Fetch request errored", { cause: e })
|
|
2534
2534
|
});
|
|
2535
2535
|
} finally {
|
|
2536
|
-
clearTimeout(r), s && (
|
|
2536
|
+
clearTimeout(r), s && (aa -= a, oa--);
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
shutdown() {}
|
|
2540
2540
|
};
|
|
2541
|
-
function
|
|
2542
|
-
return new
|
|
2541
|
+
function ca(e) {
|
|
2542
|
+
return new sa(e);
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function la(e) {
|
|
2545
2545
|
return e instanceof TypeError && !e.cause;
|
|
2546
2546
|
}
|
|
2547
2547
|
//#endregion
|
|
2548
2548
|
//#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
|
|
2549
|
-
function
|
|
2550
|
-
return
|
|
2549
|
+
function ua(e, t, n) {
|
|
2550
|
+
return li(e, t, n, ea({ transport: ca(e) }));
|
|
2551
2551
|
}
|
|
2552
2552
|
//#endregion
|
|
2553
2553
|
//#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
|
|
2554
|
-
function
|
|
2554
|
+
function da(e) {
|
|
2555
2555
|
let t = {};
|
|
2556
2556
|
return Object.entries(e ?? {}).forEach(([e, n]) => {
|
|
2557
|
-
n === void 0 ?
|
|
2557
|
+
n === void 0 ? T.warn(`Header "${e}" has invalid value (${n}) and will be ignored`) : t[e] = String(n);
|
|
2558
2558
|
}), t;
|
|
2559
2559
|
}
|
|
2560
2560
|
//#endregion
|
|
2561
2561
|
//#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
|
|
2562
|
-
function
|
|
2562
|
+
function fa(e, t, n) {
|
|
2563
2563
|
return async () => {
|
|
2564
2564
|
let r = { ...await n() }, i = {};
|
|
2565
|
-
return t != null && Object.assign(i, await t()), e != null && Object.assign(i,
|
|
2565
|
+
return t != null && Object.assign(i, await t()), e != null && Object.assign(i, da(await e())), Object.assign(i, r);
|
|
2566
2566
|
};
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function pa(e) {
|
|
2569
2569
|
if (e != null) try {
|
|
2570
2570
|
let t = globalThis.location?.href;
|
|
2571
2571
|
return new URL(e, t).href;
|
|
@@ -2573,66 +2573,66 @@ function da(e) {
|
|
|
2573
2573
|
throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`);
|
|
2574
2574
|
}
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function ma(e, t, n) {
|
|
2577
2577
|
return {
|
|
2578
|
-
|
|
2579
|
-
headers:
|
|
2580
|
-
url:
|
|
2578
|
+
...ti(e, t, n),
|
|
2579
|
+
headers: fa(e.headers, t.headers, n.headers),
|
|
2580
|
+
url: pa(e.url) ?? t.url ?? n.url
|
|
2581
2581
|
};
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function ha(e, t) {
|
|
2584
2584
|
return {
|
|
2585
|
-
...
|
|
2585
|
+
...ni(),
|
|
2586
2586
|
headers: async () => e,
|
|
2587
2587
|
url: "http://localhost:4318/" + t
|
|
2588
2588
|
};
|
|
2589
2589
|
}
|
|
2590
2590
|
//#endregion
|
|
2591
2591
|
//#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
|
|
2592
|
-
function
|
|
2593
|
-
return typeof e.headers == "function" ? e.headers :
|
|
2592
|
+
function ga(e) {
|
|
2593
|
+
return typeof e.headers == "function" ? e.headers : ei(e.headers);
|
|
2594
2594
|
}
|
|
2595
2595
|
//#endregion
|
|
2596
2596
|
//#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
|
|
2597
|
-
function
|
|
2598
|
-
return
|
|
2597
|
+
function _a(e, t, n) {
|
|
2598
|
+
return ma({
|
|
2599
2599
|
url: e.url,
|
|
2600
2600
|
timeoutMillis: e.timeoutMillis,
|
|
2601
|
-
headers:
|
|
2601
|
+
headers: ga(e),
|
|
2602
2602
|
concurrencyLimit: e.concurrencyLimit
|
|
2603
|
-
}, {},
|
|
2603
|
+
}, {}, ha(n, t));
|
|
2604
2604
|
}
|
|
2605
2605
|
//#endregion
|
|
2606
2606
|
//#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
|
|
2607
|
-
function
|
|
2608
|
-
return new
|
|
2607
|
+
function va(e, t, n, r) {
|
|
2608
|
+
return new vi({
|
|
2609
2609
|
componentType: e,
|
|
2610
2610
|
metricsHelper: t,
|
|
2611
2611
|
url: n,
|
|
2612
2612
|
meterProvider: r,
|
|
2613
2613
|
responseAttributesFromError: (e) => {
|
|
2614
|
-
if (!e) return { [
|
|
2614
|
+
if (!e) return { [ui]: 200 };
|
|
2615
2615
|
if (!(e instanceof Error)) return {};
|
|
2616
2616
|
if (e.message.startsWith("Fetch request failed with non-retryable status ")) {
|
|
2617
2617
|
let t = e.message.substring(47);
|
|
2618
|
-
return { [
|
|
2618
|
+
return { [ui]: Number(t) };
|
|
2619
2619
|
}
|
|
2620
2620
|
return {};
|
|
2621
2621
|
}
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
|
-
function
|
|
2625
|
-
let s =
|
|
2626
|
-
return
|
|
2624
|
+
function ya(e, t, n, r, i, a, o) {
|
|
2625
|
+
let s = _a(e, a, o);
|
|
2626
|
+
return ua(s, t, va(n, r, s.url, e.selfObsMeterProvider));
|
|
2627
2627
|
}
|
|
2628
2628
|
//#endregion
|
|
2629
2629
|
//#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
|
|
2630
|
-
var
|
|
2630
|
+
var ba = "otlp_http_span_exporter", xa = class extends Zr {
|
|
2631
2631
|
constructor(e = {}) {
|
|
2632
|
-
super(
|
|
2632
|
+
super(ya(e, Ki, ba, yi, e.selfObsMeterProvider, "v1/traces", { "Content-Type": "application/json" }));
|
|
2633
2633
|
}
|
|
2634
|
-
},
|
|
2635
|
-
function
|
|
2634
|
+
}, Y = console.error.bind(console);
|
|
2635
|
+
function X(e, t, n) {
|
|
2636
2636
|
let r = !!e[t] && Object.prototype.propertyIsEnumerable.call(e, t);
|
|
2637
2637
|
Object.defineProperty(e, t, {
|
|
2638
2638
|
configurable: !0,
|
|
@@ -2641,58 +2641,58 @@ function Q(e, t, n) {
|
|
|
2641
2641
|
value: n
|
|
2642
2642
|
});
|
|
2643
2643
|
}
|
|
2644
|
-
var
|
|
2644
|
+
var Sa = (e, t, n) => {
|
|
2645
2645
|
if (!e || !e[t]) {
|
|
2646
|
-
|
|
2646
|
+
Y("no original function " + String(t) + " to wrap");
|
|
2647
2647
|
return;
|
|
2648
2648
|
}
|
|
2649
2649
|
if (!n) {
|
|
2650
|
-
|
|
2650
|
+
Y("no wrapper function"), Y((/* @__PURE__ */ Error()).stack);
|
|
2651
2651
|
return;
|
|
2652
2652
|
}
|
|
2653
2653
|
let r = e[t];
|
|
2654
2654
|
if (typeof r != "function" || typeof n != "function") {
|
|
2655
|
-
|
|
2655
|
+
Y("original object and wrapper must be functions");
|
|
2656
2656
|
return;
|
|
2657
2657
|
}
|
|
2658
2658
|
let i = n(r, t);
|
|
2659
|
-
return
|
|
2660
|
-
e[t] === i &&
|
|
2661
|
-
}),
|
|
2662
|
-
},
|
|
2659
|
+
return X(i, "__original", r), X(i, "__unwrap", () => {
|
|
2660
|
+
e[t] === i && X(e, t, r);
|
|
2661
|
+
}), X(i, "__wrapped", !0), X(e, t, i), i;
|
|
2662
|
+
}, Ca = (e, t, n) => {
|
|
2663
2663
|
if (e) Array.isArray(e) || (e = [e]);
|
|
2664
2664
|
else {
|
|
2665
|
-
|
|
2665
|
+
Y("must provide one or more modules to patch"), Y((/* @__PURE__ */ Error()).stack);
|
|
2666
2666
|
return;
|
|
2667
2667
|
}
|
|
2668
2668
|
t && Array.isArray(t) ? e.forEach((e) => {
|
|
2669
2669
|
t.forEach((t) => {
|
|
2670
|
-
|
|
2670
|
+
Sa(e, t, n);
|
|
2671
2671
|
});
|
|
2672
|
-
}) :
|
|
2673
|
-
},
|
|
2672
|
+
}) : Y("must provide one or more functions to wrap on modules");
|
|
2673
|
+
}, wa = (e, t) => {
|
|
2674
2674
|
if (!e || !e[t]) {
|
|
2675
|
-
|
|
2675
|
+
Y("no function to unwrap."), Y((/* @__PURE__ */ Error()).stack);
|
|
2676
2676
|
return;
|
|
2677
2677
|
}
|
|
2678
2678
|
let n = e[t];
|
|
2679
|
-
if (!n.__unwrap)
|
|
2679
|
+
if (!n.__unwrap) Y("no original to unwrap to -- has " + String(t) + " already been unwrapped?");
|
|
2680
2680
|
else {
|
|
2681
2681
|
n.__unwrap();
|
|
2682
2682
|
return;
|
|
2683
2683
|
}
|
|
2684
|
-
},
|
|
2684
|
+
}, Ta = (e, t) => {
|
|
2685
2685
|
if (e) Array.isArray(e) || (e = [e]);
|
|
2686
2686
|
else {
|
|
2687
|
-
|
|
2687
|
+
Y("must provide one or more modules to patch"), Y((/* @__PURE__ */ Error()).stack);
|
|
2688
2688
|
return;
|
|
2689
2689
|
}
|
|
2690
2690
|
t && Array.isArray(t) ? e.forEach((e) => {
|
|
2691
2691
|
t.forEach((t) => {
|
|
2692
|
-
|
|
2692
|
+
wa(e, t);
|
|
2693
2693
|
});
|
|
2694
|
-
}) :
|
|
2695
|
-
},
|
|
2694
|
+
}) : Y("must provide one or more functions to unwrap on modules");
|
|
2695
|
+
}, Ea = class {
|
|
2696
2696
|
_config = {};
|
|
2697
2697
|
_tracer;
|
|
2698
2698
|
_meter;
|
|
@@ -2701,12 +2701,12 @@ var ba = (e, t, n) => {
|
|
|
2701
2701
|
instrumentationName;
|
|
2702
2702
|
instrumentationVersion;
|
|
2703
2703
|
constructor(e, t, n) {
|
|
2704
|
-
this.instrumentationName = e, this.instrumentationVersion = t, this.setConfig(n), this._diag =
|
|
2704
|
+
this.instrumentationName = e, this.instrumentationVersion = t, this.setConfig(n), this._diag = T.createComponentLogger({ namespace: e }), this._tracer = D.getTracer(e, t), this._meter = st.getMeter(e, t), this._logger = Di.getLogger(e, t), this._updateMetricInstruments();
|
|
2705
2705
|
}
|
|
2706
|
-
_wrap =
|
|
2707
|
-
_unwrap =
|
|
2708
|
-
_massWrap =
|
|
2709
|
-
_massUnwrap =
|
|
2706
|
+
_wrap = Sa;
|
|
2707
|
+
_unwrap = wa;
|
|
2708
|
+
_massWrap = Ca;
|
|
2709
|
+
_massUnwrap = Ta;
|
|
2710
2710
|
get meter() {
|
|
2711
2711
|
return this._meter;
|
|
2712
2712
|
}
|
|
@@ -2746,14 +2746,14 @@ var ba = (e, t, n) => {
|
|
|
2746
2746
|
this._diag.error("Error running span customization hook due to exception in handler", { triggerName: t }, e);
|
|
2747
2747
|
}
|
|
2748
2748
|
}
|
|
2749
|
-
},
|
|
2749
|
+
}, Da = class extends Ea {
|
|
2750
2750
|
constructor(e, t, n) {
|
|
2751
2751
|
super(e, t, n), this._config.enabled && this.enable();
|
|
2752
2752
|
}
|
|
2753
2753
|
};
|
|
2754
2754
|
//#endregion
|
|
2755
2755
|
//#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
|
|
2756
|
-
function
|
|
2756
|
+
function Z(e, t, n) {
|
|
2757
2757
|
let r, i;
|
|
2758
2758
|
try {
|
|
2759
2759
|
i = e();
|
|
@@ -2766,24 +2766,24 @@ function Ea(e, t, n) {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
//#endregion
|
|
2768
2768
|
//#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/semconv.js
|
|
2769
|
-
var
|
|
2770
|
-
function
|
|
2769
|
+
var Oa = "http.request.body.size", ka = T.createComponentLogger({ namespace: "@opentelemetry/opentelemetry-instrumentation-fetch/utils" });
|
|
2770
|
+
function Aa(...e) {
|
|
2771
2771
|
if (e[0] instanceof URL || typeof e[0] == "string") {
|
|
2772
2772
|
let t = e[1];
|
|
2773
2773
|
if (!t?.body) return Promise.resolve();
|
|
2774
2774
|
if (t.body instanceof ReadableStream) {
|
|
2775
|
-
let { body: e, length: n } =
|
|
2775
|
+
let { body: e, length: n } = ja(t.body);
|
|
2776
2776
|
return t.body = e, n;
|
|
2777
2777
|
}
|
|
2778
|
-
return Promise.resolve(
|
|
2778
|
+
return Promise.resolve(Na(t.body));
|
|
2779
2779
|
}
|
|
2780
2780
|
{
|
|
2781
2781
|
let t = e[0];
|
|
2782
|
-
return t?.body ? t.clone().text().then((e) =>
|
|
2782
|
+
return t?.body ? t.clone().text().then((e) => Fa(e)) : Promise.resolve();
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
|
-
function
|
|
2786
|
-
if (!e.pipeThrough) return
|
|
2785
|
+
function ja(e) {
|
|
2786
|
+
if (!e.pipeThrough) return ka.warn("Platform has ReadableStream but not pipeThrough!"), {
|
|
2787
2787
|
body: e,
|
|
2788
2788
|
length: Promise.resolve(void 0)
|
|
2789
2789
|
};
|
|
@@ -2804,32 +2804,32 @@ function Aa(e) {
|
|
|
2804
2804
|
length: r
|
|
2805
2805
|
};
|
|
2806
2806
|
}
|
|
2807
|
-
function
|
|
2807
|
+
function Ma(e) {
|
|
2808
2808
|
return typeof Document < "u" && e instanceof Document;
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2811
|
-
if (
|
|
2812
|
-
if (typeof e == "string") return
|
|
2810
|
+
function Na(e) {
|
|
2811
|
+
if (Ma(e)) return new XMLSerializer().serializeToString(document).length;
|
|
2812
|
+
if (typeof e == "string") return Fa(e);
|
|
2813
2813
|
if (e instanceof Blob) return e.size;
|
|
2814
|
-
if (e instanceof FormData) return
|
|
2815
|
-
if (e instanceof URLSearchParams) return
|
|
2814
|
+
if (e instanceof FormData) return Ia(e);
|
|
2815
|
+
if (e instanceof URLSearchParams) return Fa(e.toString());
|
|
2816
2816
|
if (e.byteLength !== void 0) return e.byteLength;
|
|
2817
|
-
|
|
2818
|
-
}
|
|
2819
|
-
var Na = new TextEncoder();
|
|
2820
|
-
function Pa(e) {
|
|
2821
|
-
return Na.encode(e).byteLength;
|
|
2817
|
+
ka.warn("unknown body type");
|
|
2822
2818
|
}
|
|
2819
|
+
var Pa = new TextEncoder();
|
|
2823
2820
|
function Fa(e) {
|
|
2821
|
+
return Pa.encode(e).byteLength;
|
|
2822
|
+
}
|
|
2823
|
+
function Ia(e) {
|
|
2824
2824
|
let t = 0;
|
|
2825
2825
|
for (let [n, r] of e.entries()) t += n.length, r instanceof Blob ? t += r.size : t += r.length;
|
|
2826
2826
|
return t;
|
|
2827
2827
|
}
|
|
2828
|
-
function
|
|
2829
|
-
let t =
|
|
2828
|
+
function La(e) {
|
|
2829
|
+
let t = Ba(), n = e.toUpperCase();
|
|
2830
2830
|
return n in t ? n : "_OTHER";
|
|
2831
2831
|
}
|
|
2832
|
-
var
|
|
2832
|
+
var Ra = {
|
|
2833
2833
|
CONNECT: !0,
|
|
2834
2834
|
DELETE: !0,
|
|
2835
2835
|
GET: !0,
|
|
@@ -2840,61 +2840,61 @@ var La = {
|
|
|
2840
2840
|
PUT: !0,
|
|
2841
2841
|
TRACE: !0,
|
|
2842
2842
|
QUERY: !0
|
|
2843
|
-
},
|
|
2844
|
-
function
|
|
2845
|
-
return
|
|
2843
|
+
}, za;
|
|
2844
|
+
function Ba() {
|
|
2845
|
+
return za === void 0 && (za = Ra), za;
|
|
2846
2846
|
}
|
|
2847
|
-
var
|
|
2847
|
+
var Va = {
|
|
2848
2848
|
"https:": "443",
|
|
2849
2849
|
"http:": "80"
|
|
2850
2850
|
};
|
|
2851
|
-
function
|
|
2852
|
-
let t = Number(e.port ||
|
|
2851
|
+
function Ha(e) {
|
|
2852
|
+
let t = Number(e.port || Va[e.protocol]);
|
|
2853
2853
|
if (t && !isNaN(t)) return t;
|
|
2854
2854
|
}
|
|
2855
2855
|
//#endregion
|
|
2856
2856
|
//#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
|
|
2857
|
-
var
|
|
2857
|
+
var Ua = "0.222.0", Wa = 300, Ga = typeof PerformanceObserver < "u", Ka = class extends Da {
|
|
2858
2858
|
component = "fetch";
|
|
2859
|
-
version =
|
|
2859
|
+
version = Ua;
|
|
2860
2860
|
moduleName = this.component;
|
|
2861
2861
|
_usedResources = /* @__PURE__ */ new WeakSet();
|
|
2862
2862
|
_tasksCount = 0;
|
|
2863
2863
|
constructor(e = {}) {
|
|
2864
|
-
super("@opentelemetry/instrumentation-fetch",
|
|
2864
|
+
super("@opentelemetry/instrumentation-fetch", Ua, e);
|
|
2865
2865
|
}
|
|
2866
2866
|
init() {}
|
|
2867
2867
|
_addChildSpan(e, t) {
|
|
2868
|
-
let n = this.tracer.startSpan("CORS Preflight", { startTime: t[
|
|
2869
|
-
|
|
2868
|
+
let n = this.tracer.startSpan("CORS Preflight", { startTime: t[W.FETCH_START] }, D.setSpan(w.active(), e));
|
|
2869
|
+
Ur(n, t, this.getConfig().ignoreNetworkEvents, void 0, !0), n.end(t[W.RESPONSE_END]);
|
|
2870
2870
|
}
|
|
2871
2871
|
_addFinalSpanAttributes(e, t) {
|
|
2872
|
-
let n =
|
|
2872
|
+
let n = Yr(t.url);
|
|
2873
2873
|
e.setAttribute("http.response.status_code", t.status), e.setAttribute("server.address", n.hostname);
|
|
2874
|
-
let r =
|
|
2874
|
+
let r = Ha(n);
|
|
2875
2875
|
r && e.setAttribute("server.port", r);
|
|
2876
2876
|
}
|
|
2877
2877
|
_addHeaders(e, t) {
|
|
2878
|
-
if (!
|
|
2878
|
+
if (!Xr(t, this.getConfig().propagateTraceHeaderCorsUrls)) {
|
|
2879
2879
|
let e = {};
|
|
2880
|
-
|
|
2881
|
-
} else if (e instanceof Request)
|
|
2880
|
+
E.inject(w.active(), e), Object.keys(e).length > 0 && this._diag.debug("headers inject skipped due to CORS policy");
|
|
2881
|
+
} else if (e instanceof Request) E.inject(w.active(), e.headers, { set: (e, t, n) => e.set(t, typeof n == "string" ? n : String(n)) });
|
|
2882
2882
|
else {
|
|
2883
2883
|
let t = new Headers(e.headers);
|
|
2884
|
-
|
|
2884
|
+
E.inject(w.active(), t, { set: (e, t, n) => e.set(t, typeof n == "string" ? n : String(n)) }), e.headers = t;
|
|
2885
2885
|
}
|
|
2886
2886
|
}
|
|
2887
2887
|
_clearResources() {
|
|
2888
2888
|
this._tasksCount === 0 && this.getConfig().clearTimingResources && (performance.clearResourceTimings(), this._usedResources = /* @__PURE__ */ new WeakSet());
|
|
2889
2889
|
}
|
|
2890
2890
|
_createSpan(e, t = {}) {
|
|
2891
|
-
if (
|
|
2891
|
+
if (Fn(e, this.getConfig().ignoreUrls)) {
|
|
2892
2892
|
this._diag.debug("ignoring span as url matches ignored url");
|
|
2893
2893
|
return;
|
|
2894
2894
|
}
|
|
2895
|
-
let n = {}, r = t.method, i =
|
|
2895
|
+
let n = {}, r = t.method, i = La(t.method || "GET"), a = i;
|
|
2896
2896
|
return n["http.request.method"] = i, i !== r && (n["http.request.method_original"] = r), n[c] = e, this.tracer.startSpan(a, {
|
|
2897
|
-
kind:
|
|
2897
|
+
kind: it.CLIENT,
|
|
2898
2898
|
attributes: n
|
|
2899
2899
|
});
|
|
2900
2900
|
}
|
|
@@ -2904,35 +2904,35 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2904
2904
|
if (!performance.getEntriesByType) return;
|
|
2905
2905
|
r = performance.getEntriesByType("resource");
|
|
2906
2906
|
}
|
|
2907
|
-
let i =
|
|
2907
|
+
let i = Kr(t.spanUrl, t.startTime, n, r, this._usedResources, "fetch");
|
|
2908
2908
|
if (i.mainRequest) {
|
|
2909
2909
|
let t = i.mainRequest;
|
|
2910
2910
|
this._markResourceAsUsed(t);
|
|
2911
2911
|
let n = i.corsPreFlightRequest;
|
|
2912
|
-
n && (this._addChildSpan(e, n), this._markResourceAsUsed(n)),
|
|
2912
|
+
n && (this._addChildSpan(e, n), this._markResourceAsUsed(n)), Ur(e, t, this.getConfig().ignoreNetworkEvents, void 0, !0);
|
|
2913
2913
|
}
|
|
2914
2914
|
}
|
|
2915
2915
|
_markResourceAsUsed(e) {
|
|
2916
2916
|
this._usedResources.add(e);
|
|
2917
2917
|
}
|
|
2918
2918
|
_endSpan(t, n, r) {
|
|
2919
|
-
let i =
|
|
2920
|
-
this._addFinalSpanAttributes(t, r), r.status >= 400 && (t.setStatus({ code:
|
|
2919
|
+
let i = j(Date.now()), a = M();
|
|
2920
|
+
this._addFinalSpanAttributes(t, r), r.status >= 400 && (t.setStatus({ code: C.ERROR }), t.setAttribute(e, String(r.status))), setTimeout(() => {
|
|
2921
2921
|
n.observer?.disconnect(), this._findResourceAndAddNetworkEvents(t, n, a), this._tasksCount--, this._clearResources(), t.end(i);
|
|
2922
|
-
},
|
|
2922
|
+
}, Wa);
|
|
2923
2923
|
}
|
|
2924
2924
|
_patchConstructor() {
|
|
2925
2925
|
return (e) => {
|
|
2926
2926
|
let t = this;
|
|
2927
2927
|
return function(...n) {
|
|
2928
2928
|
if (!t._isEnabled) return e.apply(this, n);
|
|
2929
|
-
let r = this, i =
|
|
2929
|
+
let r = this, i = Yr(n[0] instanceof Request ? n[0].url : String(n[0])).href, a;
|
|
2930
2930
|
a = n[0] instanceof Request ? n[1] == null ? n[0] : new Request(n[0], n[1]) : n[1] || {};
|
|
2931
2931
|
let o = t._createSpan(i, a);
|
|
2932
2932
|
if (!o) return e.apply(this, n);
|
|
2933
2933
|
let s = t._prepareSpanData(i);
|
|
2934
|
-
t.getConfig().measureRequestSize &&
|
|
2935
|
-
e && o.setAttribute(
|
|
2934
|
+
t.getConfig().measureRequestSize && Aa(...n).then((e) => {
|
|
2935
|
+
e && o.setAttribute(Oa, e);
|
|
2936
2936
|
}).catch((e) => {
|
|
2937
2937
|
t._diag.warn("getFetchBodyLength", e);
|
|
2938
2938
|
});
|
|
@@ -2982,24 +2982,24 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
2982
2982
|
}
|
|
2983
2983
|
throw n;
|
|
2984
2984
|
}
|
|
2985
|
-
return
|
|
2985
|
+
return w.with(D.setSpan(w.active(), o), () => (t._callRequestHook(o, a), t._addHeaders(a, i), t._tasksCount++, e.apply(r, a instanceof Request ? [a] : [i, a]).then(u.bind(r, o), ee.bind(r, o))));
|
|
2986
2986
|
};
|
|
2987
2987
|
};
|
|
2988
2988
|
}
|
|
2989
2989
|
_applyAttributesAfterFetch(e, t, n) {
|
|
2990
2990
|
let r = this.getConfig().applyCustomAttributesOnSpan;
|
|
2991
|
-
r &&
|
|
2991
|
+
r && Z(() => r(e, t, n), (e) => {
|
|
2992
2992
|
e && this._diag.error("applyCustomAttributesOnSpan", e);
|
|
2993
2993
|
}, !0);
|
|
2994
2994
|
}
|
|
2995
2995
|
_callRequestHook(e, t) {
|
|
2996
2996
|
let n = this.getConfig().requestHook;
|
|
2997
|
-
n &&
|
|
2997
|
+
n && Z(() => n(e, t), (e) => {
|
|
2998
2998
|
e && this._diag.error("requestHook", e);
|
|
2999
2999
|
}, !0);
|
|
3000
3000
|
}
|
|
3001
3001
|
_prepareSpanData(e) {
|
|
3002
|
-
let t =
|
|
3002
|
+
let t = M(), n = [];
|
|
3003
3003
|
if (typeof PerformanceObserver != "function") return {
|
|
3004
3004
|
entries: n,
|
|
3005
3005
|
startTime: t,
|
|
@@ -3018,7 +3018,7 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
3018
3018
|
};
|
|
3019
3019
|
}
|
|
3020
3020
|
enable() {
|
|
3021
|
-
if (!
|
|
3021
|
+
if (!Ga) this._diag.warn("this instrumentation is intended for web usage only, it does not instrument server-side fetch()");
|
|
3022
3022
|
else if (!this._isEnabled) {
|
|
3023
3023
|
if (this._isFetchPatched) this._diag.debug("fetch constructor already patched"), this._isEnabled = !0;
|
|
3024
3024
|
else try {
|
|
@@ -3029,52 +3029,52 @@ var Ha = "0.222.0", Ua = 300, Wa = typeof PerformanceObserver < "u", Ga = class
|
|
|
3029
3029
|
}
|
|
3030
3030
|
}
|
|
3031
3031
|
disable() {
|
|
3032
|
-
|
|
3032
|
+
Ga && this._isEnabled && (this._isEnabled = !1, this._usedResources = /* @__PURE__ */ new WeakSet());
|
|
3033
3033
|
}
|
|
3034
|
-
},
|
|
3034
|
+
}, Q;
|
|
3035
3035
|
(function(e) {
|
|
3036
3036
|
e.DOCUMENT_LOAD = "documentLoad", e.DOCUMENT_FETCH = "documentFetch", e.RESOURCE_FETCH = "resourceFetch";
|
|
3037
|
-
})(
|
|
3037
|
+
})(Q ||= {});
|
|
3038
3038
|
//#endregion
|
|
3039
3039
|
//#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/version.js
|
|
3040
|
-
var
|
|
3040
|
+
var qa = "0.67.0", Ja = "@opentelemetry/instrumentation-document-load", Ya;
|
|
3041
3041
|
(function(e) {
|
|
3042
3042
|
e.FIRST_PAINT = "firstPaint", e.FIRST_CONTENTFUL_PAINT = "firstContentfulPaint";
|
|
3043
|
-
})(
|
|
3043
|
+
})(Ya ||= {});
|
|
3044
3044
|
//#endregion
|
|
3045
3045
|
//#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
|
|
3046
|
-
var
|
|
3047
|
-
let e = {}, t =
|
|
3048
|
-
if (t) Object.values(
|
|
3049
|
-
if (
|
|
3046
|
+
var Xa = () => {
|
|
3047
|
+
let e = {}, t = A.getEntriesByType?.("navigation")[0];
|
|
3048
|
+
if (t) Object.values(W).forEach((n) => {
|
|
3049
|
+
if (G(t, n)) {
|
|
3050
3050
|
let r = t[n];
|
|
3051
3051
|
typeof r == "number" && (e[n] = r);
|
|
3052
3052
|
}
|
|
3053
3053
|
});
|
|
3054
3054
|
else {
|
|
3055
|
-
let t =
|
|
3056
|
-
t && Object.values(
|
|
3057
|
-
if (
|
|
3055
|
+
let t = A.timing;
|
|
3056
|
+
t && Object.values(W).forEach((n) => {
|
|
3057
|
+
if (G(t, n)) {
|
|
3058
3058
|
let r = t[n];
|
|
3059
3059
|
typeof r == "number" && (e[n] = r);
|
|
3060
3060
|
}
|
|
3061
3061
|
});
|
|
3062
3062
|
}
|
|
3063
3063
|
return e;
|
|
3064
|
-
},
|
|
3065
|
-
"first-paint":
|
|
3066
|
-
"first-contentful-paint":
|
|
3067
|
-
},
|
|
3068
|
-
let t =
|
|
3064
|
+
}, Za = {
|
|
3065
|
+
"first-paint": Ya.FIRST_PAINT,
|
|
3066
|
+
"first-contentful-paint": Ya.FIRST_CONTENTFUL_PAINT
|
|
3067
|
+
}, Qa = (e) => {
|
|
3068
|
+
let t = A.getEntriesByType?.("paint");
|
|
3069
3069
|
t && t.forEach(({ name: t, startTime: n }) => {
|
|
3070
|
-
|
|
3070
|
+
G(Za, t) && e.addEvent(Za[t], n);
|
|
3071
3071
|
});
|
|
3072
|
-
},
|
|
3072
|
+
}, $a = class extends Da {
|
|
3073
3073
|
component = "document-load";
|
|
3074
3074
|
version = "1";
|
|
3075
3075
|
moduleName = this.component;
|
|
3076
3076
|
constructor(e = {}) {
|
|
3077
|
-
super(
|
|
3077
|
+
super(Ja, qa, e);
|
|
3078
3078
|
}
|
|
3079
3079
|
init() {}
|
|
3080
3080
|
_onDocumentLoaded() {
|
|
@@ -3083,43 +3083,43 @@ var Ya = () => {
|
|
|
3083
3083
|
});
|
|
3084
3084
|
}
|
|
3085
3085
|
_addResourcesSpans(e) {
|
|
3086
|
-
let t =
|
|
3086
|
+
let t = A.getEntriesByType?.("resource");
|
|
3087
3087
|
t && t.forEach((t) => {
|
|
3088
3088
|
this._initResourceSpan(t, e);
|
|
3089
3089
|
});
|
|
3090
3090
|
}
|
|
3091
3091
|
_collectPerformance() {
|
|
3092
|
-
let e = Array.from(document.getElementsByTagName("meta")).find((e) => e.getAttribute("name") ===
|
|
3093
|
-
|
|
3094
|
-
let e = this._startSpan(
|
|
3095
|
-
e && (
|
|
3096
|
-
let e = this._startSpan(
|
|
3097
|
-
e && (e.setAttribute(c, location.href),
|
|
3098
|
-
|
|
3092
|
+
let e = Array.from(document.getElementsByTagName("meta")).find((e) => e.getAttribute("name") === an), t = Xa(), n = e && e.content || "";
|
|
3093
|
+
w.with(E.extract(b, { traceparent: n }), () => {
|
|
3094
|
+
let e = this._startSpan(Q.DOCUMENT_LOAD, W.FETCH_START, t);
|
|
3095
|
+
e && (w.with(D.setSpan(w.active(), e), () => {
|
|
3096
|
+
let e = this._startSpan(Q.DOCUMENT_FETCH, W.FETCH_START, t);
|
|
3097
|
+
e && (e.setAttribute(c, location.href), w.with(D.setSpan(w.active(), e), () => {
|
|
3098
|
+
Ur(e, t, this.getConfig().ignoreNetworkEvents), this._addCustomAttributesOnSpan(e, this.getConfig().applyCustomAttributesOnSpan?.documentFetch), this._endSpan(e, W.RESPONSE_END, t);
|
|
3099
3099
|
}));
|
|
3100
|
-
}), e.setAttribute(c, location.href), e.setAttribute("user_agent.original", navigator.userAgent), this._addResourcesSpans(e), this.getConfig().ignoreNetworkEvents || (
|
|
3100
|
+
}), e.setAttribute(c, location.href), e.setAttribute("user_agent.original", navigator.userAgent), this._addResourcesSpans(e), this.getConfig().ignoreNetworkEvents || (K(e, W.FETCH_START, t), K(e, W.UNLOAD_EVENT_START, t), K(e, W.UNLOAD_EVENT_END, t), K(e, W.DOM_INTERACTIVE, t), K(e, W.DOM_CONTENT_LOADED_EVENT_START, t), K(e, W.DOM_CONTENT_LOADED_EVENT_END, t), K(e, W.DOM_COMPLETE, t), K(e, W.LOAD_EVENT_START, t), K(e, W.LOAD_EVENT_END, t)), this.getConfig().ignorePerformancePaintEvents || Qa(e), this._addCustomAttributesOnSpan(e, this.getConfig().applyCustomAttributesOnSpan?.documentLoad), this._endSpan(e, W.LOAD_EVENT_END, t));
|
|
3101
3101
|
});
|
|
3102
3102
|
}
|
|
3103
3103
|
_endSpan(e, t, n) {
|
|
3104
|
-
e && (
|
|
3104
|
+
e && (G(n, t) ? e.end(n[t]) : e.end());
|
|
3105
3105
|
}
|
|
3106
3106
|
_initResourceSpan(e, t) {
|
|
3107
|
-
let n = this._startSpan(
|
|
3108
|
-
n && (n.setAttribute(c, e.name),
|
|
3107
|
+
let n = this._startSpan(Q.RESOURCE_FETCH, W.FETCH_START, e, t);
|
|
3108
|
+
n && (n.setAttribute(c, e.name), Ur(n, e, this.getConfig().ignoreNetworkEvents), this._addCustomAttributesOnResourceSpan(n, e, this.getConfig().applyCustomAttributesOnSpan?.resourceFetch), this._endSpan(n, W.RESPONSE_END, e));
|
|
3109
3109
|
}
|
|
3110
3110
|
_startSpan(e, t, n, r) {
|
|
3111
|
-
if (
|
|
3111
|
+
if (G(n, t) && typeof n[t] == "number") return this.tracer.startSpan(e, { startTime: n[t] }, r ? D.setSpan(w.active(), r) : void 0);
|
|
3112
3112
|
}
|
|
3113
3113
|
_waitForPageLoad() {
|
|
3114
3114
|
window.document.readyState === "complete" ? this._onDocumentLoaded() : (this._onDocumentLoaded = this._onDocumentLoaded.bind(this), window.addEventListener("load", this._onDocumentLoaded));
|
|
3115
3115
|
}
|
|
3116
3116
|
_addCustomAttributesOnSpan(e, t) {
|
|
3117
|
-
t &&
|
|
3117
|
+
t && Z(() => t(e), (e) => {
|
|
3118
3118
|
e && this._diag.error("addCustomAttributesOnSpan", e);
|
|
3119
3119
|
}, !0);
|
|
3120
3120
|
}
|
|
3121
3121
|
_addCustomAttributesOnResourceSpan(e, t, n) {
|
|
3122
|
-
n &&
|
|
3122
|
+
n && Z(() => n(e, t), (e) => {
|
|
3123
3123
|
e && this._diag.error("addCustomAttributesOnResourceSpan", e);
|
|
3124
3124
|
}, !0);
|
|
3125
3125
|
}
|
|
@@ -3129,22 +3129,22 @@ var Ya = () => {
|
|
|
3129
3129
|
disable() {
|
|
3130
3130
|
window.removeEventListener("load", this._onDocumentLoaded);
|
|
3131
3131
|
}
|
|
3132
|
-
},
|
|
3132
|
+
}, eo = {
|
|
3133
3133
|
development: 1,
|
|
3134
3134
|
staging: .5,
|
|
3135
3135
|
production: .2
|
|
3136
3136
|
};
|
|
3137
|
-
function
|
|
3137
|
+
function to(e) {
|
|
3138
3138
|
let t = typeof process < "u" ? process.env.OTEL_SAMPLING_RATE : void 0;
|
|
3139
3139
|
if (t !== void 0) {
|
|
3140
3140
|
let e = Number(t);
|
|
3141
3141
|
return Number.isFinite(e) ? Math.max(0, Math.min(1, e)) : 1;
|
|
3142
3142
|
}
|
|
3143
|
-
return
|
|
3143
|
+
return eo[e.toLowerCase()] ?? 1;
|
|
3144
3144
|
}
|
|
3145
3145
|
//#endregion
|
|
3146
3146
|
//#region ../../packages/telemetry/src/utils.ts
|
|
3147
|
-
function
|
|
3147
|
+
function no(e, t, n) {
|
|
3148
3148
|
return Promise.race([Promise.resolve(e).then(() => {}), new Promise((e) => {
|
|
3149
3149
|
setTimeout(() => {
|
|
3150
3150
|
console.warn(`[telemetry] ${n} timed out after ${t}ms — proceeding without confirmation`), e();
|
|
@@ -3152,26 +3152,121 @@ function to(e, t, n) {
|
|
|
3152
3152
|
})]);
|
|
3153
3153
|
}
|
|
3154
3154
|
//#endregion
|
|
3155
|
-
//#region ../../packages/telemetry/src/
|
|
3156
|
-
var
|
|
3157
|
-
function
|
|
3158
|
-
|
|
3159
|
-
|
|
3155
|
+
//#region ../../packages/telemetry/src/sanitization.ts
|
|
3156
|
+
var ro = /(InstrumentationKey|AccountKey|SharedAccessKey|Secret)=([^;"]+)/gi, io = /;Key=[A-Za-z0-9+/=]{20,}/gi, ao = /(?<![A-Za-z0-9])sk-(proj|svcacct|admin|ant)-[A-Za-z0-9_-]{40,}/g, oo = /sk-[A-Za-z0-9]{20,}/gi, so = /AIzaSy[A-Za-z0-9_-]{33}/gi, co = /gsk_[A-Za-z0-9]{20,}/gi, lo = /(?<![A-Za-z0-9])bk_[A-Za-z]{64}/g, uo = /(?<![A-Za-z0-9])(gh[pousr]|github_pat)_[A-Za-z0-9_]{36,}/g, fo = /(?<![A-Za-z0-9])vck_[A-Za-z0-9]{40,}/g, po = /Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi, mo = /eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/y, ho = /[A-Za-z0-9_-]/, go = /^[a-zA-Z0-9._%+-]+(@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/, _o = /[a-zA-Z0-9._%+-]/, vo = /[a-zA-Z0-9.-]/, yo = 64, bo = 255, xo = /([?&](api[_-]?key|token|secret|password|auth|key)=)[^\s&]*/gi;
|
|
3157
|
+
function So(e, t) {
|
|
3158
|
+
let n = t;
|
|
3159
|
+
for (; n < e.length && ho.test(e[n]);) n++;
|
|
3160
|
+
return n;
|
|
3161
|
+
}
|
|
3162
|
+
function Co(e) {
|
|
3163
|
+
let t = "", n = 0, r = e.indexOf("eyJ");
|
|
3164
|
+
for (; r >= 0;) mo.lastIndex = r, mo.test(e) ? (t += `${e.slice(n, r)}eyJ[REDACTED]`, n = mo.lastIndex, r = e.indexOf("eyJ", n)) : r = e.indexOf("eyJ", So(e, r + 3));
|
|
3165
|
+
return t + e.slice(n);
|
|
3166
|
+
}
|
|
3167
|
+
function wo(e) {
|
|
3168
|
+
let t = "", n = 0;
|
|
3169
|
+
for (let r = e.indexOf("@"); r >= 0; r = e.indexOf("@", r + 1)) {
|
|
3170
|
+
let i = r;
|
|
3171
|
+
for (; i > n && r - i < yo && _o.test(e[i - 1]);) i--;
|
|
3172
|
+
let a = r + 1;
|
|
3173
|
+
for (; a < e.length && a - r <= bo && vo.test(e[a]);) a++;
|
|
3174
|
+
let o = go.exec(e.slice(i, a));
|
|
3175
|
+
o && (t += `${e.slice(n, i)}${e[i]}***${o[1]}`, n = i + o[0].length);
|
|
3176
|
+
}
|
|
3177
|
+
return t + e.slice(n);
|
|
3178
|
+
}
|
|
3179
|
+
function To(e) {
|
|
3180
|
+
let t = e;
|
|
3181
|
+
return t = t.replace(ro, "$1=[REDACTED]"), t = t.replace(io, ";Key=[REDACTED]"), t = t.replace(ao, "sk-$1-[REDACTED]"), t = t.replace(oo, "sk-[REDACTED]"), t = t.replace(so, "AIzaSy[REDACTED]"), t = t.replace(co, "gsk_[REDACTED]"), t = t.replace(lo, "bk_[REDACTED]"), t = t.replace(uo, "$1_[REDACTED]"), t = t.replace(fo, "vck_[REDACTED]"), t = t.replace(po, "Bearer [REDACTED]"), t = Co(t), t = t.replace(xo, "$1[REDACTED]"), wo(t);
|
|
3182
|
+
}
|
|
3183
|
+
var Eo = /* @__PURE__ */ new Set([
|
|
3184
|
+
"url.full",
|
|
3185
|
+
"url.path",
|
|
3186
|
+
"url.query",
|
|
3187
|
+
"http.url",
|
|
3188
|
+
"http.target"
|
|
3189
|
+
]), $ = "[REDACTED]", Do = /^((?:[a-z][a-z0-9+.-]*:)?\/\/)[^/?#@]*@/i, Oo = /^(?=[^/]*\d)(?=[^/]*[A-Za-z])[A-Za-z0-9_-]{32,}$/, ko = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Ao = (e) => Oo.test(e) && !ko.test(e);
|
|
3190
|
+
function jo(e) {
|
|
3191
|
+
return e.split("&").map((e) => {
|
|
3192
|
+
let t = e.indexOf("=");
|
|
3193
|
+
return t >= 0 ? `${e.slice(0, t)}=${$}` : e === "" ? e : $;
|
|
3194
|
+
}).join("&");
|
|
3195
|
+
}
|
|
3196
|
+
function Mo(e) {
|
|
3197
|
+
let t = e.indexOf("#"), n = t < 0 ? e : e.slice(0, t), r = n.indexOf("?"), i = To((r < 0 ? n : n.slice(0, r)).replace(Do, `$1${$}@`)).split("/").map((e) => Ao(e) ? $ : e).join("/");
|
|
3198
|
+
return r >= 0 && (i += `?${jo(n.slice(r + 1))}`), t >= 0 && (i += `#${$}`), i;
|
|
3199
|
+
}
|
|
3200
|
+
function No(e, t) {
|
|
3201
|
+
return e === "url.query" ? t.startsWith("?") ? `?${jo(t.slice(1))}` : jo(t) : Mo(t);
|
|
3202
|
+
}
|
|
3203
|
+
function Po(e, t) {
|
|
3204
|
+
if (typeof t == "string") return No(e, t);
|
|
3205
|
+
if (!Array.isArray(t)) return t;
|
|
3206
|
+
let n = t.map((t) => typeof t == "string" ? No(e, t) : t);
|
|
3207
|
+
return n.some((e, n) => e !== t[n]) ? n : t;
|
|
3208
|
+
}
|
|
3209
|
+
function Fo(e) {
|
|
3210
|
+
let t;
|
|
3211
|
+
for (let n of Eo) {
|
|
3212
|
+
let r = e[n], i = Po(n, r);
|
|
3213
|
+
i !== r && (t ??= { ...e }, t[n] = i);
|
|
3214
|
+
}
|
|
3215
|
+
return t ?? e;
|
|
3216
|
+
}
|
|
3217
|
+
//#endregion
|
|
3218
|
+
//#region ../../packages/telemetry/src/spanUrlMasking.ts
|
|
3219
|
+
var Io = class {
|
|
3220
|
+
exporter;
|
|
3221
|
+
constructor(e) {
|
|
3222
|
+
this.exporter = e;
|
|
3223
|
+
}
|
|
3224
|
+
export(e, t) {
|
|
3225
|
+
this.exporter.export(e.map(Lo), t);
|
|
3226
|
+
}
|
|
3227
|
+
shutdown() {
|
|
3228
|
+
return this.exporter.shutdown();
|
|
3229
|
+
}
|
|
3230
|
+
forceFlush() {
|
|
3231
|
+
return this.exporter.forceFlush?.() ?? Promise.resolve();
|
|
3232
|
+
}
|
|
3233
|
+
}, Lo = (e) => {
|
|
3234
|
+
let t = Fo(e.attributes), n = !1, r = e.events.map((e) => {
|
|
3235
|
+
let t = e.attributes && Fo(e.attributes);
|
|
3236
|
+
return t === e.attributes ? e : (n = !0, {
|
|
3237
|
+
...e,
|
|
3238
|
+
attributes: t
|
|
3239
|
+
});
|
|
3240
|
+
});
|
|
3241
|
+
return t === e.attributes && !n ? e : Object.create(e, {
|
|
3242
|
+
attributes: {
|
|
3243
|
+
value: t,
|
|
3244
|
+
enumerable: !0
|
|
3245
|
+
},
|
|
3246
|
+
events: {
|
|
3247
|
+
value: n ? r : e.events,
|
|
3248
|
+
enumerable: !0
|
|
3249
|
+
}
|
|
3250
|
+
});
|
|
3251
|
+
}, Ro = !1;
|
|
3252
|
+
function zo(e) {
|
|
3253
|
+
if (Ro) return;
|
|
3254
|
+
Ro = !0;
|
|
3160
3255
|
let t = () => {
|
|
3161
|
-
|
|
3256
|
+
no(e(), 2e3, "browser flush");
|
|
3162
3257
|
};
|
|
3163
3258
|
window.addEventListener("pagehide", t), window.addEventListener("beforeunload", t), document.addEventListener("visibilitychange", () => {
|
|
3164
3259
|
document.visibilityState === "hidden" && t();
|
|
3165
3260
|
});
|
|
3166
3261
|
}
|
|
3167
|
-
function
|
|
3262
|
+
function Bo(e) {
|
|
3168
3263
|
if (e?.enabled === !1) return null;
|
|
3169
3264
|
let t = e?.serviceName ?? "frontend", n = e?.environment ?? "development";
|
|
3170
3265
|
return {
|
|
3171
3266
|
serviceName: t,
|
|
3172
3267
|
environment: n,
|
|
3173
3268
|
exporterEndpoint: e?.exporterEndpoint ?? "http://localhost:4318",
|
|
3174
|
-
samplingRate: e?.samplingRate ??
|
|
3269
|
+
samplingRate: e?.samplingRate ?? to(n),
|
|
3175
3270
|
otlpHeaders: e?.otlpHeaders ?? {},
|
|
3176
3271
|
signozApiKey: e?.signozApiKey ?? "",
|
|
3177
3272
|
logLevel: e?.logLevel ?? "info",
|
|
@@ -3179,38 +3274,38 @@ function io(e) {
|
|
|
3179
3274
|
ignoreUrls: e?.ignoreUrls
|
|
3180
3275
|
};
|
|
3181
3276
|
}
|
|
3182
|
-
function
|
|
3183
|
-
let t =
|
|
3277
|
+
function Vo(e) {
|
|
3278
|
+
let t = Bo(e);
|
|
3184
3279
|
if (!t) return {
|
|
3185
3280
|
shutdown: async () => {},
|
|
3186
3281
|
flush: async () => {}
|
|
3187
3282
|
};
|
|
3188
|
-
let n =
|
|
3283
|
+
let n = Vn({
|
|
3189
3284
|
[r]: t.serviceName,
|
|
3190
3285
|
"deployment.environment": t.environment,
|
|
3191
3286
|
"service.version": "0.0.0"
|
|
3192
|
-
}), i = new
|
|
3287
|
+
}), i = new Io(new xa({
|
|
3193
3288
|
url: `${t.exporterEndpoint}/v1/traces`,
|
|
3194
3289
|
headers: t.otlpHeaders
|
|
3195
|
-
}), a = new
|
|
3290
|
+
})), a = new Rr({
|
|
3196
3291
|
resource: n,
|
|
3197
|
-
sampler: new
|
|
3198
|
-
spanProcessors: [new
|
|
3292
|
+
sampler: new V({ root: new Dr(t.samplingRate) }),
|
|
3293
|
+
spanProcessors: [new Pr(i)]
|
|
3199
3294
|
});
|
|
3200
|
-
return a.register(),
|
|
3295
|
+
return a.register(), E.setGlobalPropagator(new un()), new Ka({
|
|
3201
3296
|
propagateTraceHeaderCorsUrls: t.propagateCorsUrls ? [t.propagateCorsUrls] : [],
|
|
3202
3297
|
ignoreUrls: t.ignoreUrls
|
|
3203
|
-
}).enable(), new
|
|
3298
|
+
}).enable(), new $a().enable(), zo(() => a.forceFlush()), {
|
|
3204
3299
|
shutdown: async () => {
|
|
3205
3300
|
try {
|
|
3206
|
-
await
|
|
3301
|
+
await no(a.shutdown(), 1e4, "browser shutdown");
|
|
3207
3302
|
} catch (e) {
|
|
3208
3303
|
console.error("[telemetry-browser] Error during shutdown", e);
|
|
3209
3304
|
}
|
|
3210
3305
|
},
|
|
3211
3306
|
flush: async () => {
|
|
3212
3307
|
try {
|
|
3213
|
-
await
|
|
3308
|
+
await no(a.forceFlush(), 1e4, "browser flush");
|
|
3214
3309
|
} catch (e) {
|
|
3215
3310
|
console.error("[telemetry-browser] Error during flush", e);
|
|
3216
3311
|
}
|
|
@@ -3218,6 +3313,6 @@ function ao(e) {
|
|
|
3218
3313
|
};
|
|
3219
3314
|
}
|
|
3220
3315
|
//#endregion
|
|
3221
|
-
export {
|
|
3316
|
+
export { Vo as initializeTelemetryBrowser };
|
|
3222
3317
|
|
|
3223
|
-
//# sourceMappingURL=browser-
|
|
3318
|
+
//# sourceMappingURL=browser-CuMi3Hhg.js.map
|