@utk09/ui-observability 1.0.0 → 1.2.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 +111 -219
- package/README.md +24 -26
- package/dist/{batch-CXmPmTse.js → batch-120Kc9jr.js} +3 -3
- package/dist/{batch-CXmPmTse.js.map → batch-120Kc9jr.js.map} +1 -1
- package/dist/{batch-mmPigCpi.cjs → batch-C3uNp5kU.cjs} +2 -2
- package/dist/{batch-mmPigCpi.cjs.map → batch-C3uNp5kU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +31 -2
- package/dist/bus/bus.d.ts +31 -2
- package/dist/bus-Dj8IEVcC.cjs +2 -0
- package/dist/bus-Dj8IEVcC.cjs.map +1 -0
- package/dist/{bus-C39wspFV.js → bus-DyNafxZN.js} +127 -104
- package/dist/bus-DyNafxZN.js.map +1 -0
- package/dist/capture/errors.d.cts +10 -0
- package/dist/capture/errors.d.ts +10 -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/capture/replay.d.cts +1 -1
- package/dist/capture/replay.d.ts +1 -1
- package/dist/capture/types.d.cts +5 -0
- package/dist/capture/types.d.ts +5 -0
- package/dist/capture/web-vitals.d.cts +1 -0
- package/dist/capture/web-vitals.d.ts +1 -0
- package/dist/{compression-tVtXwVjX.js → compression-BWkDWY3v.js} +2 -2
- package/dist/{compression-tVtXwVjX.js.map → compression-BWkDWY3v.js.map} +1 -1
- package/dist/{compression-CvED_Jel.cjs → compression-CEVe7NPX.cjs} +2 -2
- package/dist/{compression-CvED_Jel.cjs.map → compression-CEVe7NPX.cjs.map} +1 -1
- package/dist/config-C0PtemvC.cjs +2 -0
- package/dist/config-C0PtemvC.cjs.map +1 -0
- package/dist/config-DK1Zf7jn.js +556 -0
- package/dist/config-DK1Zf7jn.js.map +1 -0
- package/dist/{console-BGgGnjSi.js → console-CAyCQOpm.js} +5 -5
- package/dist/{console-BGgGnjSi.js.map → console-CAyCQOpm.js.map} +1 -1
- package/dist/{console-CSZ5_Vx5.cjs → console-Dk6GH4yj.cjs} +2 -2
- package/dist/{console-CSZ5_Vx5.cjs.map → console-Dk6GH4yj.cjs.map} +1 -1
- package/dist/{constants-CUyd9cTZ.js → constants-CEHN6KuY.js} +46 -25
- package/dist/constants-CEHN6KuY.js.map +1 -0
- package/dist/constants-NtiQDWL_.cjs +2 -0
- package/dist/constants-NtiQDWL_.cjs.map +1 -0
- package/dist/constants.d.cts +23 -0
- package/dist/constants.d.ts +23 -0
- package/dist/core/config.d.cts +9 -3
- package/dist/core/config.d.ts +9 -3
- package/dist/core/diagnostics.d.cts +1 -1
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/pipeline.d.cts +11 -0
- package/dist/core/pipeline.d.ts +11 -0
- package/dist/core/record.d.cts +2 -2
- package/dist/core/record.d.ts +2 -2
- 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/core/sender.d.cts +3 -2
- package/dist/core/sender.d.ts +3 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-DMzUfiQc.cjs} +2 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-DMzUfiQc.cjs.map} +1 -1
- package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-w78W46zr.js} +4 -4
- package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-w78W46zr.js.map} +1 -1
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.js +36 -36
- package/dist/doctor.js.map +1 -1
- package/dist/errors-07pmZ7VY.cjs +3 -0
- package/dist/errors-07pmZ7VY.cjs.map +1 -0
- package/dist/{errors-BE_EZV7Q.js → errors-C-LYbqyB.js} +27 -24
- package/dist/errors-C-LYbqyB.js.map +1 -0
- package/dist/{factory-CTi0Is3F.js → factory-BHYrcSaU.js} +39 -28
- package/dist/factory-BHYrcSaU.js.map +1 -0
- package/dist/factory-DsaNdcXp.cjs +2 -0
- package/dist/factory-DsaNdcXp.cjs.map +1 -0
- package/dist/{identity-DdhKgrpk.js → identity-Byh3gCdT.js} +35 -24
- package/dist/identity-Byh3gCdT.js.map +1 -0
- package/dist/identity-BzAzdQyv.cjs +2 -0
- package/dist/identity-BzAzdQyv.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 +453 -417
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-BYywz-v6.js} +17 -17
- package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-BYywz-v6.js.map} +1 -1
- package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-BfqGkLFe.cjs} +2 -2
- package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-BfqGkLFe.cjs.map} +1 -1
- package/dist/interactions-BXzEel4F.cjs +2 -0
- package/dist/interactions-BXzEel4F.cjs.map +1 -0
- package/dist/interactions-DdKPMWIN.js +207 -0
- package/dist/interactions-DdKPMWIN.js.map +1 -0
- package/dist/{journey-B4Adltjm.cjs → journey-BUmsrgaw.cjs} +2 -2
- package/dist/{journey-B4Adltjm.cjs.map → journey-BUmsrgaw.cjs.map} +1 -1
- package/dist/{journey-D2_sia57.js → journey-Nu655gEO.js} +14 -14
- package/dist/{journey-D2_sia57.js.map → journey-Nu655gEO.js.map} +1 -1
- package/dist/{library-console-CPW6bvZH.cjs → library-console-DdIlzzph.cjs} +2 -2
- package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DdIlzzph.cjs.map} +1 -1
- package/dist/{library-console-Btrzt814.js → library-console-amePMnP8.js} +2 -2
- package/dist/{library-console-Btrzt814.js.map → library-console-amePMnP8.js.map} +1 -1
- package/dist/{library-request-BJ9PLRaD.js → library-request-Cv7C05jf.js} +2 -2
- package/dist/{library-request-BJ9PLRaD.js.map → library-request-Cv7C05jf.js.map} +1 -1
- package/dist/{library-request-D7OvTxZV.cjs → library-request-DO3Ec7KE.cjs} +2 -2
- package/dist/{library-request-D7OvTxZV.cjs.map → library-request-DO3Ec7KE.cjs.map} +1 -1
- package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-B5yfH5is.cjs} +2 -2
- package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-B5yfH5is.cjs.map} +1 -1
- package/dist/{lifecycle-22CUCrc9.js → lifecycle-CMHz2Zbs.js} +2 -2
- package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-CMHz2Zbs.js.map} +1 -1
- package/dist/{log-record-BNiLfqtL.js → log-record-B_nSqxoe.js} +2 -2
- package/dist/{log-record-BNiLfqtL.js.map → log-record-B_nSqxoe.js.map} +1 -1
- package/dist/{log-record-CkivuiEl.cjs → log-record-Bdywwg0k.cjs} +2 -2
- package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bdywwg0k.cjs.map} +1 -1
- package/dist/{long-frames-DNFaRnC3.js → long-frames-6NGl1-uN.js} +3 -3
- package/dist/{long-frames-DNFaRnC3.js.map → long-frames-6NGl1-uN.js.map} +1 -1
- package/dist/{long-frames-BUUbXd-B.cjs → long-frames-D9DfSWqv.cjs} +2 -2
- package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-D9DfSWqv.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 +27 -11
- package/dist/models/config.d.ts +27 -11
- package/dist/models/serializer.d.cts +3 -1
- package/dist/models/serializer.d.ts +3 -1
- package/dist/{network-CGMLQ-mA.cjs → network-BNHBI0Fc.cjs} +2 -2
- package/dist/{network-CGMLQ-mA.cjs.map → network-BNHBI0Fc.cjs.map} +1 -1
- package/dist/{network-on2zZT6H.js → network-Cc3tSB7e.js} +5 -5
- package/dist/{network-on2zZT6H.js.map → network-Cc3tSB7e.js.map} +1 -1
- package/dist/observed-windows-8JtCsIr1.js +64 -0
- package/dist/observed-windows-8JtCsIr1.js.map +1 -0
- package/dist/observed-windows-BlE25nrn.cjs +2 -0
- package/dist/observed-windows-BlE25nrn.cjs.map +1 -0
- package/dist/openfin-Bxelt0yg.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/{otlp-DimfrRor.js → otlp-Btix3EBa.js} +7 -7
- package/dist/{otlp-DimfrRor.js.map → otlp-Btix3EBa.js.map} +1 -1
- package/dist/{otlp-BENHf3g9.cjs → otlp-CFSW-Dno.cjs} +2 -2
- package/dist/{otlp-BENHf3g9.cjs.map → otlp-CFSW-Dno.cjs.map} +1 -1
- package/dist/patch-DlcKzIi-.cjs +2 -0
- package/dist/patch-DlcKzIi-.cjs.map +1 -0
- package/dist/patch-Sr1wKg7W.js +9 -0
- package/dist/patch-Sr1wKg7W.js.map +1 -0
- package/dist/platform-BZjp9wp1.cjs +2 -0
- package/dist/platform-BZjp9wp1.cjs.map +1 -0
- package/dist/platform-Dba6R3Hp.js +75 -0
- package/dist/platform-Dba6R3Hp.js.map +1 -0
- package/dist/{profiler-BAZoh7A4.js → profiler-DNKcqu09.js} +60 -60
- package/dist/{profiler-BAZoh7A4.js.map → profiler-DNKcqu09.js.map} +1 -1
- package/dist/{profiler-D4tJpDRc.cjs → profiler-DpoPi1hH.cjs} +2 -2
- package/dist/{profiler-D4tJpDRc.cjs.map → profiler-DpoPi1hH.cjs.map} +1 -1
- package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-C9zJNd8_.cjs} +2 -2
- package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-C9zJNd8_.cjs.map} +1 -1
- package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-CGXZeZ_3.js} +16 -16
- package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-CGXZeZ_3.js.map} +1 -1
- package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-DNK96vLa.js} +25 -25
- package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-DNK96vLa.js.map} +1 -1
- package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-DuMFRlit.cjs} +2 -2
- package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-DuMFRlit.cjs.map} +1 -1
- package/dist/replay-Cab-lSit.cjs +2 -0
- package/dist/replay-Cab-lSit.cjs.map +1 -0
- package/dist/{replay-Ds-ANH34.js → replay-Dy6OiaOZ.js} +104 -77
- package/dist/replay-Dy6OiaOZ.js.map +1 -0
- package/dist/{reports-BDSe4dFH.cjs → reports-CGK9YQch.cjs} +2 -2
- package/dist/{reports-BDSe4dFH.cjs.map → reports-CGK9YQch.cjs.map} +1 -1
- package/dist/{reports-C-thq-bk.js → reports-CX57-S9s.js} +3 -3
- package/dist/{reports-C-thq-bk.js.map → reports-CX57-S9s.js.map} +1 -1
- package/dist/{resource-timing-eUl2dNgC.js → resource-timing-CWVDCbrY.js} +4 -4
- package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-CWVDCbrY.js.map} +1 -1
- package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-DalulXiR.cjs} +2 -2
- package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-DalulXiR.cjs.map} +1 -1
- package/dist/response-body-Cpz5__4g.cjs +3 -0
- package/dist/response-body-Cpz5__4g.cjs.map +1 -0
- package/dist/{response-body-eoSQpLiH.js → response-body-yi92Rpvo.js} +109 -109
- package/dist/response-body-yi92Rpvo.js.map +1 -0
- package/dist/{rotation-Cwct4ckk.js → rotation-ChBbNDE2.js} +27 -28
- package/dist/rotation-ChBbNDE2.js.map +1 -0
- package/dist/rotation-fTnNJcfH.cjs +2 -0
- package/dist/rotation-fTnNJcfH.cjs.map +1 -0
- package/dist/{sampling-BlrI8jor.js → sampling-DZTOD28D.js} +16 -16
- package/dist/{sampling-BlrI8jor.js.map → sampling-DZTOD28D.js.map} +1 -1
- package/dist/{sampling-mXt4dstx.cjs → sampling-wAVJIZXp.cjs} +2 -2
- package/dist/{sampling-mXt4dstx.cjs.map → sampling-wAVJIZXp.cjs.map} +1 -1
- package/dist/{sanitize-Ba0KqU06.js → sanitize-B2GKlSFp.js} +2 -2
- package/dist/{sanitize-Ba0KqU06.js.map → sanitize-B2GKlSFp.js.map} +1 -1
- package/dist/{sanitize-DQyiI_KY.cjs → sanitize-BZdhoghq.cjs} +2 -2
- package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-BZdhoghq.cjs.map} +1 -1
- package/dist/{sender-Dv8rAmpV.js → sender-BRSpc7R8.js} +192 -178
- package/dist/sender-BRSpc7R8.js.map +1 -0
- package/dist/sender-CFu98DAB.cjs +2 -0
- package/dist/sender-CFu98DAB.cjs.map +1 -0
- package/dist/storage/emergency-queue.d.cts +3 -1
- package/dist/storage/emergency-queue.d.ts +3 -1
- package/dist/storage/stored-context.d.cts +3 -2
- package/dist/storage/stored-context.d.ts +3 -2
- package/dist/stored-context-CPLlzgpm.cjs +2 -0
- package/dist/stored-context-CPLlzgpm.cjs.map +1 -0
- package/dist/{stored-context-B2EzVuYm.js → stored-context-df1dEnht.js} +12 -10
- package/dist/stored-context-df1dEnht.js.map +1 -0
- package/dist/{storm-DjKetLKZ.js → storm-U3_ek1nA.js} +2 -2
- package/dist/{storm-DjKetLKZ.js.map → storm-U3_ek1nA.js.map} +1 -1
- package/dist/{storm-C-zYSdDX.cjs → storm-qiE_AMC7.cjs} +2 -2
- package/dist/{storm-C-zYSdDX.cjs.map → storm-qiE_AMC7.cjs.map} +1 -1
- package/dist/transport/exit-flush.d.cts +23 -0
- package/dist/transport/exit-flush.d.ts +23 -0
- package/dist/transport/http-transport.d.cts +3 -2
- package/dist/transport/http-transport.d.ts +3 -2
- package/dist/transport/retry-engine.d.cts +11 -3
- package/dist/transport/retry-engine.d.ts +11 -3
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-Bj6gYHeL.js} +2 -2
- package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-Bj6gYHeL.js.map} +1 -1
- package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-CuBh-ee5.cjs} +2 -2
- package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-CuBh-ee5.cjs.map} +1 -1
- package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BWqzYF2Q.cjs} +2 -2
- package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BWqzYF2Q.cjs.map} +1 -1
- package/dist/{user-timing-BePqb1uN.js → user-timing-Duz0d-OA.js} +2 -2
- package/dist/{user-timing-BePqb1uN.js.map → user-timing-Duz0d-OA.js.map} +1 -1
- package/dist/utils/identity.d.cts +5 -0
- package/dist/utils/identity.d.ts +5 -0
- package/dist/utils/lock.d.cts +3 -2
- package/dist/utils/lock.d.ts +3 -2
- package/dist/utils/openfin.d.cts +18 -6
- package/dist/utils/openfin.d.ts +18 -6
- package/dist/utils/patch.d.cts +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/platform.d.cts +6 -0
- package/dist/utils/platform.d.ts +6 -0
- package/dist/{web-socket-DSHgDiZ6.js → web-socket-CE_9Q22z.js} +5 -5
- package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-CE_9Q22z.js.map} +1 -1
- package/dist/{web-socket-CoIUBM3C.cjs → web-socket-sm3rD-A_.cjs} +2 -2
- package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-sm3rD-A_.cjs.map} +1 -1
- package/dist/{web-vitals-4pWACwaR.js → web-vitals-CGwXGF-M.js} +4 -4
- package/dist/web-vitals-CGwXGF-M.js.map +1 -0
- package/dist/web-vitals-Df4Wsfx9.cjs +2 -0
- package/dist/web-vitals-Df4Wsfx9.cjs.map +1 -0
- package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-D5VnCdWY.cjs} +2 -2
- package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-D5VnCdWY.cjs.map} +1 -1
- package/dist/{worker-protocol-x074Rpet.js → worker-protocol-h4-tRWqy.js} +6 -6
- package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-h4-tRWqy.js.map} +1 -1
- package/dist/{worker-server-CFe4nvos.cjs → worker-server-CF1yatXq.cjs} +2 -2
- package/dist/{worker-server-CFe4nvos.cjs.map → worker-server-CF1yatXq.cjs.map} +1 -1
- package/dist/worker-server-FYfKHQhJ.js +94 -0
- package/dist/{worker-server-iUVSjH8L.js.map → worker-server-FYfKHQhJ.js.map} +1 -1
- package/dist/worker-transport-COgY4RX8.cjs +2 -0
- package/dist/worker-transport-COgY4RX8.cjs.map +1 -0
- package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-jzX1IusG.js} +49 -45
- package/dist/worker-transport-jzX1IusG.js.map +1 -0
- package/llms.txt +14 -12
- 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 +0 -560
- 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/errors-BE_EZV7Q.js.map +0 -1
- package/dist/errors-CNPbesMs.cjs +0 -3
- package/dist/errors-CNPbesMs.cjs.map +0 -1
- package/dist/factory-CTi0Is3F.js.map +0 -1
- package/dist/factory-hRrH32v5.cjs +0 -2
- package/dist/factory-hRrH32v5.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/patch-BX8KrPCT.cjs +0 -2
- package/dist/patch-BX8KrPCT.cjs.map +0 -1
- package/dist/patch-UdPz1ea8.js +0 -8
- package/dist/patch-UdPz1ea8.js.map +0 -1
- package/dist/platform-BaaFIPCU.js +0 -62
- package/dist/platform-BaaFIPCU.js.map +0 -1
- package/dist/platform-CfA3-7sJ.cjs +0 -2
- package/dist/platform-CfA3-7sJ.cjs.map +0 -1
- package/dist/replay-B3gFXIZd.cjs +0 -2
- package/dist/replay-B3gFXIZd.cjs.map +0 -1
- package/dist/replay-Ds-ANH34.js.map +0 -1
- package/dist/response-body-YdNl-HkR.cjs +0 -3
- package/dist/response-body-YdNl-HkR.cjs.map +0 -1
- package/dist/response-body-eoSQpLiH.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/sender-BdRuNVhF.cjs +0 -2
- package/dist/sender-BdRuNVhF.cjs.map +0 -1
- package/dist/sender-Dv8rAmpV.js.map +0 -1
- package/dist/stored-context-B2EzVuYm.js.map +0 -1
- package/dist/stored-context-CXt7eHZL.cjs +0 -2
- package/dist/stored-context-CXt7eHZL.cjs.map +0 -1
- package/dist/web-vitals-4pWACwaR.js.map +0 -1
- package/dist/web-vitals-__X7t4pj.cjs +0 -2
- package/dist/web-vitals-__X7t4pj.cjs.map +0 -1
- package/dist/worker-server-iUVSjH8L.js +0 -94
- 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
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import { $t as e, At as t, D as n, G as r, I as i, L as a, R as o, dn as s, hr as c, mr as l, pr as u, zn as d } from "./constants-CEHN6KuY.js";
|
|
2
|
+
import { n as f, t as p } from "./guards-BlYGRK4l.js";
|
|
3
|
+
import { i as ee } from "./platform-Dba6R3Hp.js";
|
|
4
|
+
// src/core/config.ts
|
|
5
|
+
var m = Object.keys(t), te = ["gzip", "none"], ne = [
|
|
6
|
+
"omit",
|
|
7
|
+
"same-origin",
|
|
8
|
+
"include"
|
|
9
|
+
], re = [
|
|
10
|
+
"auto",
|
|
11
|
+
"indexeddb",
|
|
12
|
+
"localstorage",
|
|
13
|
+
"memory",
|
|
14
|
+
"none"
|
|
15
|
+
], ie = ["storage", "memory"], ae = [
|
|
16
|
+
"auto",
|
|
17
|
+
"sender",
|
|
18
|
+
"forwarder",
|
|
19
|
+
"off"
|
|
20
|
+
], oe = [
|
|
21
|
+
"auto",
|
|
22
|
+
"provider",
|
|
23
|
+
"client"
|
|
24
|
+
], se = [
|
|
25
|
+
"auto",
|
|
26
|
+
"context",
|
|
27
|
+
"tab",
|
|
28
|
+
"origin"
|
|
29
|
+
], h = [
|
|
30
|
+
"error",
|
|
31
|
+
"warn",
|
|
32
|
+
"info",
|
|
33
|
+
"log"
|
|
34
|
+
], g = [
|
|
35
|
+
"action",
|
|
36
|
+
"event",
|
|
37
|
+
"metric",
|
|
38
|
+
"log",
|
|
39
|
+
"system",
|
|
40
|
+
"span"
|
|
41
|
+
], ce = {
|
|
42
|
+
logFlushIntervalMs: [100, 6e4],
|
|
43
|
+
logBatchSize: [1, 1e3],
|
|
44
|
+
metricBatchSize: [1, 1e3]
|
|
45
|
+
}, le = [1, 5e3], ue = [6e4, 6048e5], de = [1, 20], fe = {
|
|
46
|
+
maxBodyChars: [256, 65536],
|
|
47
|
+
maxAttributeChars: [256, 65536],
|
|
48
|
+
maxAttributeCount: [1, 1024],
|
|
49
|
+
maxStackChars: [256, 65536],
|
|
50
|
+
maxDepth: [1, 16],
|
|
51
|
+
maxArrayLength: [1, 1e4],
|
|
52
|
+
maxNodes: [100, 1e5],
|
|
53
|
+
maxRecordBytes: [1024, n]
|
|
54
|
+
}, pe = [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"), me = (e) => Array.isArray(e) && e.every((e) => typeof e == "function"), C = (e) => e === null || typeof e == "function", w = (e) => e === null, he = /^[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", ge = (e) => C(e) || O(e) && Object.values(e).every((e) => typeof e == "string"), O = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
55
|
+
function k(e, t, n = L) {
|
|
56
|
+
return (r, i, a, o) => i === void 0 ? a : e(i) ? i : (z(o, r, t, i, "the current value", n), a);
|
|
57
|
+
}
|
|
58
|
+
function A(e, t, n, r, i) {
|
|
59
|
+
let a;
|
|
60
|
+
try {
|
|
61
|
+
a = new URL(t, ee());
|
|
62
|
+
} catch (t) {
|
|
63
|
+
return r.report("config.invalid", `${e} is not a valid URL. The library keeps the current value.`, void 0, t), n;
|
|
64
|
+
}
|
|
65
|
+
return a.username !== "" || a.password !== "" ? (r.report("config.invalid", `${e} has a user name or a password. The library keeps the current value.`), n) : he.test(t) ? t : (a.href !== i && r.report("config.invalid", `${e} is relative. The library sends to ${a.origin}.`), a.href);
|
|
66
|
+
}
|
|
67
|
+
function j(e, t, n, r, i) {
|
|
68
|
+
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, i) : k(w, D, R)(e, t, n, r);
|
|
69
|
+
}
|
|
70
|
+
function M(e, t, n, r) {
|
|
71
|
+
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, r) : k(w, D, R)("endpoint", e, t, n);
|
|
72
|
+
}
|
|
73
|
+
var N = {
|
|
74
|
+
captureLimits: {
|
|
75
|
+
ranges: {
|
|
76
|
+
breadcrumbs: [0, 1e6],
|
|
77
|
+
errorDedupeMs: _,
|
|
78
|
+
windowMs: v
|
|
79
|
+
},
|
|
80
|
+
limits: {
|
|
81
|
+
errorsPerWindow: y,
|
|
82
|
+
consolePerWindow: y,
|
|
83
|
+
longFramesPerWindow: y,
|
|
84
|
+
webSocketPerWindow: y,
|
|
85
|
+
reportsPerWindow: y,
|
|
86
|
+
resourcesPerWindow: y,
|
|
87
|
+
lifecyclePerWindow: y
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
metadata: {
|
|
91
|
+
ranges: {},
|
|
92
|
+
limits: {}
|
|
93
|
+
},
|
|
94
|
+
storage: {
|
|
95
|
+
ranges: {},
|
|
96
|
+
limits: {},
|
|
97
|
+
choices: { backend: re }
|
|
98
|
+
},
|
|
99
|
+
diagnostics: {
|
|
100
|
+
ranges: { throttleMs: _ },
|
|
101
|
+
limits: {},
|
|
102
|
+
custom: { records: ke }
|
|
103
|
+
},
|
|
104
|
+
correlation: {
|
|
105
|
+
ranges: {},
|
|
106
|
+
limits: {
|
|
107
|
+
sessionIdleMs: v,
|
|
108
|
+
traceMaxAgeMs: v
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
metrics: {
|
|
112
|
+
ranges: { intervalMs: [1e3, 6e5] },
|
|
113
|
+
limits: {
|
|
114
|
+
maxSeries: y,
|
|
115
|
+
maxInstruments: y,
|
|
116
|
+
maxHistogramBoundaries: y
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
buffering: {
|
|
120
|
+
ranges: { maxHeldRecords: [200, 1e4] },
|
|
121
|
+
limits: {
|
|
122
|
+
maxPendingRecords: b,
|
|
123
|
+
maxPendingBytes: b
|
|
124
|
+
},
|
|
125
|
+
choices: { overflow: [
|
|
126
|
+
"drop-oldest",
|
|
127
|
+
"drop-newest",
|
|
128
|
+
"persist"
|
|
129
|
+
] }
|
|
130
|
+
},
|
|
131
|
+
delivery: {
|
|
132
|
+
ranges: {
|
|
133
|
+
requestTimeoutMs: [1, _[1]],
|
|
134
|
+
maxConcurrentRequests: b,
|
|
135
|
+
retryBaseDelayMs: _,
|
|
136
|
+
retryMaxDelayMs: _
|
|
137
|
+
},
|
|
138
|
+
limits: {},
|
|
139
|
+
choices: { priority: [
|
|
140
|
+
"low",
|
|
141
|
+
"auto",
|
|
142
|
+
"high"
|
|
143
|
+
] }
|
|
144
|
+
},
|
|
145
|
+
debugBuffer: {
|
|
146
|
+
ranges: { maxRecords: [1, 1e4] },
|
|
147
|
+
limits: { maxAgeMs: v }
|
|
148
|
+
},
|
|
149
|
+
profiler: {
|
|
150
|
+
ranges: { maxProbes: [1, e] },
|
|
151
|
+
limits: {}
|
|
152
|
+
},
|
|
153
|
+
replay: {
|
|
154
|
+
ranges: {
|
|
155
|
+
bufferMs: [5e3, 6e5],
|
|
156
|
+
maxBufferBytes: [1e5, 2e8],
|
|
157
|
+
afterErrorMs: [0, 6e5],
|
|
158
|
+
uploadWindowMs: v,
|
|
159
|
+
maxSegmentEvents: [1, 1e4],
|
|
160
|
+
maxSegmentBytes: [1e4, 1e7],
|
|
161
|
+
flushIntervalMs: [100, 6e4],
|
|
162
|
+
maxQueueBytes: [1e5, 2e8],
|
|
163
|
+
maxAttempts: [1, 10]
|
|
164
|
+
},
|
|
165
|
+
limits: { uploadsPerWindow: y },
|
|
166
|
+
choices: { mode: ["onError"] },
|
|
167
|
+
custom: {
|
|
168
|
+
endpoint: j,
|
|
169
|
+
maskSelectors: k(S, "a list of strings"),
|
|
170
|
+
blockSelectors: k(S, "a list of strings"),
|
|
171
|
+
loader: k(C, E, R),
|
|
172
|
+
onSegment: k(C, E, R),
|
|
173
|
+
headers: k(ge, "an object of strings, a function or null", R),
|
|
174
|
+
plugins: k(me, "a list of functions"),
|
|
175
|
+
recordOptions: k(O, "an object")
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}, _e = [
|
|
179
|
+
"errors",
|
|
180
|
+
"rejections",
|
|
181
|
+
"resourceErrors",
|
|
182
|
+
"fetch",
|
|
183
|
+
"xhr",
|
|
184
|
+
"httpMetrics",
|
|
185
|
+
"navigation",
|
|
186
|
+
"fullUrls",
|
|
187
|
+
"webSocket",
|
|
188
|
+
"uncleanExit",
|
|
189
|
+
"serverTiming",
|
|
190
|
+
"reports",
|
|
191
|
+
"lifecycle"
|
|
192
|
+
], 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";
|
|
193
|
+
function I(e) {
|
|
194
|
+
let t = e.map((e) => `"${e}"`);
|
|
195
|
+
return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
196
|
+
}
|
|
197
|
+
function L(e) {
|
|
198
|
+
return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
|
|
199
|
+
}
|
|
200
|
+
function R(e) {
|
|
201
|
+
return e === null ? "null" : Array.isArray(e) ? "a list" : typeof e == "object" ? "an object" : `a ${typeof e}`;
|
|
202
|
+
}
|
|
203
|
+
function z(e, t, n, r, i, a = L) {
|
|
204
|
+
e.report("config.invalid", `${t} must be ${n}. The value is ${a(r)}. The library keeps ${i}.`);
|
|
205
|
+
}
|
|
206
|
+
function B(e, t, n, r, i) {
|
|
207
|
+
if (t === void 0) return r;
|
|
208
|
+
let a = n.find((e) => e === t);
|
|
209
|
+
return a === void 0 ? (i.report("config.invalid", `${e} must be ${I(n)}. The library keeps "${r}".`), r) : a;
|
|
210
|
+
}
|
|
211
|
+
function V(e, t, n, r) {
|
|
212
|
+
return t === void 0 ? n : typeof t == "boolean" ? t : (z(r, e, "true or false", t, String(n)), n);
|
|
213
|
+
}
|
|
214
|
+
function H(e, t, n, r) {
|
|
215
|
+
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);
|
|
216
|
+
}
|
|
217
|
+
function U(e, t, n, r, i) {
|
|
218
|
+
if (t === void 0) return r;
|
|
219
|
+
let [a, o] = n;
|
|
220
|
+
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);
|
|
221
|
+
}
|
|
222
|
+
function W(e, t, n, r, i) {
|
|
223
|
+
if (t === void 0) return r;
|
|
224
|
+
if (t === null) return null;
|
|
225
|
+
let [a, o] = n;
|
|
226
|
+
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);
|
|
227
|
+
}
|
|
228
|
+
function G(e, t, n, r) {
|
|
229
|
+
if (t === void 0) return n;
|
|
230
|
+
if (t !== null) return typeof t == "function" ? t : (z(r, e, E, t, "the current value", R), n);
|
|
231
|
+
}
|
|
232
|
+
var K = () => null;
|
|
233
|
+
function we(e, t, n) {
|
|
234
|
+
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);
|
|
235
|
+
}
|
|
236
|
+
function Te(e, t, n) {
|
|
237
|
+
return e === void 0 ? t : me(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]);
|
|
238
|
+
}
|
|
239
|
+
function q(e, t, n, r) {
|
|
240
|
+
return t === void 0 ? n : typeof t == "string" ? t : (z(r, e, "a string", t, "the current value"), n);
|
|
241
|
+
}
|
|
242
|
+
function J(e, t, n, r) {
|
|
243
|
+
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);
|
|
244
|
+
}
|
|
245
|
+
function Ee(e, t, n) {
|
|
246
|
+
if (e === void 0) return t;
|
|
247
|
+
if (!f(e)) return z(n, "sampling.rates", "an object of rates", e, "the current value"), t;
|
|
248
|
+
let r = [];
|
|
249
|
+
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.`);
|
|
250
|
+
return Object.fromEntries(r);
|
|
251
|
+
}
|
|
252
|
+
function Y(e, t, n, r, i) {
|
|
253
|
+
let a = t ?? {}, o = Object.keys(r);
|
|
254
|
+
return Object.fromEntries(o.map((t) => [t, U(`${e}.${t}`, a[t], r[t], n[t], i)]));
|
|
255
|
+
}
|
|
256
|
+
function X(e) {
|
|
257
|
+
if (typeof e != "string") return;
|
|
258
|
+
let t = e.toUpperCase();
|
|
259
|
+
return m.find((e) => e === t);
|
|
260
|
+
}
|
|
261
|
+
function Z(e, t, n, r) {
|
|
262
|
+
if (t === void 0) return n;
|
|
263
|
+
let i = X(t);
|
|
264
|
+
return i === void 0 ? (z(r, e, P, t, `"${n}"`), n) : i;
|
|
265
|
+
}
|
|
266
|
+
function De(e, t, n) {
|
|
267
|
+
if (e === void 0) return t;
|
|
268
|
+
if (!f(e)) return z(n, "minLevels", "an object of level names", e, "the current value"), t;
|
|
269
|
+
let r = [];
|
|
270
|
+
for (let [t, i] of Object.entries(e)) {
|
|
271
|
+
let e = X(i);
|
|
272
|
+
t !== "" && e !== void 0 ? r.push([t, e]) : z(n, `minLevels["${t}"]`, P, i, "minLevel for it");
|
|
273
|
+
}
|
|
274
|
+
return Object.fromEntries(r);
|
|
275
|
+
}
|
|
276
|
+
function Q(e, t, n, r, i, a) {
|
|
277
|
+
if (t === void 0) return n;
|
|
278
|
+
if (!Array.isArray(t)) return z(a, e, r, t, "the current list"), n;
|
|
279
|
+
let o = [], s = t;
|
|
280
|
+
for (let t of s) {
|
|
281
|
+
let n = i(t);
|
|
282
|
+
n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${L(t)}. ${e} must be ${r}.`) : o.push(n);
|
|
283
|
+
}
|
|
284
|
+
return o;
|
|
285
|
+
}
|
|
286
|
+
function Oe(e) {
|
|
287
|
+
return f(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
|
|
288
|
+
}
|
|
289
|
+
function ke(e, t, n, r) {
|
|
290
|
+
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);
|
|
291
|
+
}
|
|
292
|
+
function Ae(e) {
|
|
293
|
+
return typeof e == "string" ? e : void 0;
|
|
294
|
+
}
|
|
295
|
+
function je(e) {
|
|
296
|
+
return g.find((t) => t === e);
|
|
297
|
+
}
|
|
298
|
+
function Me(e) {
|
|
299
|
+
return typeof e == "string" || e instanceof RegExp ? e : void 0;
|
|
300
|
+
}
|
|
301
|
+
function Ne(e) {
|
|
302
|
+
return h.find((t) => t === e);
|
|
303
|
+
}
|
|
304
|
+
function Pe(e) {
|
|
305
|
+
if (typeof e == "string") try {
|
|
306
|
+
let { origin: t } = new URL(e);
|
|
307
|
+
return t === ve ? void 0 : t;
|
|
308
|
+
} catch {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
function Fe(e) {
|
|
313
|
+
return e instanceof RegExp ? e : Pe(e);
|
|
314
|
+
}
|
|
315
|
+
function Ie(e) {
|
|
316
|
+
return f(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
|
|
317
|
+
}
|
|
318
|
+
function Le(e, t, n) {
|
|
319
|
+
if (e === void 0) return t;
|
|
320
|
+
if (e !== null) return typeof e == "function" || Ie(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the current headers."), t);
|
|
321
|
+
}
|
|
322
|
+
function Re(e) {
|
|
323
|
+
return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
|
|
324
|
+
}
|
|
325
|
+
function ze(e, t, n) {
|
|
326
|
+
return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Re(e) ? e : (n.report("config.invalid", `serializer must be "${d}", "ecs" or an implementation. The library keeps the current serializer.`), t ?? "otlp");
|
|
327
|
+
}
|
|
328
|
+
var Be = new Set(Object.keys(o));
|
|
329
|
+
function Ve(e, t) {
|
|
330
|
+
let n = {};
|
|
331
|
+
if (e !== void 0 && !f(e)) return z(t, "consoleOutput.styles", "an object of CSS strings", e, "the styles"), n;
|
|
332
|
+
let r = Object.entries(e ?? {});
|
|
333
|
+
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.`);
|
|
334
|
+
return n;
|
|
335
|
+
}
|
|
336
|
+
function He(e, t, n) {
|
|
337
|
+
if (e === void 0) return t;
|
|
338
|
+
let r = X(e);
|
|
339
|
+
return r === void 0 ? (z(n, "consoleOutput.level", P, e, "the current console level"), t) : r;
|
|
340
|
+
}
|
|
341
|
+
function Ue(e, t, n) {
|
|
342
|
+
if (e === void 0) return t;
|
|
343
|
+
if (e === !1) return {
|
|
344
|
+
level: null,
|
|
345
|
+
styles: t.styles
|
|
346
|
+
};
|
|
347
|
+
if (e === !0) return {
|
|
348
|
+
level: a,
|
|
349
|
+
styles: t.styles
|
|
350
|
+
};
|
|
351
|
+
if (typeof e == "string") {
|
|
352
|
+
let r = X(e);
|
|
353
|
+
return r === void 0 ? (z(n, "consoleOutput", P, e, "the current console level"), t) : {
|
|
354
|
+
level: r,
|
|
355
|
+
styles: t.styles
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
return typeof e != "object" || !e ? (n.report("config.invalid", "consoleOutput must be a boolean, a level or an object. The current console settings stay."), t) : {
|
|
359
|
+
level: He(e.level, t.level, n),
|
|
360
|
+
styles: {
|
|
361
|
+
...t.styles,
|
|
362
|
+
...Ve(e.styles, n)
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function We(e, t, n) {
|
|
367
|
+
let r = e ?? {};
|
|
368
|
+
return {
|
|
369
|
+
defaultRate: J("sampling.defaultRate", r.defaultRate, t.defaultRate, n),
|
|
370
|
+
remoteMaxRate: J("sampling.remoteMaxRate", r.remoteMaxRate, t.remoteMaxRate, n),
|
|
371
|
+
rates: Ee(r.rates, t.rates, n),
|
|
372
|
+
alwaysSampleTypes: Q("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, Se, je, n),
|
|
373
|
+
alwaysSampleFrom: Z("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
|
|
374
|
+
errorCeiling: W("sampling.errorCeiling", r.errorCeiling, y, t.errorCeiling, n),
|
|
375
|
+
errorCeilingWindowMs: U("sampling.errorCeilingWindowMs", r.errorCeilingWindowMs, v, t.errorCeilingWindowMs, n),
|
|
376
|
+
remote: V("sampling.remote", r.remote, t.remote, n)
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function Ge(e, t, n) {
|
|
380
|
+
let r = e ?? {};
|
|
381
|
+
return {
|
|
382
|
+
sourcePolicy: B("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
|
|
383
|
+
maxMessageBytes: W("bus.maxMessageBytes", r.maxMessageBytes, b, t.maxMessageBytes, n),
|
|
384
|
+
maxRecordsPerMessage: W("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, b, t.maxRecordsPerMessage, n),
|
|
385
|
+
maxMessagesPerSecond: W("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, b, t.maxMessagesPerSecond, n),
|
|
386
|
+
mode: B("bus.mode", r.mode, ae, t.mode, n),
|
|
387
|
+
trustedOrigins: Q("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, xe, Pe, n),
|
|
388
|
+
openFinRole: B("bus.openFinRole", r.openFinRole, oe, t.openFinRole, n)
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function Ke(e, t, n) {
|
|
392
|
+
let r = e ?? {};
|
|
393
|
+
return {
|
|
394
|
+
scope: B("journey.scope", r.scope, se, t.scope, n),
|
|
395
|
+
maxAgeMs: U("journey.maxAgeMs", r.maxAgeMs, pe, t.maxAgeMs, n)
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
function qe(e, t, n) {
|
|
399
|
+
let r = e ?? {};
|
|
400
|
+
return {
|
|
401
|
+
maxBatches: U("retention.maxBatches", r.maxBatches, le, t.maxBatches, n),
|
|
402
|
+
maxAgeMs: W("retention.maxAgeMs", r.maxAgeMs, ue, t.maxAgeMs, n),
|
|
403
|
+
maxAttempts: W("retention.maxAttempts", r.maxAttempts, de, t.maxAttempts, n)
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function $(e, t, n, r, i) {
|
|
407
|
+
if (t === void 0) return n;
|
|
408
|
+
if (typeof t == "boolean") return t;
|
|
409
|
+
if (!f(t)) return r.report("config.invalid", `capture.${e} must be a boolean or an options object.`), n;
|
|
410
|
+
let a = i(t, typeof n == "object" ? n : {});
|
|
411
|
+
for (let n of Object.keys(t)) p(a, n) || r.report("config.invalid", `The library ignores the unknown config key "capture.${e}.${n}". Check the spelling.`);
|
|
412
|
+
return a;
|
|
413
|
+
}
|
|
414
|
+
function Je(e, t, n) {
|
|
415
|
+
let r = e ?? {}, i = {
|
|
416
|
+
...t,
|
|
417
|
+
urlTransform: G("capture.urlTransform", r.urlTransform, t.urlTransform, n),
|
|
418
|
+
remoteToggles: Q("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => s.find((t) => t === e), n),
|
|
419
|
+
resourceTiming: $("resourceTiming", r.resourceTiming, t.resourceTiming, n, (e, t) => ({ slowMs: H("capture.resourceTiming.slowMs", e.slowMs, t.slowMs ?? 1e3, n) })),
|
|
420
|
+
interactions: $("interactions", r.interactions, t.interactions, n, (e, t) => Xe(e, t, n)),
|
|
421
|
+
console: $("console", r.console, t.console, n, (e, t) => ({ levels: Q("capture.console.levels", e.levels, t.levels ?? ["error", "warn"], ye, Ne, n) })),
|
|
422
|
+
longFrames: $("longFrames", r.longFrames, t.longFrames, n, (e, t) => ({ thresholdMs: H("capture.longFrames.thresholdMs", e.thresholdMs, t.thresholdMs ?? 100, n) })),
|
|
423
|
+
userTiming: $("userTiming", r.userTiming, t.userTiming, n, (e, t) => ({ include: Q("capture.userTiming.include", e.include, t.include ?? [], F, Me, n) })),
|
|
424
|
+
webVitals: $("webVitals", r.webVitals, t.webVitals, n, (e, t) => ({ loader: G("capture.webVitals.loader", e.loader, t.loader, n) })),
|
|
425
|
+
ignoreUrls: Q("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, F, Me, n),
|
|
426
|
+
propagateTraceHeaderTo: Q("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, be, Fe, n),
|
|
427
|
+
plugins: Q("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", Oe, n)
|
|
428
|
+
};
|
|
429
|
+
for (let e of _e) i[e] = V(`capture.${e}`, r[e], t[e], n);
|
|
430
|
+
return i;
|
|
431
|
+
}
|
|
432
|
+
function Ye(e) {
|
|
433
|
+
if (typeof document > "u") return !0;
|
|
434
|
+
try {
|
|
435
|
+
return document.createElement("div").matches(e), !0;
|
|
436
|
+
} catch {
|
|
437
|
+
return !1;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
function Xe(e, t, n) {
|
|
441
|
+
let r = e.ignoreSelector, i = r === void 0 ? t.ignoreSelector : r;
|
|
442
|
+
i != null && i !== "" && (typeof i == "string" && Ye(i) || (n.report("config.invalid", "capture.interactions.ignoreSelector must be a valid CSS selector, \"\" or null."), i = t.ignoreSelector));
|
|
443
|
+
let a = t.actionAttribute ?? "data-observability-action";
|
|
444
|
+
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}"`));
|
|
445
|
+
let o = t.deadClickIgnoreSelector ?? "[data-observability-live]", s = e.deadClickIgnoreSelector;
|
|
446
|
+
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}"`)), {
|
|
447
|
+
actionAttribute: a,
|
|
448
|
+
text: V("capture.interactions.text", e.text, t.text ?? !1, n),
|
|
449
|
+
selector: V("capture.interactions.selector", e.selector, t.selector ?? !1, n),
|
|
450
|
+
ignoreSelector: typeof i == "string" || i === null ? i : void 0,
|
|
451
|
+
maxTextChars: U("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], t.maxTextChars ?? 50, n),
|
|
452
|
+
rageClicks: V("capture.interactions.rageClicks", e.rageClicks, t.rageClicks ?? !1, n),
|
|
453
|
+
rageClickCount: U("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], t.rageClickCount ?? 3, n),
|
|
454
|
+
rageClickWindowMs: U("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, x, t.rageClickWindowMs ?? 1e3, n),
|
|
455
|
+
deadClicks: V("capture.interactions.deadClicks", e.deadClicks, t.deadClicks ?? !1, n),
|
|
456
|
+
deadClickMs: U("capture.interactions.deadClickMs", e.deadClickMs, x, t.deadClickMs ?? 1e3, n),
|
|
457
|
+
deadClickIgnoreSelector: o
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
function Ze(e, t, n, r, i) {
|
|
461
|
+
let a = { ...n };
|
|
462
|
+
for (let o of Object.keys(n)) {
|
|
463
|
+
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;
|
|
464
|
+
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 });
|
|
465
|
+
}
|
|
466
|
+
return a;
|
|
467
|
+
}
|
|
468
|
+
function Qe(e, t) {
|
|
469
|
+
let n = e;
|
|
470
|
+
for (let r of i) {
|
|
471
|
+
let i = e[r];
|
|
472
|
+
i !== void 0 && !f(i) && (z(t, r, "an object", i, "the current values"), n = {
|
|
473
|
+
...n,
|
|
474
|
+
[r]: void 0
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
return n;
|
|
478
|
+
}
|
|
479
|
+
function $e(e, t, n) {
|
|
480
|
+
let { capture: r, sampling: i } = t, a = (e, t) => {
|
|
481
|
+
n.report("config.invalid", `${e} has no effect ${t}. The value stays.`);
|
|
482
|
+
};
|
|
483
|
+
(e.transport !== void 0 || e.transportWorker !== void 0) && t.transport && t.transportWorker && a("transportWorker", "with transport"), (e.transport !== void 0 || e.transportOnExit !== void 0) && t.transportOnExit && !t.transport && a("transportOnExit", "without transport"), (e.capture?.remoteToggles !== void 0 || e.sampling?.remote !== void 0) && r.remoteToggles.length > 0 && !i.remote && a("capture.remoteToggles", "without sampling.remote");
|
|
484
|
+
let o = r.fetch || r.xhr || r.remoteToggles.includes("fetch") || r.remoteToggles.includes("xhr");
|
|
485
|
+
(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");
|
|
486
|
+
}
|
|
487
|
+
function et(e, t, n, i = n) {
|
|
488
|
+
let a = n ?? r, o = Qe(e, t), s = Object.fromEntries(Object.keys(N).map((e) => [e, Ze(e, o[e], a[e], N[e], t)])), l = {
|
|
489
|
+
...a,
|
|
490
|
+
...s,
|
|
491
|
+
lockConfiguration: V("lockConfiguration", o.lockConfiguration, a.lockConfiguration, t),
|
|
492
|
+
loggerCache: { maxEntries: W("loggerCache.maxEntries", o.loggerCache?.maxEntries, y, a.loggerCache.maxEntries, t) },
|
|
493
|
+
securityContext: {
|
|
494
|
+
id: q("securityContext.id", o.securityContext?.id, a.securityContext.id, t) || a.securityContext.id,
|
|
495
|
+
isolation: V("securityContext.isolation", o.securityContext?.isolation, a.securityContext.isolation, t)
|
|
496
|
+
},
|
|
497
|
+
endpoint: M(o.endpoint, a.endpoint, t, i?.endpoint),
|
|
498
|
+
serviceName: q("serviceName", o.serviceName, a.serviceName, t),
|
|
499
|
+
serviceVersion: q("serviceVersion", o.serviceVersion, a.serviceVersion, t),
|
|
500
|
+
environment: q("environment", o.environment, a.environment, t),
|
|
501
|
+
enabled: V("enabled", o.enabled, a.enabled, t),
|
|
502
|
+
payloadMode: B("payloadMode", o.payloadMode, ["copy", "defer"], a.payloadMode, t),
|
|
503
|
+
minLevel: Z("minLevel", o.minLevel, a.minLevel, t),
|
|
504
|
+
minLevels: De(o.minLevels, a.minLevels, t),
|
|
505
|
+
processors: Te(o.processors, a.processors, t),
|
|
506
|
+
compression: B("compression", o.compression, te, a.compression, t),
|
|
507
|
+
credentials: B("credentials", o.credentials, ne, a.credentials, t),
|
|
508
|
+
headers: Le(o.headers, a.headers, t),
|
|
509
|
+
identity: B("identity", o.identity, ie, a.identity, t),
|
|
510
|
+
serializer: ze(o.serializer, n?.serializer, t),
|
|
511
|
+
consoleOutput: Ue(o.consoleOutput, a.consoleOutput, t),
|
|
512
|
+
sampling: We(o.sampling, a.sampling, t),
|
|
513
|
+
bus: Ge(o.bus, a.bus, t),
|
|
514
|
+
batching: Y("batching", o.batching, a.batching, ce, t),
|
|
515
|
+
retention: qe(o.retention, a.retention, t),
|
|
516
|
+
limits: Y("limits", o.limits, a.limits, fe, t),
|
|
517
|
+
journey: Ke(o.journey, a.journey, t),
|
|
518
|
+
capture: Je(o.capture, a.capture, t),
|
|
519
|
+
transport: G("transport", o.transport, a.transport, t),
|
|
520
|
+
transportOnExit: G("transportOnExit", o.transportOnExit, a.transportOnExit, t),
|
|
521
|
+
transportWorker: G("transportWorker", o.transportWorker, a.transportWorker, t),
|
|
522
|
+
otelLoader: G("otelLoader", o.otelLoader, a.otelLoader, t),
|
|
523
|
+
contextProvider: G("contextProvider", o.contextProvider, a.contextProvider, t),
|
|
524
|
+
redact: we(o.redact, a.redact, t),
|
|
525
|
+
onDiagnostic: G("onDiagnostic", o.onDiagnostic, a.onDiagnostic, t),
|
|
526
|
+
onDrop: G("onDrop", o.onDrop, a.onDrop, t)
|
|
527
|
+
};
|
|
528
|
+
for (let e of ["metricsEndpoint", "tracesEndpoint"]) l[e] = j(e, o[e], a[e], t, i?.[e]);
|
|
529
|
+
l.endpoint === "" && l.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
|
|
530
|
+
for (let e of ["metricsEndpoint", "tracesEndpoint"]) l[e] !== null && l.endpoint === null && !l.transport && t.report("config.invalid", `${e} needs endpoint or transport. The library sends nothing to ${e}.`);
|
|
531
|
+
l.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${c}'.`), c), l.capture.ignoreUrls = l.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint && e !== n?.replay.endpoint);
|
|
532
|
+
for (let e of [
|
|
533
|
+
l.endpoint,
|
|
534
|
+
l.metricsEndpoint,
|
|
535
|
+
l.tracesEndpoint,
|
|
536
|
+
l.replay.endpoint
|
|
537
|
+
]) e && !l.capture.ignoreUrls.includes(e) && (l.capture.ignoreUrls = [...l.capture.ignoreUrls, e]);
|
|
538
|
+
return l.delivery.retryMaxDelayMs < l.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), l.delivery.retryBaseDelayMs = a.delivery.retryBaseDelayMs, l.delivery.retryMaxDelayMs = a.delivery.retryMaxDelayMs), $e(o, l, t), tt(e, t), l;
|
|
539
|
+
}
|
|
540
|
+
function tt(e, t) {
|
|
541
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(r), ...u]);
|
|
542
|
+
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.`);
|
|
543
|
+
for (let n of i) {
|
|
544
|
+
let i = e[n];
|
|
545
|
+
if (typeof i != "object" || !i) continue;
|
|
546
|
+
let a = /* @__PURE__ */ new Set([...Object.keys(r[n]), ...l[n]]);
|
|
547
|
+
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.`);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function nt(e, t) {
|
|
551
|
+
for (let n of Object.keys(t)) i.includes(n) || Object.assign(e, { [n]: t[n] });
|
|
552
|
+
for (let n of i) Object.assign(e[n], t[n]);
|
|
553
|
+
}
|
|
554
|
+
export { M as a, j as i, nt as n, et as r, K as t };
|
|
555
|
+
|
|
556
|
+
//# sourceMappingURL=config-DK1Zf7jn.js.map
|