@utk09/ui-observability 1.1.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 +42 -0
- package/dist/{batch-D3NHhF9L.js → batch-120Kc9jr.js} +3 -3
- package/dist/{batch-D3NHhF9L.js.map → batch-120Kc9jr.js.map} +1 -1
- package/dist/{batch-DnYRJqhU.cjs → batch-C3uNp5kU.cjs} +2 -2
- package/dist/{batch-DnYRJqhU.cjs.map → batch-C3uNp5kU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +5 -0
- package/dist/bus/bus.d.ts +5 -0
- package/dist/bus-Dj8IEVcC.cjs +2 -0
- package/dist/bus-Dj8IEVcC.cjs.map +1 -0
- package/dist/{bus-dw7T92sO.js → bus-DyNafxZN.js} +104 -94
- 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/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-SHPAvS4U.js → compression-BWkDWY3v.js} +2 -2
- package/dist/{compression-SHPAvS4U.js.map → compression-BWkDWY3v.js.map} +1 -1
- package/dist/{compression-C0hUHKR-.cjs → compression-CEVe7NPX.cjs} +2 -2
- package/dist/{compression-C0hUHKR-.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-CSNcS7OZ.js → config-DK1Zf7jn.js} +83 -85
- package/dist/config-DK1Zf7jn.js.map +1 -0
- package/dist/{console-BsM-fSCQ.js → console-CAyCQOpm.js} +5 -5
- package/dist/{console-BsM-fSCQ.js.map → console-CAyCQOpm.js.map} +1 -1
- package/dist/{console-Dkxs6IVQ.cjs → console-Dk6GH4yj.cjs} +2 -2
- package/dist/{console-Dkxs6IVQ.cjs.map → console-Dk6GH4yj.cjs.map} +1 -1
- package/dist/{constants-BwJDXzj6.js → constants-CEHN6KuY.js} +42 -21
- 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 +11 -0
- package/dist/constants.d.ts +11 -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/sender.d.cts +3 -2
- package/dist/core/sender.d.ts +3 -2
- package/dist/{debug-bundle-B2v6Cym-.cjs → debug-bundle-DMzUfiQc.cjs} +2 -2
- package/dist/{debug-bundle-B2v6Cym-.cjs.map → debug-bundle-DMzUfiQc.cjs.map} +1 -1
- package/dist/{debug-bundle-Cs_YWzTa.js → debug-bundle-w78W46zr.js} +4 -4
- package/dist/{debug-bundle-Cs_YWzTa.js.map → debug-bundle-w78W46zr.js.map} +1 -1
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.js +22 -22
- 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-Q3Ng1ciC.js → errors-C-LYbqyB.js} +27 -24
- package/dist/errors-C-LYbqyB.js.map +1 -0
- package/dist/{factory-DV17sm2p.js → factory-BHYrcSaU.js} +42 -31
- 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-BgtHyY4u.js → identity-Byh3gCdT.js} +11 -11
- package/dist/{identity-BgtHyY4u.js.map → identity-Byh3gCdT.js.map} +1 -1
- package/dist/{identity-CvuyqZk7.cjs → identity-BzAzdQyv.cjs} +2 -2
- package/dist/{identity-CvuyqZk7.cjs.map → identity-BzAzdQyv.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +539 -534
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-e-13ZLWm.js → indexeddb-storage-BYywz-v6.js} +4 -4
- package/dist/{indexeddb-storage-e-13ZLWm.js.map → indexeddb-storage-BYywz-v6.js.map} +1 -1
- package/dist/{indexeddb-storage-D4KVcqdD.cjs → indexeddb-storage-BfqGkLFe.cjs} +2 -2
- package/dist/{indexeddb-storage-D4KVcqdD.cjs.map → indexeddb-storage-BfqGkLFe.cjs.map} +1 -1
- package/dist/{interactions-OK85T-Dk.cjs → interactions-BXzEel4F.cjs} +2 -2
- package/dist/interactions-BXzEel4F.cjs.map +1 -0
- package/dist/{interactions-Byxf1C82.js → interactions-DdKPMWIN.js} +12 -12
- package/dist/interactions-DdKPMWIN.js.map +1 -0
- package/dist/{journey-nMbob3OB.cjs → journey-BUmsrgaw.cjs} +2 -2
- package/dist/{journey-nMbob3OB.cjs.map → journey-BUmsrgaw.cjs.map} +1 -1
- package/dist/{journey-C93FTYcs.js → journey-Nu655gEO.js} +3 -3
- package/dist/{journey-C93FTYcs.js.map → journey-Nu655gEO.js.map} +1 -1
- package/dist/{library-console-DJUQzcgM.cjs → library-console-DdIlzzph.cjs} +2 -2
- package/dist/{library-console-DJUQzcgM.cjs.map → library-console-DdIlzzph.cjs.map} +1 -1
- package/dist/{library-console-DklSmucS.js → library-console-amePMnP8.js} +2 -2
- package/dist/{library-console-DklSmucS.js.map → library-console-amePMnP8.js.map} +1 -1
- package/dist/{library-request-UGEwOHpf.js → library-request-Cv7C05jf.js} +2 -2
- package/dist/{library-request-UGEwOHpf.js.map → library-request-Cv7C05jf.js.map} +1 -1
- package/dist/{library-request-kY9iTpIF.cjs → library-request-DO3Ec7KE.cjs} +2 -2
- package/dist/{library-request-kY9iTpIF.cjs.map → library-request-DO3Ec7KE.cjs.map} +1 -1
- package/dist/{lifecycle-DaMdH_X7.cjs → lifecycle-B5yfH5is.cjs} +2 -2
- package/dist/{lifecycle-DaMdH_X7.cjs.map → lifecycle-B5yfH5is.cjs.map} +1 -1
- package/dist/{lifecycle-B2PlIuQu.js → lifecycle-CMHz2Zbs.js} +2 -2
- package/dist/{lifecycle-B2PlIuQu.js.map → lifecycle-CMHz2Zbs.js.map} +1 -1
- package/dist/{log-record-DSt2P-Sr.js → log-record-B_nSqxoe.js} +2 -2
- package/dist/{log-record-DSt2P-Sr.js.map → log-record-B_nSqxoe.js.map} +1 -1
- package/dist/{log-record-Bmx6etMh.cjs → log-record-Bdywwg0k.cjs} +2 -2
- package/dist/{log-record-Bmx6etMh.cjs.map → log-record-Bdywwg0k.cjs.map} +1 -1
- package/dist/{long-frames-Bamjs1WV.js → long-frames-6NGl1-uN.js} +3 -3
- package/dist/{long-frames-Bamjs1WV.js.map → long-frames-6NGl1-uN.js.map} +1 -1
- package/dist/{long-frames-lhtONgGt.cjs → long-frames-D9DfSWqv.cjs} +2 -2
- package/dist/{long-frames-lhtONgGt.cjs.map → long-frames-D9DfSWqv.cjs.map} +1 -1
- package/dist/models/config.d.cts +4 -3
- package/dist/models/config.d.ts +4 -3
- package/dist/{network-BCn8Gn47.cjs → network-BNHBI0Fc.cjs} +2 -2
- package/dist/{network-BCn8Gn47.cjs.map → network-BNHBI0Fc.cjs.map} +1 -1
- package/dist/{network-Cg1L2w2r.js → network-Cc3tSB7e.js} +13 -13
- package/dist/{network-Cg1L2w2r.js.map → network-Cc3tSB7e.js.map} +1 -1
- package/dist/{observed-windows-BrwaJNlj.js → observed-windows-8JtCsIr1.js} +3 -3
- package/dist/{observed-windows-BrwaJNlj.js.map → observed-windows-8JtCsIr1.js.map} +1 -1
- package/dist/{observed-windows-B3gJkdql.cjs → observed-windows-BlE25nrn.cjs} +2 -2
- package/dist/{observed-windows-B3gJkdql.cjs.map → observed-windows-BlE25nrn.cjs.map} +1 -1
- package/dist/openfin-Bxelt0yg.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/{otlp-D6dRZyB8.js → otlp-Btix3EBa.js} +7 -7
- package/dist/{otlp-D6dRZyB8.js.map → otlp-Btix3EBa.js.map} +1 -1
- package/dist/{otlp-CrAWkQdO.cjs → otlp-CFSW-Dno.cjs} +2 -2
- package/dist/{otlp-CrAWkQdO.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-8DLhjddo.js → platform-Dba6R3Hp.js} +22 -9
- package/dist/platform-Dba6R3Hp.js.map +1 -0
- package/dist/{profiler-BaXSqCfz.js → profiler-DNKcqu09.js} +19 -19
- package/dist/{profiler-BaXSqCfz.js.map → profiler-DNKcqu09.js.map} +1 -1
- package/dist/{profiler-BvWW2kNM.cjs → profiler-DpoPi1hH.cjs} +2 -2
- package/dist/{profiler-BvWW2kNM.cjs.map → profiler-DpoPi1hH.cjs.map} +1 -1
- package/dist/{profiler-frames-DeaBiB-5.cjs → profiler-frames-C9zJNd8_.cjs} +2 -2
- package/dist/{profiler-frames-DeaBiB-5.cjs.map → profiler-frames-C9zJNd8_.cjs.map} +1 -1
- package/dist/{profiler-frames-C4ySHN0X.js → profiler-frames-CGXZeZ_3.js} +4 -4
- package/dist/{profiler-frames-C4ySHN0X.js.map → profiler-frames-CGXZeZ_3.js.map} +1 -1
- package/dist/{remote-rules-Dq9xe7Qn.js → remote-rules-DNK96vLa.js} +15 -15
- package/dist/{remote-rules-Dq9xe7Qn.js.map → remote-rules-DNK96vLa.js.map} +1 -1
- package/dist/{remote-rules-D7L6D_D2.cjs → remote-rules-DuMFRlit.cjs} +2 -2
- package/dist/{remote-rules-D7L6D_D2.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-B0M8kWz_.js → replay-Dy6OiaOZ.js} +89 -62
- package/dist/replay-Dy6OiaOZ.js.map +1 -0
- package/dist/{reports-ojuMKGO7.cjs → reports-CGK9YQch.cjs} +2 -2
- package/dist/{reports-ojuMKGO7.cjs.map → reports-CGK9YQch.cjs.map} +1 -1
- package/dist/{reports--8APRLa-.js → reports-CX57-S9s.js} +3 -3
- package/dist/{reports--8APRLa-.js.map → reports-CX57-S9s.js.map} +1 -1
- package/dist/{resource-timing-BzR05rE-.js → resource-timing-CWVDCbrY.js} +4 -4
- package/dist/{resource-timing-BzR05rE-.js.map → resource-timing-CWVDCbrY.js.map} +1 -1
- package/dist/{resource-timing-pAG3ZhB5.cjs → resource-timing-DalulXiR.cjs} +2 -2
- package/dist/{resource-timing-pAG3ZhB5.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-BWvwKQ2p.js → response-body-yi92Rpvo.js} +100 -100
- package/dist/response-body-yi92Rpvo.js.map +1 -0
- package/dist/{rotation-BylN1B9e.js → rotation-ChBbNDE2.js} +24 -24
- 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-zXA6r-Nw.js → sampling-DZTOD28D.js} +6 -6
- package/dist/{sampling-zXA6r-Nw.js.map → sampling-DZTOD28D.js.map} +1 -1
- package/dist/{sampling-B46LW0cy.cjs → sampling-wAVJIZXp.cjs} +2 -2
- package/dist/{sampling-B46LW0cy.cjs.map → sampling-wAVJIZXp.cjs.map} +1 -1
- package/dist/{sanitize-DjnR6RXR.js → sanitize-B2GKlSFp.js} +2 -2
- package/dist/{sanitize-DjnR6RXR.js.map → sanitize-B2GKlSFp.js.map} +1 -1
- package/dist/{sanitize-Qj6LuZqp.cjs → sanitize-BZdhoghq.cjs} +2 -2
- package/dist/{sanitize-Qj6LuZqp.cjs.map → sanitize-BZdhoghq.cjs.map} +1 -1
- package/dist/{sender-Bdp-TAS4.js → sender-BRSpc7R8.js} +175 -161
- 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-CSttrAsw.js → stored-context-df1dEnht.js} +10 -8
- package/dist/stored-context-df1dEnht.js.map +1 -0
- package/dist/{storm-DKlpv0FL.js → storm-U3_ek1nA.js} +2 -2
- package/dist/{storm-DKlpv0FL.js.map → storm-U3_ek1nA.js.map} +1 -1
- package/dist/{storm-BHgI12iS.cjs → storm-qiE_AMC7.cjs} +2 -2
- package/dist/{storm-BHgI12iS.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-BcOB8A2e.js → unclean-exit-Bj6gYHeL.js} +2 -2
- package/dist/{unclean-exit-BcOB8A2e.js.map → unclean-exit-Bj6gYHeL.js.map} +1 -1
- package/dist/{unclean-exit-BYPYYkQ5.cjs → unclean-exit-CuBh-ee5.cjs} +2 -2
- package/dist/{unclean-exit-BYPYYkQ5.cjs.map → unclean-exit-CuBh-ee5.cjs.map} +1 -1
- package/dist/{user-timing-BsU2wQKE.cjs → user-timing-BWqzYF2Q.cjs} +2 -2
- package/dist/{user-timing-BsU2wQKE.cjs.map → user-timing-BWqzYF2Q.cjs.map} +1 -1
- package/dist/{user-timing-4KIJ74Vi.js → user-timing-Duz0d-OA.js} +2 -2
- package/dist/{user-timing-4KIJ74Vi.js.map → user-timing-Duz0d-OA.js.map} +1 -1
- 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-Zg0hj1LB.js → web-socket-CE_9Q22z.js} +5 -5
- package/dist/{web-socket-Zg0hj1LB.js.map → web-socket-CE_9Q22z.js.map} +1 -1
- package/dist/{web-socket-Cs1ZbmmN.cjs → web-socket-sm3rD-A_.cjs} +2 -2
- package/dist/{web-socket-Cs1ZbmmN.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-DFYXIFus.cjs → worker-protocol-D5VnCdWY.cjs} +2 -2
- package/dist/{worker-protocol-DFYXIFus.cjs.map → worker-protocol-D5VnCdWY.cjs.map} +1 -1
- package/dist/{worker-protocol-CYpAbrVl.js → worker-protocol-h4-tRWqy.js} +6 -6
- package/dist/{worker-protocol-CYpAbrVl.js.map → worker-protocol-h4-tRWqy.js.map} +1 -1
- package/dist/{worker-server--yGTadTA.cjs → worker-server-CF1yatXq.cjs} +2 -2
- package/dist/{worker-server--yGTadTA.cjs.map → worker-server-CF1yatXq.cjs.map} +1 -1
- package/dist/worker-server-FYfKHQhJ.js +94 -0
- package/dist/{worker-server-BokySIII.js.map → worker-server-FYfKHQhJ.js.map} +1 -1
- package/dist/{worker-transport-BdEvh_-a.cjs → worker-transport-COgY4RX8.cjs} +2 -2
- package/dist/{worker-transport-BdEvh_-a.cjs.map → worker-transport-COgY4RX8.cjs.map} +1 -1
- package/dist/{worker-transport-JK-Fby9J.js → worker-transport-jzX1IusG.js} +34 -34
- package/dist/{worker-transport-JK-Fby9J.js.map → worker-transport-jzX1IusG.js.map} +1 -1
- package/llms.txt +1 -2
- package/package.json +1 -1
- package/dist/bus-B__467mL.cjs +0 -2
- package/dist/bus-B__467mL.cjs.map +0 -1
- package/dist/bus-dw7T92sO.js.map +0 -1
- package/dist/config-CSNcS7OZ.js.map +0 -1
- package/dist/config-CybPP5VM.cjs +0 -2
- package/dist/config-CybPP5VM.cjs.map +0 -1
- package/dist/constants-BwJDXzj6.js.map +0 -1
- package/dist/constants-CtF52hIV.cjs +0 -2
- package/dist/constants-CtF52hIV.cjs.map +0 -1
- package/dist/errors-DP2RUm4V.cjs +0 -3
- package/dist/errors-DP2RUm4V.cjs.map +0 -1
- package/dist/errors-Q3Ng1ciC.js.map +0 -1
- package/dist/factory-DV17sm2p.js.map +0 -1
- package/dist/factory-K8O6gpux.cjs +0 -2
- package/dist/factory-K8O6gpux.cjs.map +0 -1
- package/dist/interactions-Byxf1C82.js.map +0 -1
- package/dist/interactions-OK85T-Dk.cjs.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-8DLhjddo.js.map +0 -1
- package/dist/platform-BqRc-7RO.cjs +0 -2
- package/dist/platform-BqRc-7RO.cjs.map +0 -1
- package/dist/replay-B0M8kWz_.js.map +0 -1
- package/dist/replay-QOFBpAXh.cjs +0 -2
- package/dist/replay-QOFBpAXh.cjs.map +0 -1
- package/dist/response-body-BWvwKQ2p.js.map +0 -1
- package/dist/response-body-CKEJ5itk.cjs +0 -3
- package/dist/response-body-CKEJ5itk.cjs.map +0 -1
- package/dist/rotation-BylN1B9e.js.map +0 -1
- package/dist/rotation-E2eKClIs.cjs +0 -2
- package/dist/rotation-E2eKClIs.cjs.map +0 -1
- package/dist/sender-Bdp-TAS4.js.map +0 -1
- package/dist/sender-DR7ZycZY.cjs +0 -2
- package/dist/sender-DR7ZycZY.cjs.map +0 -1
- package/dist/stored-context-BOu54M8Y.cjs +0 -2
- package/dist/stored-context-BOu54M8Y.cjs.map +0 -1
- package/dist/stored-context-CSttrAsw.js.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-BokySIII.js +0 -94
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { D as e,
|
|
2
|
-
import { c as _, d as v, f as ee, l as y, n as te, p as b, s as ne, t as re, u as ie } from "./factory-
|
|
3
|
-
import { n as x, t as
|
|
4
|
-
import { i as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as
|
|
8
|
-
import { a as
|
|
9
|
-
import { t as
|
|
10
|
-
import { r as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { a as
|
|
14
|
-
import { r as
|
|
15
|
-
import { i as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
1
|
+
import { D as e, Jn as t, Nn as n, V as r, Z as i, an as a, dt as o, ft as s, g as c, gt as l, ht as u, l as d, mt as f, nt as p, on as m, pt as h, ut as g } from "./constants-CEHN6KuY.js";
|
|
2
|
+
import { c as _, d as v, f as ee, l as y, n as te, p as b, s as ne, t as re, u as ie } from "./factory-BHYrcSaU.js";
|
|
3
|
+
import { n as x, t as ae } from "./deadline-C4ccAuk5.js";
|
|
4
|
+
import { i as oe, r as S } from "./library-request-Cv7C05jf.js";
|
|
5
|
+
import { t as C } from "./openfin-Bxelt0yg.js";
|
|
6
|
+
import { t as w } from "./sanitize-B2GKlSFp.js";
|
|
7
|
+
import { n as se } from "./library-console-amePMnP8.js";
|
|
8
|
+
import { a as ce, c as T, f as E, i as le, n as ue, o as D, p as de, r as fe, s as O, t as pe } from "./response-body-yi92Rpvo.js";
|
|
9
|
+
import { t as k } from "./defineProperty-s2S8BXUc.js";
|
|
10
|
+
import { r as A } from "./platform-Dba6R3Hp.js";
|
|
11
|
+
import { t as j } from "./unref-DgHPQeWv.js";
|
|
12
|
+
import { t as M } from "./compression-BWkDWY3v.js";
|
|
13
|
+
import { a as N } from "./batch-120Kc9jr.js";
|
|
14
|
+
import { r as P } from "./log-record-B_nSqxoe.js";
|
|
15
|
+
import { i as F } from "./identity-Byh3gCdT.js";
|
|
16
|
+
import { t as I } from "./sampling-DZTOD28D.js";
|
|
17
|
+
import { n as L, t as R } from "./remote-rules-DNK96vLa.js";
|
|
18
18
|
// src/storage/persistence.ts
|
|
19
|
-
async function
|
|
19
|
+
async function z(e) {
|
|
20
20
|
let t = globalThis.navigator?.storage;
|
|
21
21
|
return typeof t?.persist == "function" ? await e.guardAsync("storage.unavailable", "The browser rejected the request for persistent storage.", () => t.persist()) === !0 ? "granted" : "denied" : "unsupported";
|
|
22
22
|
}
|
|
23
23
|
// src/transport/status-transport.ts
|
|
24
|
-
function
|
|
24
|
+
function B(e) {
|
|
25
25
|
let t = typeof e == "string" ? Date.parse(e) : NaN;
|
|
26
26
|
return Number.isNaN(t) ? void 0 : Math.round(t + 500 - Date.now());
|
|
27
27
|
}
|
|
@@ -30,13 +30,13 @@ var V = class {
|
|
|
30
30
|
this.cancellation.abort();
|
|
31
31
|
}
|
|
32
32
|
assertContext(e) {
|
|
33
|
-
if (this.cancellation.signal.aborted || this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) throw this.diagnostics.count("security.context_mismatch"), new
|
|
33
|
+
if (this.cancellation.signal.aborted || this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) throw this.diagnostics.count("security.context_mismatch"), new E("permanent", "The delivery context is inactive or does not match the batch.");
|
|
34
34
|
}
|
|
35
35
|
async untilCancelled(e) {
|
|
36
|
-
if (this.cancellation.signal.aborted) throw new
|
|
36
|
+
if (this.cancellation.signal.aborted) throw new E("permanent", "The delivery context retired.");
|
|
37
37
|
let t, n = new Promise((e, n) => {
|
|
38
38
|
t = () => {
|
|
39
|
-
n(new
|
|
39
|
+
n(new E("permanent", "The delivery context retired."));
|
|
40
40
|
}, this.cancellation.signal.addEventListener("abort", t, { once: !0 });
|
|
41
41
|
});
|
|
42
42
|
try {
|
|
@@ -46,14 +46,14 @@ var V = class {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
constructor(e, t, n = () => void 0, r = () => void 0, i = () => void 0) {
|
|
49
|
-
|
|
49
|
+
k(this, "config", void 0), k(this, "diagnostics", void 0), k(this, "onSampling", void 0), k(this, "onLoss", void 0), k(this, "onClock", void 0), k(this, "cancellation", new AbortController()), k(this, "throttledUntil", {
|
|
50
50
|
logs: 0,
|
|
51
51
|
metrics: 0,
|
|
52
52
|
traces: 0
|
|
53
|
-
}),
|
|
53
|
+
}), k(this, "acceptedAt", null), this.config = e, this.diagnostics = t, this.onSampling = n, this.onLoss = r, this.onClock = i;
|
|
54
54
|
}
|
|
55
55
|
throttledForMs(e) {
|
|
56
|
-
return Math.max(0, this.throttledUntil[
|
|
56
|
+
return Math.max(0, this.throttledUntil[D(e, this.config)] - Date.now());
|
|
57
57
|
}
|
|
58
58
|
throttleEnd() {
|
|
59
59
|
let e = Math.max(...Object.values(this.throttledUntil));
|
|
@@ -63,18 +63,18 @@ var V = class {
|
|
|
63
63
|
return this.acceptedAt;
|
|
64
64
|
}
|
|
65
65
|
serialize(e) {
|
|
66
|
-
let t =
|
|
66
|
+
let t = T(this.config, e, this.diagnostics, "The serializer threw an error. The library dropped the batch.");
|
|
67
67
|
return t || this.onLoss("unserializable", e.records, [e.id]), t;
|
|
68
68
|
}
|
|
69
69
|
accept(e, t, n) {
|
|
70
70
|
this.throttledUntil[e] = 0, this.acceptedAt = Date.now(), this.config.sampling.remote && t != null && this.onSampling(t);
|
|
71
|
-
let r =
|
|
71
|
+
let r = B(n);
|
|
72
72
|
r !== void 0 && this.onClock(r);
|
|
73
73
|
}
|
|
74
74
|
reportPartial(e, t, n) {
|
|
75
|
-
let r = this.diagnostics.guard("transport.http_error", "The library could not read the body of the 2xx response.", () =>
|
|
75
|
+
let r = this.diagnostics.guard("transport.http_error", "The library could not read the body of the 2xx response.", () => le(n, t));
|
|
76
76
|
if (!r) return 0;
|
|
77
|
-
let i =
|
|
77
|
+
let i = O(t, this.config), a = Math.min(r.rejected, e.records.length);
|
|
78
78
|
if (a === 0) return this.diagnostics.report("transport.partial_success", "The server accepted the batch with a warning.", {
|
|
79
79
|
endpoint: i,
|
|
80
80
|
serverMessage: r.message
|
|
@@ -93,18 +93,18 @@ var V = class {
|
|
|
93
93
|
let t = r.advice === void 0 ? "" : ` ${r.advice}`;
|
|
94
94
|
return this.diagnostics.report("transport.rejected_credentials", `The server returned ${i}.${t}`, {
|
|
95
95
|
status: e,
|
|
96
|
-
endpoint:
|
|
97
|
-
}), new
|
|
96
|
+
endpoint: O(n, this.config)
|
|
97
|
+
}), new E("permanent", `The server rejected the batch with ${i}.`, e);
|
|
98
98
|
}
|
|
99
|
-
if (e === 413) return new
|
|
99
|
+
if (e === 413) return new E("too_large", "The payload is too large.", e, void 0, r.maxBytes);
|
|
100
100
|
if (e === 429 || e === 503) {
|
|
101
101
|
let t = e === 429, i = r.retryAfterMs === void 0 ? void 0 : Math.min(r.retryAfterMs, this.config.delivery.retryMaxDelayMs);
|
|
102
|
-
return this.throttledUntil[n] = Date.now() + (i ?? this.config.delivery.retryBaseDelayMs), t && this.diagnostics.report("transport.throttled", "The server throttles the requests.", { retryAfterMs: i }), new
|
|
102
|
+
return this.throttledUntil[n] = Date.now() + (i ?? this.config.delivery.retryBaseDelayMs), t && this.diagnostics.report("transport.throttled", "The server throttles the requests.", { retryAfterMs: i }), new E("throttled", t ? "The server throttles the requests." : "The service is not available.", e, i);
|
|
103
103
|
}
|
|
104
|
-
return e === 408 || e >= 500 ? new
|
|
104
|
+
return e === 408 || e >= 500 ? new E("transient", `The server returned the error ${i}.`, e) : (this.diagnostics.report("transport.dropped_permanent", `The server rejected the batch with ${i}. The library dropped it.`, {
|
|
105
105
|
batchId: t,
|
|
106
106
|
status: e
|
|
107
|
-
}), new
|
|
107
|
+
}), new E("permanent", `The server rejected the batch with ${i}.`, e));
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
// src/transport/custom-transport.ts
|
|
@@ -134,16 +134,16 @@ var he = class extends V {
|
|
|
134
134
|
if (!t || e.records.length === 0) return e.records.length;
|
|
135
135
|
let n = this.serialize(e);
|
|
136
136
|
if (!n) return e.records.length;
|
|
137
|
-
let r =
|
|
137
|
+
let r = D(e, this.config), i = H(e, n, r);
|
|
138
138
|
i.signal = this.cancellation.signal;
|
|
139
139
|
let a;
|
|
140
140
|
try {
|
|
141
|
-
a = await x(this.untilCancelled(
|
|
141
|
+
a = await x(this.untilCancelled(oe(() => S(() => se(() => t(i))))), this.config.delivery.requestTimeoutMs);
|
|
142
142
|
} catch (e) {
|
|
143
|
-
let t = e instanceof
|
|
144
|
-
throw new
|
|
143
|
+
let t = e instanceof ae ? e : void 0, n = t ? "timeout" : "transient", r = t?.message ?? "The custom transport failed.";
|
|
144
|
+
throw new E(n, r, void 0, void 0, void 0, e);
|
|
145
145
|
}
|
|
146
|
-
if (this.assertContext(e), !me(a)) throw this.diagnostics.report("transport.http_error", "The custom transport returned no valid status. The library sends the batch again later.", { batchId: e.id }), new
|
|
146
|
+
if (this.assertContext(e), !me(a)) throw this.diagnostics.report("transport.http_error", "The custom transport returned no valid status. The library sends the batch again later.", { batchId: e.id }), new E("transient", "The custom transport returned no valid status.");
|
|
147
147
|
let { status: o } = a;
|
|
148
148
|
if (o >= 200 && o < 300) return this.accept(r, a.sampling, a.date), 0;
|
|
149
149
|
throw this.reject(o, e.id, r, {
|
|
@@ -151,39 +151,46 @@ var he = class extends V {
|
|
|
151
151
|
maxBytes: U(a.maxBytes)
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
}, W = class {
|
|
154
|
+
}, W = 8, ge = class {
|
|
155
155
|
constructor(e) {
|
|
156
|
-
|
|
156
|
+
k(this, "deps", void 0), k(this, "installed", !1), k(this, "left", !1), k(this, "lateQueued", !1), k(this, "lateFlushes", 0), k(this, "collecting", !1), k(this, "keepaliveBytes", 0), k(this, "leaveBytes", 0), k(this, "onVisibility", () => {
|
|
157
157
|
document.visibilityState === "hidden" && this.flush("hidden");
|
|
158
|
-
}),
|
|
159
|
-
this.flush("pagehide");
|
|
160
|
-
}),
|
|
158
|
+
}), k(this, "onPageHide", () => {
|
|
159
|
+
this.left = !0, this.leaveBytes = 0, this.lateFlushes = 0, this.flush("pagehide");
|
|
160
|
+
}), k(this, "onPageShow", () => {
|
|
161
|
+
this.left = !1, this.leaveBytes = 0;
|
|
162
|
+
}), k(this, "onFreeze", () => {
|
|
161
163
|
this.flush("freeze");
|
|
162
|
-
}),
|
|
164
|
+
}), k(this, "onOpenFinClose", () => {
|
|
163
165
|
this.flush("openfin-close");
|
|
164
166
|
}), this.deps = e;
|
|
165
167
|
}
|
|
166
168
|
install() {
|
|
167
169
|
if (this.installed || typeof addEventListener > "u") return;
|
|
168
|
-
this.installed = !0, typeof document < "u" && (document.addEventListener("visibilitychange", this.onVisibility), document.addEventListener("freeze", this.onFreeze)), addEventListener("pagehide", this.onPageHide);
|
|
169
|
-
let e =
|
|
170
|
+
this.installed = !0, typeof document < "u" && (document.addEventListener("visibilitychange", this.onVisibility), document.addEventListener("freeze", this.onFreeze)), addEventListener("pagehide", this.onPageHide), addEventListener("pageshow", this.onPageShow);
|
|
171
|
+
let e = C()?.me;
|
|
170
172
|
this.deps.diagnostics.guard("openfin.unavailable", "The library could not subscribe to close-requested.", () => {
|
|
171
173
|
e?.on?.("close-requested", this.onOpenFinClose);
|
|
172
174
|
});
|
|
173
175
|
}
|
|
174
176
|
uninstall() {
|
|
175
177
|
if (!this.installed) return;
|
|
176
|
-
this.installed = !1, typeof document < "u" && (document.removeEventListener("visibilitychange", this.onVisibility), document.removeEventListener("freeze", this.onFreeze)), removeEventListener("pagehide", this.onPageHide);
|
|
177
|
-
let e =
|
|
178
|
+
this.installed = !1, this.left = !1, this.leaveBytes = 0, typeof document < "u" && (document.removeEventListener("visibilitychange", this.onVisibility), document.removeEventListener("freeze", this.onFreeze)), removeEventListener("pagehide", this.onPageHide), removeEventListener("pageshow", this.onPageShow);
|
|
179
|
+
let e = C()?.me;
|
|
178
180
|
this.deps.diagnostics.guard("openfin.unavailable", "The library could not unsubscribe from close-requested.", () => {
|
|
179
181
|
e?.removeListener?.("close-requested", this.onOpenFinClose);
|
|
180
182
|
});
|
|
181
183
|
}
|
|
184
|
+
flushLate() {
|
|
185
|
+
!this.left || this.collecting || this.lateQueued || this.lateFlushes >= W || (this.lateQueued = !0, this.lateFlushes++, queueMicrotask(() => {
|
|
186
|
+
this.lateQueued = !1, this.left && this.flush("pagehide");
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
182
189
|
flush(e) {
|
|
183
190
|
let { config: t, diagnostics: n } = this.deps;
|
|
184
|
-
if (n.guard("pipeline.crashed", "The metric points before the exit flush failed.", () => {
|
|
191
|
+
if (this.collecting = !0, n.guard("pipeline.crashed", "The metric points before the exit flush failed.", () => {
|
|
185
192
|
this.deps.beforeExit?.();
|
|
186
|
-
}), e === "hidden") {
|
|
193
|
+
}), this.collecting = !1, e === "hidden") {
|
|
187
194
|
this.flushAlive();
|
|
188
195
|
return;
|
|
189
196
|
}
|
|
@@ -192,48 +199,49 @@ var he = class extends V {
|
|
|
192
199
|
return;
|
|
193
200
|
}
|
|
194
201
|
let r = this.endpointUrl();
|
|
195
|
-
if (r
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
if (r === null) return;
|
|
203
|
+
let i = this.deps.keepaliveInFlight() ?? 0;
|
|
204
|
+
this.keepaliveBytes = i + (this.left ? this.leaveBytes : 0);
|
|
205
|
+
for (let i of this.deps.drainForExit()) {
|
|
206
|
+
let a = D(i, t), o = a === "logs" ? r.href : O(a, t);
|
|
207
|
+
o ? this.flushBatch(i, e, new URL(o)) : n.count("record.dropped_no_destination");
|
|
201
208
|
}
|
|
209
|
+
this.left && (this.leaveBytes = this.keepaliveBytes - i);
|
|
202
210
|
}
|
|
203
|
-
flushBatch(t,
|
|
211
|
+
flushBatch(t, n, i) {
|
|
204
212
|
let { config: s } = this.deps;
|
|
205
213
|
if (t.records.length === 0) return;
|
|
206
|
-
let c = this.serialize(t,
|
|
214
|
+
let c = this.serialize(t, n);
|
|
207
215
|
if (!c) return;
|
|
208
|
-
let l =
|
|
216
|
+
let l = w(c.body);
|
|
209
217
|
if (l > 6e4) {
|
|
210
218
|
this.park(t);
|
|
211
219
|
return;
|
|
212
220
|
}
|
|
213
|
-
|
|
214
|
-
let u =
|
|
221
|
+
i.searchParams.set(a, t.id), i.searchParams.set(m, n);
|
|
222
|
+
let u = i.toString(), d = this.deps.exitHeaders(), f = () => {
|
|
215
223
|
let e = new Headers(d);
|
|
216
|
-
return e.set(
|
|
224
|
+
return e.set(h, c.contentType), e.set(o, t.id), e;
|
|
217
225
|
};
|
|
218
226
|
if (d) {
|
|
219
|
-
this.keepaliveFetch(u, t, c.body, l,
|
|
227
|
+
this.keepaliveFetch(u, t, c.body, l, n, f);
|
|
220
228
|
return;
|
|
221
229
|
}
|
|
222
230
|
if (s.headers) {
|
|
223
231
|
this.park(t);
|
|
224
232
|
return;
|
|
225
233
|
}
|
|
226
|
-
if (this.isSameOrigin(
|
|
227
|
-
this.keepaliveFetch(u, t, c.body, l,
|
|
234
|
+
if (this.isSameOrigin(i)) {
|
|
235
|
+
this.keepaliveFetch(u, t, c.body, l, n, f);
|
|
228
236
|
return;
|
|
229
237
|
}
|
|
230
|
-
let
|
|
238
|
+
let p = () => new Headers({ [h]: r });
|
|
231
239
|
if (s.credentials !== "include") {
|
|
232
|
-
this.keepaliveFetch(u, t, c.body, l,
|
|
240
|
+
this.keepaliveFetch(u, t, c.body, l, n, p);
|
|
233
241
|
return;
|
|
234
242
|
}
|
|
235
243
|
let g = this.beacon(u, c.body);
|
|
236
|
-
g === "sent" ? this.keepaliveBytes += l : g === "refused" ? (this.keepaliveBytes = e, this.park(t)) : this.keepaliveFetch(u, t, c.body, l,
|
|
244
|
+
g === "sent" ? this.keepaliveBytes += l : g === "refused" ? (this.keepaliveBytes = e, this.park(t)) : this.keepaliveFetch(u, t, c.body, l, n, p);
|
|
237
245
|
}
|
|
238
246
|
isSameOrigin(e) {
|
|
239
247
|
if (typeof location > "u") return !1;
|
|
@@ -253,8 +261,8 @@ var he = class extends V {
|
|
|
253
261
|
for (let i of this.deps.drainForExit()) {
|
|
254
262
|
let a = this.serialize(i, e);
|
|
255
263
|
if (!a) continue;
|
|
256
|
-
let o = H(i, a,
|
|
257
|
-
(t === void 0 || r.guard("transport.http_error", "The transportOnExit hook threw an error.", () =>
|
|
264
|
+
let o = H(i, a, D(i, n));
|
|
265
|
+
(t === void 0 || r.guard("transport.http_error", "The transportOnExit hook threw an error.", () => S(() => t(o))) !== !0) && this.park(i);
|
|
258
266
|
}
|
|
259
267
|
}
|
|
260
268
|
park(e) {
|
|
@@ -262,7 +270,7 @@ var he = class extends V {
|
|
|
262
270
|
i === "memory" || i === "none" ? r?.("not_stored", e.records, [e.id]) : y(e, n, r);
|
|
263
271
|
}
|
|
264
272
|
serialize(e, t) {
|
|
265
|
-
let n =
|
|
273
|
+
let n = T(this.deps.config, e, this.deps.diagnostics, `The ${t} exit flush could not serialize its batch.`);
|
|
266
274
|
return n || this.deps.onLoss?.("unserializable", e.records, [e.id]), n;
|
|
267
275
|
}
|
|
268
276
|
endpointUrl() {
|
|
@@ -279,7 +287,7 @@ var he = class extends V {
|
|
|
279
287
|
let { config: o, diagnostics: s } = this.deps, c = () => {
|
|
280
288
|
this.park(t);
|
|
281
289
|
};
|
|
282
|
-
this.keepaliveBytes + r > 6e4 ? c() : (this.keepaliveBytes += r, s.guard("transport.http_error", "The keepalive fetch failed.", () => (
|
|
290
|
+
this.keepaliveBytes + r > 6e4 ? c() : (this.keepaliveBytes += r, s.guard("transport.http_error", "The keepalive fetch failed.", () => (S(() => fetch(e, {
|
|
283
291
|
method: "POST",
|
|
284
292
|
body: n,
|
|
285
293
|
headers: a(),
|
|
@@ -290,7 +298,7 @@ var he = class extends V {
|
|
|
290
298
|
}), !0)) !== !0 && c());
|
|
291
299
|
}
|
|
292
300
|
}, G = /* @__PURE__ */ new WeakMap();
|
|
293
|
-
function
|
|
301
|
+
function _e(e, t) {
|
|
294
302
|
let { headers: n } = t;
|
|
295
303
|
if (!n) return;
|
|
296
304
|
if (typeof n != "function") return n;
|
|
@@ -316,15 +324,15 @@ function q(e) {
|
|
|
316
324
|
// src/transport/http-transport.ts
|
|
317
325
|
var J = "In a cross-origin iframe, the session cookie is a third-party cookie. The browser often blocks it. Forward the records to the platform document. As an alternative, issue the cookie with the Partitioned attribute.", Y = class extends V {
|
|
318
326
|
constructor(...e) {
|
|
319
|
-
super(...e),
|
|
327
|
+
super(...e), k(this, "keepaliveBytes", 0);
|
|
320
328
|
}
|
|
321
329
|
async send(e, t) {
|
|
322
330
|
this.assertContext(e);
|
|
323
|
-
let { config: n } = this, r =
|
|
331
|
+
let { config: n } = this, r = D(e, n), i = O(r, n);
|
|
324
332
|
return i ? e.records.length === 0 ? 0 : this.post(e, r, i, t) : (this.diagnostics.count("record.dropped_no_destination"), e.records.length);
|
|
325
333
|
}
|
|
326
334
|
lastHeaders() {
|
|
327
|
-
return
|
|
335
|
+
return _e(this, this.config);
|
|
328
336
|
}
|
|
329
337
|
keepaliveInFlight() {
|
|
330
338
|
return this.keepaliveBytes;
|
|
@@ -332,15 +340,15 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
332
340
|
async post(e, t, n, r) {
|
|
333
341
|
let i = this.serialize(e);
|
|
334
342
|
if (!i) return e.records.length;
|
|
335
|
-
let a =
|
|
343
|
+
let a = pe(t, this.config.serializer), o = await this.attempt(e, n, i, a, r);
|
|
336
344
|
this.assertContext(e), this.rejectsCredentials(o.response.status) && typeof this.config.headers == "function" && (q(this), o = await this.attempt(e, n, i, a, r), this.assertContext(e));
|
|
337
|
-
let { response: s, body:
|
|
345
|
+
let { response: s, body: c } = o;
|
|
338
346
|
if (s.ok) {
|
|
339
347
|
let { headers: n } = s;
|
|
340
|
-
return this.accept(t, n.get(
|
|
348
|
+
return this.accept(t, n.get(l), n.get(f)), c === void 0 ? 0 : this.reportPartial(e, t, c);
|
|
341
349
|
}
|
|
342
|
-
let
|
|
343
|
-
throw this.reject(
|
|
350
|
+
let d = s.status, p = de(s.headers.get(u)), m = d === 413 && c !== void 0 ? this.readMaxBytes(c) : void 0;
|
|
351
|
+
throw this.reject(d, e.id, t, {
|
|
344
352
|
retryAfterMs: p,
|
|
345
353
|
maxBytes: m,
|
|
346
354
|
advice: J
|
|
@@ -350,15 +358,15 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
350
358
|
return e === 401 || e === 403;
|
|
351
359
|
}
|
|
352
360
|
async attempt(e, t, n, r, i) {
|
|
353
|
-
let
|
|
354
|
-
c.set(
|
|
355
|
-
let l = await this.before(this.encodeBody(n.body),
|
|
356
|
-
this.assertContext(e), typeof l != "string" && c.set(
|
|
357
|
-
let u = typeof l == "string" ?
|
|
358
|
-
if (!this.keepalive(u)) return this.dispatch(t, c, l,
|
|
361
|
+
let a = Date.now() + this.config.delivery.requestTimeoutMs, c = new Headers(await this.before(this.resolveHeaders(), a, t));
|
|
362
|
+
c.set(h, n.contentType), c.set(o, e.id), c.set(g, String(e.attempts));
|
|
363
|
+
let l = await this.before(this.encodeBody(n.body), a, t);
|
|
364
|
+
this.assertContext(e), typeof l != "string" && c.set(s, p);
|
|
365
|
+
let u = typeof l == "string" ? w(l) : l.byteLength;
|
|
366
|
+
if (!this.keepalive(u)) return this.dispatch(t, c, l, a, !1, r);
|
|
359
367
|
i?.(), this.keepaliveBytes += u;
|
|
360
368
|
try {
|
|
361
|
-
return await this.dispatch(t, c, l,
|
|
369
|
+
return await this.dispatch(t, c, l, a, !0, r);
|
|
362
370
|
} finally {
|
|
363
371
|
this.keepaliveBytes -= u;
|
|
364
372
|
}
|
|
@@ -367,16 +375,16 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
367
375
|
try {
|
|
368
376
|
return await x(this.untilCancelled(e), Math.max(0, t - Date.now()));
|
|
369
377
|
} catch {
|
|
370
|
-
throw this.cancellation.signal.aborted ? new
|
|
378
|
+
throw this.cancellation.signal.aborted ? new E("permanent", "The delivery context retired.") : this.timeout(n);
|
|
371
379
|
}
|
|
372
380
|
}
|
|
373
381
|
timeout(e) {
|
|
374
382
|
let t = `The request took longer than ${String(this.config.delivery.requestTimeoutMs)} ms.`;
|
|
375
|
-
return this.diagnostics.report("transport.timeout", t, { endpoint: e }), new
|
|
383
|
+
return this.diagnostics.report("transport.timeout", t, { endpoint: e }), new E("timeout", t);
|
|
376
384
|
}
|
|
377
385
|
async encodeBody(e) {
|
|
378
386
|
let { config: t } = this;
|
|
379
|
-
return t.compression !== "gzip" ||
|
|
387
|
+
return t.compression !== "gzip" || w(e) < 1024 ? e : await this.diagnostics.guardAsync("transport.http_error", "The library could not compress the payload.", () => M(e)) ?? e;
|
|
380
388
|
}
|
|
381
389
|
async dispatch(e, t, n, r, i, a) {
|
|
382
390
|
let { config: o } = this, s = new AbortController(), c = () => {
|
|
@@ -386,9 +394,9 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
386
394
|
let l = setTimeout(() => {
|
|
387
395
|
s.abort();
|
|
388
396
|
}, Math.max(0, r - Date.now()));
|
|
389
|
-
|
|
397
|
+
j(l);
|
|
390
398
|
try {
|
|
391
|
-
let r = await
|
|
399
|
+
let r = await S(() => fetch(e, {
|
|
392
400
|
method: "POST",
|
|
393
401
|
headers: t,
|
|
394
402
|
body: n,
|
|
@@ -398,36 +406,36 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
398
406
|
keepalive: i,
|
|
399
407
|
priority: i ? "auto" : o.delivery.priority
|
|
400
408
|
}));
|
|
401
|
-
return
|
|
409
|
+
return fe(r, a) ? {
|
|
402
410
|
response: r,
|
|
403
|
-
body: await
|
|
411
|
+
body: await ce(r, s.signal, this.diagnostics)
|
|
404
412
|
} : { response: r };
|
|
405
413
|
} catch {
|
|
406
|
-
throw this.cancellation.signal.aborted ? new
|
|
414
|
+
throw this.cancellation.signal.aborted ? new E("permanent", "The delivery context retired.") : s.signal.aborted ? this.timeout(e) : new E(A() ? "transient" : "offline", "A network error occurred.");
|
|
407
415
|
} finally {
|
|
408
416
|
this.cancellation.signal.removeEventListener("abort", c), clearTimeout(l);
|
|
409
417
|
}
|
|
410
418
|
}
|
|
411
419
|
keepalive(e) {
|
|
412
|
-
return globalThis.document?.visibilityState === "hidden" && e <= 6e4;
|
|
420
|
+
return globalThis.document?.visibilityState === "hidden" && this.keepaliveBytes + e <= 6e4;
|
|
413
421
|
}
|
|
414
422
|
readMaxBytes(e) {
|
|
415
|
-
return this.diagnostics.guard("transport.http_error", "The library could not read the body of the 413 response.", () =>
|
|
423
|
+
return this.diagnostics.guard("transport.http_error", "The library could not read the body of the 413 response.", () => ue(e));
|
|
416
424
|
}
|
|
417
425
|
async resolveHeaders() {
|
|
418
426
|
return K(this, this.config, this.diagnostics);
|
|
419
427
|
}
|
|
420
|
-
},
|
|
428
|
+
}, ve = class {
|
|
421
429
|
constructor(e, t, n, r, i = 20, a = () => void 0) {
|
|
422
|
-
|
|
430
|
+
k(this, "storage", void 0), k(this, "transport", void 0), k(this, "diagnostics", void 0), k(this, "config", void 0), k(this, "batchesPerDrain", void 0), k(this, "onLoss", void 0), k(this, "timer", null), k(this, "idle", !1), k(this, "attempt", 0), k(this, "draining", !1), k(this, "stopped", !1), k(this, "maxAttempts", void 0), k(this, "onOnline", () => {
|
|
423
431
|
this.attempt = 0, this.schedule(0);
|
|
424
432
|
}), this.storage = e, this.transport = t, this.diagnostics = n, this.config = r, this.batchesPerDrain = i, this.onLoss = a, this.maxAttempts = b(r.retention).maxAttempts;
|
|
425
433
|
}
|
|
426
434
|
start() {
|
|
427
|
-
this.stopped = !1, typeof addEventListener < "u" && addEventListener("online", this.onOnline), this.schedule(
|
|
435
|
+
this.stopped = !1, typeof addEventListener < "u" && addEventListener("online", this.onOnline), this.schedule(n, !0);
|
|
428
436
|
}
|
|
429
437
|
nudge() {
|
|
430
|
-
this.draining || this.schedule(this.config.delivery.retryBaseDelayMs);
|
|
438
|
+
!this.draining && (this.timer === null || this.idle) && this.schedule(this.config.delivery.retryBaseDelayMs);
|
|
431
439
|
}
|
|
432
440
|
async storeFailed(e, t) {
|
|
433
441
|
let n = this.toStorable(e, t);
|
|
@@ -456,16 +464,16 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
456
464
|
this.stop();
|
|
457
465
|
}
|
|
458
466
|
}
|
|
459
|
-
schedule(e) {
|
|
467
|
+
schedule(e, t = !1) {
|
|
460
468
|
if (this.stopped) return;
|
|
461
|
-
this.clearTimer();
|
|
462
|
-
let
|
|
469
|
+
this.clearTimer(), this.idle = t;
|
|
470
|
+
let n = setTimeout(() => {
|
|
463
471
|
this.drain();
|
|
464
472
|
}, e);
|
|
465
|
-
this.timer =
|
|
473
|
+
this.timer = n, j(n);
|
|
466
474
|
}
|
|
467
475
|
bounded(e) {
|
|
468
|
-
return x(e,
|
|
476
|
+
return x(e, t);
|
|
469
477
|
}
|
|
470
478
|
clearTimer() {
|
|
471
479
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
@@ -478,8 +486,8 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
478
486
|
if (!this.draining) {
|
|
479
487
|
this.draining = !0;
|
|
480
488
|
try {
|
|
481
|
-
let e = ie(
|
|
482
|
-
await v(e, this.diagnostics, () => this.drainLocked()) !== !0 && this.schedule(
|
|
489
|
+
let e = ie(i, this.config.storage.namespace);
|
|
490
|
+
await v(e, this.diagnostics, () => this.drainLocked()) !== !0 && this.schedule(n, !0);
|
|
483
491
|
} finally {
|
|
484
492
|
this.draining = !1;
|
|
485
493
|
}
|
|
@@ -487,19 +495,19 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
487
495
|
}
|
|
488
496
|
async drainLocked() {
|
|
489
497
|
try {
|
|
490
|
-
if (!
|
|
498
|
+
if (!A()) return this.schedule(n, !0), !0;
|
|
491
499
|
let e = await this.bounded(this.storage.take(this.batchesPerDrain));
|
|
492
|
-
if (e.length === 0) return this.schedule(
|
|
493
|
-
let
|
|
494
|
-
for (let
|
|
500
|
+
if (e.length === 0) return this.schedule(n, !0), !0;
|
|
501
|
+
let t = /* @__PURE__ */ new Set(), r = 0, i = !1;
|
|
502
|
+
for (let n of e) {
|
|
495
503
|
if (this.stopped) return !0;
|
|
496
|
-
let e =
|
|
497
|
-
if (
|
|
498
|
-
let
|
|
499
|
-
if (
|
|
500
|
-
i !== "next" && (
|
|
504
|
+
let e = D(n, this.config);
|
|
505
|
+
if (t.has(e)) continue;
|
|
506
|
+
let a = this.transport.throttledForMs(n), o = a > 0 ? a : await this.deliver(n);
|
|
507
|
+
if (o === "stop") return !0;
|
|
508
|
+
o === "split" ? i = !0 : o !== "next" && (t.add(e), r = Math.max(r, o));
|
|
501
509
|
}
|
|
502
|
-
return
|
|
510
|
+
return t.size > 0 ? this.schedule(r) : e.length === this.batchesPerDrain ? this.schedule(0) : i ? this.schedule(this.config.delivery.retryBaseDelayMs) : this.schedule(n, !0), !0;
|
|
503
511
|
} catch (e) {
|
|
504
512
|
return this.diagnostics.report("storage.degraded", "The drain loop threw an error.", void 0, e), this.attempt++, this.schedule(this.backoffMs()), !0;
|
|
505
513
|
}
|
|
@@ -511,22 +519,24 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
511
519
|
}), this.onLoss("max_attempts", e.records, [e.id]), await this.bounded(this.storage.remove(e.id)), "next";
|
|
512
520
|
try {
|
|
513
521
|
return await this.transport.send(e), await this.bounded(this.storage.remove(e.id)), this.attempt = 0, "next";
|
|
514
|
-
} catch (
|
|
522
|
+
} catch (t) {
|
|
515
523
|
if (this.stopped) return "stop";
|
|
516
|
-
let r =
|
|
517
|
-
return r?.kind === "permanent" || r?.kind === "too_large" ?
|
|
524
|
+
let r = t instanceof E ? t : void 0;
|
|
525
|
+
return r?.kind === "permanent" || r?.kind === "too_large" ? await this.replaceStored(e, t) ? "split" : "next" : r?.kind === "offline" ? (this.schedule(n, !0), "stop") : r?.kind === "throttled" ? (this.attempt++, r.retryAfterMs ?? this.backoffMs()) : (await this.bounded(this.storage.bumpAttempts(e.id, e.attempts + 1)), this.attempt++, r?.retryAfterMs ?? this.backoffMs());
|
|
518
526
|
}
|
|
519
527
|
}
|
|
520
528
|
async replaceStored(e, t) {
|
|
521
529
|
let n = this.toStorable(e, t);
|
|
522
530
|
await this.bounded(this.storage.remove(e.id));
|
|
523
|
-
|
|
531
|
+
let r = !1;
|
|
532
|
+
for (let e of n) await this.bounded(this.storage.save(e)) && (r = !0);
|
|
533
|
+
return r;
|
|
524
534
|
}
|
|
525
535
|
toStorable(e, t) {
|
|
526
|
-
let n = t instanceof
|
|
536
|
+
let n = t instanceof E ? t : void 0;
|
|
527
537
|
if (n?.kind === "permanent") return this.onLoss("rejected", e.records, [e.id]), [];
|
|
528
538
|
if (n?.kind !== "too_large") return [e];
|
|
529
|
-
let r =
|
|
539
|
+
let r = N(e, this.diagnostics);
|
|
530
540
|
return r ? (this.diagnostics.report("transport.batch_split", "The server refused the batch because it is too large.", {
|
|
531
541
|
from: e.records.length,
|
|
532
542
|
to: r[0].records.length,
|
|
@@ -542,7 +552,7 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
542
552
|
"traces"
|
|
543
553
|
];
|
|
544
554
|
function Z(e) {
|
|
545
|
-
let t = e.attributes[
|
|
555
|
+
let t = e.attributes[c];
|
|
546
556
|
return t === "metric" ? "metrics" : t === "span" ? "traces" : "logs";
|
|
547
557
|
}
|
|
548
558
|
function Q(e, t) {
|
|
@@ -552,19 +562,19 @@ function Q(e, t) {
|
|
|
552
562
|
dropped: t - e
|
|
553
563
|
};
|
|
554
564
|
}
|
|
555
|
-
var
|
|
565
|
+
var ye = {
|
|
556
566
|
stored: "The send failed. The library stored the batch and sends it again later.",
|
|
557
567
|
split: "The send failed. The library stored the batch in two parts and sends them again later.",
|
|
558
568
|
rejected: "The send failed, and another send would fail too. The library drops the batch.",
|
|
559
569
|
not_stored: "The send failed, and storage did not keep the batch. The library drops the records that are not in storage.",
|
|
560
570
|
unknown: "The send failed. The library could not confirm that storage kept the batch. The library sends again only the records that are in storage."
|
|
561
|
-
},
|
|
571
|
+
}, be = {
|
|
562
572
|
stored: "The server throttles requests. The pipeline stored the batch and did not send it.",
|
|
563
573
|
not_stored: "The server throttles requests, and storage did not keep the batch. The library drops the batch.",
|
|
564
574
|
unknown: "The server throttles requests. The library could not confirm that storage kept the batch. The library sends the batch later only if it is in storage."
|
|
565
575
|
}, $ = class {
|
|
566
576
|
constructor(e, t) {
|
|
567
|
-
|
|
577
|
+
k(this, "options", void 0), k(this, "onFlush", void 0), k(this, "pending", []), k(this, "timer", null), this.options = e, this.onFlush = t;
|
|
568
578
|
}
|
|
569
579
|
add(e) {
|
|
570
580
|
this.pending.push(e), this.pending.length >= this.options.batchSize ? this.onFlush(this) : this.arm();
|
|
@@ -588,12 +598,12 @@ var ve = {
|
|
|
588
598
|
let e = setTimeout(() => {
|
|
589
599
|
this.timer = null, this.onFlush(this);
|
|
590
600
|
}, this.options.flushIntervalMs);
|
|
591
|
-
this.timer = e,
|
|
601
|
+
this.timer = e, j(e);
|
|
592
602
|
}
|
|
593
603
|
clearTimer() {
|
|
594
604
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
595
605
|
}
|
|
596
|
-
},
|
|
606
|
+
}, xe = class {
|
|
597
607
|
release(e) {
|
|
598
608
|
for (let t of e) this.heldBytes -= this.held.get(t) ?? 0, this.held.delete(t);
|
|
599
609
|
}
|
|
@@ -614,7 +624,7 @@ var ve = {
|
|
|
614
624
|
if (!this.policy) return !0;
|
|
615
625
|
let { maxPendingRecords: t, maxPendingBytes: n, overflow: r } = this.policy.buffering, i;
|
|
616
626
|
try {
|
|
617
|
-
i =
|
|
627
|
+
i = w(JSON.stringify(e));
|
|
618
628
|
} catch {
|
|
619
629
|
return this.onLoss("unserializable", [e]), !1;
|
|
620
630
|
}
|
|
@@ -637,7 +647,7 @@ var ve = {
|
|
|
637
647
|
return this.held.set(e, i), this.heldBytes += i, !0;
|
|
638
648
|
}
|
|
639
649
|
constructor(e, t, n, r, i, a, o, s = () => void 0, c = () => void 0) {
|
|
640
|
-
|
|
650
|
+
k(this, "transport", void 0), k(this, "storage", void 0), k(this, "retry", void 0), k(this, "diagnostics", void 0), k(this, "routingContextId", void 0), k(this, "policy", void 0), k(this, "onLoss", void 0), k(this, "clockOffset", void 0), k(this, "streams", void 0), k(this, "unconfirmed", /* @__PURE__ */ new Map()), k(this, "keptAlive", /* @__PURE__ */ new Map()), k(this, "queue", []), k(this, "open", /* @__PURE__ */ new Set()), k(this, "ceiling", new I()), k(this, "inFlight", 0), k(this, "pumpScheduled", !1), k(this, "stopped", !1), k(this, "paused", !1), k(this, "waiters", /* @__PURE__ */ new Set()), k(this, "held", /* @__PURE__ */ new Map()), k(this, "heldBytes", 0), k(this, "persisting", !1), this.transport = e, this.storage = t, this.retry = n, this.diagnostics = r, this.routingContextId = a, this.policy = o, this.onLoss = s, this.clockOffset = c;
|
|
641
651
|
let l = (e) => {
|
|
642
652
|
this.claim(e);
|
|
643
653
|
};
|
|
@@ -649,7 +659,7 @@ var ve = {
|
|
|
649
659
|
}
|
|
650
660
|
push(e) {
|
|
651
661
|
if (this.stopped) return;
|
|
652
|
-
e.observedTimeUnixNano =
|
|
662
|
+
e.observedTimeUnixNano = P();
|
|
653
663
|
let t = { ...e };
|
|
654
664
|
this.admit(t) && this.route(t);
|
|
655
665
|
}
|
|
@@ -657,6 +667,10 @@ var ve = {
|
|
|
657
667
|
let e = [...this.unconfirmed.values()].flatMap((e) => e.records);
|
|
658
668
|
return this.unconfirmed.clear(), this.held.clear(), this.heldBytes = 0, X.map((t) => this.toBatch([...e.filter((e) => Z(e) === t), ...this.streams[t].take()])).filter((e) => e !== null);
|
|
659
669
|
}
|
|
670
|
+
drainForRetire() {
|
|
671
|
+
let e = [...this.keptAlive.values()];
|
|
672
|
+
return this.keptAlive.clear(), [...e, ...this.drainForExit()];
|
|
673
|
+
}
|
|
660
674
|
async flushPending(e) {
|
|
661
675
|
if (this.paused) return [];
|
|
662
676
|
if (!this.stopped) for (let e of X) this.claim(this.streams[e]);
|
|
@@ -724,7 +738,7 @@ var ve = {
|
|
|
724
738
|
}
|
|
725
739
|
toBatch(e) {
|
|
726
740
|
return e.length === 0 ? null : {
|
|
727
|
-
id:
|
|
741
|
+
id: F(this.diagnostics),
|
|
728
742
|
records: e,
|
|
729
743
|
createdAt: Date.now(),
|
|
730
744
|
attempts: 0,
|
|
@@ -742,7 +756,7 @@ var ve = {
|
|
|
742
756
|
let r = this.clockOffset();
|
|
743
757
|
r !== void 0 && t !== "metrics" && (e.attributes = {
|
|
744
758
|
...e.attributes,
|
|
745
|
-
[
|
|
759
|
+
[d]: r
|
|
746
760
|
}), n.add(e);
|
|
747
761
|
} catch (e) {
|
|
748
762
|
this.diagnostics.report("pipeline.crashed", "The pipeline dropped a record before it reached a stream.", void 0, e);
|
|
@@ -790,7 +804,7 @@ var ve = {
|
|
|
790
804
|
let n = this.transport.throttledForMs(e);
|
|
791
805
|
if (n > 0) {
|
|
792
806
|
let r = await this.store(e);
|
|
793
|
-
return this.diagnostics.report("transport.throttled",
|
|
807
|
+
return this.diagnostics.report("transport.throttled", be[r], {
|
|
794
808
|
batchId: e.id,
|
|
795
809
|
records: t,
|
|
796
810
|
throttledMs: n
|
|
@@ -798,7 +812,7 @@ var ve = {
|
|
|
798
812
|
}
|
|
799
813
|
try {
|
|
800
814
|
let n = await this.transport.send(e, () => {
|
|
801
|
-
this.unconfirmed.delete(e.id);
|
|
815
|
+
this.unconfirmed.delete(e.id), this.keptAlive.set(e.id, e);
|
|
802
816
|
});
|
|
803
817
|
return {
|
|
804
818
|
accepted: t - n,
|
|
@@ -811,28 +825,28 @@ var ve = {
|
|
|
811
825
|
...e,
|
|
812
826
|
attempts: e.attempts + 1
|
|
813
827
|
}, n);
|
|
814
|
-
return this.diagnostics.report("transport.http_error",
|
|
828
|
+
return this.diagnostics.report("transport.http_error", ye[r?.outcome ?? "unknown"], {
|
|
815
829
|
batchId: e.id,
|
|
816
830
|
records: t
|
|
817
831
|
}, n), r ? Q(r.stored, t) : void 0;
|
|
818
832
|
}
|
|
819
833
|
} finally {
|
|
820
|
-
this.unconfirmed.delete(e.id);
|
|
834
|
+
this.unconfirmed.delete(e.id), this.keptAlive.delete(e.id);
|
|
821
835
|
}
|
|
822
836
|
}
|
|
823
837
|
storeFailed(e, t) {
|
|
824
838
|
return this.diagnostics.guardAsync("storage.degraded", "The library could not store an undelivered batch.", () => this.retry.storeFailed(e, t));
|
|
825
839
|
}
|
|
826
840
|
async store(e) {
|
|
827
|
-
let
|
|
828
|
-
let
|
|
829
|
-
return
|
|
841
|
+
let n = await this.diagnostics.guardAsync("storage.degraded", "The library could not store an undelivered batch.", async () => {
|
|
842
|
+
let n = await x(this.storage.save(e), t);
|
|
843
|
+
return n && this.retry.nudge(), n;
|
|
830
844
|
});
|
|
831
|
-
return
|
|
845
|
+
return n === void 0 ? "unknown" : n ? "stored" : "not_stored";
|
|
832
846
|
}
|
|
833
|
-
},
|
|
847
|
+
}, Se = class {
|
|
834
848
|
constructor(e, t = () => void 0) {
|
|
835
|
-
|
|
849
|
+
k(this, "transport", void 0), k(this, "onSent", void 0), k(this, "failures", 0), k(this, "failedAt", null), this.transport = e, this.onSent = t;
|
|
836
850
|
}
|
|
837
851
|
async send(e, t) {
|
|
838
852
|
let n = this.transport.lastSendAt(), r;
|
|
@@ -853,19 +867,19 @@ var ve = {
|
|
|
853
867
|
consecutiveFailures: this.failures
|
|
854
868
|
};
|
|
855
869
|
}
|
|
856
|
-
},
|
|
870
|
+
}, Ce = class e {
|
|
857
871
|
constructor(e, t, n, r, i, a, o) {
|
|
858
|
-
|
|
872
|
+
k(this, "storage", void 0), k(this, "retry", void 0), k(this, "pipeline", void 0), k(this, "exitFlush", void 0), k(this, "diagnostics", void 0), k(this, "transport", void 0), k(this, "outcomes", void 0), k(this, "retired", !1), k(this, "emergencyImport", Promise.resolve()), this.storage = e, this.retry = t, this.pipeline = n, this.exitFlush = r, this.diagnostics = i, this.transport = a, this.outcomes = o;
|
|
859
873
|
}
|
|
860
874
|
static async create(t) {
|
|
861
875
|
let { config: n, diagnostics: r } = t, i = t.storage ?? await re(n.storage.backend, te(n.storage.namespace), b(n.retention), r, t.onGap, n.storage.namespace);
|
|
862
|
-
t.onStorage?.(i), n.storage.requestPersistent && (i.name === "indexeddb" || i.name === "localstorage") && (t.onPersistence?.("pending"),
|
|
876
|
+
t.onStorage?.(i), n.storage.requestPersistent && (i.name === "indexeddb" || i.name === "localstorage") && (t.onPersistence?.("pending"), z(r).then(t.onPersistence));
|
|
863
877
|
let a = new ee(i, n.securityContext, n.storage.namespace), o = (e) => {
|
|
864
|
-
let i =
|
|
865
|
-
i &&
|
|
878
|
+
let i = L(e, r);
|
|
879
|
+
i && R(t.remote, n, i);
|
|
866
880
|
}, s, c = (e) => {
|
|
867
881
|
s = e;
|
|
868
|
-
}, { onLoss: l } = t, u = !n.transport && n.transportWorker ? await r.guardAsync("transport.http_error", "The transport worker module did not load. The library uses HTTP.", async () => (await import("./worker-transport-
|
|
882
|
+
}, { onLoss: l } = t, u = !n.transport && n.transportWorker ? await r.guardAsync("transport.http_error", "The transport worker module did not load. The library uses HTTP.", async () => (await import("./worker-transport-jzX1IusG.js")).createWorkerTransport(n, r, o, l, c)) : void 0, d = n.transport !== void 0 || u !== void 0 ? void 0 : new Y(n, r, o, l, c), f = u?.transport ?? d ?? new he(n, r, o, l, c), p = new Se(f, t.onSent), m = new ve(a, p, r, n, void 0, l), { batching: h } = n, g = new xe(p, a, m, r, {
|
|
869
883
|
logs: {
|
|
870
884
|
flushIntervalMs: h.logFlushIntervalMs,
|
|
871
885
|
batchSize: h.logBatchSize
|
|
@@ -880,7 +894,7 @@ var ve = {
|
|
|
880
894
|
flushIntervalMs: h.logFlushIntervalMs,
|
|
881
895
|
batchSize: h.logBatchSize
|
|
882
896
|
}
|
|
883
|
-
}, () => n.securityContext.id || void 0, n, l, () => n.metadata.clockOffset ? s : void 0), _ = new
|
|
897
|
+
}, () => n.securityContext.id || void 0, n, l, () => n.metadata.clockOffset ? s : void 0), _ = new ge({
|
|
884
898
|
config: n,
|
|
885
899
|
diagnostics: r,
|
|
886
900
|
drainForExit: () => g.drainForExit(),
|
|
@@ -899,7 +913,7 @@ var ve = {
|
|
|
899
913
|
return y.emergencyImport = y.importEmergency(), y;
|
|
900
914
|
}
|
|
901
915
|
push(e) {
|
|
902
|
-
this.pipeline.push(e);
|
|
916
|
+
this.pipeline.push(e), this.exitFlush.flushLate();
|
|
903
917
|
}
|
|
904
918
|
hold(e) {
|
|
905
919
|
this.pipeline.hold(e), e ? (this.exitFlush.uninstall(), this.retry.stop()) : (this.exitFlush.install(), this.retry.start());
|
|
@@ -933,7 +947,7 @@ var ve = {
|
|
|
933
947
|
}
|
|
934
948
|
async pause(e) {
|
|
935
949
|
this.retired = !0, this.exitFlush.uninstall(), this.retry.stop(), this.transport.stop();
|
|
936
|
-
let t = this.pipeline.
|
|
950
|
+
let t = this.pipeline.drainForRetire();
|
|
937
951
|
this.pipeline.destroy(), await this.emergencyImport, await this.keep(t, e);
|
|
938
952
|
}
|
|
939
953
|
async keep(e, t) {
|
|
@@ -950,12 +964,12 @@ var ve = {
|
|
|
950
964
|
this.diagnostics.report("transport.timeout", "The flush of the old security context did not complete before its time limit.", void 0, e);
|
|
951
965
|
}
|
|
952
966
|
this.retry.stop(), this.transport.stop();
|
|
953
|
-
let r = this.pipeline.
|
|
967
|
+
let r = this.pipeline.drainForRetire(), i = r.flatMap((e) => e.records);
|
|
954
968
|
this.pipeline.destroy(), await this.emergencyImport;
|
|
955
969
|
let a = await this.storage.take(2 ** 53 - 1);
|
|
956
970
|
e === "retain" && await this.keep(r, n);
|
|
957
971
|
let o = e === "discard" || e === "flush";
|
|
958
|
-
return await this.storage.retire(o), o && ne(n, this.diagnostics, this.storage.namespace), {
|
|
972
|
+
return await this.storage.retire(o), o && a.push(...ne(n, this.diagnostics, this.storage.namespace)), {
|
|
959
973
|
buffered: i,
|
|
960
974
|
stored: a
|
|
961
975
|
};
|
|
@@ -974,6 +988,6 @@ var ve = {
|
|
|
974
988
|
!this.retired && e !== void 0 && e > 0 && this.retry.nudge();
|
|
975
989
|
}
|
|
976
990
|
};
|
|
977
|
-
export {
|
|
991
|
+
export { Ce as Sender, V as a, K as i, Y as n, q as r, J as t };
|
|
978
992
|
|
|
979
|
-
//# sourceMappingURL=sender-
|
|
993
|
+
//# sourceMappingURL=sender-BRSpc7R8.js.map
|