@utk09/ui-observability 1.0.0 → 1.1.0
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/CHANGELOG.md +69 -219
- package/README.md +24 -26
- package/dist/{batch-CXmPmTse.js → batch-D3NHhF9L.js} +3 -3
- package/dist/{batch-CXmPmTse.js.map → batch-D3NHhF9L.js.map} +1 -1
- package/dist/{batch-mmPigCpi.cjs → batch-DnYRJqhU.cjs} +2 -2
- package/dist/{batch-mmPigCpi.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +26 -2
- package/dist/bus/bus.d.ts +26 -2
- package/dist/bus-B__467mL.cjs +2 -0
- package/dist/bus-B__467mL.cjs.map +1 -0
- package/dist/{bus-C39wspFV.js → bus-dw7T92sO.js} +37 -24
- package/dist/bus-dw7T92sO.js.map +1 -0
- package/dist/capture/interactions.d.cts +35 -3
- package/dist/capture/interactions.d.ts +35 -3
- package/dist/capture/observed-windows.d.cts +51 -0
- package/dist/capture/observed-windows.d.ts +51 -0
- package/dist/{compression-CvED_Jel.cjs → compression-C0hUHKR-.cjs} +2 -2
- package/dist/{compression-CvED_Jel.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
- package/dist/{compression-tVtXwVjX.js → compression-SHPAvS4U.js} +2 -2
- package/dist/{compression-tVtXwVjX.js.map → compression-SHPAvS4U.js.map} +1 -1
- package/dist/{config-SgQcCP1_.js → config-CSNcS7OZ.js} +194 -196
- package/dist/config-CSNcS7OZ.js.map +1 -0
- package/dist/config-CybPP5VM.cjs +2 -0
- package/dist/config-CybPP5VM.cjs.map +1 -0
- package/dist/{console-BGgGnjSi.js → console-BsM-fSCQ.js} +4 -4
- package/dist/{console-BGgGnjSi.js.map → console-BsM-fSCQ.js.map} +1 -1
- package/dist/{console-CSZ5_Vx5.cjs → console-Dkxs6IVQ.cjs} +2 -2
- package/dist/{console-CSZ5_Vx5.cjs.map → console-Dkxs6IVQ.cjs.map} +1 -1
- package/dist/{constants-CUyd9cTZ.js → constants-BwJDXzj6.js} +23 -23
- package/dist/constants-BwJDXzj6.js.map +1 -0
- package/dist/constants-CtF52hIV.cjs +2 -0
- package/dist/constants-CtF52hIV.cjs.map +1 -0
- package/dist/constants.d.cts +12 -0
- package/dist/constants.d.ts +12 -0
- package/dist/core/diagnostics.d.cts +1 -1
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/rotation.d.cts +26 -2
- package/dist/core/rotation.d.ts +26 -2
- package/dist/core/runtime.d.cts +9 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-B2v6Cym-.cjs} +2 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-B2v6Cym-.cjs.map} +1 -1
- package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-Cs_YWzTa.js} +4 -4
- package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-Cs_YWzTa.js.map} +1 -1
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.js +31 -31
- package/dist/doctor.js.map +1 -1
- package/dist/{errors-CNPbesMs.cjs → errors-DP2RUm4V.cjs} +2 -2
- package/dist/{errors-CNPbesMs.cjs.map → errors-DP2RUm4V.cjs.map} +1 -1
- package/dist/{errors-BE_EZV7Q.js → errors-Q3Ng1ciC.js} +3 -3
- package/dist/{errors-BE_EZV7Q.js.map → errors-Q3Ng1ciC.js.map} +1 -1
- package/dist/{factory-CTi0Is3F.js → factory-DV17sm2p.js} +22 -22
- package/dist/{factory-CTi0Is3F.js.map → factory-DV17sm2p.js.map} +1 -1
- package/dist/{factory-hRrH32v5.cjs → factory-K8O6gpux.cjs} +2 -2
- package/dist/{factory-hRrH32v5.cjs.map → factory-K8O6gpux.cjs.map} +1 -1
- package/dist/{identity-DdhKgrpk.js → identity-BgtHyY4u.js} +38 -27
- package/dist/identity-BgtHyY4u.js.map +1 -0
- package/dist/identity-CvuyqZk7.cjs +2 -0
- package/dist/identity-CvuyqZk7.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +600 -569
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-D4KVcqdD.cjs} +2 -2
- package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-D4KVcqdD.cjs.map} +1 -1
- package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-e-13ZLWm.js} +17 -17
- package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-e-13ZLWm.js.map} +1 -1
- package/dist/interactions-Byxf1C82.js +207 -0
- package/dist/interactions-Byxf1C82.js.map +1 -0
- package/dist/interactions-OK85T-Dk.cjs +2 -0
- package/dist/interactions-OK85T-Dk.cjs.map +1 -0
- package/dist/{journey-D2_sia57.js → journey-C93FTYcs.js} +14 -14
- package/dist/{journey-D2_sia57.js.map → journey-C93FTYcs.js.map} +1 -1
- package/dist/{journey-B4Adltjm.cjs → journey-nMbob3OB.cjs} +2 -2
- package/dist/{journey-B4Adltjm.cjs.map → journey-nMbob3OB.cjs.map} +1 -1
- package/dist/{library-console-CPW6bvZH.cjs → library-console-DJUQzcgM.cjs} +2 -2
- package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
- package/dist/{library-console-Btrzt814.js → library-console-DklSmucS.js} +2 -2
- package/dist/{library-console-Btrzt814.js.map → library-console-DklSmucS.js.map} +1 -1
- package/dist/{library-request-BJ9PLRaD.js → library-request-UGEwOHpf.js} +2 -2
- package/dist/{library-request-BJ9PLRaD.js.map → library-request-UGEwOHpf.js.map} +1 -1
- package/dist/{library-request-D7OvTxZV.cjs → library-request-kY9iTpIF.cjs} +2 -2
- package/dist/{library-request-D7OvTxZV.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
- package/dist/{lifecycle-22CUCrc9.js → lifecycle-B2PlIuQu.js} +2 -2
- package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-B2PlIuQu.js.map} +1 -1
- package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-DaMdH_X7.cjs} +2 -2
- package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-DaMdH_X7.cjs.map} +1 -1
- package/dist/{log-record-CkivuiEl.cjs → log-record-Bmx6etMh.cjs} +2 -2
- package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bmx6etMh.cjs.map} +1 -1
- package/dist/{log-record-BNiLfqtL.js → log-record-DSt2P-Sr.js} +2 -2
- package/dist/{log-record-BNiLfqtL.js.map → log-record-DSt2P-Sr.js.map} +1 -1
- package/dist/{long-frames-DNFaRnC3.js → long-frames-Bamjs1WV.js} +3 -3
- package/dist/{long-frames-DNFaRnC3.js.map → long-frames-Bamjs1WV.js.map} +1 -1
- package/dist/{long-frames-BUUbXd-B.cjs → long-frames-lhtONgGt.cjs} +2 -2
- package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-lhtONgGt.cjs.map} +1 -1
- package/dist/models/bus.d.cts +6 -1
- package/dist/models/bus.d.ts +6 -1
- package/dist/models/config.d.cts +23 -8
- package/dist/models/config.d.ts +23 -8
- package/dist/models/serializer.d.cts +3 -1
- package/dist/models/serializer.d.ts +3 -1
- package/dist/{network-CGMLQ-mA.cjs → network-BCn8Gn47.cjs} +2 -2
- package/dist/{network-CGMLQ-mA.cjs.map → network-BCn8Gn47.cjs.map} +1 -1
- package/dist/{network-on2zZT6H.js → network-Cg1L2w2r.js} +12 -12
- package/dist/{network-on2zZT6H.js.map → network-Cg1L2w2r.js.map} +1 -1
- package/dist/observed-windows-B3gJkdql.cjs +2 -0
- package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
- package/dist/observed-windows-BrwaJNlj.js +64 -0
- package/dist/observed-windows-BrwaJNlj.js.map +1 -0
- package/dist/{otlp-BENHf3g9.cjs → otlp-CrAWkQdO.cjs} +2 -2
- package/dist/{otlp-BENHf3g9.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
- package/dist/{otlp-DimfrRor.js → otlp-D6dRZyB8.js} +6 -6
- package/dist/{otlp-DimfrRor.js.map → otlp-D6dRZyB8.js.map} +1 -1
- package/dist/{platform-BaaFIPCU.js → platform-8DLhjddo.js} +7 -7
- package/dist/{platform-BaaFIPCU.js.map → platform-8DLhjddo.js.map} +1 -1
- package/dist/{platform-CfA3-7sJ.cjs → platform-BqRc-7RO.cjs} +2 -2
- package/dist/{platform-CfA3-7sJ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
- package/dist/{profiler-BAZoh7A4.js → profiler-BaXSqCfz.js} +59 -59
- package/dist/{profiler-BAZoh7A4.js.map → profiler-BaXSqCfz.js.map} +1 -1
- package/dist/{profiler-D4tJpDRc.cjs → profiler-BvWW2kNM.cjs} +2 -2
- package/dist/{profiler-D4tJpDRc.cjs.map → profiler-BvWW2kNM.cjs.map} +1 -1
- package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-C4ySHN0X.js} +16 -16
- package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-C4ySHN0X.js.map} +1 -1
- package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-DeaBiB-5.cjs} +2 -2
- package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-DeaBiB-5.cjs.map} +1 -1
- package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-D7L6D_D2.cjs} +2 -2
- package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-D7L6D_D2.cjs.map} +1 -1
- package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-Dq9xe7Qn.js} +22 -22
- package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-Dq9xe7Qn.js.map} +1 -1
- package/dist/{replay-Ds-ANH34.js → replay-B0M8kWz_.js} +24 -24
- package/dist/{replay-Ds-ANH34.js.map → replay-B0M8kWz_.js.map} +1 -1
- package/dist/{replay-B3gFXIZd.cjs → replay-QOFBpAXh.cjs} +2 -2
- package/dist/{replay-B3gFXIZd.cjs.map → replay-QOFBpAXh.cjs.map} +1 -1
- package/dist/{reports-C-thq-bk.js → reports--8APRLa-.js} +3 -3
- package/dist/{reports-C-thq-bk.js.map → reports--8APRLa-.js.map} +1 -1
- package/dist/{reports-BDSe4dFH.cjs → reports-ojuMKGO7.cjs} +2 -2
- package/dist/{reports-BDSe4dFH.cjs.map → reports-ojuMKGO7.cjs.map} +1 -1
- package/dist/{resource-timing-eUl2dNgC.js → resource-timing-BzR05rE-.js} +4 -4
- package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-BzR05rE-.js.map} +1 -1
- package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-pAG3ZhB5.cjs} +2 -2
- package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-pAG3ZhB5.cjs.map} +1 -1
- package/dist/{response-body-eoSQpLiH.js → response-body-BWvwKQ2p.js} +106 -106
- package/dist/{response-body-eoSQpLiH.js.map → response-body-BWvwKQ2p.js.map} +1 -1
- package/dist/{response-body-YdNl-HkR.cjs → response-body-CKEJ5itk.cjs} +3 -3
- package/dist/{response-body-YdNl-HkR.cjs.map → response-body-CKEJ5itk.cjs.map} +1 -1
- package/dist/{rotation-Cwct4ckk.js → rotation-BylN1B9e.js} +10 -11
- package/dist/rotation-BylN1B9e.js.map +1 -0
- package/dist/rotation-E2eKClIs.cjs +2 -0
- package/dist/rotation-E2eKClIs.cjs.map +1 -0
- package/dist/{sampling-mXt4dstx.cjs → sampling-B46LW0cy.cjs} +2 -2
- package/dist/{sampling-mXt4dstx.cjs.map → sampling-B46LW0cy.cjs.map} +1 -1
- package/dist/{sampling-BlrI8jor.js → sampling-zXA6r-Nw.js} +16 -16
- package/dist/{sampling-BlrI8jor.js.map → sampling-zXA6r-Nw.js.map} +1 -1
- package/dist/{sanitize-Ba0KqU06.js → sanitize-DjnR6RXR.js} +2 -2
- package/dist/{sanitize-Ba0KqU06.js.map → sanitize-DjnR6RXR.js.map} +1 -1
- package/dist/{sanitize-DQyiI_KY.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
- package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-Qj6LuZqp.cjs.map} +1 -1
- package/dist/{sender-Dv8rAmpV.js → sender-Bdp-TAS4.js} +71 -71
- package/dist/{sender-Dv8rAmpV.js.map → sender-Bdp-TAS4.js.map} +1 -1
- package/dist/{sender-BdRuNVhF.cjs → sender-DR7ZycZY.cjs} +2 -2
- package/dist/{sender-BdRuNVhF.cjs.map → sender-DR7ZycZY.cjs.map} +1 -1
- package/dist/{stored-context-CXt7eHZL.cjs → stored-context-BOu54M8Y.cjs} +2 -2
- package/dist/{stored-context-CXt7eHZL.cjs.map → stored-context-BOu54M8Y.cjs.map} +1 -1
- package/dist/{stored-context-B2EzVuYm.js → stored-context-CSttrAsw.js} +6 -6
- package/dist/{stored-context-B2EzVuYm.js.map → stored-context-CSttrAsw.js.map} +1 -1
- package/dist/{storm-C-zYSdDX.cjs → storm-BHgI12iS.cjs} +2 -2
- package/dist/{storm-C-zYSdDX.cjs.map → storm-BHgI12iS.cjs.map} +1 -1
- package/dist/{storm-DjKetLKZ.js → storm-DKlpv0FL.js} +2 -2
- package/dist/{storm-DjKetLKZ.js.map → storm-DKlpv0FL.js.map} +1 -1
- package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-BYPYYkQ5.cjs} +2 -2
- package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-BYPYYkQ5.cjs.map} +1 -1
- package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-BcOB8A2e.js} +2 -2
- package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-BcOB8A2e.js.map} +1 -1
- package/dist/{user-timing-BePqb1uN.js → user-timing-4KIJ74Vi.js} +2 -2
- package/dist/{user-timing-BePqb1uN.js.map → user-timing-4KIJ74Vi.js.map} +1 -1
- package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BsU2wQKE.cjs} +2 -2
- package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BsU2wQKE.cjs.map} +1 -1
- package/dist/utils/identity.d.cts +5 -0
- package/dist/utils/identity.d.ts +5 -0
- package/dist/{web-socket-CoIUBM3C.cjs → web-socket-Cs1ZbmmN.cjs} +2 -2
- package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
- package/dist/{web-socket-DSHgDiZ6.js → web-socket-Zg0hj1LB.js} +4 -4
- package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-Zg0hj1LB.js.map} +1 -1
- package/dist/{worker-protocol-x074Rpet.js → worker-protocol-CYpAbrVl.js} +4 -4
- package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-CYpAbrVl.js.map} +1 -1
- package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-DFYXIFus.cjs} +2 -2
- package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-DFYXIFus.cjs.map} +1 -1
- package/dist/{worker-server-CFe4nvos.cjs → worker-server--yGTadTA.cjs} +2 -2
- package/dist/{worker-server-CFe4nvos.cjs.map → worker-server--yGTadTA.cjs.map} +1 -1
- package/dist/{worker-server-iUVSjH8L.js → worker-server-BokySIII.js} +25 -25
- package/dist/{worker-server-iUVSjH8L.js.map → worker-server-BokySIII.js.map} +1 -1
- package/dist/worker-transport-BdEvh_-a.cjs +2 -0
- package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
- package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-JK-Fby9J.js} +23 -19
- package/dist/worker-transport-JK-Fby9J.js.map +1 -0
- package/llms.txt +13 -10
- package/package.json +13 -5
- package/dist/bus-C39wspFV.js.map +0 -1
- package/dist/bus-_EaOVPGq.cjs +0 -2
- package/dist/bus-_EaOVPGq.cjs.map +0 -1
- package/dist/config-DUs7uHHt.cjs +0 -2
- package/dist/config-DUs7uHHt.cjs.map +0 -1
- package/dist/config-SgQcCP1_.js.map +0 -1
- package/dist/constants-CUyd9cTZ.js.map +0 -1
- package/dist/constants-CqdJhTxH.cjs +0 -2
- package/dist/constants-CqdJhTxH.cjs.map +0 -1
- package/dist/identity-DdhKgrpk.js.map +0 -1
- package/dist/identity-DlWRIuwy.cjs +0 -2
- package/dist/identity-DlWRIuwy.cjs.map +0 -1
- package/dist/interactions-CUkzK8sR.cjs +0 -2
- package/dist/interactions-CUkzK8sR.cjs.map +0 -1
- package/dist/interactions-DiFvCosX.js +0 -111
- package/dist/interactions-DiFvCosX.js.map +0 -1
- package/dist/rotation-Cwct4ckk.js.map +0 -1
- package/dist/rotation-D4qUAHAu.cjs +0 -2
- package/dist/rotation-D4qUAHAu.cjs.map +0 -1
- package/dist/worker-transport-CRAX-09c.cjs +0 -2
- package/dist/worker-transport-CRAX-09c.cjs.map +0 -1
- package/dist/worker-transport-Dy1KMA7t.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as e, At as t, D as n, G as r, I as i, L as a, R as o, Rn as s, fr as c, mr as l, pr as u, un as d } from "./constants-BwJDXzj6.js";
|
|
2
2
|
import { n as f, t as p } from "./guards-BlYGRK4l.js";
|
|
3
3
|
// src/core/config.ts
|
|
4
|
-
var m = Object.keys(
|
|
4
|
+
var m = Object.keys(t), ee = ["gzip", "none"], te = [
|
|
5
5
|
"omit",
|
|
6
6
|
"same-origin",
|
|
7
7
|
"include"
|
|
@@ -49,10 +49,10 @@ var m = Object.keys(c), ee = ["gzip", "none"], te = [
|
|
|
49
49
|
maxDepth: [1, 16],
|
|
50
50
|
maxArrayLength: [1, 1e4],
|
|
51
51
|
maxNodes: [100, 1e5],
|
|
52
|
-
maxRecordBytes: [1024,
|
|
53
|
-
}, fe = [6e4, 864e5], _ = [0, 2147483647], v = [1, _[1]], y = [0, 2 ** 53 - 1], b = [1, 2 ** 53 - 1], x = [100, 1e4], S = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"),
|
|
54
|
-
function k(e, t, n =
|
|
55
|
-
return (r, i, a, o) => i === void 0 ? a : e(i) ? i : (
|
|
52
|
+
maxRecordBytes: [1024, n]
|
|
53
|
+
}, fe = [6e4, 864e5], _ = [0, 2147483647], v = [1, _[1]], y = [0, 2 ** 53 - 1], b = [1, 2 ** 53 - 1], x = [100, 1e4], S = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), pe = (e) => Array.isArray(e) && e.every((e) => typeof e == "function"), C = (e) => e === null || typeof e == "function", w = (e) => e === null, me = /^[a-z][a-z\d+.-]*:/i, T = (e) => typeof e == "number" && e >= 0 && e <= 1, E = "a function or null", D = "a URL string or null", he = (e) => C(e) || O(e) && Object.values(e).every((e) => typeof e == "string"), O = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
54
|
+
function k(e, t, n = L) {
|
|
55
|
+
return (r, i, a, o) => i === void 0 ? a : e(i) ? i : (z(o, r, t, i, "the current value", n), a);
|
|
56
56
|
}
|
|
57
57
|
function ge() {
|
|
58
58
|
return typeof document < "u" ? document.baseURI : typeof location > "u" ? void 0 : location.href;
|
|
@@ -67,10 +67,10 @@ function A(e, t, n, r) {
|
|
|
67
67
|
return i.username !== "" || i.password !== "" ? (r.report("config.invalid", `${e} has a user name or a password. The library keeps the current value.`), n) : me.test(t) ? t : (r.report("config.invalid", `${e} is relative. The library sends to ${i.origin}.`), i.href);
|
|
68
68
|
}
|
|
69
69
|
function j(e, t, n, r) {
|
|
70
|
-
return typeof t == "string" ? t.trim() === "" ? (r.report("config.invalid", `${e} is empty. The library turns it off. Use null to turn it off.`), null) : t === n ? t : A(e, t, n, r) : k(
|
|
70
|
+
return typeof t == "string" ? t.trim() === "" ? (r.report("config.invalid", `${e} is empty. The library turns it off. Use null to turn it off.`), null) : t === n ? t : A(e, t, n, r) : k(w, D, R)(e, t, n, r);
|
|
71
71
|
}
|
|
72
72
|
function M(e, t, n) {
|
|
73
|
-
return typeof e == "string" ? e === "" || e === t ? e : e.trim() === "" ? (n.report("config.invalid", "endpoint is blank. The library keeps the current value."), t) : A("endpoint", e, t, n) : k(
|
|
73
|
+
return typeof e == "string" ? e === "" || e === t ? e : e.trim() === "" ? (n.report("config.invalid", "endpoint is blank. The library keeps the current value."), t) : A("endpoint", e, t, n) : k(w, D, R)("endpoint", e, t, n);
|
|
74
74
|
}
|
|
75
75
|
var N = {
|
|
76
76
|
captureLimits: {
|
|
@@ -101,7 +101,7 @@ var N = {
|
|
|
101
101
|
diagnostics: {
|
|
102
102
|
ranges: { throttleMs: _ },
|
|
103
103
|
limits: {},
|
|
104
|
-
custom: { records:
|
|
104
|
+
custom: { records: ke }
|
|
105
105
|
},
|
|
106
106
|
correlation: {
|
|
107
107
|
ranges: {},
|
|
@@ -149,7 +149,7 @@ var N = {
|
|
|
149
149
|
limits: { maxAgeMs: v }
|
|
150
150
|
},
|
|
151
151
|
profiler: {
|
|
152
|
-
ranges: { maxProbes: [1,
|
|
152
|
+
ranges: { maxProbes: [1, e] },
|
|
153
153
|
limits: {}
|
|
154
154
|
},
|
|
155
155
|
replay: {
|
|
@@ -170,10 +170,10 @@ var N = {
|
|
|
170
170
|
endpoint: j,
|
|
171
171
|
maskSelectors: k(S, "a list of strings"),
|
|
172
172
|
blockSelectors: k(S, "a list of strings"),
|
|
173
|
-
loader: k(
|
|
174
|
-
onSegment: k(
|
|
175
|
-
headers: k(he, "an object of strings, a function or null",
|
|
176
|
-
plugins: k(
|
|
173
|
+
loader: k(C, E, R),
|
|
174
|
+
onSegment: k(C, E, R),
|
|
175
|
+
headers: k(he, "an object of strings, a function or null", R),
|
|
176
|
+
plugins: k(pe, "a list of functions"),
|
|
177
177
|
recordOptions: k(O, "an object")
|
|
178
178
|
}
|
|
179
179
|
}
|
|
@@ -191,119 +191,119 @@ var N = {
|
|
|
191
191
|
"serverTiming",
|
|
192
192
|
"reports",
|
|
193
193
|
"lifecycle"
|
|
194
|
-
], ve = "null", P = `a level name: ${
|
|
195
|
-
function
|
|
194
|
+
], ve = "null", P = `a level name: ${I(m)}`, ye = `a list of ${I(h)}`, F = "a list of strings and RegExp patterns", be = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", xe = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", Se = `a list of log types: ${I(g)}`, Ce = "true, false or a list of diagnostic codes";
|
|
195
|
+
function I(e) {
|
|
196
196
|
let t = e.map((e) => `"${e}"`);
|
|
197
197
|
return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function L(e) {
|
|
200
200
|
return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function R(e) {
|
|
203
203
|
return e === null ? "null" : Array.isArray(e) ? "a list" : typeof e == "object" ? "an object" : `a ${typeof e}`;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function z(e, t, n, r, i, a = L) {
|
|
206
206
|
e.report("config.invalid", `${t} must be ${n}. The value is ${a(r)}. The library keeps ${i}.`);
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function B(e, t, n, r, i) {
|
|
209
209
|
if (t === void 0) return r;
|
|
210
210
|
let a = n.find((e) => e === t);
|
|
211
|
-
return a === void 0 ? (i.report("config.invalid", `${e} must be ${
|
|
211
|
+
return a === void 0 ? (i.report("config.invalid", `${e} must be ${I(n)}. The library keeps "${r}".`), r) : a;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
return t === void 0 ? n : typeof t == "boolean" ? t : (
|
|
213
|
+
function V(e, t, n, r) {
|
|
214
|
+
return t === void 0 ? n : typeof t == "boolean" ? t : (z(r, e, "true or false", t, String(n)), n);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (
|
|
216
|
+
function H(e, t, n, r) {
|
|
217
|
+
return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (z(r, e, "a finite number of 0 or more", t, String(n)), n);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function U(e, t, n, r, i) {
|
|
220
220
|
if (t === void 0) return r;
|
|
221
221
|
let [a, o] = n;
|
|
222
|
-
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (
|
|
222
|
+
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (z(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function W(e, t, n, r, i) {
|
|
225
225
|
if (t === void 0) return r;
|
|
226
226
|
if (t === null) return null;
|
|
227
227
|
let [a, o] = n;
|
|
228
|
-
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (
|
|
228
|
+
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (z(i, e, `an integer from ${String(a)} to ${String(o)}, or null for no limit`, t, String(r)), r);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function G(e, t, n, r) {
|
|
231
231
|
if (t === void 0) return n;
|
|
232
|
-
if (t !== null) return typeof t == "function" ? t : (
|
|
233
|
-
}
|
|
234
|
-
var q = () => null;
|
|
235
|
-
function Ce(e, t, n) {
|
|
236
|
-
return e == null || typeof e == "function" || t ? K("redact", e, t, n) : (n.report("config.invalid", `redact must be ${E}. The value is ${z(e)}. The library drops each record until redact is a function or null.`), q);
|
|
232
|
+
if (t !== null) return typeof t == "function" ? t : (z(r, e, E, t, "the current value", R), n);
|
|
237
233
|
}
|
|
234
|
+
var K = () => null;
|
|
238
235
|
function we(e, t, n) {
|
|
239
|
-
return e
|
|
236
|
+
return e == null || typeof e == "function" || t ? G("redact", e, t, n) : (n.report("config.invalid", `redact must be ${E}. The value is ${R(e)}. The library drops each record until redact is a function or null.`), K);
|
|
240
237
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
238
|
+
function Te(e, t, n) {
|
|
239
|
+
return e === void 0 ? t : pe(e) ? [...e] : t.length > 0 ? (z(n, "processors", "a list of functions", e, "the current list", R), t) : (n.report("config.invalid", `processors must be a list of functions. The value is ${R(e)}. The library drops each record until processors is a list of functions or [].`), [K]);
|
|
243
240
|
}
|
|
244
|
-
function
|
|
245
|
-
return t === void 0 ? n :
|
|
241
|
+
function q(e, t, n, r) {
|
|
242
|
+
return t === void 0 ? n : typeof t == "string" ? t : (z(r, e, "a string", t, "the current value"), n);
|
|
246
243
|
}
|
|
247
|
-
function
|
|
244
|
+
function J(e, t, n, r) {
|
|
245
|
+
return t === void 0 ? n : T(t) ? t : (r.report("config.invalid", `${e} must be 0..1. The value is ${L(t)}. The library keeps ${String(n)}.`), n);
|
|
246
|
+
}
|
|
247
|
+
function Ee(e, t, n) {
|
|
248
248
|
if (e === void 0) return t;
|
|
249
|
-
if (!f(e)) return
|
|
249
|
+
if (!f(e)) return z(n, "sampling.rates", "an object of rates", e, "the current value"), t;
|
|
250
250
|
let r = [];
|
|
251
|
-
for (let [t, i] of Object.entries(e)) T(i) ? r.push([t, i]) : i !== void 0 && n.report("config.invalid", `sampling.rates["${t}"] must be 0..1. The value is ${
|
|
251
|
+
for (let [t, i] of Object.entries(e)) T(i) ? r.push([t, i]) : i !== void 0 && n.report("config.invalid", `sampling.rates["${t}"] must be 0..1. The value is ${L(i)}. The library ignores this entry.`);
|
|
252
252
|
return Object.fromEntries(r);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Y(e, t, n, r, i) {
|
|
255
255
|
let a = t ?? {}, o = Object.keys(r);
|
|
256
|
-
return Object.fromEntries(o.map((t) => [t,
|
|
256
|
+
return Object.fromEntries(o.map((t) => [t, U(`${e}.${t}`, a[t], r[t], n[t], i)]));
|
|
257
257
|
}
|
|
258
258
|
function X(e) {
|
|
259
259
|
if (typeof e != "string") return;
|
|
260
260
|
let t = e.toUpperCase();
|
|
261
261
|
return m.find((e) => e === t);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Z(e, t, n, r) {
|
|
264
264
|
if (t === void 0) return n;
|
|
265
265
|
let i = X(t);
|
|
266
|
-
return i === void 0 ? (
|
|
266
|
+
return i === void 0 ? (z(r, e, P, t, `"${n}"`), n) : i;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function De(e, t, n) {
|
|
269
269
|
if (e === void 0) return t;
|
|
270
|
-
if (!f(e)) return
|
|
270
|
+
if (!f(e)) return z(n, "minLevels", "an object of level names", e, "the current value"), t;
|
|
271
271
|
let r = [];
|
|
272
272
|
for (let [t, i] of Object.entries(e)) {
|
|
273
273
|
let e = X(i);
|
|
274
|
-
t !== "" && e !== void 0 ? r.push([t, e]) :
|
|
274
|
+
t !== "" && e !== void 0 ? r.push([t, e]) : z(n, `minLevels["${t}"]`, P, i, "minLevel for it");
|
|
275
275
|
}
|
|
276
276
|
return Object.fromEntries(r);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Q(e, t, n, r, i, a) {
|
|
279
279
|
if (t === void 0) return n;
|
|
280
|
-
if (!Array.isArray(t)) return
|
|
280
|
+
if (!Array.isArray(t)) return z(a, e, r, t, "the current list"), n;
|
|
281
281
|
let o = [], s = t;
|
|
282
282
|
for (let t of s) {
|
|
283
283
|
let n = i(t);
|
|
284
|
-
n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${
|
|
284
|
+
n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${L(t)}. ${e} must be ${r}.`) : o.push(n);
|
|
285
285
|
}
|
|
286
286
|
return o;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Oe(e) {
|
|
289
289
|
return f(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ?
|
|
291
|
+
function ke(e, t, n, r) {
|
|
292
|
+
return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? Q(e, t, [], Ce, Ae, r) : (z(r, e, Ce, t, "the current value"), n);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Ae(e) {
|
|
295
295
|
return typeof e == "string" ? e : void 0;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function je(e) {
|
|
298
298
|
return g.find((t) => t === e);
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Me(e) {
|
|
301
301
|
return typeof e == "string" || e instanceof RegExp ? e : void 0;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Ne(e) {
|
|
304
304
|
return h.find((t) => t === e);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Pe(e) {
|
|
307
307
|
if (typeof e == "string") try {
|
|
308
308
|
let { origin: t } = new URL(e);
|
|
309
309
|
return t === ve ? void 0 : t;
|
|
@@ -312,7 +312,7 @@ function Q(e) {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
function Fe(e) {
|
|
315
|
-
return e instanceof RegExp ? e :
|
|
315
|
+
return e instanceof RegExp ? e : Pe(e);
|
|
316
316
|
}
|
|
317
317
|
function Ie(e) {
|
|
318
318
|
return f(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
|
|
@@ -324,13 +324,13 @@ function Le(e, t, n) {
|
|
|
324
324
|
function Re(e) {
|
|
325
325
|
return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
|
|
326
326
|
}
|
|
327
|
-
function ze(e,
|
|
328
|
-
return e === void 0 ?
|
|
327
|
+
function ze(e, t, n) {
|
|
328
|
+
return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Re(e) ? e : (n.report("config.invalid", `serializer must be "${s}", "ecs" or an implementation. The library keeps the current serializer.`), t ?? "otlp");
|
|
329
329
|
}
|
|
330
|
-
var Be = new Set(Object.keys(
|
|
330
|
+
var Be = new Set(Object.keys(o));
|
|
331
331
|
function Ve(e, t) {
|
|
332
332
|
let n = {};
|
|
333
|
-
if (e !== void 0 && !f(e)) return
|
|
333
|
+
if (e !== void 0 && !f(e)) return z(t, "consoleOutput.styles", "an object of CSS strings", e, "the styles"), n;
|
|
334
334
|
let r = Object.entries(e ?? {});
|
|
335
335
|
for (let [e, i] of r) Be.has(e) ? i !== void 0 && (typeof i == "string" ? n[e] = i : t.report("config.invalid", `consoleOutput.styles.${e} must be a string. The library keeps the current style.`)) : t.report("config.invalid", `The library ignores the unknown consoleOutput.styles key "${e}". Check the spelling.`);
|
|
336
336
|
return n;
|
|
@@ -338,7 +338,7 @@ function Ve(e, t) {
|
|
|
338
338
|
function He(e, t, n) {
|
|
339
339
|
if (e === void 0) return t;
|
|
340
340
|
let r = X(e);
|
|
341
|
-
return r === void 0 ? (
|
|
341
|
+
return r === void 0 ? (z(n, "consoleOutput.level", P, e, "the current console level"), t) : r;
|
|
342
342
|
}
|
|
343
343
|
function Ue(e, t, n) {
|
|
344
344
|
if (e === void 0) return t;
|
|
@@ -347,12 +347,12 @@ function Ue(e, t, n) {
|
|
|
347
347
|
styles: t.styles
|
|
348
348
|
};
|
|
349
349
|
if (e === !0) return {
|
|
350
|
-
level:
|
|
350
|
+
level: a,
|
|
351
351
|
styles: t.styles
|
|
352
352
|
};
|
|
353
353
|
if (typeof e == "string") {
|
|
354
354
|
let r = X(e);
|
|
355
|
-
return r === void 0 ? (
|
|
355
|
+
return r === void 0 ? (z(n, "consoleOutput", P, e, "the current console level"), t) : {
|
|
356
356
|
level: r,
|
|
357
357
|
styles: t.styles
|
|
358
358
|
};
|
|
@@ -368,41 +368,41 @@ function Ue(e, t, n) {
|
|
|
368
368
|
function We(e, t, n) {
|
|
369
369
|
let r = e ?? {};
|
|
370
370
|
return {
|
|
371
|
-
defaultRate:
|
|
372
|
-
remoteMaxRate:
|
|
373
|
-
rates:
|
|
374
|
-
alwaysSampleTypes:
|
|
375
|
-
alwaysSampleFrom:
|
|
376
|
-
errorCeiling:
|
|
377
|
-
errorCeilingWindowMs:
|
|
378
|
-
remote:
|
|
371
|
+
defaultRate: J("sampling.defaultRate", r.defaultRate, t.defaultRate, n),
|
|
372
|
+
remoteMaxRate: J("sampling.remoteMaxRate", r.remoteMaxRate, t.remoteMaxRate, n),
|
|
373
|
+
rates: Ee(r.rates, t.rates, n),
|
|
374
|
+
alwaysSampleTypes: Q("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, Se, je, n),
|
|
375
|
+
alwaysSampleFrom: Z("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
|
|
376
|
+
errorCeiling: W("sampling.errorCeiling", r.errorCeiling, y, t.errorCeiling, n),
|
|
377
|
+
errorCeilingWindowMs: U("sampling.errorCeilingWindowMs", r.errorCeilingWindowMs, v, t.errorCeilingWindowMs, n),
|
|
378
|
+
remote: V("sampling.remote", r.remote, t.remote, n)
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
function Ge(e, t, n) {
|
|
382
382
|
let r = e ?? {};
|
|
383
383
|
return {
|
|
384
|
-
sourcePolicy:
|
|
385
|
-
maxMessageBytes:
|
|
386
|
-
maxRecordsPerMessage:
|
|
387
|
-
maxMessagesPerSecond:
|
|
388
|
-
mode:
|
|
389
|
-
trustedOrigins:
|
|
390
|
-
openFinRole:
|
|
384
|
+
sourcePolicy: B("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
|
|
385
|
+
maxMessageBytes: W("bus.maxMessageBytes", r.maxMessageBytes, b, t.maxMessageBytes, n),
|
|
386
|
+
maxRecordsPerMessage: W("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, b, t.maxRecordsPerMessage, n),
|
|
387
|
+
maxMessagesPerSecond: W("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, b, t.maxMessagesPerSecond, n),
|
|
388
|
+
mode: B("bus.mode", r.mode, ie, t.mode, n),
|
|
389
|
+
trustedOrigins: Q("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, xe, Pe, n),
|
|
390
|
+
openFinRole: B("bus.openFinRole", r.openFinRole, ae, t.openFinRole, n)
|
|
391
391
|
};
|
|
392
392
|
}
|
|
393
393
|
function Ke(e, t, n) {
|
|
394
394
|
let r = e ?? {};
|
|
395
395
|
return {
|
|
396
|
-
scope:
|
|
397
|
-
maxAgeMs:
|
|
396
|
+
scope: B("journey.scope", r.scope, oe, t.scope, n),
|
|
397
|
+
maxAgeMs: U("journey.maxAgeMs", r.maxAgeMs, fe, t.maxAgeMs, n)
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
400
|
function qe(e, t, n) {
|
|
401
401
|
let r = e ?? {};
|
|
402
402
|
return {
|
|
403
|
-
maxBatches:
|
|
404
|
-
maxAgeMs:
|
|
405
|
-
maxAttempts:
|
|
403
|
+
maxBatches: U("retention.maxBatches", r.maxBatches, ce, t.maxBatches, n),
|
|
404
|
+
maxAgeMs: W("retention.maxAgeMs", r.maxAgeMs, le, t.maxAgeMs, n),
|
|
405
|
+
maxAttempts: W("retention.maxAttempts", r.maxAttempts, ue, t.maxAttempts, n)
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
408
|
function $(e, t, n, r, i) {
|
|
@@ -416,71 +416,69 @@ function $(e, t, n, r, i) {
|
|
|
416
416
|
function Je(e, t, n) {
|
|
417
417
|
let r = e ?? {}, i = {
|
|
418
418
|
...t,
|
|
419
|
-
urlTransform:
|
|
420
|
-
remoteToggles:
|
|
421
|
-
resourceTiming: $("resourceTiming", r.resourceTiming, t.resourceTiming, n, (e, t) => ({ slowMs:
|
|
422
|
-
interactions: $("interactions", r.interactions, t.interactions, n, (e, t) =>
|
|
423
|
-
console: $("console", r.console, t.console, n, (e, t) => ({ levels:
|
|
424
|
-
longFrames: $("longFrames", r.longFrames, t.longFrames, n, (e, t) => ({ thresholdMs:
|
|
425
|
-
userTiming: $("userTiming", r.userTiming, t.userTiming, n, (e, t) => ({ include:
|
|
426
|
-
webVitals: $("webVitals", r.webVitals, t.webVitals, n, (e, t) => ({ loader:
|
|
427
|
-
ignoreUrls:
|
|
428
|
-
propagateTraceHeaderTo:
|
|
429
|
-
plugins:
|
|
419
|
+
urlTransform: G("capture.urlTransform", r.urlTransform, t.urlTransform, n),
|
|
420
|
+
remoteToggles: Q("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => d.find((t) => t === e), n),
|
|
421
|
+
resourceTiming: $("resourceTiming", r.resourceTiming, t.resourceTiming, n, (e, t) => ({ slowMs: H("capture.resourceTiming.slowMs", e.slowMs, t.slowMs ?? 1e3, n) })),
|
|
422
|
+
interactions: $("interactions", r.interactions, t.interactions, n, (e, t) => Xe(e, t, n)),
|
|
423
|
+
console: $("console", r.console, t.console, n, (e, t) => ({ levels: Q("capture.console.levels", e.levels, t.levels ?? ["error", "warn"], ye, Ne, n) })),
|
|
424
|
+
longFrames: $("longFrames", r.longFrames, t.longFrames, n, (e, t) => ({ thresholdMs: H("capture.longFrames.thresholdMs", e.thresholdMs, t.thresholdMs ?? 100, n) })),
|
|
425
|
+
userTiming: $("userTiming", r.userTiming, t.userTiming, n, (e, t) => ({ include: Q("capture.userTiming.include", e.include, t.include ?? [], F, Me, n) })),
|
|
426
|
+
webVitals: $("webVitals", r.webVitals, t.webVitals, n, (e, t) => ({ loader: G("capture.webVitals.loader", e.loader, t.loader, n) })),
|
|
427
|
+
ignoreUrls: Q("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, F, Me, n),
|
|
428
|
+
propagateTraceHeaderTo: Q("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, be, Fe, n),
|
|
429
|
+
plugins: Q("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", Oe, n)
|
|
430
430
|
};
|
|
431
|
-
for (let e of _e) i[e] =
|
|
431
|
+
for (let e of _e) i[e] = V(`capture.${e}`, r[e], t[e], n);
|
|
432
432
|
return i;
|
|
433
433
|
}
|
|
434
|
-
function Ye(e
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
typeof document < "u" && document.createElement("div").matches(i);
|
|
434
|
+
function Ye(e) {
|
|
435
|
+
if (typeof document > "u") return !0;
|
|
436
|
+
try {
|
|
437
|
+
return document.createElement("div").matches(e), !0;
|
|
439
438
|
} catch {
|
|
440
|
-
|
|
439
|
+
return !1;
|
|
441
440
|
}
|
|
441
|
+
}
|
|
442
|
+
function Xe(e, t, n) {
|
|
443
|
+
let r = e.ignoreSelector, i = r === void 0 ? t.ignoreSelector : r;
|
|
444
|
+
i != null && (typeof i == "string" && Ye(i) || (n.report("config.invalid", "capture.interactions.ignoreSelector must be a valid CSS selector or null."), i = t.ignoreSelector));
|
|
442
445
|
let a = t.actionAttribute ?? "data-observability-action";
|
|
443
|
-
|
|
446
|
+
e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? a = e.actionAttribute : z(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${a}"`));
|
|
447
|
+
let o = t.deadClickIgnoreSelector ?? "[data-observability-live]", s = e.deadClickIgnoreSelector;
|
|
448
|
+
return s !== void 0 && (typeof s == "string" && (s === "" || Ye(s)) ? o = s : z(n, "capture.interactions.deadClickIgnoreSelector", "a valid CSS selector, or \"\" to turn the live-region filter off", s, `"${o}"`)), {
|
|
444
449
|
actionAttribute: a,
|
|
445
|
-
text:
|
|
446
|
-
selector:
|
|
450
|
+
text: V("capture.interactions.text", e.text, t.text ?? !1, n),
|
|
451
|
+
selector: V("capture.interactions.selector", e.selector, t.selector ?? !1, n),
|
|
447
452
|
ignoreSelector: typeof i == "string" || i === null ? i : void 0,
|
|
448
|
-
maxTextChars:
|
|
449
|
-
rageClicks:
|
|
450
|
-
rageClickCount:
|
|
451
|
-
rageClickWindowMs:
|
|
452
|
-
deadClicks:
|
|
453
|
-
deadClickMs:
|
|
453
|
+
maxTextChars: U("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], t.maxTextChars ?? 50, n),
|
|
454
|
+
rageClicks: V("capture.interactions.rageClicks", e.rageClicks, t.rageClicks ?? !1, n),
|
|
455
|
+
rageClickCount: U("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], t.rageClickCount ?? 3, n),
|
|
456
|
+
rageClickWindowMs: U("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, x, t.rageClickWindowMs ?? 1e3, n),
|
|
457
|
+
deadClicks: V("capture.interactions.deadClicks", e.deadClicks, t.deadClicks ?? !1, n),
|
|
458
|
+
deadClickMs: U("capture.interactions.deadClickMs", e.deadClickMs, x, t.deadClickMs ?? 1e3, n),
|
|
459
|
+
deadClickIgnoreSelector: o
|
|
454
460
|
};
|
|
455
461
|
}
|
|
456
|
-
|
|
457
|
-
metricsEndpoint: "The library sends metric records as log records.",
|
|
458
|
-
tracesEndpoint: "The library sends no span."
|
|
459
|
-
};
|
|
460
|
-
function Ze(e, n, r, i, a) {
|
|
461
|
-
let o = j(e, n, r, a);
|
|
462
|
-
return o !== null && i !== "otlp" ? (a.report("config.invalid", `${e} needs serializer "${t}". ${Xe[e]}`), null) : o;
|
|
463
|
-
}
|
|
464
|
-
function Qe(e, t, n, r, i) {
|
|
462
|
+
function Ze(e, t, n, r, i) {
|
|
465
463
|
let a = { ...n };
|
|
466
464
|
for (let o of Object.keys(n)) {
|
|
467
465
|
let s = t?.[o], c = n[o], l = r.ranges[o], u = r.limits[o], d = r.choices?.[o], f = r.custom?.[o], p = c;
|
|
468
|
-
f ? p = f(`${e}.${o}`, s, c, i) : u ? p =
|
|
466
|
+
f ? p = f(`${e}.${o}`, s, c, i) : u ? p = W(`${e}.${o}`, s, u, c, i) : typeof c == "number" && l ? p = U(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? p = V(`${e}.${o}`, s, c, i) : d ? p = B(`${e}.${o}`, s, d, String(c), i) : s === void 0 || typeof s == "string" ? p = s ?? c : z(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: p });
|
|
469
467
|
}
|
|
470
468
|
return a;
|
|
471
469
|
}
|
|
472
|
-
function
|
|
473
|
-
let
|
|
474
|
-
for (let
|
|
475
|
-
let
|
|
476
|
-
|
|
477
|
-
...
|
|
478
|
-
[
|
|
470
|
+
function Qe(e, t) {
|
|
471
|
+
let n = e;
|
|
472
|
+
for (let r of i) {
|
|
473
|
+
let i = e[r];
|
|
474
|
+
i !== void 0 && !f(i) && (z(t, r, "an object", i, "the current values"), n = {
|
|
475
|
+
...n,
|
|
476
|
+
[r]: void 0
|
|
479
477
|
});
|
|
480
478
|
}
|
|
481
|
-
return
|
|
479
|
+
return n;
|
|
482
480
|
}
|
|
483
|
-
function
|
|
481
|
+
function $e(e, t, n) {
|
|
484
482
|
let { capture: r, sampling: i } = t, a = (e, t) => {
|
|
485
483
|
n.report("config.invalid", `${e} has no effect ${t}. The value stays.`);
|
|
486
484
|
};
|
|
@@ -488,73 +486,73 @@ function et(e, t, n) {
|
|
|
488
486
|
let o = r.fetch || r.xhr || r.remoteToggles.includes("fetch") || r.remoteToggles.includes("xhr");
|
|
489
487
|
(e.capture?.propagateTraceHeaderTo !== void 0 || e.capture?.fetch !== void 0 || e.capture?.xhr !== void 0) && r.propagateTraceHeaderTo.length > 0 && !o && a("capture.propagateTraceHeaderTo", "without capture.fetch or capture.xhr");
|
|
490
488
|
}
|
|
491
|
-
function
|
|
492
|
-
let
|
|
493
|
-
...
|
|
489
|
+
function et(e, t, n) {
|
|
490
|
+
let i = n ?? r, a = Qe(e, t), o = Object.fromEntries(Object.keys(N).map((e) => [e, Ze(e, a[e], i[e], N[e], t)])), s = {
|
|
491
|
+
...i,
|
|
494
492
|
...o,
|
|
495
|
-
lockConfiguration:
|
|
496
|
-
loggerCache: { maxEntries:
|
|
493
|
+
lockConfiguration: V("lockConfiguration", a.lockConfiguration, i.lockConfiguration, t),
|
|
494
|
+
loggerCache: { maxEntries: W("loggerCache.maxEntries", a.loggerCache?.maxEntries, y, i.loggerCache.maxEntries, t) },
|
|
497
495
|
securityContext: {
|
|
498
|
-
id:
|
|
499
|
-
isolation:
|
|
496
|
+
id: q("securityContext.id", a.securityContext?.id, i.securityContext.id, t) || i.securityContext.id,
|
|
497
|
+
isolation: V("securityContext.isolation", a.securityContext?.isolation, i.securityContext.isolation, t)
|
|
500
498
|
},
|
|
501
|
-
endpoint: M(
|
|
502
|
-
serviceName:
|
|
503
|
-
serviceVersion:
|
|
504
|
-
environment:
|
|
505
|
-
enabled:
|
|
506
|
-
payloadMode:
|
|
507
|
-
minLevel:
|
|
508
|
-
minLevels:
|
|
509
|
-
processors:
|
|
510
|
-
compression:
|
|
511
|
-
credentials:
|
|
512
|
-
headers: Le(
|
|
513
|
-
identity:
|
|
514
|
-
serializer: ze(
|
|
515
|
-
consoleOutput: Ue(
|
|
516
|
-
sampling: We(
|
|
517
|
-
bus: Ge(
|
|
518
|
-
batching:
|
|
519
|
-
retention: qe(
|
|
520
|
-
limits:
|
|
521
|
-
journey: Ke(
|
|
522
|
-
capture: Je(
|
|
523
|
-
transport:
|
|
524
|
-
transportOnExit:
|
|
525
|
-
transportWorker:
|
|
526
|
-
otelLoader:
|
|
527
|
-
contextProvider:
|
|
528
|
-
redact:
|
|
529
|
-
onDiagnostic:
|
|
530
|
-
onDrop:
|
|
499
|
+
endpoint: M(a.endpoint, i.endpoint, t),
|
|
500
|
+
serviceName: q("serviceName", a.serviceName, i.serviceName, t),
|
|
501
|
+
serviceVersion: q("serviceVersion", a.serviceVersion, i.serviceVersion, t),
|
|
502
|
+
environment: q("environment", a.environment, i.environment, t),
|
|
503
|
+
enabled: V("enabled", a.enabled, i.enabled, t),
|
|
504
|
+
payloadMode: B("payloadMode", a.payloadMode, ["copy", "defer"], i.payloadMode, t),
|
|
505
|
+
minLevel: Z("minLevel", a.minLevel, i.minLevel, t),
|
|
506
|
+
minLevels: De(a.minLevels, i.minLevels, t),
|
|
507
|
+
processors: Te(a.processors, i.processors, t),
|
|
508
|
+
compression: B("compression", a.compression, ee, i.compression, t),
|
|
509
|
+
credentials: B("credentials", a.credentials, te, i.credentials, t),
|
|
510
|
+
headers: Le(a.headers, i.headers, t),
|
|
511
|
+
identity: B("identity", a.identity, re, i.identity, t),
|
|
512
|
+
serializer: ze(a.serializer, n?.serializer, t),
|
|
513
|
+
consoleOutput: Ue(a.consoleOutput, i.consoleOutput, t),
|
|
514
|
+
sampling: We(a.sampling, i.sampling, t),
|
|
515
|
+
bus: Ge(a.bus, i.bus, t),
|
|
516
|
+
batching: Y("batching", a.batching, i.batching, se, t),
|
|
517
|
+
retention: qe(a.retention, i.retention, t),
|
|
518
|
+
limits: Y("limits", a.limits, i.limits, de, t),
|
|
519
|
+
journey: Ke(a.journey, i.journey, t),
|
|
520
|
+
capture: Je(a.capture, i.capture, t),
|
|
521
|
+
transport: G("transport", a.transport, i.transport, t),
|
|
522
|
+
transportOnExit: G("transportOnExit", a.transportOnExit, i.transportOnExit, t),
|
|
523
|
+
transportWorker: G("transportWorker", a.transportWorker, i.transportWorker, t),
|
|
524
|
+
otelLoader: G("otelLoader", a.otelLoader, i.otelLoader, t),
|
|
525
|
+
contextProvider: G("contextProvider", a.contextProvider, i.contextProvider, t),
|
|
526
|
+
redact: we(a.redact, i.redact, t),
|
|
527
|
+
onDiagnostic: G("onDiagnostic", a.onDiagnostic, i.onDiagnostic, t),
|
|
528
|
+
onDrop: G("onDrop", a.onDrop, i.onDrop, t)
|
|
531
529
|
};
|
|
532
|
-
for (let e of ["metricsEndpoint", "tracesEndpoint"])
|
|
533
|
-
|
|
534
|
-
for (let e of ["metricsEndpoint", "tracesEndpoint"])
|
|
535
|
-
|
|
530
|
+
for (let e of ["metricsEndpoint", "tracesEndpoint"]) s[e] = j(e, a[e], i[e], t);
|
|
531
|
+
s.endpoint === "" && s.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
|
|
532
|
+
for (let e of ["metricsEndpoint", "tracesEndpoint"]) s[e] !== null && s.endpoint === null && !s.transport && t.report("config.invalid", `${e} needs endpoint or transport. The library sends nothing to ${e}.`);
|
|
533
|
+
s.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${l}'.`), l), s.capture.ignoreUrls = s.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint && e !== n?.replay.endpoint);
|
|
536
534
|
for (let e of [
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
]) e && !
|
|
542
|
-
return
|
|
543
|
-
}
|
|
544
|
-
function
|
|
545
|
-
let
|
|
546
|
-
for (let
|
|
547
|
-
for (let
|
|
548
|
-
let
|
|
549
|
-
if (typeof
|
|
550
|
-
let
|
|
551
|
-
for (let e of Object.keys(
|
|
535
|
+
s.endpoint,
|
|
536
|
+
s.metricsEndpoint,
|
|
537
|
+
s.tracesEndpoint,
|
|
538
|
+
s.replay.endpoint
|
|
539
|
+
]) e && !s.capture.ignoreUrls.includes(e) && (s.capture.ignoreUrls = [...s.capture.ignoreUrls, e]);
|
|
540
|
+
return s.delivery.retryMaxDelayMs < s.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), s.delivery.retryBaseDelayMs = i.delivery.retryBaseDelayMs, s.delivery.retryMaxDelayMs = i.delivery.retryMaxDelayMs), $e(a, s, t), tt(e, t), s;
|
|
541
|
+
}
|
|
542
|
+
function tt(e, t) {
|
|
543
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(r), ...c]);
|
|
544
|
+
for (let r of Object.keys(e)) n.has(r) || t.report("config.invalid", `The library ignores the unknown config key "${r}". Check the spelling.`);
|
|
545
|
+
for (let n of i) {
|
|
546
|
+
let i = e[n];
|
|
547
|
+
if (typeof i != "object" || !i) continue;
|
|
548
|
+
let a = /* @__PURE__ */ new Set([...Object.keys(r[n]), ...u[n]]);
|
|
549
|
+
for (let e of Object.keys(i)) a.has(e) || t.report("config.invalid", `The library ignores the unknown config key "${n}.${e}". Check the spelling.`);
|
|
552
550
|
}
|
|
553
551
|
}
|
|
554
|
-
function
|
|
555
|
-
for (let
|
|
556
|
-
for (let
|
|
552
|
+
function nt(e, t) {
|
|
553
|
+
for (let n of Object.keys(t)) i.includes(n) || Object.assign(e, { [n]: t[n] });
|
|
554
|
+
for (let n of i) Object.assign(e[n], t[n]);
|
|
557
555
|
}
|
|
558
|
-
export { M as a, j as i,
|
|
556
|
+
export { M as a, j as i, nt as n, et as r, K as t };
|
|
559
557
|
|
|
560
|
-
//# sourceMappingURL=config-
|
|
558
|
+
//# sourceMappingURL=config-CSNcS7OZ.js.map
|