@utk09/ui-observability 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -219
- package/README.md +24 -26
- package/dist/{batch-CXmPmTse.js → batch-D3NHhF9L.js} +3 -3
- package/dist/{batch-CXmPmTse.js.map → batch-D3NHhF9L.js.map} +1 -1
- package/dist/{batch-mmPigCpi.cjs → batch-DnYRJqhU.cjs} +2 -2
- package/dist/{batch-mmPigCpi.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +26 -2
- package/dist/bus/bus.d.ts +26 -2
- package/dist/bus-B__467mL.cjs +2 -0
- package/dist/bus-B__467mL.cjs.map +1 -0
- package/dist/{bus-C39wspFV.js → bus-dw7T92sO.js} +37 -24
- package/dist/bus-dw7T92sO.js.map +1 -0
- package/dist/capture/interactions.d.cts +35 -3
- package/dist/capture/interactions.d.ts +35 -3
- package/dist/capture/observed-windows.d.cts +51 -0
- package/dist/capture/observed-windows.d.ts +51 -0
- package/dist/{compression-CvED_Jel.cjs → compression-C0hUHKR-.cjs} +2 -2
- package/dist/{compression-CvED_Jel.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
- package/dist/{compression-tVtXwVjX.js → compression-SHPAvS4U.js} +2 -2
- package/dist/{compression-tVtXwVjX.js.map → compression-SHPAvS4U.js.map} +1 -1
- package/dist/{config-SgQcCP1_.js → config-CSNcS7OZ.js} +194 -196
- package/dist/config-CSNcS7OZ.js.map +1 -0
- package/dist/config-CybPP5VM.cjs +2 -0
- package/dist/config-CybPP5VM.cjs.map +1 -0
- package/dist/{console-BGgGnjSi.js → console-BsM-fSCQ.js} +4 -4
- package/dist/{console-BGgGnjSi.js.map → console-BsM-fSCQ.js.map} +1 -1
- package/dist/{console-CSZ5_Vx5.cjs → console-Dkxs6IVQ.cjs} +2 -2
- package/dist/{console-CSZ5_Vx5.cjs.map → console-Dkxs6IVQ.cjs.map} +1 -1
- package/dist/{constants-CUyd9cTZ.js → constants-BwJDXzj6.js} +23 -23
- package/dist/constants-BwJDXzj6.js.map +1 -0
- package/dist/constants-CtF52hIV.cjs +2 -0
- package/dist/constants-CtF52hIV.cjs.map +1 -0
- package/dist/constants.d.cts +12 -0
- package/dist/constants.d.ts +12 -0
- package/dist/core/diagnostics.d.cts +1 -1
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/rotation.d.cts +26 -2
- package/dist/core/rotation.d.ts +26 -2
- package/dist/core/runtime.d.cts +9 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-B2v6Cym-.cjs} +2 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-B2v6Cym-.cjs.map} +1 -1
- package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-Cs_YWzTa.js} +4 -4
- package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-Cs_YWzTa.js.map} +1 -1
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.js +31 -31
- package/dist/doctor.js.map +1 -1
- package/dist/{errors-CNPbesMs.cjs → errors-DP2RUm4V.cjs} +2 -2
- package/dist/{errors-CNPbesMs.cjs.map → errors-DP2RUm4V.cjs.map} +1 -1
- package/dist/{errors-BE_EZV7Q.js → errors-Q3Ng1ciC.js} +3 -3
- package/dist/{errors-BE_EZV7Q.js.map → errors-Q3Ng1ciC.js.map} +1 -1
- package/dist/{factory-CTi0Is3F.js → factory-DV17sm2p.js} +22 -22
- package/dist/{factory-CTi0Is3F.js.map → factory-DV17sm2p.js.map} +1 -1
- package/dist/{factory-hRrH32v5.cjs → factory-K8O6gpux.cjs} +2 -2
- package/dist/{factory-hRrH32v5.cjs.map → factory-K8O6gpux.cjs.map} +1 -1
- package/dist/{identity-DdhKgrpk.js → identity-BgtHyY4u.js} +38 -27
- package/dist/identity-BgtHyY4u.js.map +1 -0
- package/dist/identity-CvuyqZk7.cjs +2 -0
- package/dist/identity-CvuyqZk7.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +600 -569
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-D4KVcqdD.cjs} +2 -2
- package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-D4KVcqdD.cjs.map} +1 -1
- package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-e-13ZLWm.js} +17 -17
- package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-e-13ZLWm.js.map} +1 -1
- package/dist/interactions-Byxf1C82.js +207 -0
- package/dist/interactions-Byxf1C82.js.map +1 -0
- package/dist/interactions-OK85T-Dk.cjs +2 -0
- package/dist/interactions-OK85T-Dk.cjs.map +1 -0
- package/dist/{journey-D2_sia57.js → journey-C93FTYcs.js} +14 -14
- package/dist/{journey-D2_sia57.js.map → journey-C93FTYcs.js.map} +1 -1
- package/dist/{journey-B4Adltjm.cjs → journey-nMbob3OB.cjs} +2 -2
- package/dist/{journey-B4Adltjm.cjs.map → journey-nMbob3OB.cjs.map} +1 -1
- package/dist/{library-console-CPW6bvZH.cjs → library-console-DJUQzcgM.cjs} +2 -2
- package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
- package/dist/{library-console-Btrzt814.js → library-console-DklSmucS.js} +2 -2
- package/dist/{library-console-Btrzt814.js.map → library-console-DklSmucS.js.map} +1 -1
- package/dist/{library-request-BJ9PLRaD.js → library-request-UGEwOHpf.js} +2 -2
- package/dist/{library-request-BJ9PLRaD.js.map → library-request-UGEwOHpf.js.map} +1 -1
- package/dist/{library-request-D7OvTxZV.cjs → library-request-kY9iTpIF.cjs} +2 -2
- package/dist/{library-request-D7OvTxZV.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
- package/dist/{lifecycle-22CUCrc9.js → lifecycle-B2PlIuQu.js} +2 -2
- package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-B2PlIuQu.js.map} +1 -1
- package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-DaMdH_X7.cjs} +2 -2
- package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-DaMdH_X7.cjs.map} +1 -1
- package/dist/{log-record-CkivuiEl.cjs → log-record-Bmx6etMh.cjs} +2 -2
- package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bmx6etMh.cjs.map} +1 -1
- package/dist/{log-record-BNiLfqtL.js → log-record-DSt2P-Sr.js} +2 -2
- package/dist/{log-record-BNiLfqtL.js.map → log-record-DSt2P-Sr.js.map} +1 -1
- package/dist/{long-frames-DNFaRnC3.js → long-frames-Bamjs1WV.js} +3 -3
- package/dist/{long-frames-DNFaRnC3.js.map → long-frames-Bamjs1WV.js.map} +1 -1
- package/dist/{long-frames-BUUbXd-B.cjs → long-frames-lhtONgGt.cjs} +2 -2
- package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-lhtONgGt.cjs.map} +1 -1
- package/dist/models/bus.d.cts +6 -1
- package/dist/models/bus.d.ts +6 -1
- package/dist/models/config.d.cts +23 -8
- package/dist/models/config.d.ts +23 -8
- package/dist/models/serializer.d.cts +3 -1
- package/dist/models/serializer.d.ts +3 -1
- package/dist/{network-CGMLQ-mA.cjs → network-BCn8Gn47.cjs} +2 -2
- package/dist/{network-CGMLQ-mA.cjs.map → network-BCn8Gn47.cjs.map} +1 -1
- package/dist/{network-on2zZT6H.js → network-Cg1L2w2r.js} +12 -12
- package/dist/{network-on2zZT6H.js.map → network-Cg1L2w2r.js.map} +1 -1
- package/dist/observed-windows-B3gJkdql.cjs +2 -0
- package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
- package/dist/observed-windows-BrwaJNlj.js +64 -0
- package/dist/observed-windows-BrwaJNlj.js.map +1 -0
- package/dist/{otlp-BENHf3g9.cjs → otlp-CrAWkQdO.cjs} +2 -2
- package/dist/{otlp-BENHf3g9.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
- package/dist/{otlp-DimfrRor.js → otlp-D6dRZyB8.js} +6 -6
- package/dist/{otlp-DimfrRor.js.map → otlp-D6dRZyB8.js.map} +1 -1
- package/dist/{platform-BaaFIPCU.js → platform-8DLhjddo.js} +7 -7
- package/dist/{platform-BaaFIPCU.js.map → platform-8DLhjddo.js.map} +1 -1
- package/dist/{platform-CfA3-7sJ.cjs → platform-BqRc-7RO.cjs} +2 -2
- package/dist/{platform-CfA3-7sJ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
- package/dist/{profiler-BAZoh7A4.js → profiler-BaXSqCfz.js} +59 -59
- package/dist/{profiler-BAZoh7A4.js.map → profiler-BaXSqCfz.js.map} +1 -1
- package/dist/{profiler-D4tJpDRc.cjs → profiler-BvWW2kNM.cjs} +2 -2
- package/dist/{profiler-D4tJpDRc.cjs.map → profiler-BvWW2kNM.cjs.map} +1 -1
- package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-C4ySHN0X.js} +16 -16
- package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-C4ySHN0X.js.map} +1 -1
- package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-DeaBiB-5.cjs} +2 -2
- package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-DeaBiB-5.cjs.map} +1 -1
- package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-D7L6D_D2.cjs} +2 -2
- package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-D7L6D_D2.cjs.map} +1 -1
- package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-Dq9xe7Qn.js} +22 -22
- package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-Dq9xe7Qn.js.map} +1 -1
- package/dist/{replay-Ds-ANH34.js → replay-B0M8kWz_.js} +24 -24
- package/dist/{replay-Ds-ANH34.js.map → replay-B0M8kWz_.js.map} +1 -1
- package/dist/{replay-B3gFXIZd.cjs → replay-QOFBpAXh.cjs} +2 -2
- package/dist/{replay-B3gFXIZd.cjs.map → replay-QOFBpAXh.cjs.map} +1 -1
- package/dist/{reports-C-thq-bk.js → reports--8APRLa-.js} +3 -3
- package/dist/{reports-C-thq-bk.js.map → reports--8APRLa-.js.map} +1 -1
- package/dist/{reports-BDSe4dFH.cjs → reports-ojuMKGO7.cjs} +2 -2
- package/dist/{reports-BDSe4dFH.cjs.map → reports-ojuMKGO7.cjs.map} +1 -1
- package/dist/{resource-timing-eUl2dNgC.js → resource-timing-BzR05rE-.js} +4 -4
- package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-BzR05rE-.js.map} +1 -1
- package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-pAG3ZhB5.cjs} +2 -2
- package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-pAG3ZhB5.cjs.map} +1 -1
- package/dist/{response-body-eoSQpLiH.js → response-body-BWvwKQ2p.js} +106 -106
- package/dist/{response-body-eoSQpLiH.js.map → response-body-BWvwKQ2p.js.map} +1 -1
- package/dist/{response-body-YdNl-HkR.cjs → response-body-CKEJ5itk.cjs} +3 -3
- package/dist/{response-body-YdNl-HkR.cjs.map → response-body-CKEJ5itk.cjs.map} +1 -1
- package/dist/{rotation-Cwct4ckk.js → rotation-BylN1B9e.js} +10 -11
- package/dist/rotation-BylN1B9e.js.map +1 -0
- package/dist/rotation-E2eKClIs.cjs +2 -0
- package/dist/rotation-E2eKClIs.cjs.map +1 -0
- package/dist/{sampling-mXt4dstx.cjs → sampling-B46LW0cy.cjs} +2 -2
- package/dist/{sampling-mXt4dstx.cjs.map → sampling-B46LW0cy.cjs.map} +1 -1
- package/dist/{sampling-BlrI8jor.js → sampling-zXA6r-Nw.js} +16 -16
- package/dist/{sampling-BlrI8jor.js.map → sampling-zXA6r-Nw.js.map} +1 -1
- package/dist/{sanitize-Ba0KqU06.js → sanitize-DjnR6RXR.js} +2 -2
- package/dist/{sanitize-Ba0KqU06.js.map → sanitize-DjnR6RXR.js.map} +1 -1
- package/dist/{sanitize-DQyiI_KY.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
- package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-Qj6LuZqp.cjs.map} +1 -1
- package/dist/{sender-Dv8rAmpV.js → sender-Bdp-TAS4.js} +71 -71
- package/dist/{sender-Dv8rAmpV.js.map → sender-Bdp-TAS4.js.map} +1 -1
- package/dist/{sender-BdRuNVhF.cjs → sender-DR7ZycZY.cjs} +2 -2
- package/dist/{sender-BdRuNVhF.cjs.map → sender-DR7ZycZY.cjs.map} +1 -1
- package/dist/{stored-context-CXt7eHZL.cjs → stored-context-BOu54M8Y.cjs} +2 -2
- package/dist/{stored-context-CXt7eHZL.cjs.map → stored-context-BOu54M8Y.cjs.map} +1 -1
- package/dist/{stored-context-B2EzVuYm.js → stored-context-CSttrAsw.js} +6 -6
- package/dist/{stored-context-B2EzVuYm.js.map → stored-context-CSttrAsw.js.map} +1 -1
- package/dist/{storm-C-zYSdDX.cjs → storm-BHgI12iS.cjs} +2 -2
- package/dist/{storm-C-zYSdDX.cjs.map → storm-BHgI12iS.cjs.map} +1 -1
- package/dist/{storm-DjKetLKZ.js → storm-DKlpv0FL.js} +2 -2
- package/dist/{storm-DjKetLKZ.js.map → storm-DKlpv0FL.js.map} +1 -1
- package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-BYPYYkQ5.cjs} +2 -2
- package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-BYPYYkQ5.cjs.map} +1 -1
- package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-BcOB8A2e.js} +2 -2
- package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-BcOB8A2e.js.map} +1 -1
- package/dist/{user-timing-BePqb1uN.js → user-timing-4KIJ74Vi.js} +2 -2
- package/dist/{user-timing-BePqb1uN.js.map → user-timing-4KIJ74Vi.js.map} +1 -1
- package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BsU2wQKE.cjs} +2 -2
- package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BsU2wQKE.cjs.map} +1 -1
- package/dist/utils/identity.d.cts +5 -0
- package/dist/utils/identity.d.ts +5 -0
- package/dist/{web-socket-CoIUBM3C.cjs → web-socket-Cs1ZbmmN.cjs} +2 -2
- package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
- package/dist/{web-socket-DSHgDiZ6.js → web-socket-Zg0hj1LB.js} +4 -4
- package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-Zg0hj1LB.js.map} +1 -1
- package/dist/{worker-protocol-x074Rpet.js → worker-protocol-CYpAbrVl.js} +4 -4
- package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-CYpAbrVl.js.map} +1 -1
- package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-DFYXIFus.cjs} +2 -2
- package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-DFYXIFus.cjs.map} +1 -1
- package/dist/{worker-server-CFe4nvos.cjs → worker-server--yGTadTA.cjs} +2 -2
- package/dist/{worker-server-CFe4nvos.cjs.map → worker-server--yGTadTA.cjs.map} +1 -1
- package/dist/{worker-server-iUVSjH8L.js → worker-server-BokySIII.js} +25 -25
- package/dist/{worker-server-iUVSjH8L.js.map → worker-server-BokySIII.js.map} +1 -1
- package/dist/worker-transport-BdEvh_-a.cjs +2 -0
- package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
- package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-JK-Fby9J.js} +23 -19
- package/dist/worker-transport-JK-Fby9J.js.map +1 -0
- package/llms.txt +13 -10
- package/package.json +13 -5
- package/dist/bus-C39wspFV.js.map +0 -1
- package/dist/bus-_EaOVPGq.cjs +0 -2
- package/dist/bus-_EaOVPGq.cjs.map +0 -1
- package/dist/config-DUs7uHHt.cjs +0 -2
- package/dist/config-DUs7uHHt.cjs.map +0 -1
- package/dist/config-SgQcCP1_.js.map +0 -1
- package/dist/constants-CUyd9cTZ.js.map +0 -1
- package/dist/constants-CqdJhTxH.cjs +0 -2
- package/dist/constants-CqdJhTxH.cjs.map +0 -1
- package/dist/identity-DdhKgrpk.js.map +0 -1
- package/dist/identity-DlWRIuwy.cjs +0 -2
- package/dist/identity-DlWRIuwy.cjs.map +0 -1
- package/dist/interactions-CUkzK8sR.cjs +0 -2
- package/dist/interactions-CUkzK8sR.cjs.map +0 -1
- package/dist/interactions-DiFvCosX.js +0 -111
- package/dist/interactions-DiFvCosX.js.map +0 -1
- package/dist/rotation-Cwct4ckk.js.map +0 -1
- package/dist/rotation-D4qUAHAu.cjs +0 -2
- package/dist/rotation-D4qUAHAu.cjs.map +0 -1
- package/dist/worker-transport-CRAX-09c.cjs +0 -2
- package/dist/worker-transport-CRAX-09c.cjs.map +0 -1
- package/dist/worker-transport-Dy1KMA7t.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
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-
|
|
1
|
+
import { D as e, Mn as t, V as n, Z as r, an as i, dt as a, ft as o, g as s, gt as c, ht as l, l as u, mt as d, nt as f, on as p, pt as m, qn as h, ut as g } from "./constants-BwJDXzj6.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-DV17sm2p.js";
|
|
3
3
|
import { n as x, t as S } from "./deadline-C4ccAuk5.js";
|
|
4
|
-
import { i as ae, r as C } from "./library-request-
|
|
4
|
+
import { i as ae, r as C } from "./library-request-UGEwOHpf.js";
|
|
5
5
|
import { t as w } from "./openfin-Bxelt0yg.js";
|
|
6
|
-
import { t as T } from "./sanitize-
|
|
7
|
-
import { n as oe } from "./library-console-
|
|
8
|
-
import { a as se, c as E, f as D, i as ce, n as le, o as O, p as ue, r as de, s as k, t as fe } from "./response-body-
|
|
6
|
+
import { t as T } from "./sanitize-DjnR6RXR.js";
|
|
7
|
+
import { n as oe } from "./library-console-DklSmucS.js";
|
|
8
|
+
import { a as se, c as E, f as D, i as ce, n as le, o as O, p as ue, r as de, s as k, t as fe } from "./response-body-BWvwKQ2p.js";
|
|
9
9
|
import { t as A } from "./defineProperty-s2S8BXUc.js";
|
|
10
|
-
import { r as j } from "./platform-
|
|
10
|
+
import { r as j } from "./platform-8DLhjddo.js";
|
|
11
11
|
import { t as M } from "./unref-DgHPQeWv.js";
|
|
12
|
-
import { t as N } from "./compression-
|
|
13
|
-
import { a as P } from "./batch-
|
|
14
|
-
import { r as F } from "./log-record-
|
|
15
|
-
import { i as I } from "./identity-
|
|
16
|
-
import { t as L } from "./sampling-
|
|
17
|
-
import { n as R, t as z } from "./remote-rules-
|
|
12
|
+
import { t as N } from "./compression-SHPAvS4U.js";
|
|
13
|
+
import { a as P } from "./batch-D3NHhF9L.js";
|
|
14
|
+
import { r as F } from "./log-record-DSt2P-Sr.js";
|
|
15
|
+
import { i as I } from "./identity-BgtHyY4u.js";
|
|
16
|
+
import { t as L } from "./sampling-zXA6r-Nw.js";
|
|
17
|
+
import { n as R, t as z } from "./remote-rules-Dq9xe7Qn.js";
|
|
18
18
|
// src/storage/persistence.ts
|
|
19
19
|
async function B(e) {
|
|
20
20
|
let t = globalThis.navigator?.storage;
|
|
@@ -200,40 +200,40 @@ var he = class extends V {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
flushBatch(
|
|
204
|
-
let { config:
|
|
205
|
-
if (
|
|
206
|
-
let
|
|
207
|
-
if (!
|
|
208
|
-
let
|
|
209
|
-
if (
|
|
210
|
-
this.park(
|
|
203
|
+
flushBatch(t, r, o) {
|
|
204
|
+
let { config: s } = this.deps;
|
|
205
|
+
if (t.records.length === 0) return;
|
|
206
|
+
let c = this.serialize(t, r);
|
|
207
|
+
if (!c) return;
|
|
208
|
+
let l = T(c.body);
|
|
209
|
+
if (l > 6e4) {
|
|
210
|
+
this.park(t);
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
let
|
|
215
|
-
let e = new Headers(
|
|
216
|
-
return e.set(
|
|
213
|
+
o.searchParams.set(i, t.id), o.searchParams.set(p, r);
|
|
214
|
+
let u = o.toString(), d = this.deps.exitHeaders(), f = () => {
|
|
215
|
+
let e = new Headers(d);
|
|
216
|
+
return e.set(m, c.contentType), e.set(a, t.id), e;
|
|
217
217
|
};
|
|
218
|
-
if (
|
|
219
|
-
this.keepaliveFetch(
|
|
218
|
+
if (d) {
|
|
219
|
+
this.keepaliveFetch(u, t, c.body, l, r, f);
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
this.park(
|
|
222
|
+
if (s.headers) {
|
|
223
|
+
this.park(t);
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
-
if (this.isSameOrigin(
|
|
227
|
-
this.keepaliveFetch(
|
|
226
|
+
if (this.isSameOrigin(o)) {
|
|
227
|
+
this.keepaliveFetch(u, t, c.body, l, r, f);
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
|
-
let
|
|
231
|
-
if (
|
|
232
|
-
this.keepaliveFetch(
|
|
230
|
+
let h = () => new Headers({ [m]: n });
|
|
231
|
+
if (s.credentials !== "include") {
|
|
232
|
+
this.keepaliveFetch(u, t, c.body, l, r, h);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
|
-
let
|
|
236
|
-
|
|
235
|
+
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, r, h);
|
|
237
237
|
}
|
|
238
238
|
isSameOrigin(e) {
|
|
239
239
|
if (typeof location > "u") return !1;
|
|
@@ -334,14 +334,14 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
334
334
|
if (!i) return e.records.length;
|
|
335
335
|
let a = fe(t, this.config.serializer), o = await this.attempt(e, n, i, a, r);
|
|
336
336
|
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:
|
|
338
|
-
if (
|
|
339
|
-
let { headers: n } =
|
|
340
|
-
return this.accept(t, n.get(
|
|
341
|
-
}
|
|
342
|
-
let
|
|
343
|
-
throw this.reject(
|
|
344
|
-
retryAfterMs:
|
|
337
|
+
let { response: s, body: u } = o;
|
|
338
|
+
if (s.ok) {
|
|
339
|
+
let { headers: n } = s;
|
|
340
|
+
return this.accept(t, n.get(c), n.get(d)), u === void 0 ? 0 : this.reportPartial(e, t, u);
|
|
341
|
+
}
|
|
342
|
+
let f = s.status, p = ue(s.headers.get(l)), m = f === 413 && u !== void 0 ? this.readMaxBytes(u) : void 0;
|
|
343
|
+
throw this.reject(f, e.id, t, {
|
|
344
|
+
retryAfterMs: p,
|
|
345
345
|
maxBytes: m,
|
|
346
346
|
advice: J
|
|
347
347
|
});
|
|
@@ -349,18 +349,18 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
349
349
|
rejectsCredentials(e) {
|
|
350
350
|
return e === 401 || e === 403;
|
|
351
351
|
}
|
|
352
|
-
async attempt(e, t, n, r,
|
|
352
|
+
async attempt(e, t, n, r, i) {
|
|
353
353
|
let s = Date.now() + this.config.delivery.requestTimeoutMs, c = new Headers(await this.before(this.resolveHeaders(), s, t));
|
|
354
|
-
c.set(
|
|
354
|
+
c.set(m, n.contentType), c.set(a, e.id), c.set(g, String(e.attempts));
|
|
355
355
|
let l = await this.before(this.encodeBody(n.body), s, t);
|
|
356
|
-
this.assertContext(e), typeof l != "string" && c.set(
|
|
357
|
-
let
|
|
358
|
-
if (!this.keepalive(
|
|
359
|
-
|
|
356
|
+
this.assertContext(e), typeof l != "string" && c.set(o, f);
|
|
357
|
+
let u = typeof l == "string" ? T(l) : l.byteLength;
|
|
358
|
+
if (!this.keepalive(u)) return this.dispatch(t, c, l, s, !1, r);
|
|
359
|
+
i?.(), this.keepaliveBytes += u;
|
|
360
360
|
try {
|
|
361
361
|
return await this.dispatch(t, c, l, s, !0, r);
|
|
362
362
|
} finally {
|
|
363
|
-
this.keepaliveBytes -=
|
|
363
|
+
this.keepaliveBytes -= u;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
async before(e, t, n) {
|
|
@@ -424,7 +424,7 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
424
424
|
}), 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
425
|
}
|
|
426
426
|
start() {
|
|
427
|
-
this.stopped = !1, typeof addEventListener < "u" && addEventListener("online", this.onOnline), this.schedule(
|
|
427
|
+
this.stopped = !1, typeof addEventListener < "u" && addEventListener("online", this.onOnline), this.schedule(t);
|
|
428
428
|
}
|
|
429
429
|
nudge() {
|
|
430
430
|
this.draining || this.schedule(this.config.delivery.retryBaseDelayMs);
|
|
@@ -465,7 +465,7 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
465
465
|
this.timer = t, M(t);
|
|
466
466
|
}
|
|
467
467
|
bounded(e) {
|
|
468
|
-
return x(e,
|
|
468
|
+
return x(e, h);
|
|
469
469
|
}
|
|
470
470
|
clearTimer() {
|
|
471
471
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
@@ -479,7 +479,7 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
479
479
|
this.draining = !0;
|
|
480
480
|
try {
|
|
481
481
|
let e = ie(r, this.config.storage.namespace);
|
|
482
|
-
await v(e, this.diagnostics, () => this.drainLocked()) !== !0 && this.schedule(
|
|
482
|
+
await v(e, this.diagnostics, () => this.drainLocked()) !== !0 && this.schedule(t);
|
|
483
483
|
} finally {
|
|
484
484
|
this.draining = !1;
|
|
485
485
|
}
|
|
@@ -487,19 +487,19 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
487
487
|
}
|
|
488
488
|
async drainLocked() {
|
|
489
489
|
try {
|
|
490
|
-
if (!j()) return this.schedule(
|
|
490
|
+
if (!j()) return this.schedule(t), !0;
|
|
491
491
|
let e = await this.bounded(this.storage.take(this.batchesPerDrain));
|
|
492
|
-
if (e.length === 0) return this.schedule(
|
|
493
|
-
let
|
|
494
|
-
for (let
|
|
492
|
+
if (e.length === 0) return this.schedule(t), !0;
|
|
493
|
+
let n = /* @__PURE__ */ new Set(), r = 0;
|
|
494
|
+
for (let t of e) {
|
|
495
495
|
if (this.stopped) return !0;
|
|
496
|
-
let e = O(
|
|
497
|
-
if (
|
|
498
|
-
let i = await this.deliver(
|
|
496
|
+
let e = O(t, this.config);
|
|
497
|
+
if (n.has(e)) continue;
|
|
498
|
+
let i = await this.deliver(t);
|
|
499
499
|
if (i === "stop") return !0;
|
|
500
|
-
i !== "next" && (
|
|
500
|
+
i !== "next" && (n.add(e), r = Math.max(r, i));
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return n.size > 0 ? this.schedule(r) : this.schedule(e.length === this.batchesPerDrain ? 0 : t), !0;
|
|
503
503
|
} catch (e) {
|
|
504
504
|
return this.diagnostics.report("storage.degraded", "The drain loop threw an error.", void 0, e), this.attempt++, this.schedule(this.backoffMs()), !0;
|
|
505
505
|
}
|
|
@@ -511,10 +511,10 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
511
511
|
}), this.onLoss("max_attempts", e.records, [e.id]), await this.bounded(this.storage.remove(e.id)), "next";
|
|
512
512
|
try {
|
|
513
513
|
return await this.transport.send(e), await this.bounded(this.storage.remove(e.id)), this.attempt = 0, "next";
|
|
514
|
-
} catch (
|
|
514
|
+
} catch (n) {
|
|
515
515
|
if (this.stopped) return "stop";
|
|
516
|
-
let
|
|
517
|
-
return
|
|
516
|
+
let r = n instanceof D ? n : void 0;
|
|
517
|
+
return r?.kind === "permanent" || r?.kind === "too_large" ? (await this.replaceStored(e, n), "next") : r?.kind === "offline" ? (this.schedule(t), "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
518
|
}
|
|
519
519
|
}
|
|
520
520
|
async replaceStored(e, t) {
|
|
@@ -542,7 +542,7 @@ var J = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
542
542
|
"traces"
|
|
543
543
|
];
|
|
544
544
|
function Z(e) {
|
|
545
|
-
let t = e.attributes[
|
|
545
|
+
let t = e.attributes[s];
|
|
546
546
|
return t === "metric" ? "metrics" : t === "span" ? "traces" : "logs";
|
|
547
547
|
}
|
|
548
548
|
function Q(e, t) {
|
|
@@ -742,7 +742,7 @@ var ve = {
|
|
|
742
742
|
let r = this.clockOffset();
|
|
743
743
|
r !== void 0 && t !== "metrics" && (e.attributes = {
|
|
744
744
|
...e.attributes,
|
|
745
|
-
[
|
|
745
|
+
[u]: r
|
|
746
746
|
}), n.add(e);
|
|
747
747
|
} catch (e) {
|
|
748
748
|
this.diagnostics.report("pipeline.crashed", "The pipeline dropped a record before it reached a stream.", void 0, e);
|
|
@@ -825,7 +825,7 @@ var ve = {
|
|
|
825
825
|
}
|
|
826
826
|
async store(e) {
|
|
827
827
|
let t = await this.diagnostics.guardAsync("storage.degraded", "The library could not store an undelivered batch.", async () => {
|
|
828
|
-
let t = await x(this.storage.save(e),
|
|
828
|
+
let t = await x(this.storage.save(e), h);
|
|
829
829
|
return t && this.retry.nudge(), t;
|
|
830
830
|
});
|
|
831
831
|
return t === void 0 ? "unknown" : t ? "stored" : "not_stored";
|
|
@@ -865,7 +865,7 @@ var ve = {
|
|
|
865
865
|
i && z(t.remote, n, i);
|
|
866
866
|
}, s, c = (e) => {
|
|
867
867
|
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-
|
|
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-JK-Fby9J.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 xe(f, t.onSent), m = new _e(a, p, r, n, void 0, l), { batching: h } = n, g = new be(p, a, m, r, {
|
|
869
869
|
logs: {
|
|
870
870
|
flushIntervalMs: h.logFlushIntervalMs,
|
|
871
871
|
batchSize: h.logBatchSize
|
|
@@ -976,4 +976,4 @@ var ve = {
|
|
|
976
976
|
};
|
|
977
977
|
export { Se as Sender, V as a, K as i, Y as n, q as r, J as t };
|
|
978
978
|
|
|
979
|
-
//# sourceMappingURL=sender-
|
|
979
|
+
//# sourceMappingURL=sender-Bdp-TAS4.js.map
|