@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
package/CHANGELOG.md
CHANGED
|
@@ -2,215 +2,107 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
## [1.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Added - v1.
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- `
|
|
22
|
-
- The
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
- `
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
- `
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
73
|
-
- **
|
|
74
|
-
- **
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
- The rotation code loads in its own chunk on the first `rotateSecurityContext()`.
|
|
107
|
-
|
|
108
|
-
#### Public API
|
|
109
|
-
|
|
110
|
-
- **Breaking:** `flush()` now returns `Promise<FlushResult>`, not `Promise<void>`.
|
|
111
|
-
- **Breaking:** `flush()` now waits at most 5000 ms by default. `timeoutMs` sets the wait, from 0 to 600000 ms.
|
|
112
|
-
- **Breaking:** In a frame, a worker or an OpenFin view, `flush()` now waits for the answer of the sender. The sender gets 90 percent of the time that is left.
|
|
113
|
-
- **Breaking:** `getHealth()` puts the delivery state in a `delivery` block. `pending`, `inFlight`, `stored` and `lastSendAt` are no longer top-level fields.
|
|
114
|
-
- **Breaking:** `setContext(values)` takes an attribute map and merges it. A `null` value removes its key. An `undefined` value keeps the current value. A value that is not an object reports `config.invalid` and changes nothing.
|
|
115
|
-
- **Breaking:** `getJourneyToken()` returns `null` when no journey is active.
|
|
116
|
-
- **Breaking:** The package exports the logger class only as the type `Logger`. `getLogger()` and `PluginContext.logger` use `Logger`.
|
|
117
|
-
- **Breaking:** `startTrace()` is now `newTrace()`.
|
|
118
|
-
- `getHealth().delivery.consecutiveFailures` resets only when the server accepts a batch.
|
|
119
|
-
|
|
120
|
-
#### Delivery
|
|
121
|
-
|
|
122
|
-
- **Breaking:** Without `headers`, the exit batch to another origin is a keepalive `fetch` with `text/plain;charset=UTF-8`. It obeys `credentials`, so by default it sends no cookie. Only `credentials: "include"` uses `sendBeacon`. The CORS answer of the ingest server must permit the origin of the page.
|
|
123
|
-
- **Breaking:** The exit batch to an endpoint on the origin of the page is a keepalive `fetch` with the content type of the serializer. Before, it was a `text/plain` beacon.
|
|
124
|
-
- **Breaking:** A `fetch` request that already has a `traceparent` header keeps it. The library records no client span for it and reports `capture.trace_header_kept`. Before, the library replaced the header.
|
|
125
|
-
- **Breaking:** On a metric point from a frame or a worker, the `redact` of the sender can change `metric.name`, `metric.unit` and `metric.attribute_keys`.
|
|
126
|
-
- A forwarded record gets its metric and span fields back only when its `log.type` and namespace are those of the library, and each field has the shape that the library writes.
|
|
127
|
-
- The library reads at most 16 KiB of the body of a `413` or of an OTLP `2xx` answer. `delivery.requestTimeoutMs` also limits that read.
|
|
128
|
-
- The main thread waits 1000 ms more for an answer from a transport worker that is ready.
|
|
129
|
-
- A full hold buffer keeps its first 100 records of each kind. It drops the oldest record after them.
|
|
130
|
-
- `StorageAdapter.save()` returns `Promise<boolean>`. The value is true only when the batch is in storage when the save ends.
|
|
131
|
-
- The `transport.http_error` and `transport.throttled` texts tell whether storage kept the batch.
|
|
132
|
-
- The exit flush counts the keepalive bytes that are still in flight from the flush of the hidden page.
|
|
133
|
-
|
|
134
|
-
#### Bus
|
|
135
|
-
|
|
136
|
-
- **Breaking:** A same-origin child frame compares the bus protocol tag of its parent with its own tag before a direct call. With a different tag, it reports `bus.protocol_mismatch` and tries a message link.
|
|
137
|
-
- The bus starts a flush for other contexts at most one time each second. It keeps at most 4 waiting flush requests for each source and 100 in total.
|
|
138
|
-
- The bus does not take a flush request on the broadcast link.
|
|
139
|
-
- A flush that a frame or a worker asks for does not send the open interval of the metrics and the profiler of its sender.
|
|
140
|
-
- The bus sends each answer for a worker to that worker only.
|
|
141
|
-
|
|
142
|
-
#### Session replay
|
|
143
|
-
|
|
144
|
-
- **Breaking:** Session replay always blocks each element in `[data-observability-ignore]`.
|
|
145
|
-
- The `capture.rate_limited` text for a full replay buffer says that the replay of an error in that time starts at the error, with no events from before it.
|
|
146
|
-
|
|
147
|
-
#### Build, browsers and docs
|
|
148
|
-
|
|
149
|
-
- The build targets ES2021. The library supports Chrome 85, Edge 85, Firefox 79 and Safari 14.1 and later.
|
|
150
|
-
- The README and `docs/browser-support.md` state that OpenFin support is not validated on a real OpenFin runtime.
|
|
151
|
-
- The gzip budget of the main graph is 55,524 B. The measured main graph is 50,478 B.
|
|
152
|
-
- The README is short. It has the installation, the quick start, three recipes and a table of the reference documents.
|
|
153
|
-
- The ingest contract is in `docs/ingest-server.md`. Its rules do not change.
|
|
154
|
-
- Lint enforces braces on each conditional again. `eslint-config-prettier` had turned the `curly` rule off.
|
|
155
|
-
|
|
156
|
-
### Removed - v1.0.0
|
|
157
|
-
|
|
158
|
-
- **Breaking:** `logMetric()` and the logger method `logMetric()`. Use `counter()`, `gauge()` or `histogram()`.
|
|
159
|
-
- **Breaking:** `timeSync()`, `timeAsync()` and the logger methods of the same names. Use `measure()`. `measure()` logs no ERROR record on a failure.
|
|
160
|
-
- **Breaking:** `getStats()` and `getQueueDepth()`. Use `getHealth().delivery`.
|
|
161
|
-
- **Breaking:** `clearPersistedLogs()`. Use `shutdown({ pending: "discard", clearStorage: scope })`.
|
|
162
|
-
- **Breaking:** `setContextMap()`. Use `setContext(values)`.
|
|
163
|
-
- **Breaking:** The type `DeliveryStats` and the value export `OneLogger`.
|
|
164
|
-
- **Breaking:** `retention.mode`. Set `retention.maxAgeMs` and `retention.maxAttempts` to `null` in place of `"until-delivered"`.
|
|
165
|
-
- **Breaking:** `delivery.retryIdleDelayMs`, `delivery.batchesPerDrain`, `correlation.sessionTouchMs`, `bus.maxTrackedSources` and `capturePolicy.maxErrorSignatures`. A config with one of these keys reports `config.invalid`.
|
|
166
|
-
- **Breaking:** `bus.validation`. The bus always checks each message. `getHealth().bus` no longer has `validation` and `maxTrackedSources`.
|
|
167
|
-
|
|
168
|
-
### Fixed - v1.0.0
|
|
169
|
-
|
|
170
|
-
- A log call no longer throws in Chrome 92, Firefox 91 and Safari 15.3 or older. Before, with console output or with `processors`, each log call threw. A second `configure()` also threw.
|
|
171
|
-
- Session replay sets `replay.id` when the browser has no `crypto.randomUUID`. This also applies to a page on plain `http`.
|
|
172
|
-
- `TransportError` keeps its `cause` in browsers without the ES2022 `cause` option.
|
|
173
|
-
- The type declarations work for a strict consumer with `moduleResolution` `"NodeNext"` (ES module or CommonJS) or `"Bundler"`, also with `skipLibCheck: false`. `exports` gives `import` and `require` each its own declarations, `index.d.ts` and `index.d.cts`.
|
|
174
|
-
- `configure({ redact: undefined })` no longer removes `redact`. The other hooks and the transports have the same fix.
|
|
175
|
-
- `redact`, `onDiagnostic`, `otelLoader` and the `loader` of `capture.webVitals` report `config.invalid` for a value that is not a function.
|
|
176
|
-
- `configure()` no longer throws when a getter in its input throws.
|
|
177
|
-
- `configure()` no longer writes into the app's object.
|
|
178
|
-
- A key that is fixed at startup no longer reports "cannot change after startup" for the value `undefined`.
|
|
179
|
-
- A histogram without custom boundaries no longer reports `config.invalid` when the boundary limit is low.
|
|
180
|
-
- `sampling: { defaultRate: undefined }` no longer sets the rate to `1`.
|
|
181
|
-
- `serviceName`, `serviceVersion`, `environment` and `securityContext.id` report `config.invalid` for a value that is not a string.
|
|
182
|
-
- An `undefined` style no longer reports `config.invalid`. `consoleOutput.styles: null` now reports `config.invalid`.
|
|
183
|
-
- A failed first `configure()` call after an early log call no longer lets records go out without `redact`.
|
|
184
|
-
- A failed first `configure()` call writes no id to `localStorage` or `sessionStorage`. It reports `config.invalid` to diagnostics, and it writes the console warning.
|
|
185
|
-
- A frame that logs before `configure()` uses the `bus.mode` of its first `configure()` call.
|
|
186
|
-
- A journey that starts before `configure()` stays active after the call. The journey token leaves the URL.
|
|
187
|
-
- A `newSession()` call before `configure()` keeps its session after the start.
|
|
188
|
-
- `onDrop` reports each lost record one time, also when a `pagehide` comes before a later rotation or `shutdown()`.
|
|
189
|
-
- A `shutdown()` before the end of startup reports the held records to `onDrop` with `load_failed`.
|
|
190
|
-
- A rotation that waits for the delivery stack load at `shutdown()` stops and rejects. Before, it could remove the stored batches of the old context.
|
|
191
|
-
- A rotation that a shutdown stops after it took the old records reports those records to `onDrop` with `security_context`.
|
|
192
|
-
- A rotation that a shutdown meets in its storage step rejects, and does not apply the new context.
|
|
193
|
-
- A delivery stack load that ends after a rejected rotation no longer sends the stored batches of the old context.
|
|
194
|
-
- After `shutdown()`, `startJourney()` and `adoptJourney()` write nothing to `sessionStorage`.
|
|
195
|
-
- `flush()` no longer waits without end for a request or a storage call that does not settle.
|
|
196
|
-
- A response body that stalls no longer holds a send past the request deadline or after a stop.
|
|
197
|
-
- `fetch(request, init)` with trace propagation builds the request one time with the whole init of the caller. With an empty init, it keeps the referrer of the request.
|
|
198
|
-
- A refused beacon marks the keepalive budget as used, so a later exit batch goes to the emergency queue.
|
|
199
|
-
- A diagnostic no longer says that the library stored a batch that storage did not keep.
|
|
200
|
-
- A `srcdoc` or `about:blank` frame forwards its records through its same-origin parent. Before, the parent refused its `"null"` origin, and the frame sent its own records past the `redact` of the parent.
|
|
201
|
-
- In Firefox, a `srcdoc` frame without a direct link finds its same-origin parent through the `origin` global of the parent. A `srcdoc` frame inside a `srcdoc` frame also finds it.
|
|
202
|
-
- A `srcdoc` or `about:blank` parent sends a new security context to its direct children. Before, the next batch of such a child was dropped with only a `security.context_mismatch` count.
|
|
203
|
-
- A `srcdoc` parent under `bus.sourcePolicy: "trusted-origin"` accepts its same-origin children. It also does not report them as untrusted.
|
|
204
|
-
- A `srcdoc` forwarder accepts the sampling rules of its parent on the message link.
|
|
205
|
-
- A replay snapshot that fails at an error no longer keeps the upload open. Before, each later event went to the replay endpoint with no end. Now the library sends no replay for that error and reports `capture.record_failed`.
|
|
206
|
-
- A replay snapshot that fails halfway sends no part of itself. The buffer then waits for the next full snapshot, so an upload always starts with one.
|
|
207
|
-
- A failed replay snapshot does not use an upload of `replay.uploadsPerWindow`.
|
|
208
|
-
- The library reports a full replay buffer one time for each recording, also when the first snapshot is too large.
|
|
209
|
-
- A new replay recording does not report the dropped events of an earlier recording.
|
|
210
|
-
- The replay uploader sends no segment after a later call removes both `replay.endpoint` and `replay.onSegment`.
|
|
211
|
-
- The mock ingest server no longer stops on a log record, a span or a metric point with no time. It prints `observedTimeUnixNano` for a log record, or `-` when the record has no time.
|
|
212
|
-
- The mock ingest server answers `400` to a JSON body that does not have the expected shape. Before, that body stopped the server.
|
|
213
|
-
- `docs/ingest-server.md` names `application/x-ndjson` for `serializer: "ecs"`. It says that `408` and each `5xx` make the library send the batch again.
|
|
5
|
+
## [1.2.0] - 2026-11-23
|
|
6
|
+
|
|
7
|
+
A minor release. It stops losses of records, throws into the host page and gaps in the privacy rules. It sends the records that a page logs after `pagehide`. One event has a new diagnostic code. See "Changed".
|
|
8
|
+
|
|
9
|
+
### Added - v1.2.0
|
|
10
|
+
|
|
11
|
+
- The diagnostic code `bus.tab_id_changed`. The library logs it at INFO. It reports a document that makes a new tab id, because another document uses the same one.
|
|
12
|
+
- **Development:** new browser tests check the close of a tab, a cross-origin `srcdoc` frame and cross-site credentials. They also check the final web-vitals and a bus with the 1.0.0 bundle.
|
|
13
|
+
- **Development:** `tools/build-release-bundle.mjs` builds release 1.0.0 from its pinned commit for the browser tests. CI gets the full git history for the browser tests.
|
|
14
|
+
|
|
15
|
+
### Changed - v1.2.0
|
|
16
|
+
|
|
17
|
+
- A changed tab id reports `bus.tab_id_changed`. Before, it reported `bus.role_resolved`. A handler that filters on `bus.role_resolved` for this event must use the new code.
|
|
18
|
+
- `capture.interactions.ignoreSelector: ""` goes back to the default, `[data-observability-ignore]`. Before, the library refused `""` with `config.invalid`.
|
|
19
|
+
- A relative `endpoint`, `metricsEndpoint` or `tracesEndpoint` reports `config.invalid` only when its destination changes. Before, it reported at each `configure()` and at each rotation. `replay.endpoint` still reports each time.
|
|
20
|
+
- A change to `otelLoader` after startup reports `config.invalid`. The library keeps the first loader. Before, the change had no report.
|
|
21
|
+
- The OpenFin link uses `InterApplicationBus.send` to the UUID of its own application. Before, it used `publish`, which reaches each application on the runtime. Only `fin` stubs test this change. No real OpenFin runtime ran it.
|
|
22
|
+
- The sender applies its own limits to each record from a frame or a worker. These are the limits on depth, array length, string length and node count. They apply to the attributes and the resource. A resource keeps the larger of `limits.maxAttributeCount` and 128 keys.
|
|
23
|
+
- A metric point does not copy a record-level key, such as `page.url` or `session.id`. This is also true when `metric.attribute_keys` names the key.
|
|
24
|
+
- With `resourceErrors`, a failed resource with no URL string is recorded with no `resource.url`.
|
|
25
|
+
- A URL with user info is recorded in its parsed form. On an https page, `//u:p@host/p` becomes `https://host/p`.
|
|
26
|
+
- A send from a hidden page uses keepalive only when its body and the keepalive bytes in flight stay within 60,000 bytes.
|
|
27
|
+
|
|
28
|
+
### Fixed - v1.2.0
|
|
29
|
+
|
|
30
|
+
- The error capture does not throw into the host page for an `error` event with no URL. An example is an image with `srcset` only. Before, the page got an uncaught `TypeError`.
|
|
31
|
+
- `capture.webVitals: false` and a remote rule that turns `webVitals` off stop all web-vitals records. Before, the late reports of INP and CLS continued.
|
|
32
|
+
- A stop removes the `history.pushState` and the `history.replaceState` that the library added. Before, they hid a later change of `History.prototype`.
|
|
33
|
+
- The replay does not start when a selector list is not valid as one list, or when one entry hides the entries after it. Before, the recorder blocked nothing and masked nothing.
|
|
34
|
+
- A recorded URL keeps no user name and no password. This includes a URL with no scheme, with backslashes or with a leading space. It includes record bodies, breadcrumbs, replay request names and the page URL of a replay.
|
|
35
|
+
- The links of a worker and of OpenFin remove their listeners at `shutdown()`. Before, each `configure()` after a `shutdown()` added one more.
|
|
36
|
+
- A bus that stops during its message-link handshake posts no more `hello` messages. It reports nothing after the stop.
|
|
37
|
+
- A child frame or worker cannot make the sender lose a batch with a deeply nested value.
|
|
38
|
+
- A rotation does not lose a keepalive request that is open on a hidden page. `retain` stores its records. `carry` sends them with the new context. `discard` reports them to `onDrop` with `security_context`. Before, the library lost them with no report.
|
|
39
|
+
- The retry drain and the emergency import run without a lock when Web Locks rejects the request. An example is a frame with an opaque origin. Before, the drain did not run.
|
|
40
|
+
- The retry drain sends no stored batch to an endpoint that a `429` or `503` throttles. A new stored batch does not shorten a backoff or a `Retry-After` wait.
|
|
41
|
+
- The halves of a batch that a `413` splits go out after `delivery.retryBaseDelayMs`. Before, they waited about 30 seconds.
|
|
42
|
+
- A `discard` or `flush` rotation reports the records that another tab parked in the emergency queue. A logout `discard` with no sender reports the stored batches that it removes. Before, the library removed them with no report.
|
|
43
|
+
- A record that the page logs after `pagehide` goes out in an exit flush. An example is the final LCP, CLS or INP. One page leave has at most 8 late exit flushes, and they share one byte budget. Before, the library lost these records on a real page leave.
|
|
44
|
+
- A key of the emergency queue that another window removed gives no diagnostic about a bad entry.
|
|
45
|
+
- `docs/delivery-guarantees.md` states two known limits. Firefox can lose the exit batch of a closed tab. The `web-vitals` package has no final INP when the page goes away before its idle callback runs.
|
|
46
|
+
|
|
47
|
+
## [1.1.0] - 2026-11-22
|
|
48
|
+
|
|
49
|
+
A minor release. It has no breaking change. It captures clicks in popout windows, and it finds dead clicks on pages with live data. It gives each popup its own tab id. It also closes gaps in the loss reports of `shutdown()`, and it removes a limit on the signal endpoints.
|
|
50
|
+
|
|
51
|
+
### Added - v1.1.0
|
|
52
|
+
|
|
53
|
+
- `observeWindow(target)` captures clicks, rage clicks and dead clicks in another window of the page with the same origin, for example a popout. It returns a function that stops the capture. The library does not capture a window from another origin.
|
|
54
|
+
- `capture.interactions.deadClickIgnoreSelector` names the regions that change on their own, for example a price cell. A change or a scroll inside such a region is not an answer to a click. The default is `[data-observability-live]`. `""` turns the filter off.
|
|
55
|
+
- The diagnostic code `bus.journey_denied`. The bus counts it for a journey request from a registered frame or worker without `journey:read`.
|
|
56
|
+
- The `tab` bus message has the optional field `since`. It holds the `performance.timeOrigin` of the document. An older library ignores it.
|
|
57
|
+
- `docs/guides.md` has the section "One Setup for All Specs". It configures the library one time in a Vitest setup file. No spec then needs a mock of the library.
|
|
58
|
+
- The `serializer` reference and the `LogSerializer` JSDoc tell that the library drops a batch that the server refuses with `400`. A custom serializer must keep each record within the limits of the server.
|
|
59
|
+
- `docs/configuration.md` tells that the spans of the library need no OpenTelemetry SDK.
|
|
60
|
+
|
|
61
|
+
### Changed - v1.1.0
|
|
62
|
+
|
|
63
|
+
- A journey request from a registered frame or worker without `journey:read` does not count `bus.rejected_message` now. Each frame and worker with the default permissions sends one at startup.
|
|
64
|
+
- When the bus finds a duplicated tab id, the newer document makes a new tab id. The older document keeps its id. Before, the document with the larger random context id made a new id, or no document did.
|
|
65
|
+
- A write that keeps the old value of an attribute or a text is not an answer to a click. A batch that sets `name` or `type` and then puts back the old value is not an answer either.
|
|
66
|
+
- A swap of marked elements under one parent is not an answer to a click. A marked element that only appears or only goes away is an answer.
|
|
67
|
+
- Click capture checks the node type of the clicked element, not `instanceof Element`. A click on an element of another window is then recorded.
|
|
68
|
+
- `metricsEndpoint` and `tracesEndpoint` work with each `serializer`. Metric batches and span batches always use OTLP. Before, the `ecs` serializer or a custom serializer turned these endpoints off and reported `config.invalid`.
|
|
69
|
+
- With a custom serializer, the transport worker sends the metric batches and the span batches. The log batches still use the main thread.
|
|
70
|
+
- The package has no `engines` field. An install with `engine-strict` no longer fails on an older Node version. Use Node 22 or later. The tests run on Node 22.22.3.
|
|
71
|
+
- **Development:** `devEngines` in `package.json` sets Node 22.22.3 or later for this repository.
|
|
72
|
+
- **Development:** the workspace accepts the `@emnapi` versions that `oxc-parser` pins for `@napi-rs/wasm-runtime@1.2.7`. `pnpm peers check` passes.
|
|
73
|
+
- **Development:** GitHub CI runs the `verify` steps on the Node floor and on Node 24. It also builds the playgrounds and runs the playground tests, the browser tests and the playground smoke tests.
|
|
74
|
+
- **Development:** the Prettier config prints Markdown tables in compact form, with no column padding.
|
|
75
|
+
- **Development:** `playground/react-custom-backend` is a new example. A React 19 app sends its logs to its own backend through a custom `serializer`. `tools/mock-app-api.mjs` is its mock app API, with a login, prices and orders.
|
|
76
|
+
- **Development:** `playground/react` is now an FX workspace on `dockview-react` 8.9.1. It has a login, a saved layout for each user and tenant, popout windows, panel windows and 11 panels. It calls `observeWindow()` for each popout.
|
|
77
|
+
- **Development:** the replay player in `playground/react/src/replay-player/` replaces the replay spike and the replay viewer. The workspace does not install their rrweb packages now, so it does not declare the `@rrweb/types` peer.
|
|
78
|
+
- **Development:** `tools/mock-ingest-server.mjs` keeps replay segments in a bounded memory store. `GET /v1/replay/recordings` and `GET /v1/replay/recordings/<id>` read them.
|
|
79
|
+
- **Development:** the mock ingest server and the mock app API listen on `127.0.0.1` only. They refuse a `Host` header that is not `localhost` or `127.0.0.1`.
|
|
80
|
+
- **Development:** `tools/mock-app-api.mjs` has `POST /api/refresh` for the token refresh recipe.
|
|
81
|
+
- **Development:** `pnpm run test:playground` runs one Chromium smoke test for each playground app.
|
|
82
|
+
- **Development:** `e2e/observe-window.e2e.ts` checks `observeWindow()` with a real popup in Chromium, Firefox and WebKit.
|
|
83
|
+
|
|
84
|
+
### Fixed - v1.1.0
|
|
85
|
+
|
|
86
|
+
- A popup that `window.open()` opens gets its own tab id at startup. Before, it kept the tab id that it copied from its opener.
|
|
87
|
+
- React's input writes no longer hide each `ui.dead_click`. React writes `name` and `type` at each render with no net change.
|
|
88
|
+
- With `diagnostics.records`, a diagnostic from the check of the next settings in a rotation goes to the new identity. An example is `config.invalid`. Before, the library dropped that record during the rotation.
|
|
89
|
+
- A `shutdown()` before the end of startup reports each held record to `onDrop` with `load_failed`. Before, with `bus: { mode: "off" }`, the library lost these records with no report.
|
|
90
|
+
- A `shutdown()` after the delivery stack loads, but before the end of startup, sends the startup records. Before, the library lost them with no report.
|
|
91
|
+
- A `shutdown()` during the sender load of a `carry` rotation rejects the rotation. `onDrop` reports the carried records in memory with `security_context`. Before, the rotation resolved, and the library lost the records with no report.
|
|
92
|
+
- A `shutdown({ clearStorage: "context" })` during that load removes the stored batches of the old context. Before, these batches stayed on the device.
|
|
93
|
+
- After a failed load of the delivery stack, `shutdown({ clearStorage })` still removes the stored batches that a `carry` rotation during a pause left.
|
|
94
|
+
- The testing examples in `docs/guides.md` and `llms.txt` call `memory.clear()` after `await shutdown()`. Before, the records that `shutdown()` sent reached the next test.
|
|
95
|
+
- `docs/configuration.md` and the `endpoint` JSDoc tell that a relative `endpoint` works. The library also reports `config.invalid` with the origin that gets the records.
|
|
96
|
+
- `docs/ingest-server.md` tells that the batches for `metricsEndpoint` and `tracesEndpoint` use OTLP with each `serializer`. This includes a `text/plain` exit batch.
|
|
97
|
+
- `docs/delivery-guarantees.md` tells how a `413` splits a batch. It also tells that the library loses an exit batch that gets a `413`, with no `onDrop` report.
|
|
98
|
+
- `docs/configuration.md` tells that an exit batch can hold more than `batching.logBatchSize` records.
|
|
99
|
+
- `docs/runtime-policies.md` tells that a full `payloadMode: "defer"` queue builds its pending calls inside the log call that finds it full.
|
|
100
|
+
- The "Logout on a shared device" recipe uses `clearStorage: "namespace"`. With `"context"`, the parked batches of earlier page loads stay on the device for `retention.maxAgeMs`.
|
|
101
|
+
- `docs/configuration.md` and `docs/threat-model.md` tell that the processors of the sender do not run on a record from a frame or a worker. Only `redact` runs on it again.
|
|
102
|
+
- `docs/threat-model.md` and `docs/production-recipes.md` tell that `shutdown()` removes each `registerFrame()` and `registerWorker()` registration.
|
|
103
|
+
- The "Consent withdrawal" recipe tells that a frame or a worker with its own `endpoint` becomes its own sender when the owner starts no bus.
|
|
104
|
+
- `CHANGELOG.md` has the 1.0.0 section one time. Before, it had that section two times.
|
|
105
|
+
- **Development:** the debug bundle test does not fail now when the random security context id holds "abc".
|
|
214
106
|
|
|
215
107
|
## [1.0.0] - 2026-11-20
|
|
216
108
|
|
|
@@ -943,16 +835,16 @@ configure({ endpoint, console: true });
|
|
|
943
835
|
configure({ endpoint, console: "WARN" });
|
|
944
836
|
```
|
|
945
837
|
|
|
946
|
-
| Section
|
|
947
|
-
|
|
|
948
|
-
| `streams` | `logs.batchSize`, `logs.flushIntervalMs`, `metrics.batchSize`, `metrics.flushIntervalMs`
|
|
949
|
-
| `retry`
|
|
950
|
-
| `journey` | `maxAgeMs`, `endOnOwnerClose`, `urlParam`
|
|
951
|
-
| `limits`
|
|
952
|
-
| `storage` | `dbName`, `maxBatches`, `maxAgeMs`, `maxAttempts`
|
|
953
|
-
| `bus`
|
|
954
|
-
| `capture` | `maxBreadcrumbs`, `errorDedupeMs`
|
|
955
|
-
| top level | `maxConcurrentRequests`, `requestTimeoutMs`, `compressionThresholdBytes`
|
|
838
|
+
| Section | Removed keys |
|
|
839
|
+
| --- | --- |
|
|
840
|
+
| `streams` | `logs.batchSize`, `logs.flushIntervalMs`, `metrics.batchSize`, `metrics.flushIntervalMs` |
|
|
841
|
+
| `retry` | `baseDelayMs`, `maxDelayMs`, `idleDelayMs` |
|
|
842
|
+
| `journey` | `maxAgeMs`, `endOnOwnerClose`, `urlParam` |
|
|
843
|
+
| `limits` | `maxBodyChars`, `maxAttributeChars`, `maxAttributeCount`, `maxStackChars`, `maxDepth`, `maxArrayLength`, `maxRecordBytes` |
|
|
844
|
+
| `storage` | `dbName`, `maxBatches`, `maxAgeMs`, `maxAttempts` |
|
|
845
|
+
| `bus` | `channelName`, `handshakeTimeoutMs`, `maxHandshakeAttempts`, `maxBootBufferRecords`, `openFinHost`, `orphanPolicy` |
|
|
846
|
+
| `capture` | `maxBreadcrumbs`, `errorDedupeMs` |
|
|
847
|
+
| top level | `maxConcurrentRequests`, `requestTimeoutMs`, `compressionThresholdBytes` |
|
|
956
848
|
|
|
957
849
|
`sampling` is unchanged.
|
|
958
850
|
|
package/README.md
CHANGED
|
@@ -23,9 +23,7 @@ pnpm add --save-exact @utk09/ui-observability
|
|
|
23
23
|
yarn add --exact @utk09/ui-observability
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The package has an ES module entry and a CommonJS entry. Each entry has its own type declarations.
|
|
27
|
-
The types work with `moduleResolution` set to `NodeNext` or `Bundler`. They also work with `skipLibCheck: false`.
|
|
28
|
-
Use one module format in one application. The two entries are separate copies with separate state and separate types.
|
|
26
|
+
The package has an ES module entry and a CommonJS entry. Each entry has its own type declarations. The types work with `moduleResolution` set to `NodeNext` or `Bundler`. They also work with `skipLibCheck: false`. Use one module format in one application. The two entries are separate copies with separate state and separate types.
|
|
29
27
|
|
|
30
28
|
### Peer Dependencies
|
|
31
29
|
|
|
@@ -159,34 +157,34 @@ configure({
|
|
|
159
157
|
|
|
160
158
|
## Documentation
|
|
161
159
|
|
|
162
|
-
| Document
|
|
163
|
-
|
|
|
164
|
-
| [API Reference](docs/api.md)
|
|
165
|
-
| [Configuration Options](docs/configuration.md)
|
|
166
|
-
| [Guides](docs/guides.md)
|
|
167
|
-
| [Production recipes](docs/production-recipes.md)
|
|
168
|
-
| [Ingest Server Requirements](docs/ingest-server.md)
|
|
169
|
-
| [Migration to 1.0.0](docs/migration-v1.md)
|
|
170
|
-
| [Release and support](docs/release-and-support.md)
|
|
171
|
-
| [Runtime policies and migration](docs/runtime-policies.md) | Each default, each range, security-context rotation and the upgrade steps.
|
|
172
|
-
| [Delivery guarantees](docs/delivery-guarantees.md)
|
|
173
|
-
| [Attribute reference](docs/attributes.md)
|
|
174
|
-
| [Browser support](docs/browser-support.md)
|
|
175
|
-
| [Architecture](docs/architecture.md)
|
|
176
|
-
| [Threat model](docs/threat-model.md)
|
|
177
|
-
| [Performance](docs/performance.md)
|
|
178
|
-
| [Development](docs/development.md)
|
|
179
|
-
| [Browser tests](e2e/README.md)
|
|
180
|
-
| [Collector check](e2e/collector/README.md)
|
|
181
|
-
| [Playground guide](playground/README.md)
|
|
182
|
-
| [Security policy](SECURITY.md)
|
|
183
|
-
| [llms.txt](llms.txt)
|
|
160
|
+
| Document | Content |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| [API Reference](docs/api.md) | Each exported function, the delivery health, the flush result and the shutdown options. |
|
|
163
|
+
| [Configuration Options](docs/configuration.md) | Each config key and its default, auto-capture, spans and the browser storage keys. |
|
|
164
|
+
| [Guides](docs/guides.md) | Console output, custom transport, worker transport, testing and remote sampling. |
|
|
165
|
+
| [Production recipes](docs/production-recipes.md) | Login, logout, tenant rotation, token refresh, consent withdrawal and the initialization order. |
|
|
166
|
+
| [Ingest Server Requirements](docs/ingest-server.md) | The ingest contract and the `uiobs doctor` check of an ingest server. |
|
|
167
|
+
| [Migration to 1.0.0](docs/migration-v1.md) | Each change from 0.12.x, with the new code. |
|
|
168
|
+
| [Release and support](docs/release-and-support.md) | The stable API contract, the supported environments and the release evidence. |
|
|
169
|
+
| [Runtime policies and migration](docs/runtime-policies.md) | Each default, each range, security-context rotation and the upgrade steps. |
|
|
170
|
+
| [Delivery guarantees](docs/delivery-guarantees.md) | Duplicates, order, each loss and its `onDrop` reason, retention, the exit flush and rotation. |
|
|
171
|
+
| [Attribute reference](docs/attributes.md) | Each attribute that the library writes, and its type. |
|
|
172
|
+
| [Browser support](docs/browser-support.md) | The minimum browser versions, the browser APIs that the library uses, and the fallback for each. |
|
|
173
|
+
| [Architecture](docs/architecture.md) | The core architecture, the layers of the library and the path of a record. |
|
|
174
|
+
| [Threat model](docs/threat-model.md) | The trust boundaries, the threats and the controls. |
|
|
175
|
+
| [Performance](docs/performance.md) | The release benchmark, its baselines and its budgets. |
|
|
176
|
+
| [Development](docs/development.md) | The workspace, the checks and the example applications. |
|
|
177
|
+
| [Browser tests](e2e/README.md) | The Playwright tests and the coverage that is still missing. |
|
|
178
|
+
| [Collector check](e2e/collector/README.md) | The check against a pinned OpenTelemetry Collector. |
|
|
179
|
+
| [Playground guide](playground/README.md) | The six example applications and how to start each one. |
|
|
180
|
+
| [Security policy](SECURITY.md) | How to report a vulnerability. |
|
|
181
|
+
| [llms.txt](llms.txt) | A summary of the library for a large language model. The package includes it. |
|
|
184
182
|
|
|
185
183
|
---
|
|
186
184
|
|
|
187
185
|
## Development
|
|
188
186
|
|
|
189
|
-
|
|
187
|
+
To work on this repository, use Node 22.22.3 or later and pnpm 12.21.0. An app that uses the package can use Node 22 or later.
|
|
190
188
|
|
|
191
189
|
```bash
|
|
192
190
|
pnpm install
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as n } from "./identity-
|
|
1
|
+
import { Pt as e, g as t } from "./constants-CEHN6KuY.js";
|
|
2
|
+
import { i as n } from "./identity-Byh3gCdT.js";
|
|
3
3
|
// src/models/batch.ts
|
|
4
4
|
function r(e) {
|
|
5
5
|
if (typeof e != "object" || !e) return !1;
|
|
@@ -32,4 +32,4 @@ function s(e) {
|
|
|
32
32
|
}
|
|
33
33
|
export { i as a, r as i, s as n, o as r, a as t };
|
|
34
34
|
|
|
35
|
-
//# sourceMappingURL=batch-
|
|
35
|
+
//# sourceMappingURL=batch-120Kc9jr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-
|
|
1
|
+
{"version":3,"file":"batch-120Kc9jr.js","names":["LOG_TYPE_ACTION","ATTR_LOG_TYPE","newId","isLogBatch","value","id","createdAt","attempts","records","splitBatch","batch","middle","halve","diagnostics","attributeOf","record","attributes","key","isActionRecord","countRecords","batches","total"],"sources":["../src/models/batch.ts"],"sourcesContent":["// src/models/batch.ts\n//\n// A batch of log records for delivery to the ingest endpoint.\n\nimport { ATTR_LOG_TYPE, LOG_TYPE_ACTION } from \"../constants\";\nimport type { Diagnostics } from \"../core/diagnostics\";\nimport { newId } from \"../utils/identity\";\nimport type { LogRecord } from \"./log-record\";\n\n/**\n * A batch of records with a stable id used for server-side deduplication across retries.\n * @see {@link splitBatch}\n */\nexport interface LogBatch {\n /** Application namespace that owns this stored batch. */\n readonly persistenceNamespace?: string;\n /** Delivery context id. Never changes. With isolation, a batch without one stays stored. */\n readonly routingContextId?: string;\n /** Deduplication key. Stays the same across retries and reloads. */\n id: string;\n /** Records to deliver, in log order. */\n records: LogRecord[];\n /** Batch creation time, in epoch milliseconds. */\n createdAt: number;\n /** Delivery attempts so far. */\n attempts: number;\n}\n\n/**\n * Checks whether a value from storage has every field of a batch. `keyOf` can't match an entry\n * without `id` after delivery, so that entry would be retried forever and block every batch\n * behind it. An entry without `attempts` counts as NaN, which never reaches `maxAttempts`, so\n * it would never be dropped as a dead letter.\n * @param value Parsed storage entry.\n * @returns True when every required field is present and has the correct type.\n */\nexport function isLogBatch(value: unknown): value is LogBatch {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n\n const id: unknown = Reflect.get(value, \"id\");\n const createdAt: unknown = Reflect.get(value, \"createdAt\");\n const attempts: unknown = Reflect.get(value, \"attempts\");\n const records: unknown = Reflect.get(value, \"records\");\n\n return (\n typeof id === \"string\" &&\n typeof createdAt === \"number\" &&\n typeof attempts === \"number\" &&\n Array.isArray(records)\n );\n}\n\n/**\n * Splits a batch that the server rejected as too large into two halves. Each half gets a new\n * id but keeps the original batch's age and attempts.\n * @param batch The rejected batch.\n * @param diagnostics Diagnostics reporter for the new batch ids.\n * @returns Two batches, or `null` if a single record is already over the limit.\n */\nexport function splitBatch(batch: LogBatch, diagnostics: Diagnostics): [LogBatch, LogBatch] | null {\n if (batch.records.length < 2) {\n return null;\n }\n\n const middle = Math.floor(batch.records.length / 2);\n const halve = (records: LogRecord[]): LogBatch => ({\n id: newId(diagnostics),\n records,\n createdAt: batch.createdAt,\n attempts: batch.attempts,\n routingContextId: batch.routingContextId,\n persistenceNamespace: batch.persistenceNamespace,\n });\n\n return [halve(batch.records.slice(0, middle)), halve(batch.records.slice(middle))];\n}\n\n/**\n * Reads one attribute of a record. A record from storage can be corrupt, either null or\n * missing its attributes.\n * @param record Record to read.\n * @param key Attribute key.\n * @returns The attribute value, or undefined for a corrupt record.\n */\nexport function attributeOf(record: LogRecord, key: string): unknown {\n const value: unknown = record;\n if (typeof value !== \"object\" || value === null) {\n return undefined;\n }\n\n const attributes: unknown = Reflect.get(value, \"attributes\");\n if (typeof attributes !== \"object\" || attributes === null) {\n return undefined;\n }\n\n return Reflect.get(attributes, key);\n}\n\n/**\n * Checks whether a record is an action. A corrupt record from storage is not an action.\n * @param record Record to check.\n * @returns True for an action record.\n */\nexport function isActionRecord(record: LogRecord): boolean {\n return attributeOf(record, ATTR_LOG_TYPE) === LOG_TYPE_ACTION;\n}\n\n/**\n * Counts the records across all batches.\n * @param batches Batches to measure.\n * @returns Total record count.\n */\nexport function countRecords(batches: readonly LogBatch[]): number {\n return batches.reduce((total, batch) => total + batch.records.length, 0);\n}\n"],"mappings":";;;AAoCA,SAAgBG,EAAW,GAAmC;CAC5D,IAAI,OAAOC,KAAU,aAAYA,GAC/B,OAAO;CAGT,IAAMC,IAAc,QAAQ,IAAID,GAAO,IAAI,GACrCE,IAAqB,QAAQ,IAAIF,GAAO,WAAW,GACnDG,IAAoB,QAAQ,IAAIH,GAAO,UAAU,GACjDI,IAAmB,QAAQ,IAAIJ,GAAO,SAAS;CAErD,OACE,OAAOC,KAAO,YACd,OAAOC,KAAc,YACrB,OAAOC,KAAa,YACpB,MAAM,QAAQC,CAAO;AAEzB;AASA,SAAgBC,EAAW,GAAiB,GAAuD;CACjG,IAAIC,EAAM,QAAQ,SAAS,GACzB,OAAO;CAGT,IAAMC,IAAS,KAAK,MAAMD,EAAM,QAAQ,SAAS,CAAC,GAC5CE,KAAS,OAAoC;EACjD,IAAIV,EAAMW,CAAW;EACrB;EACA,WAAWH,EAAM;EACjB,UAAUA,EAAM;EAChB,kBAAkBA,EAAM;EACxB,sBAAsBA,EAAM;CAC9B;CAEA,OAAO,CAACE,EAAMF,EAAM,QAAQ,MAAM,GAAGC,CAAM,CAAC,GAAGC,EAAMF,EAAM,QAAQ,MAAMC,CAAM,CAAC,CAAC;AACnF;AASA,SAAgBG,EAAY,GAAmB,GAAsB;CACnE,IAAMV,IAAiBW;CACvB,IAAI,OAAOX,KAAU,aAAYA,GAC/B;CAGF,IAAMY,IAAsB,QAAQ,IAAIZ,GAAO,YAAY;CAC3D,IAAI,OAAOY,KAAe,YAAYA,GAItC,OAAO,QAAQ,IAAIA,GAAYC,CAAG;AACpC;AAOA,SAAgBC,EAAe,GAA4B;CACzD,OAAOJ,EAAYC,GAAQd,CAAa,MAAMD;AAChD;AAOA,SAAgBmB,EAAa,GAAsC;CACjE,OAAOC,EAAQ,QAAQ,GAAO,MAAUC,IAAQX,EAAM,QAAQ,QAAQ,CAAC;AACzE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./constants-
|
|
2
|
-
//# sourceMappingURL=batch-
|
|
1
|
+
const e=require("./constants-NtiQDWL_.cjs"),t=require("./identity-BzAzdQyv.cjs");function n(e){if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`id`),n=Reflect.get(e,`createdAt`),r=Reflect.get(e,`attempts`),i=Reflect.get(e,`records`);return typeof t==`string`&&typeof n==`number`&&typeof r==`number`&&Array.isArray(i)}function r(e,n){if(e.records.length<2)return null;let r=Math.floor(e.records.length/2),i=r=>({id:t.i(n),records:r,createdAt:e.createdAt,attempts:e.attempts,routingContextId:e.routingContextId,persistenceNamespace:e.persistenceNamespace});return[i(e.records.slice(0,r)),i(e.records.slice(r))]}function i(e,t){let n=e;if(typeof n!=`object`||!n)return;let r=Reflect.get(n,`attributes`);if(typeof r==`object`&&r)return Reflect.get(r,t)}function a(t){return i(t,e.g)===e.Pt}function o(e){return e.reduce((e,t)=>e+t.records.length,0)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
2
|
+
//# sourceMappingURL=batch-C3uNp5kU.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-
|
|
1
|
+
{"version":3,"file":"batch-C3uNp5kU.cjs","names":["newId","ATTR_LOG_TYPE","LOG_TYPE_ACTION","require_constants","require_identity","isLogBatch","value","id","createdAt","attempts","records","splitBatch","batch","middle","halve","diagnostics","attributeOf","record","attributes","key","isActionRecord","countRecords","batches","total"],"sources":["../src/models/batch.ts"],"sourcesContent":["// src/models/batch.ts\n//\n// A batch of log records for delivery to the ingest endpoint.\n\nimport { ATTR_LOG_TYPE, LOG_TYPE_ACTION } from \"../constants\";\nimport type { Diagnostics } from \"../core/diagnostics\";\nimport { newId } from \"../utils/identity\";\nimport type { LogRecord } from \"./log-record\";\n\n/**\n * A batch of records with a stable id used for server-side deduplication across retries.\n * @see {@link splitBatch}\n */\nexport interface LogBatch {\n /** Application namespace that owns this stored batch. */\n readonly persistenceNamespace?: string;\n /** Delivery context id. Never changes. With isolation, a batch without one stays stored. */\n readonly routingContextId?: string;\n /** Deduplication key. Stays the same across retries and reloads. */\n id: string;\n /** Records to deliver, in log order. */\n records: LogRecord[];\n /** Batch creation time, in epoch milliseconds. */\n createdAt: number;\n /** Delivery attempts so far. */\n attempts: number;\n}\n\n/**\n * Checks whether a value from storage has every field of a batch. `keyOf` can't match an entry\n * without `id` after delivery, so that entry would be retried forever and block every batch\n * behind it. An entry without `attempts` counts as NaN, which never reaches `maxAttempts`, so\n * it would never be dropped as a dead letter.\n * @param value Parsed storage entry.\n * @returns True when every required field is present and has the correct type.\n */\nexport function isLogBatch(value: unknown): value is LogBatch {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n\n const id: unknown = Reflect.get(value, \"id\");\n const createdAt: unknown = Reflect.get(value, \"createdAt\");\n const attempts: unknown = Reflect.get(value, \"attempts\");\n const records: unknown = Reflect.get(value, \"records\");\n\n return (\n typeof id === \"string\" &&\n typeof createdAt === \"number\" &&\n typeof attempts === \"number\" &&\n Array.isArray(records)\n );\n}\n\n/**\n * Splits a batch that the server rejected as too large into two halves. Each half gets a new\n * id but keeps the original batch's age and attempts.\n * @param batch The rejected batch.\n * @param diagnostics Diagnostics reporter for the new batch ids.\n * @returns Two batches, or `null` if a single record is already over the limit.\n */\nexport function splitBatch(batch: LogBatch, diagnostics: Diagnostics): [LogBatch, LogBatch] | null {\n if (batch.records.length < 2) {\n return null;\n }\n\n const middle = Math.floor(batch.records.length / 2);\n const halve = (records: LogRecord[]): LogBatch => ({\n id: newId(diagnostics),\n records,\n createdAt: batch.createdAt,\n attempts: batch.attempts,\n routingContextId: batch.routingContextId,\n persistenceNamespace: batch.persistenceNamespace,\n });\n\n return [halve(batch.records.slice(0, middle)), halve(batch.records.slice(middle))];\n}\n\n/**\n * Reads one attribute of a record. A record from storage can be corrupt, either null or\n * missing its attributes.\n * @param record Record to read.\n * @param key Attribute key.\n * @returns The attribute value, or undefined for a corrupt record.\n */\nexport function attributeOf(record: LogRecord, key: string): unknown {\n const value: unknown = record;\n if (typeof value !== \"object\" || value === null) {\n return undefined;\n }\n\n const attributes: unknown = Reflect.get(value, \"attributes\");\n if (typeof attributes !== \"object\" || attributes === null) {\n return undefined;\n }\n\n return Reflect.get(attributes, key);\n}\n\n/**\n * Checks whether a record is an action. A corrupt record from storage is not an action.\n * @param record Record to check.\n * @returns True for an action record.\n */\nexport function isActionRecord(record: LogRecord): boolean {\n return attributeOf(record, ATTR_LOG_TYPE) === LOG_TYPE_ACTION;\n}\n\n/**\n * Counts the records across all batches.\n * @param batches Batches to measure.\n * @returns Total record count.\n */\nexport function countRecords(batches: readonly LogBatch[]): number {\n return batches.reduce((total, batch) => total + batch.records.length, 0);\n}\n"],"mappings":"A,iFAoCA,SAAgBK,EAAW,EAAmC,CAC5D,GAAI,OAAOC,GAAU,WAAYA,EAC/B,MAAO,GAGT,IAAMC,EAAc,QAAQ,IAAID,EAAO,IAAI,EACrCE,EAAqB,QAAQ,IAAIF,EAAO,WAAW,EACnDG,EAAoB,QAAQ,IAAIH,EAAO,UAAU,EACjDI,EAAmB,QAAQ,IAAIJ,EAAO,SAAS,EAErD,OACE,OAAOC,GAAO,UACd,OAAOC,GAAc,UACrB,OAAOC,GAAa,UACpB,MAAM,QAAQC,CAAO,CAEzB,CASA,SAAgBC,EAAW,EAAiB,EAAuD,CACjG,GAAIC,EAAM,QAAQ,OAAS,EACzB,OAAO,KAGT,IAAMC,EAAS,KAAK,MAAMD,EAAM,QAAQ,OAAS,CAAC,EAC5CE,EAAS,IAAoC,CACjD,GAAId,EAAAA,EAAMe,CAAW,EACrB,UACA,UAAWH,EAAM,UACjB,SAAUA,EAAM,SAChB,iBAAkBA,EAAM,iBACxB,qBAAsBA,EAAM,oBAC9B,GAEA,MAAO,CAACE,EAAMF,EAAM,QAAQ,MAAM,EAAGC,CAAM,CAAC,EAAGC,EAAMF,EAAM,QAAQ,MAAMC,CAAM,CAAC,CAAC,CACnF,CASA,SAAgBG,EAAY,EAAmB,EAAsB,CACnE,IAAMV,EAAiBW,EACvB,GAAI,OAAOX,GAAU,WAAYA,EAC/B,OAGF,IAAMY,EAAsB,QAAQ,IAAIZ,EAAO,YAAY,EAC3D,GAAI,OAAOY,GAAe,UAAYA,EAItC,OAAO,QAAQ,IAAIA,EAAYC,CAAG,CACpC,CAOA,SAAgBC,EAAe,EAA4B,CACzD,OAAOJ,EAAYC,EAAQhB,EAAAA,CAAa,IAAMC,EAAAA,EAChD,CAOA,SAAgBmB,EAAa,EAAsC,CACjE,OAAOC,EAAQ,QAAQ,EAAO,IAAUC,EAAQX,EAAM,QAAQ,OAAQ,CAAC,CACzE,C"}
|