@utk09/ui-observability 0.11.0 → 0.12.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 +61 -0
- package/README.md +273 -102
- package/bin/uiobs.mjs +1 -1
- package/dist/{batch-CL9uWYY3.js → batch-BjQUwjA6.js} +4 -4
- package/dist/batch-BjQUwjA6.js.map +1 -0
- package/dist/{batch-C8OcWR2L.cjs → batch-D5LlU4Q9.cjs} +2 -2
- package/dist/batch-D5LlU4Q9.cjs.map +1 -0
- package/dist/bus/bus.d.ts +48 -47
- package/dist/bus/links.d.ts +4 -4
- package/dist/bus/validation.d.ts +1 -1
- package/dist/bus-D_7pd7RN.cjs +2 -0
- package/dist/bus-D_7pd7RN.cjs.map +1 -0
- package/dist/{bus-BZ0GldpT.js → bus-ecxUNTja.js} +91 -91
- package/dist/bus-ecxUNTja.js.map +1 -0
- package/dist/capture/console.d.ts +10 -10
- package/dist/capture/errors.d.ts +6 -6
- package/dist/capture/interactions.d.ts +14 -14
- package/dist/capture/lifecycle.d.ts +3 -3
- package/dist/capture/long-frames.d.ts +6 -6
- package/dist/capture/network.d.ts +17 -17
- package/dist/capture/profiler-frames.d.ts +44 -0
- package/dist/capture/replay-buffer.d.ts +46 -0
- package/dist/capture/replay-upload.d.ts +74 -0
- package/dist/capture/replay.d.ts +114 -0
- package/dist/capture/reports.d.ts +2 -2
- package/dist/capture/resource-timing.d.ts +1 -1
- package/dist/capture/server-timing.d.ts +3 -3
- package/dist/capture/storm.d.ts +3 -3
- package/dist/capture/types.d.ts +45 -33
- package/dist/capture/unclean-exit.d.ts +8 -8
- package/dist/capture/user-timing.d.ts +3 -3
- package/dist/capture/web-socket.d.ts +11 -11
- package/dist/capture/web-vitals.d.ts +20 -7
- package/dist/compression-AJJCMBOa.js +11 -0
- package/dist/compression-AJJCMBOa.js.map +1 -0
- package/dist/compression-lD9abCcO.cjs +2 -0
- package/dist/compression-lD9abCcO.cjs.map +1 -0
- package/dist/{console-BPZCuSLc.cjs → console-CLz_PvFn.cjs} +2 -2
- package/dist/console-CLz_PvFn.cjs.map +1 -0
- package/dist/{console-BeCF7n59.js → console-cwgHKXvM.js} +4 -4
- package/dist/console-cwgHKXvM.js.map +1 -0
- package/dist/constants-Bwl_YtQi.js +349 -0
- package/dist/constants-Bwl_YtQi.js.map +1 -0
- package/dist/constants-DakMxVB2.cjs +2 -0
- package/dist/constants-DakMxVB2.cjs.map +1 -0
- package/dist/constants.d.ts +150 -103
- package/dist/context-storage-BjzeBSxH.cjs.map +1 -1
- package/dist/context-storage-BzkoHzkQ.js.map +1 -1
- package/dist/core/breadcrumbs.d.ts +16 -15
- package/dist/core/config.d.ts +3 -3
- package/dist/core/context.d.ts +7 -7
- package/dist/core/debug-buffer.d.ts +10 -10
- package/dist/core/debug-bundle.d.ts +3 -3
- package/dist/core/deferred.d.ts +2 -2
- package/dist/core/diagnostics.d.ts +24 -21
- package/dist/core/drops.d.ts +7 -7
- package/dist/core/hold-buffer.d.ts +1 -1
- package/dist/core/journey.d.ts +22 -23
- package/dist/core/logger.d.ts +22 -21
- package/dist/core/measure.d.ts +7 -7
- package/dist/core/meter.d.ts +25 -21
- package/dist/core/pipeline.d.ts +42 -41
- package/dist/core/profile-buckets.d.ts +31 -0
- package/dist/core/profiler.d.ts +218 -0
- package/dist/core/record.d.ts +23 -23
- package/dist/core/remote-rules.d.ts +4 -4
- package/dist/core/remote-sampling.d.ts +21 -20
- package/dist/core/runtime.d.ts +206 -137
- package/dist/core/sampling.d.ts +18 -18
- package/dist/core/sender.d.ts +22 -20
- package/dist/core/spans.d.ts +5 -5
- package/dist/{deadline-BOjOxNHj.js → deadline-C4ccAuk5.js} +3 -6
- package/dist/deadline-C4ccAuk5.js.map +1 -0
- package/dist/deadline-CUGbto-y.cjs +2 -0
- package/dist/deadline-CUGbto-y.cjs.map +1 -0
- package/dist/{debug-bundle-C7UkHZ-q.js → debug-bundle-BOdYmCeV.js} +10 -3
- package/dist/debug-bundle-BOdYmCeV.js.map +1 -0
- package/dist/debug-bundle-Ex4L_LSP.cjs +2 -0
- package/dist/debug-bundle-Ex4L_LSP.cjs.map +1 -0
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.cjs.map +1 -1
- package/dist/doctor.d.ts +16 -6
- package/dist/doctor.js +147 -52
- package/dist/doctor.js.map +1 -1
- package/dist/{emergency-queue-Zy6lNafo.js → emergency-queue-B9WZxanZ.js} +4 -4
- package/dist/emergency-queue-B9WZxanZ.js.map +1 -0
- package/dist/{emergency-queue-CNTRui5t.cjs → emergency-queue-HBpL5r3V.cjs} +2 -2
- package/dist/emergency-queue-HBpL5r3V.cjs.map +1 -0
- package/dist/error-like-B11pB4aL.js.map +1 -1
- package/dist/error-like-gGRx2s36.cjs.map +1 -1
- package/dist/{errors-Dh7kef0i.js → errors-D6bwgJtO.js} +3 -3
- package/dist/errors-D6bwgJtO.js.map +1 -0
- package/dist/{errors-tfEr48bS.cjs → errors-DCOCRdSi.cjs} +2 -2
- package/dist/errors-DCOCRdSi.cjs.map +1 -0
- package/dist/{factory-CJXVYp0R.cjs → factory-DLFDjdLv.cjs} +2 -2
- package/dist/factory-DLFDjdLv.cjs.map +1 -0
- package/dist/{factory-BonqI3NL.js → factory-e9Qo3K0z.js} +13 -13
- package/dist/factory-e9Qo3K0z.js.map +1 -0
- package/dist/fixed-window-CvESpFYV.cjs.map +1 -1
- package/dist/fixed-window-Dq3MLUUv.js.map +1 -1
- package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
- package/dist/global-scope-D9I8s-oN.js.map +1 -1
- package/dist/guards-Cidk71ME.js.map +1 -1
- package/dist/guards-nJ70syPt.cjs.map +1 -1
- package/dist/{identity-Cxgj6pZX.cjs → identity-BlvlgjrU.cjs} +2 -2
- package/dist/identity-BlvlgjrU.cjs.map +1 -0
- package/dist/{identity-DT5VmvXy.js → identity-BrQp_5J5.js} +19 -19
- package/dist/identity-BrQp_5J5.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +112 -79
- package/dist/index.js +783 -635
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-CIoW21Xd.cjs → indexeddb-storage-CtLvZH1r.cjs} +2 -2
- package/dist/indexeddb-storage-CtLvZH1r.cjs.map +1 -0
- package/dist/{indexeddb-storage-BJVtiQKm.js → indexeddb-storage-DLXQzAGh.js} +4 -4
- package/dist/indexeddb-storage-DLXQzAGh.js.map +1 -0
- package/dist/{interactions-DTgKy_6K.js → interactions-B6z2I4tU.js} +3 -3
- package/dist/interactions-B6z2I4tU.js.map +1 -0
- package/dist/{interactions-fEN6FbVo.cjs → interactions-P6pz08Jn.cjs} +2 -2
- package/dist/interactions-P6pz08Jn.cjs.map +1 -0
- package/dist/{journey-CuJrHzEg.js → journey-35yCMNFo.js} +20 -19
- package/dist/journey-35yCMNFo.js.map +1 -0
- package/dist/journey-DAGh5h9k.cjs +2 -0
- package/dist/journey-DAGh5h9k.cjs.map +1 -0
- package/dist/keys-BHhw_0Wh.cjs.map +1 -1
- package/dist/keys-BU9j5YqW.js.map +1 -1
- package/dist/{library-console-D2GY9Or6.cjs → library-console-BFWEuQsl.cjs} +2 -2
- package/dist/library-console-BFWEuQsl.cjs.map +1 -0
- package/dist/{library-console-C1m6g1BR.js → library-console-Dl_Ly6DQ.js} +2 -2
- package/dist/library-console-Dl_Ly6DQ.js.map +1 -0
- package/dist/{library-request-1BX_UlaX.cjs → library-request-Da-CHKzT.cjs} +2 -2
- package/dist/library-request-Da-CHKzT.cjs.map +1 -0
- package/dist/{library-request-BQBT9N9Q.js → library-request-nI6pvI6I.js} +2 -2
- package/dist/library-request-nI6pvI6I.js.map +1 -0
- package/dist/{lifecycle-2EtUaRpo.cjs → lifecycle-BGGOcN4N.cjs} +2 -2
- package/dist/lifecycle-BGGOcN4N.cjs.map +1 -0
- package/dist/{lifecycle-BaKx_-32.js → lifecycle-CZ6RRXc6.js} +2 -2
- package/dist/lifecycle-CZ6RRXc6.js.map +1 -0
- package/dist/{log-record-i9zOTkpQ.cjs → log-record-D7bA1RPb.cjs} +2 -2
- package/dist/log-record-D7bA1RPb.cjs.map +1 -0
- package/dist/{log-record-CAoGBBf3.js → log-record-DIA6McNr.js} +2 -2
- package/dist/log-record-DIA6McNr.js.map +1 -0
- package/dist/{long-frames-Czk7IupC.js → long-frames-430_85Da.js} +8 -6
- package/dist/long-frames-430_85Da.js.map +1 -0
- package/dist/long-frames-Dd8tsi2U.cjs +2 -0
- package/dist/long-frames-Dd8tsi2U.cjs.map +1 -0
- package/dist/models/batch.d.ts +14 -15
- package/dist/models/bus.d.ts +24 -24
- package/dist/models/config.d.ts +402 -216
- package/dist/models/drop.d.ts +13 -11
- package/dist/models/health.d.ts +13 -13
- package/dist/models/log-record.d.ts +13 -14
- package/dist/models/metric.d.ts +82 -17
- package/dist/models/plugin.d.ts +13 -13
- package/dist/models/replay.d.ts +60 -0
- package/dist/models/serializer.d.ts +2 -3
- package/dist/models/stats.d.ts +2 -2
- package/dist/models/storage.d.ts +12 -11
- package/dist/{network-DBNwApoF.js → network-C7SkLf4v.js} +12 -12
- package/dist/network-C7SkLf4v.js.map +1 -0
- package/dist/{network-xbbuvG_6.cjs → network-pEX3PAJv.cjs} +2 -2
- package/dist/network-pEX3PAJv.cjs.map +1 -0
- package/dist/openfin-Bxelt0yg.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/otlp-2MCrC3kd.cjs +2 -0
- package/dist/otlp-2MCrC3kd.cjs.map +1 -0
- package/dist/{otlp-BTJdIa6F.js → otlp-COq033e3.js} +25 -32
- package/dist/otlp-COq033e3.js.map +1 -0
- package/dist/patch-BX8KrPCT.cjs.map +1 -1
- package/dist/patch-UdPz1ea8.js.map +1 -1
- package/dist/{platform-C2Ez5kDc.cjs → platform-12uR7kBQ.cjs} +2 -2
- package/dist/platform-12uR7kBQ.cjs.map +1 -0
- package/dist/{platform-DkcuXwe-.js → platform-CVewe4wQ.js} +7 -7
- package/dist/platform-CVewe4wQ.js.map +1 -0
- package/dist/profiler-BVWIOgnq.js +310 -0
- package/dist/profiler-BVWIOgnq.js.map +1 -0
- package/dist/profiler-eVCknCzS.cjs +2 -0
- package/dist/profiler-eVCknCzS.cjs.map +1 -0
- package/dist/profiler-frames-CLXlT_xL.js +86 -0
- package/dist/profiler-frames-CLXlT_xL.js.map +1 -0
- package/dist/profiler-frames-Dg2OebB2.cjs +2 -0
- package/dist/profiler-frames-Dg2OebB2.cjs.map +1 -0
- package/dist/{remote-rules-Cfb4K-Nl.js → remote-rules-BJGDJGwA.js} +27 -27
- package/dist/remote-rules-BJGDJGwA.js.map +1 -0
- package/dist/{remote-rules-vzvk7aKf.cjs → remote-rules-CJD3ToVk.cjs} +2 -2
- package/dist/remote-rules-CJD3ToVk.cjs.map +1 -0
- package/dist/replay-0zAJv9T3.js +338 -0
- package/dist/replay-0zAJv9T3.js.map +1 -0
- package/dist/replay-DomJpXqW.cjs +2 -0
- package/dist/replay-DomJpXqW.cjs.map +1 -0
- package/dist/{reports-Dk2YhKIh.cjs → reports-BsbqmP8h.cjs} +2 -2
- package/dist/reports-BsbqmP8h.cjs.map +1 -0
- package/dist/{reports-TA-zInnq.js → reports-BuXekPOS.js} +3 -3
- package/dist/reports-BuXekPOS.js.map +1 -0
- package/dist/{resource-timing-BLv3EA2A.js → resource-timing-CXGHwFRD.js} +4 -4
- package/dist/resource-timing-CXGHwFRD.js.map +1 -0
- package/dist/{resource-timing-Cysw1S1f.cjs → resource-timing-DkycFGDa.cjs} +2 -2
- package/dist/resource-timing-DkycFGDa.cjs.map +1 -0
- package/dist/{sampling-Ckh2yW9k.cjs → sampling-Dd0wllyq.cjs} +2 -2
- package/dist/sampling-Dd0wllyq.cjs.map +1 -0
- package/dist/{sampling-C4VV-1MS.js → sampling-UUDbi3K0.js} +9 -9
- package/dist/sampling-UUDbi3K0.js.map +1 -0
- package/dist/{sanitize-6ymPlVvP.js → sanitize-CNmsD9r3.js} +2 -2
- package/dist/sanitize-CNmsD9r3.js.map +1 -0
- package/dist/{sanitize-BAWzkZt0.cjs → sanitize-ChLn97Ch.cjs} +2 -2
- package/dist/sanitize-ChLn97Ch.cjs.map +1 -0
- package/dist/{select-ZF4by-lF.cjs → select-CTk-K5mG.cjs} +3 -3
- package/dist/select-CTk-K5mG.cjs.map +1 -0
- package/dist/{select-xtQaenIi.js → select-DPv_j6wq.js} +61 -61
- package/dist/select-DPv_j6wq.js.map +1 -0
- package/dist/{sender-CiMHC9YG.js → sender-15zEsZpr.js} +61 -60
- package/dist/sender-15zEsZpr.js.map +1 -0
- package/dist/sender-Bfpv9tad.cjs +2 -0
- package/dist/sender-Bfpv9tad.cjs.map +1 -0
- package/dist/storage/context-storage.d.ts +34 -33
- package/dist/storage/emergency-queue.d.ts +9 -9
- package/dist/storage/eviction.d.ts +12 -12
- package/dist/storage/factory.d.ts +8 -7
- package/dist/storage/gap.d.ts +6 -6
- package/dist/storage/idb-driver.d.ts +31 -32
- package/dist/storage/indexeddb-storage.d.ts +26 -27
- package/dist/storage/keys.d.ts +7 -7
- package/dist/storage/local-storage.d.ts +38 -38
- package/dist/storage/memory-storage.d.ts +21 -22
- package/dist/storage/persistence.d.ts +1 -1
- package/dist/storage-BA9RqRO-.cjs.map +1 -1
- package/dist/storage-DZwed89z.js.map +1 -1
- package/dist/{storm-VR024_QN.js → storm-BTSNTIWI.js} +2 -2
- package/dist/storm-BTSNTIWI.js.map +1 -0
- package/dist/{storm-CYi9Swpx.cjs → storm-D0_qZOEg.cjs} +2 -2
- package/dist/storm-D0_qZOEg.cjs.map +1 -0
- package/dist/transport/compression.d.ts +2 -2
- package/dist/transport/errors.d.ts +7 -7
- package/dist/transport/exit-flush.d.ts +39 -39
- package/dist/transport/headers.d.ts +2 -2
- package/dist/transport/http-transport.d.ts +28 -27
- package/dist/transport/memory-transport.d.ts +6 -6
- package/dist/transport/retry-engine.d.ts +35 -34
- package/dist/transport/serializers/ecs.d.ts +1 -1
- package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
- package/dist/transport/serializers/otlp-traces.d.ts +1 -1
- package/dist/transport/serializers/otlp.d.ts +16 -16
- package/dist/transport/serializers/select.d.ts +7 -7
- package/dist/transport/status-transport.d.ts +20 -20
- package/dist/transport/worker-protocol.d.ts +3 -3
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-DFUN57wY.cjs → unclean-exit-ClGzrc2A.cjs} +2 -2
- package/dist/unclean-exit-ClGzrc2A.cjs.map +1 -0
- package/dist/{unclean-exit-CwcUhFOn.js → unclean-exit-Cob_jyTv.js} +2 -2
- package/dist/unclean-exit-Cob_jyTv.js.map +1 -0
- package/dist/unref-CU9Nyz_9.cjs +2 -0
- package/dist/unref-CU9Nyz_9.cjs.map +1 -0
- package/dist/unref-DgHPQeWv.js +7 -0
- package/dist/unref-DgHPQeWv.js.map +1 -0
- package/dist/user-timing-CdYqx3PF.cjs +2 -0
- package/dist/user-timing-CdYqx3PF.cjs.map +1 -0
- package/dist/{user-timing-_jZIhDKI.js → user-timing-DgHubxCI.js} +5 -3
- package/dist/user-timing-DgHubxCI.js.map +1 -0
- package/dist/utils/console.d.ts +2 -2
- package/dist/utils/deadline.d.ts +4 -4
- package/dist/utils/error-like.d.ts +7 -7
- package/dist/utils/fixed-window.d.ts +9 -8
- package/dist/utils/global-scope.d.ts +8 -8
- package/dist/utils/guards.d.ts +2 -2
- package/dist/utils/identity.d.ts +17 -17
- package/dist/utils/library-console.d.ts +4 -4
- package/dist/utils/library-request.d.ts +10 -10
- package/dist/utils/lock.d.ts +10 -9
- package/dist/utils/openfin.d.ts +5 -5
- package/dist/utils/patch.d.ts +6 -6
- package/dist/utils/platform.d.ts +13 -11
- package/dist/utils/sanitize.d.ts +4 -4
- package/dist/utils/timer.d.ts +1 -1
- package/dist/utils/tracing.d.ts +38 -38
- package/dist/utils/unref.d.ts +3 -3
- package/dist/{web-socket-BWUoqBh8.cjs → web-socket-BTuvYoJI.cjs} +2 -2
- package/dist/web-socket-BTuvYoJI.cjs.map +1 -0
- package/dist/{web-socket-CV7yIMnm.js → web-socket-DthJuSAg.js} +4 -4
- package/dist/web-socket-DthJuSAg.js.map +1 -0
- package/dist/web-vitals-Ch5BpDmo.cjs +2 -0
- package/dist/web-vitals-Ch5BpDmo.cjs.map +1 -0
- package/dist/web-vitals-CsGCWnUr.js +77 -0
- package/dist/web-vitals-CsGCWnUr.js.map +1 -0
- package/dist/{worker-protocol-CrsdSDLn.js → worker-protocol-B0_8rWy5.js} +4 -4
- package/dist/worker-protocol-B0_8rWy5.js.map +1 -0
- package/dist/{worker-protocol-Bai7GAIA.cjs → worker-protocol-BjzFORfq.cjs} +2 -2
- package/dist/worker-protocol-BjzFORfq.cjs.map +1 -0
- package/dist/worker-server-4en-Lt-3.cjs +2 -0
- package/dist/worker-server-4en-Lt-3.cjs.map +1 -0
- package/dist/{worker-server-Dp5HYm4b.js → worker-server-Cne9MX9I.js} +8 -8
- package/dist/{worker-server-Dp5HYm4b.js.map → worker-server-Cne9MX9I.js.map} +1 -1
- package/dist/worker-transport-B-GF4Aqn.cjs +2 -0
- package/dist/worker-transport-B-GF4Aqn.cjs.map +1 -0
- package/dist/{worker-transport-D6jtgpqN.js → worker-transport-C3SjJAEC.js} +62 -61
- package/dist/worker-transport-C3SjJAEC.js.map +1 -0
- package/package.json +8 -2
- package/dist/batch-C8OcWR2L.cjs.map +0 -1
- package/dist/batch-CL9uWYY3.js.map +0 -1
- package/dist/bus-BZ0GldpT.js.map +0 -1
- package/dist/bus-VWlmM5xs.cjs +0 -2
- package/dist/bus-VWlmM5xs.cjs.map +0 -1
- package/dist/console-BPZCuSLc.cjs.map +0 -1
- package/dist/console-BeCF7n59.js.map +0 -1
- package/dist/constants-DqKJH_MP.cjs +0 -2
- package/dist/constants-DqKJH_MP.cjs.map +0 -1
- package/dist/constants-zyrqveN4.js +0 -304
- package/dist/constants-zyrqveN4.js.map +0 -1
- package/dist/deadline-BOjOxNHj.js.map +0 -1
- package/dist/deadline-XSnm95pg.cjs +0 -2
- package/dist/deadline-XSnm95pg.cjs.map +0 -1
- package/dist/debug-bundle-BzJNpbF0.cjs +0 -2
- package/dist/debug-bundle-BzJNpbF0.cjs.map +0 -1
- package/dist/debug-bundle-C7UkHZ-q.js.map +0 -1
- package/dist/emergency-queue-CNTRui5t.cjs.map +0 -1
- package/dist/emergency-queue-Zy6lNafo.js.map +0 -1
- package/dist/errors-Dh7kef0i.js.map +0 -1
- package/dist/errors-tfEr48bS.cjs.map +0 -1
- package/dist/factory-BonqI3NL.js.map +0 -1
- package/dist/factory-CJXVYp0R.cjs.map +0 -1
- package/dist/identity-Cxgj6pZX.cjs.map +0 -1
- package/dist/identity-DT5VmvXy.js.map +0 -1
- package/dist/indexeddb-storage-BJVtiQKm.js.map +0 -1
- package/dist/indexeddb-storage-CIoW21Xd.cjs.map +0 -1
- package/dist/interactions-DTgKy_6K.js.map +0 -1
- package/dist/interactions-fEN6FbVo.cjs.map +0 -1
- package/dist/journey-CuJrHzEg.js.map +0 -1
- package/dist/journey-pffMVMfa.cjs +0 -2
- package/dist/journey-pffMVMfa.cjs.map +0 -1
- package/dist/library-console-C1m6g1BR.js.map +0 -1
- package/dist/library-console-D2GY9Or6.cjs.map +0 -1
- package/dist/library-request-1BX_UlaX.cjs.map +0 -1
- package/dist/library-request-BQBT9N9Q.js.map +0 -1
- package/dist/lifecycle-2EtUaRpo.cjs.map +0 -1
- package/dist/lifecycle-BaKx_-32.js.map +0 -1
- package/dist/log-record-CAoGBBf3.js.map +0 -1
- package/dist/log-record-i9zOTkpQ.cjs.map +0 -1
- package/dist/long-frames-BVg4i5SC.cjs +0 -2
- package/dist/long-frames-BVg4i5SC.cjs.map +0 -1
- package/dist/long-frames-Czk7IupC.js.map +0 -1
- package/dist/network-DBNwApoF.js.map +0 -1
- package/dist/network-xbbuvG_6.cjs.map +0 -1
- package/dist/otlp-BDvFrLnc.cjs +0 -2
- package/dist/otlp-BDvFrLnc.cjs.map +0 -1
- package/dist/otlp-BTJdIa6F.js.map +0 -1
- package/dist/platform-C2Ez5kDc.cjs.map +0 -1
- package/dist/platform-DkcuXwe-.js.map +0 -1
- package/dist/remote-rules-Cfb4K-Nl.js.map +0 -1
- package/dist/remote-rules-vzvk7aKf.cjs.map +0 -1
- package/dist/reports-Dk2YhKIh.cjs.map +0 -1
- package/dist/reports-TA-zInnq.js.map +0 -1
- package/dist/resource-timing-BLv3EA2A.js.map +0 -1
- package/dist/resource-timing-Cysw1S1f.cjs.map +0 -1
- package/dist/sampling-C4VV-1MS.js.map +0 -1
- package/dist/sampling-Ckh2yW9k.cjs.map +0 -1
- package/dist/sanitize-6ymPlVvP.js.map +0 -1
- package/dist/sanitize-BAWzkZt0.cjs.map +0 -1
- package/dist/select-ZF4by-lF.cjs.map +0 -1
- package/dist/select-xtQaenIi.js.map +0 -1
- package/dist/sender-CiMHC9YG.js.map +0 -1
- package/dist/sender-D5wBoXA8.cjs +0 -2
- package/dist/sender-D5wBoXA8.cjs.map +0 -1
- package/dist/storm-CYi9Swpx.cjs.map +0 -1
- package/dist/storm-VR024_QN.js.map +0 -1
- package/dist/unclean-exit-CwcUhFOn.js.map +0 -1
- package/dist/unclean-exit-DFUN57wY.cjs.map +0 -1
- package/dist/user-timing-C9kfRq3J.cjs +0 -2
- package/dist/user-timing-C9kfRq3J.cjs.map +0 -1
- package/dist/user-timing-_jZIhDKI.js.map +0 -1
- package/dist/web-socket-BWUoqBh8.cjs.map +0 -1
- package/dist/web-socket-CV7yIMnm.js.map +0 -1
- package/dist/web-vitals-Bq4WFHQo.js +0 -52
- package/dist/web-vitals-Bq4WFHQo.js.map +0 -1
- package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
- package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
- package/dist/worker-protocol-Bai7GAIA.cjs.map +0 -1
- package/dist/worker-protocol-CrsdSDLn.js.map +0 -1
- package/dist/worker-server-BrIYkfoa.cjs +0 -2
- package/dist/worker-server-BrIYkfoa.cjs.map +0 -1
- package/dist/worker-transport-Bwej4N2e.cjs +0 -2
- package/dist/worker-transport-Bwej4N2e.cjs.map +0 -1
- package/dist/worker-transport-D6jtgpqN.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { Cn as e, D as t, Dt as n, En as r, F as i, Ft as a, G as o, Gn as s, Gt as c, I as l, In as u, J as d, Jn as f, K as p, Kn as m, L as h, Mn as ee, N as g, Nn as _, Nt as v, Pt as y, Qn as te, Sn as ne, Tt as b, U as re, Un as ie, W as ae, Wn as oe, X as se, Zn as ce, _ as le, _n as ue, _t as de, a as fe, bn as pe, c as x, d as me, dn as he, er as ge, f as S, fn as _e, g as ve, gn as ye, h as be, hn as xe, ln as Se, m as Ce, mn as we, nn as Te, nr as Ee, o as De, p as Oe, pn as ke, q as Ae, qn as je, s as Me, tn as Ne, tr as Pe, u as Fe, un as Ie, v as Le, vn as Re, wn as ze, wt as Be, xn as Ve, y as He, yn as Ue } from "./constants-Bwl_YtQi.js";
|
|
2
|
+
import { n as We, r as Ge, t as Ke } from "./log-record-DIA6McNr.js";
|
|
3
|
+
import { n as qe, r as Je, t as Ye } from "./error-like-B11pB4aL.js";
|
|
4
|
+
import { t as C } from "./guards-Cidk71ME.js";
|
|
5
|
+
import { t as Xe } from "./unref-DgHPQeWv.js";
|
|
6
|
+
import { i as w, n as Ze, t as Qe } from "./platform-CVewe4wQ.js";
|
|
7
|
+
import { t as T } from "./profiler-BVWIOgnq.js";
|
|
8
|
+
import { n as E, t as $e } from "./library-console-Dl_Ly6DQ.js";
|
|
9
|
+
import { i as et, n as tt, r as D } from "./sanitize-CNmsD9r3.js";
|
|
10
|
+
import { a as nt, i as O, n as rt, o as it, r as at, s as ot, t as st } from "./identity-BrQp_5J5.js";
|
|
11
|
+
import { r as ct } from "./library-request-nI6pvI6I.js";
|
|
12
|
+
import { r as lt, t as ut } from "./batch-BjQUwjA6.js";
|
|
13
|
+
import { n as dt, t as ft } from "./journey-35yCMNFo.js";
|
|
14
|
+
import { a as pt, i as mt, n as ht, o as gt } from "./sampling-UUDbi3K0.js";
|
|
14
15
|
// src/utils/timer.ts
|
|
15
|
-
function
|
|
16
|
+
function _t(e) {
|
|
16
17
|
return Math.round((performance.now() - e) * se) / se;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function vt(e, t, n, r, i) {
|
|
19
20
|
e.logMetric(`${t}.duration`, n, "ms", "histogram", {
|
|
20
21
|
status: r,
|
|
21
22
|
...i
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
let a =
|
|
25
|
+
function yt(e, t, n, r, i) {
|
|
26
|
+
let a = _t(n);
|
|
26
27
|
e.error(`${t} failed`, r, {
|
|
27
28
|
"action.duration_ms": a,
|
|
28
29
|
status: "FAILURE",
|
|
29
30
|
...i
|
|
30
|
-
}),
|
|
31
|
+
}), vt(e, t, a, "FAILURE", i);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function bt(e, t, n, r) {
|
|
33
34
|
let i = performance.now();
|
|
34
35
|
try {
|
|
35
36
|
let a = n();
|
|
36
|
-
return
|
|
37
|
+
return vt(e, t, _t(i), "SUCCESS", r), a;
|
|
37
38
|
} catch (n) {
|
|
38
|
-
throw
|
|
39
|
+
throw yt(e, t, i, n, r), n;
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
|
-
async function
|
|
42
|
+
async function xt(e, t, n, r) {
|
|
42
43
|
let i = performance.now();
|
|
43
44
|
try {
|
|
44
45
|
let a = await n();
|
|
45
|
-
return
|
|
46
|
+
return vt(e, t, _t(i), "SUCCESS", r), a;
|
|
46
47
|
} catch (n) {
|
|
47
|
-
throw
|
|
48
|
+
throw yt(e, t, i, n, r), n;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
// src/core/deferred.ts
|
|
51
|
-
var
|
|
52
|
-
function
|
|
52
|
+
var k = /* @__PURE__ */ new WeakMap();
|
|
53
|
+
function St(e) {
|
|
53
54
|
let t = e.idle;
|
|
54
55
|
t !== void 0 && (e.diagnostics.guard("pipeline.crashed", "The idle callback could not be cancelled.", () => {
|
|
55
56
|
cancelIdleCallback(t);
|
|
56
57
|
}), e.idle = void 0), clearTimeout(e.timer), e.timer = void 0;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function Ct(e, t) {
|
|
59
60
|
typeof requestIdleCallback == "function" && typeof cancelIdleCallback == "function" && (t.idle = t.diagnostics.guard("pipeline.crashed", "The idle callback could not be scheduled.", () => requestIdleCallback((n) => {
|
|
60
|
-
|
|
61
|
-
}, { timeout:
|
|
62
|
-
|
|
63
|
-
}, 0),
|
|
64
|
-
}
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
67
|
-
|
|
61
|
+
A(e, t, n);
|
|
62
|
+
}, { timeout: o })), t.idle !== void 0) || (t.timer = setTimeout(() => {
|
|
63
|
+
A(e, t);
|
|
64
|
+
}, 0), Xe(t.timer));
|
|
65
|
+
}
|
|
66
|
+
function A(e, t, n) {
|
|
67
|
+
if (k.get(e) !== t || t.draining) return;
|
|
68
|
+
St(t), t.draining = !0;
|
|
68
69
|
let r = t.work;
|
|
69
70
|
t.work = [];
|
|
70
71
|
let i = 0;
|
|
71
|
-
for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++,
|
|
72
|
-
t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ?
|
|
72
|
+
for (; i < r.length && (!n || n.didTimeout && i === 0 || n.timeRemaining() > 0);) if (t.diagnostics.guard("pipeline.crashed", "The library could not build a deferred record.", r[i]), i++, k.get(e) !== t) return;
|
|
73
|
+
t.work = [...r.slice(i), ...t.work], t.draining = !1, t.work.length > 0 ? Ct(e, t) : k.delete(e);
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
-
let i =
|
|
76
|
-
if (i && i.work.length >= a && !i.draining && (
|
|
75
|
+
function wt(e, t, n, r) {
|
|
76
|
+
let i = k.get(e), a = r > 0 ? Math.min(r, p) : p;
|
|
77
|
+
if (i && i.work.length >= a && !i.draining && (A(e, i), i = k.get(e)), i) {
|
|
77
78
|
if (i.work.length >= a) {
|
|
78
79
|
n.count("record.dropped_by_ceiling");
|
|
79
80
|
return;
|
|
@@ -83,29 +84,29 @@ function yt(e, t, n, r) {
|
|
|
83
84
|
work: [t],
|
|
84
85
|
diagnostics: n,
|
|
85
86
|
draining: !1
|
|
86
|
-
},
|
|
87
|
+
}, k.set(e, i), Ct(e, i);
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
let t =
|
|
90
|
-
t &&
|
|
89
|
+
function j(e) {
|
|
90
|
+
let t = k.get(e);
|
|
91
|
+
t && A(e, t);
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
let t =
|
|
93
|
+
function Tt(e) {
|
|
94
|
+
let t = k.get(e);
|
|
94
95
|
if (t) {
|
|
95
|
-
|
|
96
|
+
St(t), k.delete(e);
|
|
96
97
|
for (let e of t.work) t.diagnostics.count("record.dropped_by_ceiling");
|
|
97
98
|
t.work = [];
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
// src/core/logger.ts
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
var Et = [
|
|
103
|
+
g,
|
|
104
|
+
u,
|
|
105
|
+
Ae
|
|
105
106
|
];
|
|
106
|
-
function
|
|
107
|
+
function Dt(e, t) {
|
|
107
108
|
let n = t.guard("record.sanitize_failed", "The library could not read the error reason.", () => {
|
|
108
|
-
if (!(e instanceof Error) && !
|
|
109
|
+
if (!(e instanceof Error) && !Je(e)) return;
|
|
109
110
|
let t = Error(e.message);
|
|
110
111
|
return t.name = e.name, t.stack = e.stack, t;
|
|
111
112
|
});
|
|
@@ -113,38 +114,38 @@ function St(e, t) {
|
|
|
113
114
|
let r = t.guard("record.sanitize_failed", "The library could not convert the error reason to text.", () => String(e));
|
|
114
115
|
return Error(r ?? typeof e);
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
+
function Ot(e, t, n) {
|
|
117
118
|
return n.guard("record.sanitize_failed", "The library could not read the error reason.", () => e instanceof Error ? e : t) ?? t;
|
|
118
119
|
}
|
|
119
|
-
function
|
|
120
|
+
function kt(e, t) {
|
|
120
121
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e == "symbol") return e;
|
|
121
122
|
if (typeof e == "object" && e) return t.guard("record.sanitize_failed", "The library could not read the properties of the error reason.", () => {
|
|
122
|
-
let t = e, n =
|
|
123
|
+
let t = e, n = Je(e), r = {}, i = 0;
|
|
123
124
|
for (let e of Object.keys(t)) {
|
|
124
125
|
let a = t[e];
|
|
125
|
-
n &&
|
|
126
|
+
n && Ye.has(e) || !qe(a) || (r[e] = a, i++);
|
|
126
127
|
}
|
|
127
128
|
return i === 0 ? void 0 : r;
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
if (!
|
|
131
|
+
function At(e) {
|
|
132
|
+
if (!C(e) || e instanceof Error) return !1;
|
|
132
133
|
let t = Object.getPrototypeOf(e);
|
|
133
134
|
return t === null || Object.getPrototypeOf(t) === null;
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
136
|
+
function jt(e) {
|
|
137
|
+
return Et.some((t) => e === t || e.startsWith(`${t}.`)) ? "system" : "log";
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function M(e, t) {
|
|
139
140
|
return e === void 0 ? {} : t.guard("record.sanitize_failed", "The library could not read the payload.", () => ({ ...e })) ?? { "uiobs.sanitize_failed": !0 };
|
|
140
141
|
}
|
|
141
|
-
var
|
|
142
|
+
var N = class e {
|
|
142
143
|
bind;
|
|
143
144
|
namespace;
|
|
144
145
|
options;
|
|
145
146
|
levelType;
|
|
146
147
|
constructor(e, t, n = {}) {
|
|
147
|
-
this.bind = e, this.namespace = t, this.options = n, this.levelType =
|
|
148
|
+
this.bind = e, this.namespace = t, this.options = n, this.levelType = jt(t);
|
|
148
149
|
}
|
|
149
150
|
child(t, n = {}) {
|
|
150
151
|
return new e(this.bind, `${this.namespace}.${t}`, { scopedContext: {
|
|
@@ -183,7 +184,7 @@ var F = class e {
|
|
|
183
184
|
}
|
|
184
185
|
let a = this.bind();
|
|
185
186
|
this.submit(a, "INFO", "metric", (o) => {
|
|
186
|
-
let s =
|
|
187
|
+
let s = M(i, a.diagnostics), c = {
|
|
187
188
|
...s,
|
|
188
189
|
"metric.name": e,
|
|
189
190
|
"metric.value": t,
|
|
@@ -194,8 +195,8 @@ var F = class e {
|
|
|
194
195
|
this.writeNow(a, "INFO", "metric", e, c, !0, o);
|
|
195
196
|
});
|
|
196
197
|
};
|
|
197
|
-
timeSync = (e, t, n) =>
|
|
198
|
-
timeAsync = (e, t, n) =>
|
|
198
|
+
timeSync = (e, t, n) => bt(this, e, t, n);
|
|
199
|
+
timeAsync = (e, t, n) => xt(this, e, t, n);
|
|
199
200
|
write(e, t, n, r) {
|
|
200
201
|
let i = this.bind();
|
|
201
202
|
this.submit(i, e, t, (a) => {
|
|
@@ -208,13 +209,13 @@ var F = class e {
|
|
|
208
209
|
else if (e.config.payloadMode === "defer" && e.config.enabled && !e.config.debugBuffer.enabled && this.namespace !== "uiobs.diagnostics") {
|
|
209
210
|
if (!e.builder.isEnabled(t, this.namespace, n) && !this.mirrors(e, t)) return;
|
|
210
211
|
let i = e.journey.current(), a = {
|
|
211
|
-
timeUnixNano:
|
|
212
|
+
timeUnixNano: Ge(),
|
|
212
213
|
trace: e.tracing.resolve(),
|
|
213
214
|
journey: i ? { ...i } : null,
|
|
214
215
|
context: e.context.getAll(),
|
|
215
|
-
url:
|
|
216
|
+
url: Qe(e.diagnostics)
|
|
216
217
|
};
|
|
217
|
-
|
|
218
|
+
wt(e, () => {
|
|
218
219
|
r(a);
|
|
219
220
|
}, e.diagnostics, e.config.buffering.maxPendingRecords);
|
|
220
221
|
} else r();
|
|
@@ -232,7 +233,7 @@ var F = class e {
|
|
|
232
233
|
body: r,
|
|
233
234
|
namespace: this.namespace,
|
|
234
235
|
scoped: this.options.scopedContext,
|
|
235
|
-
payload: a ? i :
|
|
236
|
+
payload: a ? i : M(i, e.diagnostics)
|
|
236
237
|
}, { record: c, dropped: l } = e.builder.build(s), u = !!e.config.redact || e.config.processors.length > 0, d = n !== "metric" && e.config.capturePolicy.breadcrumbs > 0, f = l === "sampling" && u && d ? e.builder.build(s, !0) : void 0, p = c ?? f?.record ?? null, m = p ? p.body : l === "sampling" && !u ? r : void 0;
|
|
237
238
|
d && m !== void 0 && e.breadcrumbs.push({
|
|
238
239
|
t: o ? Number(o.timeUnixNano.slice(0, -6)) : Date.now(),
|
|
@@ -249,12 +250,12 @@ var F = class e {
|
|
|
249
250
|
writeErrorNow(e, t, n, r, i, a) {
|
|
250
251
|
let o = e.builder.isEnabled(t, this.namespace);
|
|
251
252
|
if (!o && !this.mirrors(e, t)) return;
|
|
252
|
-
let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () =>
|
|
253
|
+
let s = i === void 0 && (e.diagnostics.guard("record.sanitize_failed", "The library could not read the error slot.", () => At(r)) ?? !1), c = s ? r : i, l = s ? void 0 : r, u = l === void 0 ? void 0 : Dt(l, e.diagnostics), d = u === void 0 ? void 0 : Ot(l, u, e.diagnostics);
|
|
253
254
|
if (!o) {
|
|
254
255
|
this.print(e, t, n, c, d, null, void 0, a);
|
|
255
256
|
return;
|
|
256
257
|
}
|
|
257
|
-
let f = u ?
|
|
258
|
+
let f = u ? kt(l, e.diagnostics) : void 0, { record: p, dropped: m } = e.builder.build({
|
|
258
259
|
snapshot: a,
|
|
259
260
|
level: t,
|
|
260
261
|
type: this.levelType,
|
|
@@ -262,14 +263,14 @@ var F = class e {
|
|
|
262
263
|
namespace: this.namespace,
|
|
263
264
|
scoped: this.options.scopedContext,
|
|
264
265
|
payload: {
|
|
265
|
-
...
|
|
266
|
+
...M(c, e.diagnostics),
|
|
266
267
|
...u ? {
|
|
267
268
|
"error.type": u.name,
|
|
268
269
|
"error.message": u.message,
|
|
269
270
|
"error.stack_trace": u.stack
|
|
270
271
|
} : {},
|
|
271
272
|
...f === void 0 ? {} : { [me]: f },
|
|
272
|
-
[
|
|
273
|
+
[x]: e.breadcrumbs.snapshot()
|
|
273
274
|
}
|
|
274
275
|
});
|
|
275
276
|
this.print(e, t, n, c, d, p, m, a), e.emit(p);
|
|
@@ -292,7 +293,7 @@ var F = class e {
|
|
|
292
293
|
namespace: this.namespace,
|
|
293
294
|
scoped: this.options.scopedContext,
|
|
294
295
|
payload: {
|
|
295
|
-
...
|
|
296
|
+
...M(r, e.diagnostics),
|
|
296
297
|
...i ? {
|
|
297
298
|
"error.type": i.name,
|
|
298
299
|
"error.message": i.message,
|
|
@@ -305,33 +306,33 @@ var F = class e {
|
|
|
305
306
|
mirrors(e, t) {
|
|
306
307
|
return e.config.enabled && e.console.accepts(t);
|
|
307
308
|
}
|
|
308
|
-
},
|
|
309
|
+
}, Mt = "overflow", Nt = /* @__PURE__ */ new Set([
|
|
309
310
|
ve,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
be,
|
|
312
|
+
fe,
|
|
313
|
+
Le,
|
|
314
|
+
S,
|
|
315
|
+
Oe,
|
|
315
316
|
Ce
|
|
316
317
|
]);
|
|
317
|
-
function
|
|
318
|
+
function Pt(e = {}) {
|
|
318
319
|
let t = {};
|
|
319
320
|
for (let n of Object.keys(e).sort()) {
|
|
320
|
-
if (n.startsWith("metric.") ||
|
|
321
|
+
if (n.startsWith("metric.") || Nt.has(n)) continue;
|
|
321
322
|
let r = e[n];
|
|
322
323
|
(typeof r == "string" || typeof r == "boolean" || typeof r == "number" && Number.isFinite(r)) && (t[n] = r);
|
|
323
324
|
}
|
|
324
325
|
return t;
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function Ft(e, t) {
|
|
327
328
|
if (!Array.isArray(e)) return null;
|
|
328
329
|
let n = t === 0 ? e.length : Math.min(e.length, t + 1);
|
|
329
330
|
return Array.from({ length: n }, (t, n) => e[n]);
|
|
330
331
|
}
|
|
331
|
-
function
|
|
332
|
+
function It(e, t) {
|
|
332
333
|
return Array.isArray(e) && (t === 0 || e.length <= t) && e.every((t, n) => typeof t == "number" && Number.isFinite(t) && (n === 0 || t > e[n - 1]));
|
|
333
334
|
}
|
|
334
|
-
function
|
|
335
|
+
function Lt(e, t, n) {
|
|
335
336
|
let r = {
|
|
336
337
|
"metric.name": e.name,
|
|
337
338
|
"metric.unit": e.unit,
|
|
@@ -349,29 +350,42 @@ function Mt(e, t, n) {
|
|
|
349
350
|
[y.buckets]: t.buckets
|
|
350
351
|
};
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
-
|
|
353
|
+
function Rt(e, t) {
|
|
354
|
+
try {
|
|
355
|
+
return {
|
|
356
|
+
unit: e.unit,
|
|
357
|
+
boundaries: e.boundaries
|
|
358
|
+
};
|
|
359
|
+
} catch (e) {
|
|
360
|
+
return t(e), {
|
|
361
|
+
unit: void 0,
|
|
362
|
+
boundaries: void 0
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function zt(e, t, n, r) {
|
|
367
|
+
let i = {
|
|
354
368
|
name: e,
|
|
355
369
|
kind: "counter",
|
|
356
|
-
unit: t.unit ?? "count",
|
|
370
|
+
unit: Rt(t, r).unit ?? "count",
|
|
357
371
|
boundaries: []
|
|
358
372
|
};
|
|
359
373
|
return { add: (e, t) => {
|
|
360
|
-
n(
|
|
374
|
+
n(i, e, t);
|
|
361
375
|
} };
|
|
362
376
|
}
|
|
363
|
-
function
|
|
364
|
-
let r = {
|
|
377
|
+
function Bt(e, t, n, r) {
|
|
378
|
+
let { unit: i, boundaries: a } = Rt(t, r), o = {
|
|
365
379
|
name: e,
|
|
366
380
|
kind: "histogram",
|
|
367
|
-
unit:
|
|
368
|
-
boundaries:
|
|
381
|
+
unit: i ?? "count",
|
|
382
|
+
boundaries: a ?? v
|
|
369
383
|
};
|
|
370
384
|
return { record: (e, t) => {
|
|
371
|
-
n(
|
|
385
|
+
n(o, e, t);
|
|
372
386
|
} };
|
|
373
387
|
}
|
|
374
|
-
var
|
|
388
|
+
var Vt = class {
|
|
375
389
|
intervalMs;
|
|
376
390
|
emit;
|
|
377
391
|
diagnostics;
|
|
@@ -389,25 +403,25 @@ var Ft = class {
|
|
|
389
403
|
record(e, t, n) {
|
|
390
404
|
!Number.isFinite(t) || e.kind === "counter" && t < 0 ? this.diagnostics.report("record.dropped_malformed", `The value of the metric ${e.name} is not valid. The library dropped it.`, { "metric.name": e.name }) : this.diagnostics.guard("record.sanitize_failed", `The library could not read the attributes of the metric ${e.name}.`, () => {
|
|
391
405
|
let r = this.instrumentOf(e);
|
|
392
|
-
r && (this.add(r, t,
|
|
406
|
+
r && (this.add(r, t, Pt(n)), this.arm());
|
|
393
407
|
});
|
|
394
408
|
}
|
|
395
409
|
collect() {
|
|
396
410
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
397
411
|
let e = `${String(this.startedAt)}000000`, t = [...this.instruments.values()];
|
|
398
412
|
this.instruments.clear();
|
|
399
|
-
for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes,
|
|
413
|
+
for (let { def: n, series: r } of t) for (let t of r.values()) this.emit(n.name, t.attributes, Lt(n, t, e));
|
|
400
414
|
}
|
|
401
415
|
instrumentOf(e) {
|
|
402
416
|
let t = this.instruments.get(e.name);
|
|
403
417
|
if (t) return t.def.kind === e.kind ? t : (this.diagnostics.report("record.dropped_malformed", `The metric ${e.name} is a counter and a histogram. The library dropped the value.`, { "metric.name": e.name }), null);
|
|
404
418
|
if (this.policy.maxInstruments && this.instruments.size >= this.policy.maxInstruments) return this.diagnostics.count("record.dropped_by_ceiling"), null;
|
|
405
|
-
let n =
|
|
419
|
+
let n = Ft(e.boundaries, this.policy.maxHistogramBoundaries), r = It(n, this.policy.maxHistogramBoundaries);
|
|
406
420
|
e.kind === "histogram" && !r && this.diagnostics.report("config.invalid", `The boundaries of the metric ${e.name} must meet metrics.maxHistogramBoundaries and contain finite numbers in ascending order. The library uses the default boundaries.`);
|
|
407
421
|
let i = {
|
|
408
422
|
def: {
|
|
409
423
|
...e,
|
|
410
|
-
boundaries: r ? n : [...
|
|
424
|
+
boundaries: r ? n : [...v]
|
|
411
425
|
},
|
|
412
426
|
series: /* @__PURE__ */ new Map()
|
|
413
427
|
};
|
|
@@ -415,7 +429,7 @@ var Ft = class {
|
|
|
415
429
|
}
|
|
416
430
|
add(e, t, n) {
|
|
417
431
|
let r = JSON.stringify(n), i = e.series.get(r), a = n;
|
|
418
|
-
if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r =
|
|
432
|
+
if (!i && this.policy.maxSeries > 0 && e.series.size >= this.policy.maxSeries && (r = Mt, i = e.series.get(r), a = { [le]: !0 }), !i) {
|
|
419
433
|
let n = e.def.kind === "histogram" ? e.def.boundaries.length + 1 : 0, o = Array(n).fill(0);
|
|
420
434
|
i = {
|
|
421
435
|
attributes: a,
|
|
@@ -434,81 +448,81 @@ var Ft = class {
|
|
|
434
448
|
arm() {
|
|
435
449
|
this.timer === null && (this.startedAt = Date.now(), this.timer = setTimeout(() => {
|
|
436
450
|
this.collect();
|
|
437
|
-
}, this.intervalMs()),
|
|
451
|
+
}, this.intervalMs()), Xe(this.timer));
|
|
438
452
|
}
|
|
439
|
-
},
|
|
453
|
+
}, Ht = {
|
|
440
454
|
TRACE: "debug",
|
|
441
455
|
DEBUG: "debug",
|
|
442
456
|
INFO: "info",
|
|
443
457
|
WARN: "warn",
|
|
444
458
|
ERROR: "error",
|
|
445
459
|
FATAL: "error"
|
|
446
|
-
},
|
|
460
|
+
}, Ut = class {
|
|
447
461
|
settings;
|
|
448
462
|
diagnostics;
|
|
449
463
|
limits;
|
|
450
|
-
constructor(e, t, n =
|
|
464
|
+
constructor(e, t, n = Ne) {
|
|
451
465
|
this.settings = e, this.diagnostics = t, this.limits = n;
|
|
452
466
|
}
|
|
453
467
|
update(e) {
|
|
454
468
|
this.settings = e;
|
|
455
469
|
}
|
|
456
470
|
accepts(e) {
|
|
457
|
-
return this.settings.level === null || !Object.hasOwn(
|
|
471
|
+
return this.settings.level === null || !Object.hasOwn(b, this.settings.level) ? !1 : b[e] >= b[this.settings.level];
|
|
458
472
|
}
|
|
459
473
|
write(e, t, n, r, i) {
|
|
460
|
-
if (!this.accepts(t) || typeof console > "u" ||
|
|
461
|
-
let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s =
|
|
474
|
+
if (!this.accepts(t) || typeof console > "u" || $e()) return;
|
|
475
|
+
let a = `%c[%s]%c[${t}]%c`, { styles: o } = this.settings, s = Ht[t];
|
|
462
476
|
this.diagnostics.guard("handler.threw", `The library could not print to console.${s}.`, () => {
|
|
463
477
|
let c = [];
|
|
464
|
-
i !== void 0 && c.push(i), r !== void 0 && c.push(
|
|
478
|
+
i !== void 0 && c.push(i), r !== void 0 && c.push(tt(r, this.limits, this.diagnostics)), E(() => {
|
|
465
479
|
console[s](a, o.namespace, e, o[t], "", n, ...c);
|
|
466
480
|
});
|
|
467
481
|
});
|
|
468
482
|
}
|
|
469
|
-
},
|
|
483
|
+
}, Wt = class {
|
|
470
484
|
value = 0;
|
|
471
485
|
next() {
|
|
472
486
|
return ++this.value;
|
|
473
487
|
}
|
|
474
|
-
},
|
|
475
|
-
function
|
|
476
|
-
return
|
|
488
|
+
}, Gt = /^[0-9a-f]{32}$/, Kt = /^[0-9a-f]{16}$/, qt = /[1-9a-f]/;
|
|
489
|
+
function Jt(e) {
|
|
490
|
+
return Gt.test(e.traceId) && qt.test(e.traceId) && Kt.test(e.spanId) && qt.test(e.spanId);
|
|
477
491
|
}
|
|
478
|
-
function
|
|
479
|
-
return
|
|
492
|
+
function Yt() {
|
|
493
|
+
return it(16);
|
|
480
494
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
495
|
+
function Xt() {
|
|
496
|
+
return it(8);
|
|
483
497
|
}
|
|
484
|
-
function
|
|
498
|
+
function Zt(e) {
|
|
485
499
|
return {
|
|
486
|
-
traceId:
|
|
487
|
-
spanId:
|
|
500
|
+
traceId: Yt(),
|
|
501
|
+
spanId: Xt(),
|
|
488
502
|
traceFlags: 1,
|
|
489
503
|
startedAt: Date.now(),
|
|
490
504
|
reason: e,
|
|
491
505
|
ended: !1
|
|
492
506
|
};
|
|
493
507
|
}
|
|
494
|
-
function
|
|
508
|
+
function Qt(e, t, n) {
|
|
495
509
|
return `00-${e}-${t}-${(n & 255).toString(16).padStart(2, "0")}`;
|
|
496
510
|
}
|
|
497
|
-
function
|
|
511
|
+
function $t(e) {
|
|
498
512
|
return {
|
|
499
513
|
traceId: e.traceId,
|
|
500
514
|
spanId: e.spanId,
|
|
501
515
|
traceFlags: e.traceFlags
|
|
502
516
|
};
|
|
503
517
|
}
|
|
504
|
-
var
|
|
518
|
+
var en = class {
|
|
505
519
|
diagnostics;
|
|
506
520
|
maxAgeMs;
|
|
507
521
|
load;
|
|
508
522
|
spans;
|
|
509
|
-
ambient =
|
|
523
|
+
ambient = Zt("start");
|
|
510
524
|
otel;
|
|
511
|
-
constructor(e, t =
|
|
525
|
+
constructor(e, t = je, n, r) {
|
|
512
526
|
this.diagnostics = e, this.maxAgeMs = t, this.load = n, this.spans = r;
|
|
513
527
|
}
|
|
514
528
|
async loadOtel() {
|
|
@@ -522,7 +536,7 @@ var Jt = class {
|
|
|
522
536
|
return this.activeSpanContext() ?? this.ambientContext();
|
|
523
537
|
}
|
|
524
538
|
ambientContext() {
|
|
525
|
-
return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"),
|
|
539
|
+
return Date.now() - this.ambient.startedAt > this.maxAgeMs && this.rotate("maxAge"), $t(this.ambient);
|
|
526
540
|
}
|
|
527
541
|
activeSpanContext() {
|
|
528
542
|
let e = this.otel;
|
|
@@ -530,7 +544,7 @@ var Jt = class {
|
|
|
530
544
|
let t = e.trace.getActiveSpan();
|
|
531
545
|
if (t === void 0) return;
|
|
532
546
|
let n = t.spanContext();
|
|
533
|
-
if (
|
|
547
|
+
if (Jt(n)) return {
|
|
534
548
|
traceId: n.traceId,
|
|
535
549
|
spanId: n.spanId,
|
|
536
550
|
traceFlags: n.traceFlags
|
|
@@ -539,8 +553,8 @@ var Jt = class {
|
|
|
539
553
|
}
|
|
540
554
|
rotate(e) {
|
|
541
555
|
let t = this.ambient;
|
|
542
|
-
this.ambient =
|
|
543
|
-
let n =
|
|
556
|
+
this.ambient = Zt(e);
|
|
557
|
+
let n = $t(this.ambient);
|
|
544
558
|
return this.finish(t), n;
|
|
545
559
|
}
|
|
546
560
|
end() {
|
|
@@ -567,9 +581,9 @@ var Jt = class {
|
|
|
567
581
|
n.propagation.inject(n.context.active(), t);
|
|
568
582
|
}), t.traceparent) return { headers: t };
|
|
569
583
|
let r = this.activeSpanContext(), i = r ?? this.ambientContext(), a = r ? void 0 : this.spans;
|
|
570
|
-
if (!a?.enabled()) return t[
|
|
571
|
-
let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ?
|
|
572
|
-
return t[
|
|
584
|
+
if (!a?.enabled()) return t[m] = Qt(i.traceId, i.spanId, i.traceFlags), { headers: t };
|
|
585
|
+
let o = a.keeps(i.traceId), s = o ? i.traceFlags : i.traceFlags & -2, c = e ? Xt() : i.spanId;
|
|
586
|
+
return t[m] = Qt(i.traceId, c, s), !e || !o ? { headers: t } : {
|
|
573
587
|
headers: t,
|
|
574
588
|
span: {
|
|
575
589
|
traceId: i.traceId,
|
|
@@ -578,7 +592,7 @@ var Jt = class {
|
|
|
578
592
|
}
|
|
579
593
|
};
|
|
580
594
|
}
|
|
581
|
-
},
|
|
595
|
+
}, tn = class {
|
|
582
596
|
buffer;
|
|
583
597
|
pointer = 0;
|
|
584
598
|
filled = !1;
|
|
@@ -599,45 +613,45 @@ var Jt = class {
|
|
|
599
613
|
snapshot() {
|
|
600
614
|
return (this.filled ? [...this.buffer.slice(this.pointer), ...this.buffer.slice(0, this.pointer)] : this.buffer.slice(0, this.pointer)).filter((e) => e !== void 0);
|
|
601
615
|
}
|
|
602
|
-
},
|
|
616
|
+
}, nn = Object.keys(b), rn = ["gzip", "none"], an = [
|
|
603
617
|
"omit",
|
|
604
618
|
"same-origin",
|
|
605
619
|
"include"
|
|
606
|
-
],
|
|
620
|
+
], on = [
|
|
607
621
|
"auto",
|
|
608
622
|
"indexeddb",
|
|
609
623
|
"localstorage",
|
|
610
624
|
"memory",
|
|
611
625
|
"none"
|
|
612
|
-
],
|
|
626
|
+
], sn = ["storage", "memory"], cn = [
|
|
613
627
|
"auto",
|
|
614
628
|
"sender",
|
|
615
629
|
"forwarder",
|
|
616
630
|
"off"
|
|
617
|
-
],
|
|
631
|
+
], ln = [
|
|
618
632
|
"auto",
|
|
619
633
|
"provider",
|
|
620
634
|
"client"
|
|
621
|
-
],
|
|
635
|
+
], un = [
|
|
622
636
|
"auto",
|
|
623
637
|
"context",
|
|
624
638
|
"tab",
|
|
625
639
|
"origin"
|
|
626
|
-
],
|
|
640
|
+
], dn = [
|
|
627
641
|
"error",
|
|
628
642
|
"warn",
|
|
629
643
|
"info",
|
|
630
644
|
"log"
|
|
631
|
-
],
|
|
645
|
+
], fn = ["limited", "until-delivered"], pn = {
|
|
632
646
|
logFlushIntervalMs: [100, 6e4],
|
|
633
647
|
logBatchSize: [1, 1e3],
|
|
634
648
|
metricFlushIntervalMs: [100, 6e4],
|
|
635
649
|
metricBatchSize: [1, 1e3]
|
|
636
|
-
},
|
|
650
|
+
}, mn = {
|
|
637
651
|
maxBatches: [1, 5e3],
|
|
638
652
|
maxAgeMs: [6e4, 6048e5],
|
|
639
653
|
maxAttempts: [1, 20]
|
|
640
|
-
},
|
|
654
|
+
}, hn = {
|
|
641
655
|
maxBodyChars: [256, 65536],
|
|
642
656
|
maxAttributeChars: [256, 65536],
|
|
643
657
|
maxAttributeCount: [1, 1024],
|
|
@@ -645,42 +659,46 @@ var Jt = class {
|
|
|
645
659
|
maxDepth: [1, 16],
|
|
646
660
|
maxArrayLength: [1, 1e4],
|
|
647
661
|
maxNodes: [100, 1e5],
|
|
648
|
-
maxRecordBytes: [1024,
|
|
649
|
-
},
|
|
662
|
+
maxRecordBytes: [1024, t]
|
|
663
|
+
}, gn = [6e4, 864e5], P = [0, 2147483647], F = [0, 2 ** 53 - 1], _n = [1, 2 ** 53 - 1], vn = [100, 1e4], yn = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), bn = (e) => Array.isArray(e) && e.every((e) => typeof e == "function"), xn = (e) => e === null || typeof e == "function", Sn = (e) => xn(e) || Cn(e) && Object.values(e).every((e) => typeof e == "string"), Cn = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
664
|
+
function I(e, t) {
|
|
665
|
+
return (n, r, i, a) => r === void 0 ? i : e(r) ? r : (R(a, n, t, r, "the current value"), i);
|
|
666
|
+
}
|
|
667
|
+
var wn = {
|
|
650
668
|
capturePolicy: { ranges: {
|
|
651
669
|
breadcrumbs: [0, 1e6],
|
|
652
|
-
errorDedupeMs:
|
|
653
|
-
maxErrorSignatures:
|
|
654
|
-
errorsPerWindow:
|
|
655
|
-
consolePerWindow:
|
|
656
|
-
longFramesPerWindow:
|
|
657
|
-
webSocketPerWindow:
|
|
658
|
-
reportsPerWindow:
|
|
659
|
-
resourcesPerWindow:
|
|
660
|
-
lifecyclePerWindow:
|
|
661
|
-
windowMs:
|
|
662
|
-
errorCeiling:
|
|
670
|
+
errorDedupeMs: P,
|
|
671
|
+
maxErrorSignatures: F,
|
|
672
|
+
errorsPerWindow: F,
|
|
673
|
+
consolePerWindow: F,
|
|
674
|
+
longFramesPerWindow: F,
|
|
675
|
+
webSocketPerWindow: F,
|
|
676
|
+
reportsPerWindow: F,
|
|
677
|
+
resourcesPerWindow: F,
|
|
678
|
+
lifecyclePerWindow: F,
|
|
679
|
+
windowMs: P,
|
|
680
|
+
errorCeiling: F
|
|
663
681
|
} },
|
|
664
682
|
metadata: { ranges: {} },
|
|
665
683
|
persistence: { ranges: {} },
|
|
666
684
|
diagnostics: {
|
|
667
|
-
ranges: { throttleMs:
|
|
668
|
-
custom: { records:
|
|
685
|
+
ranges: { throttleMs: P },
|
|
686
|
+
custom: { records: Hn }
|
|
669
687
|
},
|
|
670
688
|
correlation: { ranges: {
|
|
671
|
-
sessionIdleMs:
|
|
672
|
-
sessionTouchMs:
|
|
673
|
-
traceMaxAgeMs:
|
|
689
|
+
sessionIdleMs: P,
|
|
690
|
+
sessionTouchMs: P,
|
|
691
|
+
traceMaxAgeMs: P
|
|
674
692
|
} },
|
|
675
693
|
metrics: { ranges: {
|
|
676
|
-
maxSeries:
|
|
677
|
-
maxInstruments:
|
|
678
|
-
maxHistogramBoundaries:
|
|
694
|
+
maxSeries: F,
|
|
695
|
+
maxInstruments: F,
|
|
696
|
+
maxHistogramBoundaries: F
|
|
679
697
|
} },
|
|
680
698
|
buffering: {
|
|
681
699
|
ranges: {
|
|
682
|
-
maxPendingRecords:
|
|
683
|
-
maxPendingBytes:
|
|
700
|
+
maxPendingRecords: F,
|
|
701
|
+
maxPendingBytes: F
|
|
684
702
|
},
|
|
685
703
|
choices: { overflow: [
|
|
686
704
|
"drop-oldest",
|
|
@@ -690,12 +708,12 @@ var Jt = class {
|
|
|
690
708
|
},
|
|
691
709
|
delivery: {
|
|
692
710
|
ranges: {
|
|
693
|
-
requestTimeoutMs: [1,
|
|
694
|
-
maxConcurrentRequests:
|
|
695
|
-
retryBaseDelayMs:
|
|
696
|
-
retryMaxDelayMs:
|
|
697
|
-
retryIdleDelayMs:
|
|
698
|
-
batchesPerDrain:
|
|
711
|
+
requestTimeoutMs: [1, P[1]],
|
|
712
|
+
maxConcurrentRequests: _n,
|
|
713
|
+
retryBaseDelayMs: P,
|
|
714
|
+
retryMaxDelayMs: P,
|
|
715
|
+
retryIdleDelayMs: P,
|
|
716
|
+
batchesPerDrain: _n
|
|
699
717
|
},
|
|
700
718
|
choices: { priority: [
|
|
701
719
|
"low",
|
|
@@ -705,9 +723,36 @@ var Jt = class {
|
|
|
705
723
|
},
|
|
706
724
|
debugBuffer: { ranges: {
|
|
707
725
|
maxRecords: [1, 1e4],
|
|
708
|
-
maxAgeMs:
|
|
709
|
-
} }
|
|
710
|
-
|
|
726
|
+
maxAgeMs: P
|
|
727
|
+
} },
|
|
728
|
+
profiler: { ranges: {
|
|
729
|
+
flushIntervalMs: [1e3, 6e5],
|
|
730
|
+
maxProbes: [1, c]
|
|
731
|
+
} },
|
|
732
|
+
replay: {
|
|
733
|
+
ranges: {
|
|
734
|
+
bufferMs: [5e3, 6e5],
|
|
735
|
+
maxBufferBytes: [1e5, 2e8],
|
|
736
|
+
afterErrorMs: [0, 6e5],
|
|
737
|
+
uploadsPerWindow: F,
|
|
738
|
+
batchSize: [1, 1e4],
|
|
739
|
+
batchBytes: [1e4, 1e7],
|
|
740
|
+
flushIntervalMs: [100, 6e4],
|
|
741
|
+
maxQueueBytes: [1e5, 2e8],
|
|
742
|
+
maxAttempts: [1, 10]
|
|
743
|
+
},
|
|
744
|
+
choices: { mode: ["onError"] },
|
|
745
|
+
custom: {
|
|
746
|
+
maskSelectors: I(yn, "a list of strings"),
|
|
747
|
+
blockSelectors: I(yn, "a list of strings"),
|
|
748
|
+
loader: I(xn, "a function or null"),
|
|
749
|
+
onSegment: I(xn, "a function or null"),
|
|
750
|
+
headers: I(Sn, "an object of strings, a function or null"),
|
|
751
|
+
plugins: I(bn, "a list of functions"),
|
|
752
|
+
recordOptions: I(Cn, "an object")
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}, Tn = [
|
|
711
756
|
"errors",
|
|
712
757
|
"rejections",
|
|
713
758
|
"resourceErrors",
|
|
@@ -724,123 +769,123 @@ var Jt = class {
|
|
|
724
769
|
"serverTiming",
|
|
725
770
|
"reports",
|
|
726
771
|
"lifecycle"
|
|
727
|
-
],
|
|
728
|
-
function
|
|
772
|
+
], En = "null", L = `a level name: ${Nn(nn)}`, Dn = `true, false or a list of ${Nn(dn)}`, On = "a list of strings and RegExp patterns", kn = "a list of origin URLs such as \"https://api.example\" and RegExp patterns", An = "a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame", jn = "a list of strings", Mn = "true, false or a list of diagnostic codes";
|
|
773
|
+
function Nn(e) {
|
|
729
774
|
let t = e.map((e) => `"${e}"`);
|
|
730
775
|
return `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
731
776
|
}
|
|
732
|
-
function
|
|
777
|
+
function Pn(e) {
|
|
733
778
|
return typeof e == "string" ? `"${e}"` : typeof e == "function" ? "a function" : typeof e == "object" && e ? "an object" : String(e);
|
|
734
779
|
}
|
|
735
|
-
function
|
|
736
|
-
e.report("config.invalid", `${t} must be ${n}. The value is ${
|
|
780
|
+
function R(e, t, n, r, i) {
|
|
781
|
+
e.report("config.invalid", `${t} must be ${n}. The value is ${Pn(r)}. The library keeps ${i}.`);
|
|
737
782
|
}
|
|
738
|
-
function
|
|
783
|
+
function z(e, t, n, r, i) {
|
|
739
784
|
if (t === void 0) return r;
|
|
740
785
|
let a = n.find((e) => e === t);
|
|
741
|
-
return a === void 0 ? (
|
|
786
|
+
return a === void 0 ? (R(i, e, Nn(n), t, `"${r}"`), r) : a;
|
|
742
787
|
}
|
|
743
|
-
function
|
|
744
|
-
return t === void 0 ? n : typeof t == "boolean" ? t : (
|
|
788
|
+
function B(e, t, n, r) {
|
|
789
|
+
return t === void 0 ? n : typeof t == "boolean" ? t : (R(r, e, "true or false", t, String(n)), n);
|
|
745
790
|
}
|
|
746
|
-
function
|
|
747
|
-
return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (
|
|
791
|
+
function Fn(e, t, n, r) {
|
|
792
|
+
return t === void 0 ? n : typeof t == "number" && Number.isFinite(t) && t >= 0 ? t : (R(r, e, "a finite number of 0 or more", t, String(n)), n);
|
|
748
793
|
}
|
|
749
|
-
function
|
|
794
|
+
function V(e, t, n, r, i) {
|
|
750
795
|
if (t === void 0) return r;
|
|
751
796
|
let [a, o] = n;
|
|
752
|
-
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (
|
|
797
|
+
return typeof t == "number" && Number.isInteger(t) && t >= a && t <= o ? t : (R(i, e, `an integer from ${String(a)} to ${String(o)}`, t, String(r)), r);
|
|
753
798
|
}
|
|
754
|
-
function
|
|
755
|
-
return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (
|
|
799
|
+
function In(e, t, n) {
|
|
800
|
+
return e === void 0 ? t : e === null ? null : typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : (R(n, "loggerCache.maxEntries", "a nonnegative safe integer or null", e, String(t)), t);
|
|
756
801
|
}
|
|
757
|
-
function
|
|
802
|
+
function Ln(e, t, n, r, i) {
|
|
758
803
|
let a = t ?? {}, o = Object.keys(r);
|
|
759
|
-
return Object.fromEntries(o.map((t) => [t,
|
|
804
|
+
return Object.fromEntries(o.map((t) => [t, V(`${e}.${t}`, a[t], r[t], n[t], i)]));
|
|
760
805
|
}
|
|
761
|
-
function
|
|
806
|
+
function H(e) {
|
|
762
807
|
if (typeof e != "string") return;
|
|
763
808
|
let t = e.toUpperCase();
|
|
764
|
-
return
|
|
809
|
+
return nn.find((e) => e === t);
|
|
765
810
|
}
|
|
766
|
-
function
|
|
811
|
+
function Rn(e, t, n, r) {
|
|
767
812
|
if (t === void 0) return n;
|
|
768
|
-
let i =
|
|
769
|
-
return i === void 0 ? (
|
|
813
|
+
let i = H(t);
|
|
814
|
+
return i === void 0 ? (R(r, e, L, t, `"${n}"`), n) : i;
|
|
770
815
|
}
|
|
771
|
-
function
|
|
816
|
+
function zn(e, t, n) {
|
|
772
817
|
if (e === void 0) return t;
|
|
773
|
-
if (!
|
|
818
|
+
if (!C(e)) return R(n, "minLevels", "an object of level names", e, "the current value"), t;
|
|
774
819
|
let r = [];
|
|
775
820
|
for (let [t, i] of Object.entries(e)) {
|
|
776
|
-
let e =
|
|
777
|
-
t !== "" && e !== void 0 ? r.push([t, e]) :
|
|
821
|
+
let e = H(i);
|
|
822
|
+
t !== "" && e !== void 0 ? r.push([t, e]) : R(n, `minLevels["${t}"]`, L, i, "minLevel for it");
|
|
778
823
|
}
|
|
779
824
|
return Object.fromEntries(r);
|
|
780
825
|
}
|
|
781
|
-
function
|
|
826
|
+
function U(e, t, n, r, i, a) {
|
|
782
827
|
if (t === void 0) return n;
|
|
783
|
-
if (!Array.isArray(t)) return
|
|
828
|
+
if (!Array.isArray(t)) return R(a, e, r, t, "the current list"), n;
|
|
784
829
|
let o = [], s = t;
|
|
785
830
|
for (let t of s) {
|
|
786
831
|
let n = i(t);
|
|
787
|
-
n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${
|
|
832
|
+
n === void 0 ? a.report("config.invalid", `The library ignores the ${e} entry ${Pn(t)}. ${e} must be ${r}.`) : o.push(n);
|
|
788
833
|
}
|
|
789
834
|
return o;
|
|
790
835
|
}
|
|
791
|
-
function
|
|
836
|
+
function Bn(e) {
|
|
792
837
|
return typeof e == "function" ? e : void 0;
|
|
793
838
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
839
|
+
function Vn(e) {
|
|
840
|
+
return C(e) && typeof e.name == "string" && e.name !== "" && typeof e.install == "function" && typeof e.uninstall == "function" ? e : void 0;
|
|
796
841
|
}
|
|
797
|
-
function
|
|
798
|
-
return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ?
|
|
842
|
+
function Hn(e, t, n, r) {
|
|
843
|
+
return t === void 0 || typeof t == "boolean" ? t ?? n : Array.isArray(t) ? U(e, t, [], Mn, Un, r) : (R(r, e, Mn, t, "the current value"), n);
|
|
799
844
|
}
|
|
800
|
-
function
|
|
845
|
+
function Un(e) {
|
|
801
846
|
return typeof e == "string" ? e : void 0;
|
|
802
847
|
}
|
|
803
|
-
function
|
|
848
|
+
function Wn(e) {
|
|
804
849
|
return typeof e == "string" || e instanceof RegExp ? e : void 0;
|
|
805
850
|
}
|
|
806
|
-
function
|
|
807
|
-
return
|
|
851
|
+
function Gn(e) {
|
|
852
|
+
return dn.find((t) => t === e);
|
|
808
853
|
}
|
|
809
|
-
function
|
|
854
|
+
function Kn(e) {
|
|
810
855
|
if (typeof e == "string") try {
|
|
811
856
|
let { origin: t } = new URL(e);
|
|
812
|
-
return t ===
|
|
857
|
+
return t === En ? void 0 : t;
|
|
813
858
|
} catch {
|
|
814
859
|
return;
|
|
815
860
|
}
|
|
816
861
|
}
|
|
817
|
-
function
|
|
818
|
-
return e instanceof RegExp ? e :
|
|
862
|
+
function qn(e) {
|
|
863
|
+
return e instanceof RegExp ? e : Kn(e);
|
|
819
864
|
}
|
|
820
|
-
function
|
|
821
|
-
return
|
|
865
|
+
function Jn(e) {
|
|
866
|
+
return C(e) ? Object.values(e).every((e) => typeof e == "string") : !1;
|
|
822
867
|
}
|
|
823
|
-
function
|
|
824
|
-
if (e !== void 0) return typeof e == "function" ||
|
|
868
|
+
function Yn(e, t, n) {
|
|
869
|
+
if (e !== void 0) return typeof e == "function" || Jn(e) ? e : (n.report("config.invalid", "headers must be an object of strings or a function. The library keeps the current headers."), t);
|
|
825
870
|
}
|
|
826
|
-
function
|
|
871
|
+
function Xn(e) {
|
|
827
872
|
return typeof e != "object" || !e ? !1 : typeof Reflect.get(e, "serialize") == "function";
|
|
828
873
|
}
|
|
829
|
-
function
|
|
830
|
-
return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" ||
|
|
874
|
+
function Zn(e, t, n) {
|
|
875
|
+
return e === void 0 ? t ?? "otlp" : e === "otlp" || e === "ecs" || Xn(e) ? e : (n.report("config.invalid", `serializer must be "${r}", "ecs" or an implementation. The library uses "${r}".`), r);
|
|
831
876
|
}
|
|
832
|
-
var
|
|
833
|
-
function
|
|
877
|
+
var Qn = new Set(Object.keys(h));
|
|
878
|
+
function $n(e, t) {
|
|
834
879
|
let n = {}, r = Object.entries(e ?? {});
|
|
835
|
-
for (let [e, i] of r)
|
|
880
|
+
for (let [e, i] of r) Qn.has(e) ? typeof i == "string" ? n[e] = i : t.report("config.invalid", `console.styles.${e} must be a string. The library keeps the current style.`) : t.report("config.invalid", `The library ignores the unknown console.styles key "${e}". Check the spelling.`);
|
|
836
881
|
return n;
|
|
837
882
|
}
|
|
838
|
-
function
|
|
883
|
+
function er(e, t, n) {
|
|
839
884
|
if (e === void 0) return t ?? "DEBUG";
|
|
840
|
-
let r =
|
|
841
|
-
return r === void 0 ? (
|
|
885
|
+
let r = H(e);
|
|
886
|
+
return r === void 0 ? (R(n, "console.level", L, e, "the current console level"), t) : r;
|
|
842
887
|
}
|
|
843
|
-
function
|
|
888
|
+
function tr(e, t, n) {
|
|
844
889
|
if (e === void 0) return t;
|
|
845
890
|
if (e === !1) return {
|
|
846
891
|
level: null,
|
|
@@ -851,21 +896,21 @@ function Wn(e, t, n) {
|
|
|
851
896
|
styles: t.styles
|
|
852
897
|
};
|
|
853
898
|
if (typeof e == "string") {
|
|
854
|
-
let r =
|
|
855
|
-
return r === void 0 ? (
|
|
899
|
+
let r = H(e);
|
|
900
|
+
return r === void 0 ? (R(n, "console", L, e, "the current console level"), t) : {
|
|
856
901
|
level: r,
|
|
857
902
|
styles: t.styles
|
|
858
903
|
};
|
|
859
904
|
}
|
|
860
|
-
return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The console settings
|
|
861
|
-
level:
|
|
905
|
+
return typeof e != "object" || !e ? (n.report("config.invalid", "console must be a boolean, a level or an object. The current console settings stay."), t) : {
|
|
906
|
+
level: er(e.level, t.level, n),
|
|
862
907
|
styles: {
|
|
863
908
|
...t.styles,
|
|
864
|
-
|
|
909
|
+
...$n(e.styles, n)
|
|
865
910
|
}
|
|
866
911
|
};
|
|
867
912
|
}
|
|
868
|
-
function
|
|
913
|
+
function nr(e, t, n) {
|
|
869
914
|
let r = e ?? {};
|
|
870
915
|
return {
|
|
871
916
|
...t,
|
|
@@ -874,66 +919,66 @@ function Gn(e, t, n) {
|
|
|
874
919
|
...t.rates,
|
|
875
920
|
...r.rates
|
|
876
921
|
},
|
|
877
|
-
alwaysSampleTypes:
|
|
878
|
-
alwaysSampleFrom:
|
|
879
|
-
remote:
|
|
922
|
+
alwaysSampleTypes: U("sampling.alwaysSampleTypes", r.alwaysSampleTypes, t.alwaysSampleTypes, jn, Un, n),
|
|
923
|
+
alwaysSampleFrom: Rn("sampling.alwaysSampleFrom", r.alwaysSampleFrom, t.alwaysSampleFrom, n),
|
|
924
|
+
remote: B("sampling.remote", r.remote, t.remote, n)
|
|
880
925
|
};
|
|
881
926
|
}
|
|
882
|
-
function
|
|
927
|
+
function rr(e, t, n) {
|
|
883
928
|
let r = e ?? {};
|
|
884
929
|
return {
|
|
885
|
-
maxTrackedSources:
|
|
886
|
-
sourcePolicy:
|
|
887
|
-
validation:
|
|
888
|
-
maxMessageBytes:
|
|
889
|
-
maxRecordsPerMessage:
|
|
890
|
-
maxMessagesPerSecond:
|
|
891
|
-
mode:
|
|
892
|
-
trustedOrigins:
|
|
893
|
-
openFinRole:
|
|
930
|
+
maxTrackedSources: V("bus.maxTrackedSources", r.maxTrackedSources, [0, 2 ** 53 - 1], t.maxTrackedSources, n),
|
|
931
|
+
sourcePolicy: z("bus.sourcePolicy", r.sourcePolicy, ["registered", "trusted-origin"], t.sourcePolicy, n),
|
|
932
|
+
validation: z("bus.validation", r.validation, ["strict", "envelope"], t.validation, n),
|
|
933
|
+
maxMessageBytes: V("bus.maxMessageBytes", r.maxMessageBytes, [0, 2 ** 53 - 1], t.maxMessageBytes, n),
|
|
934
|
+
maxRecordsPerMessage: V("bus.maxRecordsPerMessage", r.maxRecordsPerMessage, [0, 2 ** 53 - 1], t.maxRecordsPerMessage, n),
|
|
935
|
+
maxMessagesPerSecond: V("bus.maxMessagesPerSecond", r.maxMessagesPerSecond, [0, 2 ** 53 - 1], t.maxMessagesPerSecond, n),
|
|
936
|
+
mode: z("bus.mode", r.mode, cn, t.mode, n),
|
|
937
|
+
trustedOrigins: U("bus.trustedOrigins", r.trustedOrigins, t.trustedOrigins, An, Kn, n),
|
|
938
|
+
openFinRole: z("bus.openFinRole", r.openFinRole, ln, t.openFinRole, n)
|
|
894
939
|
};
|
|
895
940
|
}
|
|
896
|
-
function
|
|
941
|
+
function ir(e, t, n) {
|
|
897
942
|
let r = e ?? {};
|
|
898
943
|
return {
|
|
899
|
-
scope:
|
|
900
|
-
maxAgeMs:
|
|
944
|
+
scope: z("journey.scope", r.scope, un, t.scope, n),
|
|
945
|
+
maxAgeMs: V("journey.maxAgeMs", r.maxAgeMs, gn, t.maxAgeMs, n)
|
|
901
946
|
};
|
|
902
947
|
}
|
|
903
|
-
function
|
|
948
|
+
function ar(e, t, n) {
|
|
904
949
|
let r = e ?? {};
|
|
905
950
|
return {
|
|
906
|
-
mode:
|
|
907
|
-
...
|
|
951
|
+
mode: z("retention.mode", r.mode, fn, t.mode, n),
|
|
952
|
+
...Ln("retention", r, t, mn, n)
|
|
908
953
|
};
|
|
909
954
|
}
|
|
910
|
-
function
|
|
911
|
-
return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ?
|
|
955
|
+
function or(e, t, n) {
|
|
956
|
+
return e === void 0 ? t : typeof e == "boolean" ? e : Array.isArray(e) ? U("capture.console", e, [], Dn, Gn, n) : (R(n, "capture.console", Dn, e, "the current value"), t);
|
|
912
957
|
}
|
|
913
|
-
function
|
|
958
|
+
function sr(e, t, n) {
|
|
914
959
|
let r = e ?? {}, i = {
|
|
915
960
|
...t,
|
|
916
961
|
...r,
|
|
917
|
-
remoteToggles:
|
|
918
|
-
resourceTiming:
|
|
919
|
-
interactions:
|
|
920
|
-
console:
|
|
921
|
-
|
|
922
|
-
ignoreUrls:
|
|
923
|
-
userTimingInclude:
|
|
924
|
-
propagateTraceHeaderTo:
|
|
925
|
-
plugins:
|
|
962
|
+
remoteToggles: U("capture.remoteToggles", r.remoteToggles, t.remoteToggles, "a list of capture switch names without privacy controls", (e) => Te.find((t) => t === e), n),
|
|
963
|
+
resourceTiming: cr(r.resourceTiming, t.resourceTiming, n),
|
|
964
|
+
interactions: lr(r.interactions, t.interactions, n),
|
|
965
|
+
console: or(r.console, t.console, n),
|
|
966
|
+
longFrameMs: Fn("capture.longFrameMs", r.longFrameMs, t.longFrameMs, n),
|
|
967
|
+
ignoreUrls: U("capture.ignoreUrls", r.ignoreUrls, t.ignoreUrls, On, Wn, n),
|
|
968
|
+
userTimingInclude: U("capture.userTimingInclude", r.userTimingInclude, t.userTimingInclude, On, Wn, n),
|
|
969
|
+
propagateTraceHeaderTo: U("capture.propagateTraceHeaderTo", r.propagateTraceHeaderTo, t.propagateTraceHeaderTo, kn, qn, n),
|
|
970
|
+
plugins: U("capture.plugins", r.plugins, t.plugins, "a list of objects with a name, install() and uninstall()", Vn, n)
|
|
926
971
|
};
|
|
927
|
-
for (let e of
|
|
972
|
+
for (let e of Tn) i[e] = B(`capture.${e}`, r[e], t[e], n);
|
|
928
973
|
return i;
|
|
929
974
|
}
|
|
930
|
-
function
|
|
931
|
-
return e === void 0 ? t : typeof e == "boolean" ? e :
|
|
975
|
+
function cr(e, t, n) {
|
|
976
|
+
return e === void 0 ? t : typeof e == "boolean" ? e : C(e) ? { slowMs: Fn("capture.resourceTiming.slowMs", e.slowMs, typeof t == "object" ? t.slowMs ?? 1e3 : Re, n) } : (n.report("config.invalid", "capture.resourceTiming must be a boolean or an options object."), t);
|
|
932
977
|
}
|
|
933
|
-
function
|
|
978
|
+
function lr(e, t, n) {
|
|
934
979
|
if (e === void 0) return t;
|
|
935
980
|
if (typeof e == "boolean") return e;
|
|
936
|
-
if (!
|
|
981
|
+
if (!C(e)) return n.report("config.invalid", "capture.interactions must be a boolean or an options object."), t;
|
|
937
982
|
let r = typeof t == "object" ? t : {}, i = e.ignoreSelector, a = i === void 0 ? r.ignoreSelector : i;
|
|
938
983
|
if (a != null) try {
|
|
939
984
|
if (typeof a != "string") throw Error("Invalid selector");
|
|
@@ -942,112 +987,113 @@ function Qn(e, t, n) {
|
|
|
942
987
|
n.report("config.invalid", "capture.interactions.ignoreSelector must be a valid CSS selector or null."), a = r.ignoreSelector;
|
|
943
988
|
}
|
|
944
989
|
let o = r.actionAttribute ?? "data-observability-action";
|
|
945
|
-
return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute :
|
|
990
|
+
return e.actionAttribute !== void 0 && (typeof e.actionAttribute == "string" && /^[a-z][\w-]*$/i.test(e.actionAttribute) ? o = e.actionAttribute : R(n, "capture.interactions.actionAttribute", "an attribute name of letters, digits, hyphens and underscores", e.actionAttribute, `"${o}"`)), {
|
|
946
991
|
actionAttribute: o,
|
|
947
|
-
text:
|
|
948
|
-
selector:
|
|
992
|
+
text: B("capture.interactions.text", e.text, r.text ?? !1, n),
|
|
993
|
+
selector: B("capture.interactions.selector", e.selector, r.selector ?? !1, n),
|
|
949
994
|
ignoreSelector: typeof a == "string" || a === null ? a : void 0,
|
|
950
|
-
maxTextChars:
|
|
951
|
-
rageClicks:
|
|
952
|
-
rageClickCount:
|
|
953
|
-
rageClickWindowMs:
|
|
954
|
-
deadClicks:
|
|
955
|
-
deadClickMs:
|
|
995
|
+
maxTextChars: V("capture.interactions.maxTextChars", e.maxTextChars, [0, 2 ** 53 - 1], r.maxTextChars ?? 50, n),
|
|
996
|
+
rageClicks: B("capture.interactions.rageClicks", e.rageClicks, r.rageClicks ?? !1, n),
|
|
997
|
+
rageClickCount: V("capture.interactions.rageClickCount", e.rageClickCount, [2, 20], r.rageClickCount ?? 3, n),
|
|
998
|
+
rageClickWindowMs: V("capture.interactions.rageClickWindowMs", e.rageClickWindowMs, vn, r.rageClickWindowMs ?? 1e3, n),
|
|
999
|
+
deadClicks: B("capture.interactions.deadClicks", e.deadClicks, r.deadClicks ?? !1, n),
|
|
1000
|
+
deadClickMs: V("capture.interactions.deadClickMs", e.deadClickMs, vn, r.deadClickMs ?? 1e3, n)
|
|
956
1001
|
};
|
|
957
1002
|
}
|
|
958
|
-
var
|
|
1003
|
+
var ur = {
|
|
959
1004
|
metricsEndpoint: "The library sends metric records as log records.",
|
|
960
1005
|
tracesEndpoint: "The library sends no span."
|
|
961
1006
|
};
|
|
962
|
-
function
|
|
963
|
-
let
|
|
1007
|
+
function dr(e, t, n, i, a) {
|
|
1008
|
+
let o = n;
|
|
964
1009
|
if (typeof t == "string" && t !== "") try {
|
|
965
|
-
new URL(t),
|
|
1010
|
+
new URL(t), o = t;
|
|
966
1011
|
} catch (n) {
|
|
967
|
-
|
|
1012
|
+
a.report("config.invalid", `${e} is not a valid absolute URL: ${w(t, !1)}. The library keeps the current value.`, void 0, n);
|
|
968
1013
|
}
|
|
969
|
-
else t === "" ?
|
|
970
|
-
return
|
|
1014
|
+
else t === "" ? o = "" : t !== void 0 && R(a, e, "a URL string", t, "the current value");
|
|
1015
|
+
return o !== "" && i !== "otlp" ? (a.report("config.invalid", `${e} needs serializer "${r}". ${ur[e]}`), "") : o;
|
|
971
1016
|
}
|
|
972
|
-
function
|
|
1017
|
+
function fr(e, t, n, r, i) {
|
|
973
1018
|
let a = { ...n };
|
|
974
1019
|
for (let o of Object.keys(n)) {
|
|
975
1020
|
let s = t?.[o], c = n[o], l = r.ranges[o], u = r.choices?.[o], d = r.custom?.[o], f = c;
|
|
976
|
-
d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f =
|
|
1021
|
+
d ? f = d(`${e}.${o}`, s, c, i) : typeof c == "number" && l ? f = V(`${e}.${o}`, s, l, c, i) : typeof c == "boolean" ? f = B(`${e}.${o}`, s, c, i) : u ? f = z(`${e}.${o}`, s, u, String(c), i) : s === void 0 || typeof s == "string" ? f = s ?? c : R(i, `${e}.${o}`, "a string", s, String(c)), Object.assign(a, { [o]: f });
|
|
977
1022
|
}
|
|
978
1023
|
return a;
|
|
979
1024
|
}
|
|
980
|
-
function
|
|
981
|
-
let r = n ?? re, i = Object.fromEntries(Object.keys(
|
|
1025
|
+
function W(e, t, n) {
|
|
1026
|
+
let r = n ?? re, i = Object.fromEntries(Object.keys(wn).map((n) => [n, fr(n, e[n], r[n], wn[n], t)])), a = {
|
|
982
1027
|
...r,
|
|
983
1028
|
...e,
|
|
984
1029
|
...i,
|
|
985
|
-
lockConfiguration:
|
|
986
|
-
loggerCache: { maxEntries:
|
|
1030
|
+
lockConfiguration: B("lockConfiguration", e.lockConfiguration, r.lockConfiguration, t),
|
|
1031
|
+
loggerCache: { maxEntries: In(e.loggerCache?.maxEntries, r.loggerCache.maxEntries, t) },
|
|
987
1032
|
securityContext: {
|
|
988
1033
|
id: typeof e.securityContext?.id == "string" && e.securityContext.id || r.securityContext.id,
|
|
989
|
-
isolation:
|
|
1034
|
+
isolation: B("securityContext.isolation", e.securityContext?.isolation, r.securityContext.isolation, t)
|
|
990
1035
|
},
|
|
991
1036
|
endpoint: e.endpoint === void 0 ? r.endpoint : e.endpoint,
|
|
992
|
-
enabled:
|
|
993
|
-
payloadMode:
|
|
994
|
-
minLevel:
|
|
995
|
-
minLevels:
|
|
996
|
-
processors:
|
|
997
|
-
compression:
|
|
998
|
-
credentials:
|
|
999
|
-
headers: "headers" in e ?
|
|
1000
|
-
storage:
|
|
1001
|
-
identity:
|
|
1002
|
-
serializer:
|
|
1003
|
-
console:
|
|
1004
|
-
sampling:
|
|
1005
|
-
bus:
|
|
1006
|
-
batching:
|
|
1007
|
-
retention:
|
|
1008
|
-
limits:
|
|
1009
|
-
journey:
|
|
1010
|
-
capture:
|
|
1037
|
+
enabled: B("enabled", e.enabled, r.enabled, t),
|
|
1038
|
+
payloadMode: z("payloadMode", e.payloadMode, ["copy", "defer"], r.payloadMode, t),
|
|
1039
|
+
minLevel: Rn("minLevel", e.minLevel, r.minLevel, t),
|
|
1040
|
+
minLevels: zn(e.minLevels, r.minLevels, t),
|
|
1041
|
+
processors: U("processors", e.processors, r.processors, "a list of functions", Bn, t),
|
|
1042
|
+
compression: z("compression", e.compression, rn, r.compression, t),
|
|
1043
|
+
credentials: z("credentials", e.credentials, an, r.credentials, t),
|
|
1044
|
+
headers: "headers" in e ? Yn(e.headers, r.headers, t) : r.headers,
|
|
1045
|
+
storage: z("storage", e.storage, on, r.storage, t),
|
|
1046
|
+
identity: z("identity", e.identity, sn, r.identity, t),
|
|
1047
|
+
serializer: Zn(e.serializer, n?.serializer, t),
|
|
1048
|
+
console: tr(e.console, r.console, t),
|
|
1049
|
+
sampling: nr(e.sampling, r.sampling, t),
|
|
1050
|
+
bus: rr(e.bus, r.bus, t),
|
|
1051
|
+
batching: Ln("batching", e.batching, r.batching, pn, t),
|
|
1052
|
+
retention: ar(e.retention, r.retention, t),
|
|
1053
|
+
limits: Ln("limits", e.limits, r.limits, hn, t),
|
|
1054
|
+
journey: ir(e.journey, r.journey, t),
|
|
1055
|
+
capture: sr(e.capture, r.capture, t)
|
|
1011
1056
|
};
|
|
1012
|
-
for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] =
|
|
1013
|
-
if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the value
|
|
1057
|
+
for (let n of ["metricsEndpoint", "tracesEndpoint"]) a[n] = dr(n, e[n], r[n], a.serializer, t);
|
|
1058
|
+
if (a.transport !== void 0 && typeof a.transport != "function" && (t.report("config.invalid", "transport must be a function. The library ignores the value."), a.transport = r.transport), a.onDrop !== void 0 && typeof a.onDrop != "function" && (t.report("config.invalid", "onDrop must be a function. The library ignores the value."), a.onDrop = r.onDrop), a.contextProvider !== void 0 && typeof a.contextProvider != "function" && (t.report("config.invalid", "contextProvider must be a function. The library ignores the value."), a.contextProvider = r.contextProvider), a.transportWorker !== void 0 && typeof a.transportWorker != "function" && (t.report("config.invalid", "transportWorker must be a function. The library keeps the current value."), a.transportWorker = r.transportWorker), a.transportOnExit !== void 0 && typeof a.transportOnExit != "function" && (t.report("config.invalid", "transportOnExit must be a function. The library ignores the value."), a.transportOnExit = r.transportOnExit), a.endpoint === "") a.transport === void 0 && t.report("config.invalid", "endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.");
|
|
1014
1059
|
else if (a.endpoint !== null) try {
|
|
1015
1060
|
new URL(a.endpoint);
|
|
1016
1061
|
} catch (e) {
|
|
1017
|
-
t.report("config.invalid", `endpoint is not a valid absolute URL: ${
|
|
1062
|
+
t.report("config.invalid", `endpoint is not a valid absolute URL: ${w(a.endpoint, !1)}.`, void 0, e);
|
|
1018
1063
|
}
|
|
1019
1064
|
for (let e of ["metricsEndpoint", "tracesEndpoint"]) a[e] !== "" && a.endpoint === null && !a.transport && t.report("config.invalid", `${e} needs endpoint or transport. The library sends nothing to ${e}.`);
|
|
1020
|
-
a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${
|
|
1065
|
+
a.serviceName ||= (t.report("config.invalid", `serviceName is missing. Every record reports service.name as '${Ee}'.`), Ee);
|
|
1021
1066
|
let o = a.sampling.defaultRate;
|
|
1022
1067
|
(typeof o != "number" || o < 0 || o > 1) && (t.report("config.invalid", `sampling.defaultRate must be 0..1. The value is ${String(o)}. The library uses 1.`), a.sampling.defaultRate = 1);
|
|
1023
1068
|
let s = a.sampling.remoteMaxRate;
|
|
1024
1069
|
typeof s == "number" && s >= 0 && s <= 1 || (t.report("config.invalid", `sampling.remoteMaxRate must be 0..1. The value is ${String(s)}. The library uses 1.`), a.sampling.remoteMaxRate = 1);
|
|
1025
1070
|
let c = Object.entries(a.sampling.rates);
|
|
1026
1071
|
for (let [e, n] of c) (typeof n != "number" || n < 0 || n > 1) && (t.report("config.invalid", `sampling.rates["${e}"] must be 0..1. The value is ${String(n)}. The library uses 1.`), a.sampling.rates[e] = 1);
|
|
1027
|
-
a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint);
|
|
1072
|
+
a.capture.ignoreUrls = a.capture.ignoreUrls.filter((e) => e !== n?.endpoint && e !== n?.metricsEndpoint && e !== n?.tracesEndpoint && e !== n?.replay.endpoint);
|
|
1028
1073
|
for (let e of [
|
|
1029
1074
|
a.endpoint,
|
|
1030
1075
|
a.metricsEndpoint,
|
|
1031
|
-
a.tracesEndpoint
|
|
1076
|
+
a.tracesEndpoint,
|
|
1077
|
+
a.replay.endpoint
|
|
1032
1078
|
]) e && !a.capture.ignoreUrls.includes(e) && (a.capture.ignoreUrls = [...a.capture.ignoreUrls, e]);
|
|
1033
|
-
return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform),
|
|
1079
|
+
return a.delivery.retryMaxDelayMs < a.delivery.retryBaseDelayMs && (t.report("config.invalid", "delivery.retryMaxDelayMs must be at least retryBaseDelayMs."), a.delivery.retryBaseDelayMs = r.delivery.retryBaseDelayMs, a.delivery.retryMaxDelayMs = r.delivery.retryMaxDelayMs), a.capture.urlTransform !== void 0 && typeof a.capture.urlTransform != "function" && (t.report("config.invalid", "capture.urlTransform must be a function."), a.capture.urlTransform = r.capture.urlTransform), pr(e, t), a;
|
|
1034
1080
|
}
|
|
1035
|
-
function
|
|
1036
|
-
let n = /* @__PURE__ */ new Set([...Object.keys(re), ...
|
|
1081
|
+
function pr(e, t) {
|
|
1082
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(re), ...ge]);
|
|
1037
1083
|
for (let r of Object.keys(e)) n.has(r) || t.report("config.invalid", `The library ignores the unknown config key "${r}". Check the spelling.`);
|
|
1038
|
-
for (let n of
|
|
1084
|
+
for (let n of i) {
|
|
1039
1085
|
let r = e[n];
|
|
1040
1086
|
if (typeof r != "object" || !r) continue;
|
|
1041
|
-
let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...
|
|
1087
|
+
let i = /* @__PURE__ */ new Set([...Object.keys(re[n]), ...Pe[n]]);
|
|
1042
1088
|
for (let e of Object.keys(r)) i.has(e) || t.report("config.invalid", `The library ignores the unknown config key "${n}.${e}". Check the spelling.`);
|
|
1043
1089
|
}
|
|
1044
1090
|
}
|
|
1045
|
-
function
|
|
1046
|
-
for (let n of Object.keys(t))
|
|
1047
|
-
for (let n of
|
|
1091
|
+
function mr(e, t) {
|
|
1092
|
+
for (let n of Object.keys(t)) i.includes(n) || Object.assign(e, { [n]: t[n] });
|
|
1093
|
+
for (let n of i) Object.assign(e[n], t[n]);
|
|
1048
1094
|
}
|
|
1049
1095
|
// src/core/context.ts
|
|
1050
|
-
var
|
|
1096
|
+
var hr = class {
|
|
1051
1097
|
map = /* @__PURE__ */ new Map();
|
|
1052
1098
|
set(e, t) {
|
|
1053
1099
|
this.map.set(e, t);
|
|
@@ -1064,7 +1110,7 @@ var ir = class {
|
|
|
1064
1110
|
getAll() {
|
|
1065
1111
|
return Object.fromEntries(this.map);
|
|
1066
1112
|
}
|
|
1067
|
-
},
|
|
1113
|
+
}, gr = class {
|
|
1068
1114
|
policy;
|
|
1069
1115
|
kept = [];
|
|
1070
1116
|
constructor(e) {
|
|
@@ -1083,7 +1129,7 @@ var ir = class {
|
|
|
1083
1129
|
...e,
|
|
1084
1130
|
attributes: {
|
|
1085
1131
|
...e.attributes,
|
|
1086
|
-
[
|
|
1132
|
+
[Fe]: !0
|
|
1087
1133
|
}
|
|
1088
1134
|
}));
|
|
1089
1135
|
}
|
|
@@ -1099,7 +1145,7 @@ var ir = class {
|
|
|
1099
1145
|
clear() {
|
|
1100
1146
|
this.kept = [];
|
|
1101
1147
|
}
|
|
1102
|
-
},
|
|
1148
|
+
}, _r = class {
|
|
1103
1149
|
handler;
|
|
1104
1150
|
throttleMs;
|
|
1105
1151
|
consoleFallback;
|
|
@@ -1118,27 +1164,29 @@ var ir = class {
|
|
|
1118
1164
|
let n = (this.counters.get(e) ?? 0) + t;
|
|
1119
1165
|
return this.counters.set(e, n), n;
|
|
1120
1166
|
}
|
|
1121
|
-
report(e, t,
|
|
1167
|
+
report(e, t, r, i) {
|
|
1122
1168
|
let a = this.count(e), o = Date.now();
|
|
1123
|
-
if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return;
|
|
1169
|
+
if (o - (this.lastEmitted.get(e) ?? 0) < this.throttleMs) return !1;
|
|
1124
1170
|
this.lastEmitted.set(e, o);
|
|
1125
1171
|
let s = {
|
|
1126
1172
|
code: e,
|
|
1127
1173
|
message: t,
|
|
1128
|
-
detail:
|
|
1129
|
-
cause:
|
|
1174
|
+
detail: r,
|
|
1175
|
+
cause: i,
|
|
1130
1176
|
at: o,
|
|
1131
1177
|
count: a
|
|
1132
1178
|
}, { handler: c } = this;
|
|
1133
|
-
if (c)
|
|
1134
|
-
|
|
1179
|
+
if (!c) return !0;
|
|
1180
|
+
try {
|
|
1181
|
+
E(() => {
|
|
1135
1182
|
c(s);
|
|
1136
1183
|
});
|
|
1137
1184
|
} catch {
|
|
1138
|
-
this.count("handler.threw"), this.consoleFallback && typeof console < "u" &&
|
|
1139
|
-
console.warn(`${
|
|
1185
|
+
this.count("handler.threw"), this.consoleFallback && typeof console < "u" && E(() => {
|
|
1186
|
+
console.warn(`${n} The onDiagnostic handler threw an error.`);
|
|
1140
1187
|
});
|
|
1141
1188
|
}
|
|
1189
|
+
return !0;
|
|
1142
1190
|
}
|
|
1143
1191
|
guard(e, t, n) {
|
|
1144
1192
|
try {
|
|
@@ -1161,10 +1209,10 @@ var ir = class {
|
|
|
1161
1209
|
}
|
|
1162
1210
|
};
|
|
1163
1211
|
// src/core/drops.ts
|
|
1164
|
-
function
|
|
1212
|
+
function vr(e, t) {
|
|
1165
1213
|
e.length < 20 && !e.includes(t) && e.push(t);
|
|
1166
1214
|
}
|
|
1167
|
-
var
|
|
1215
|
+
var yr = class {
|
|
1168
1216
|
config;
|
|
1169
1217
|
diagnostics;
|
|
1170
1218
|
pending = /* @__PURE__ */ new Map();
|
|
@@ -1183,12 +1231,12 @@ var cr = class {
|
|
|
1183
1231
|
journeyIds: [],
|
|
1184
1232
|
actions: []
|
|
1185
1233
|
}, this.pending.set(e, r)), r.records += t.length;
|
|
1186
|
-
for (let e of n)
|
|
1234
|
+
for (let e of n) vr(r.batchIds, e);
|
|
1187
1235
|
for (let e of t) {
|
|
1188
|
-
let t =
|
|
1189
|
-
typeof t == "string" &&
|
|
1190
|
-
let n =
|
|
1191
|
-
typeof n == "string" &&
|
|
1236
|
+
let t = ut(e, S);
|
|
1237
|
+
typeof t == "string" && vr(r.journeyIds, t);
|
|
1238
|
+
let n = lt(e) ? e.body : void 0;
|
|
1239
|
+
typeof n == "string" && vr(r.actions, n);
|
|
1192
1240
|
}
|
|
1193
1241
|
this.scheduled || (this.scheduled = !0, queueMicrotask(() => {
|
|
1194
1242
|
this.flush();
|
|
@@ -1202,8 +1250,8 @@ var cr = class {
|
|
|
1202
1250
|
if (t) {
|
|
1203
1251
|
this.reporting = !0;
|
|
1204
1252
|
for (let n of e) this.diagnostics.guard("handler.threw", "The onDrop hook threw an error.", () => {
|
|
1205
|
-
|
|
1206
|
-
|
|
1253
|
+
ct(() => {
|
|
1254
|
+
E(() => {
|
|
1207
1255
|
t(n);
|
|
1208
1256
|
});
|
|
1209
1257
|
});
|
|
@@ -1211,7 +1259,7 @@ var cr = class {
|
|
|
1211
1259
|
this.reporting = !1;
|
|
1212
1260
|
}
|
|
1213
1261
|
}
|
|
1214
|
-
},
|
|
1262
|
+
}, br = class {
|
|
1215
1263
|
onDrop;
|
|
1216
1264
|
held = [];
|
|
1217
1265
|
actions = 0;
|
|
@@ -1225,10 +1273,10 @@ var cr = class {
|
|
|
1225
1273
|
return this.held.length;
|
|
1226
1274
|
}
|
|
1227
1275
|
push(e) {
|
|
1228
|
-
let t =
|
|
1276
|
+
let t = lt(e);
|
|
1229
1277
|
if ((t ? this.actions : this.held.length - this.actions) < (t ? 2e3 : 500)) this.actions += +!!t;
|
|
1230
1278
|
else {
|
|
1231
|
-
let e = this.held.findIndex((e) =>
|
|
1279
|
+
let e = this.held.findIndex((e) => lt(e) === t), [n] = this.held.splice(e, 1);
|
|
1232
1280
|
this.onDrop(n);
|
|
1233
1281
|
}
|
|
1234
1282
|
this.held.push(e);
|
|
@@ -1237,20 +1285,20 @@ var cr = class {
|
|
|
1237
1285
|
let e = this.held;
|
|
1238
1286
|
return this.held = [], this.actions = 0, e;
|
|
1239
1287
|
}
|
|
1240
|
-
},
|
|
1288
|
+
}, xr = {
|
|
1241
1289
|
name: "ui.measure.duration",
|
|
1242
1290
|
kind: "histogram",
|
|
1243
1291
|
unit: "ms",
|
|
1244
|
-
boundaries:
|
|
1245
|
-
},
|
|
1292
|
+
boundaries: v
|
|
1293
|
+
}, Sr = {
|
|
1246
1294
|
name: "ui.measure.phase.duration",
|
|
1247
1295
|
kind: "histogram",
|
|
1248
1296
|
unit: "ms",
|
|
1249
|
-
boundaries:
|
|
1297
|
+
boundaries: v
|
|
1250
1298
|
};
|
|
1251
|
-
function
|
|
1299
|
+
function Cr(e, t, n, r) {
|
|
1252
1300
|
let i = String(e), a = Date.now(), o = performance.now(), s, c = !1, l = (e) => a + e - o, u = (e, a) => {
|
|
1253
|
-
s &&= (r.metric(
|
|
1301
|
+
s &&= (r.metric(Sr, e - s.at, {
|
|
1254
1302
|
...t,
|
|
1255
1303
|
"measure.name": i,
|
|
1256
1304
|
"measure.phase": s.name
|
|
@@ -1258,7 +1306,7 @@ function fr(e, t, n, r) {
|
|
|
1258
1306
|
name: s.name,
|
|
1259
1307
|
kind: "internal",
|
|
1260
1308
|
traceId: n.traceId,
|
|
1261
|
-
spanId:
|
|
1309
|
+
spanId: Xt(),
|
|
1262
1310
|
parentSpanId: n.spanId,
|
|
1263
1311
|
startMs: l(s.at),
|
|
1264
1312
|
endMs: l(e),
|
|
@@ -1284,7 +1332,7 @@ function fr(e, t, n, r) {
|
|
|
1284
1332
|
...t,
|
|
1285
1333
|
"measure.outcome": e
|
|
1286
1334
|
};
|
|
1287
|
-
r.metric(
|
|
1335
|
+
r.metric(xr, s - o, {
|
|
1288
1336
|
...f,
|
|
1289
1337
|
"measure.name": i
|
|
1290
1338
|
}), n && r.span({
|
|
@@ -1300,11 +1348,11 @@ function fr(e, t, n, r) {
|
|
|
1300
1348
|
};
|
|
1301
1349
|
}
|
|
1302
1350
|
// src/core/record.ts
|
|
1303
|
-
var
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
],
|
|
1351
|
+
var wr = "error.", Tr = [
|
|
1352
|
+
Le,
|
|
1353
|
+
S,
|
|
1354
|
+
Oe
|
|
1355
|
+
], Er = {
|
|
1308
1356
|
processor: {
|
|
1309
1357
|
label: "A processor",
|
|
1310
1358
|
code: "record.dropped_by_processor"
|
|
@@ -1313,21 +1361,21 @@ var pr = "error.", mr = [
|
|
|
1313
1361
|
label: "The redact hook",
|
|
1314
1362
|
code: "record.dropped_by_redact"
|
|
1315
1363
|
}
|
|
1316
|
-
},
|
|
1364
|
+
}, Dr = [
|
|
1317
1365
|
"metric.name",
|
|
1318
1366
|
"metric.unit",
|
|
1319
1367
|
"metric.type",
|
|
1320
1368
|
"metric.value",
|
|
1321
1369
|
...Object.values(y),
|
|
1322
|
-
...Object.values(
|
|
1370
|
+
...Object.values(_)
|
|
1323
1371
|
];
|
|
1324
|
-
function
|
|
1325
|
-
return Object.fromEntries(
|
|
1372
|
+
function Or(e) {
|
|
1373
|
+
return Object.fromEntries(Dr.filter((t) => t in e).map((t) => [t, e[t]]));
|
|
1326
1374
|
}
|
|
1327
|
-
function
|
|
1375
|
+
function G(e) {
|
|
1328
1376
|
return e;
|
|
1329
1377
|
}
|
|
1330
|
-
var
|
|
1378
|
+
var kr = class {
|
|
1331
1379
|
deps;
|
|
1332
1380
|
resourceCache = null;
|
|
1333
1381
|
constructor(e) {
|
|
@@ -1336,12 +1384,12 @@ var vr = class {
|
|
|
1336
1384
|
invalidateResource() {
|
|
1337
1385
|
this.resourceCache = null;
|
|
1338
1386
|
}
|
|
1339
|
-
isEnabled(e, t,
|
|
1340
|
-
let { config:
|
|
1341
|
-
if (!
|
|
1342
|
-
if (
|
|
1343
|
-
let
|
|
1344
|
-
return
|
|
1387
|
+
isEnabled(e, t, n) {
|
|
1388
|
+
let { config: r } = this.deps;
|
|
1389
|
+
if (!r.enabled) return !1;
|
|
1390
|
+
if (n !== void 0 && Be.includes(n)) return !0;
|
|
1391
|
+
let i = this.deps.remote.sampling?.minLevelFor(t) ?? ht(t, r);
|
|
1392
|
+
return b[e] >= b[i];
|
|
1345
1393
|
}
|
|
1346
1394
|
keepForDebug(e) {
|
|
1347
1395
|
let { config: t, debug: n } = this.deps;
|
|
@@ -1355,7 +1403,7 @@ var vr = class {
|
|
|
1355
1403
|
record: null,
|
|
1356
1404
|
dropped: "level"
|
|
1357
1405
|
};
|
|
1358
|
-
let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d =
|
|
1406
|
+
let l = e.trace ?? e.snapshot?.trace ?? i.resolve(), u = e.snapshot ? e.snapshot.journey : a.current(), d = gt({
|
|
1359
1407
|
level: e.level,
|
|
1360
1408
|
type: e.type,
|
|
1361
1409
|
namespace: e.namespace,
|
|
@@ -1367,27 +1415,27 @@ var vr = class {
|
|
|
1367
1415
|
record: null,
|
|
1368
1416
|
dropped: "sampling"
|
|
1369
1417
|
};
|
|
1370
|
-
let f = o.next(), p = e.snapshot?.url ??
|
|
1418
|
+
let f = o.next(), p = e.snapshot?.url ?? Qe(r), m = n.metadata.pageUrl ? w(p, n.capture.fullUrls, n.capture.urlTransform, r) : "", h, g = 0;
|
|
1371
1419
|
try {
|
|
1372
|
-
let t =
|
|
1420
|
+
let t = D(e.snapshot?.context ?? this.deps.context.getAll(), s, r), n = D(this.provided(), s, r), i = D(e.scoped ?? {}, s, r), a = D(e.payload ?? {}, s, r);
|
|
1373
1421
|
g = t.bytes + n.bytes + i.bytes + a.bytes, h = {
|
|
1374
|
-
...
|
|
1375
|
-
...
|
|
1376
|
-
...
|
|
1377
|
-
...
|
|
1422
|
+
...G(t.value),
|
|
1423
|
+
...G(n.value),
|
|
1424
|
+
...G(i.value),
|
|
1425
|
+
...G(a.value)
|
|
1378
1426
|
};
|
|
1379
1427
|
} catch (e) {
|
|
1380
|
-
r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [
|
|
1428
|
+
r.report("record.sanitize_failed", "The library could not sanitize the attributes.", void 0, e), h = { [He]: !0 };
|
|
1381
1429
|
}
|
|
1382
|
-
Object.assign(h, e.fixed), h[ve] = e.type, h[
|
|
1383
|
-
let _ =
|
|
1430
|
+
Object.assign(h, e.fixed), h[ve] = e.type, h[be] = f, h[fe] = e.namespace, h[Le] = m, u && (h[S] = u.id, h[Oe] = u.name, u.parentId !== void 0 && (h[Ce] = u.parentId));
|
|
1431
|
+
let _ = et(e.body, s.maxBodyChars);
|
|
1384
1432
|
_ !== e.body && r.count("record.truncated");
|
|
1385
1433
|
let v = {
|
|
1386
|
-
timeUnixNano: e.snapshot?.timeUnixNano ??
|
|
1434
|
+
timeUnixNano: e.snapshot?.timeUnixNano ?? Ge(),
|
|
1387
1435
|
traceId: l.traceId,
|
|
1388
1436
|
spanId: l.spanId,
|
|
1389
1437
|
traceFlags: l.traceFlags,
|
|
1390
|
-
severityNumber:
|
|
1438
|
+
severityNumber: ee[e.level],
|
|
1391
1439
|
severityText: e.level,
|
|
1392
1440
|
body: _,
|
|
1393
1441
|
attributes: h,
|
|
@@ -1408,19 +1456,19 @@ var vr = class {
|
|
|
1408
1456
|
});
|
|
1409
1457
|
let t = {
|
|
1410
1458
|
[ve]: e.type,
|
|
1411
|
-
[
|
|
1412
|
-
[
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1459
|
+
[be]: f,
|
|
1460
|
+
[fe]: e.namespace,
|
|
1461
|
+
[Me]: !0,
|
|
1462
|
+
[De]: g
|
|
1415
1463
|
};
|
|
1416
|
-
for (let e of
|
|
1417
|
-
for (let [e, n] of Object.entries(v.attributes)) e.startsWith(
|
|
1418
|
-
let n =
|
|
1419
|
-
n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n =
|
|
1420
|
-
let i = v.attributes[
|
|
1464
|
+
for (let e of Tr) e in v.attributes && (t[e] = v.attributes[e]);
|
|
1465
|
+
for (let [e, n] of Object.entries(v.attributes)) e.startsWith(wr) && (t[e] = n);
|
|
1466
|
+
let n = D(t, s, r).bytes;
|
|
1467
|
+
n > s.maxRecordBytes && "error.data" in t && (Reflect.deleteProperty(t, me), n = D(t, s, r).bytes);
|
|
1468
|
+
let i = v.attributes[x];
|
|
1421
1469
|
if (i !== void 0) {
|
|
1422
|
-
let e =
|
|
1423
|
-
n + e <= s.maxRecordBytes && (t[
|
|
1470
|
+
let e = D(i, s, r).bytes;
|
|
1471
|
+
n + e <= s.maxRecordBytes && (t[x] = i);
|
|
1424
1472
|
}
|
|
1425
1473
|
Object.assign(t, e.fixed), v.attributes = t;
|
|
1426
1474
|
}
|
|
@@ -1429,7 +1477,7 @@ var vr = class {
|
|
|
1429
1477
|
redactForwarded(e) {
|
|
1430
1478
|
let { redact: t } = this.deps.config;
|
|
1431
1479
|
if (!t) return e;
|
|
1432
|
-
let n = [[t, "redact"]], r = this.applyHooks(e, n,
|
|
1480
|
+
let n = [[t, "redact"]], r = this.applyHooks(e, n, Or(e.attributes));
|
|
1433
1481
|
return typeof r == "string" ? null : r.record;
|
|
1434
1482
|
}
|
|
1435
1483
|
applyHooks(e, t, n) {
|
|
@@ -1439,7 +1487,7 @@ var vr = class {
|
|
|
1439
1487
|
if (typeof t == "string") return t;
|
|
1440
1488
|
r = t;
|
|
1441
1489
|
}
|
|
1442
|
-
let { diagnostics: i, limits: a } = this.deps, o =
|
|
1490
|
+
let { diagnostics: i, limits: a } = this.deps, o = D(r.attributes, a, i), s = G(o.value);
|
|
1443
1491
|
return Object.assign(s, n), {
|
|
1444
1492
|
record: {
|
|
1445
1493
|
...r,
|
|
@@ -1449,7 +1497,7 @@ var vr = class {
|
|
|
1449
1497
|
};
|
|
1450
1498
|
}
|
|
1451
1499
|
runHook(e, t, n) {
|
|
1452
|
-
let { diagnostics: r } = this.deps, { label: i, code: a } =
|
|
1500
|
+
let { diagnostics: r } = this.deps, { label: i, code: a } = Er[t], o;
|
|
1453
1501
|
try {
|
|
1454
1502
|
o = e(n);
|
|
1455
1503
|
} catch (e) {
|
|
@@ -1457,9 +1505,9 @@ var vr = class {
|
|
|
1457
1505
|
}
|
|
1458
1506
|
if (o === null) return r.count(a), t;
|
|
1459
1507
|
let s = o ?? n;
|
|
1460
|
-
return
|
|
1508
|
+
return We(s) ? Ke(s.severityText) ? {
|
|
1461
1509
|
...s,
|
|
1462
|
-
severityNumber:
|
|
1510
|
+
severityNumber: ee[s.severityText]
|
|
1463
1511
|
} : (r.report("record.dropped_malformed", `${i} set a severityText that is not a log level. The library dropped the record.`), "malformed") : s === n ? (r.report("record.dropped_malformed", `${i} changed the record to a shape that is not a record. The library dropped it.`), "malformed") : (r.report(a, `${i} returned a value that is not a record. The library dropped the record.`), t);
|
|
1464
1512
|
}
|
|
1465
1513
|
provided() {
|
|
@@ -1467,42 +1515,42 @@ var vr = class {
|
|
|
1467
1515
|
if (!e) return {};
|
|
1468
1516
|
let { diagnostics: t } = this.deps, n = t.guard("handler.threw", "The contextProvider threw an error. The record has no attributes from it.", () => {
|
|
1469
1517
|
let t = e();
|
|
1470
|
-
return t === void 0 ? {} :
|
|
1518
|
+
return t === void 0 ? {} : C(t) && typeof t.then != "function" ? t : null;
|
|
1471
1519
|
});
|
|
1472
1520
|
return n === null && t.report("config.invalid", "contextProvider must return an object of attributes. The library ignores the value."), n ?? {};
|
|
1473
1521
|
}
|
|
1474
1522
|
resource() {
|
|
1475
1523
|
if (this.resourceCache) return this.resourceCache;
|
|
1476
|
-
let { config:
|
|
1524
|
+
let { config: e, identity: t, platform: n } = this.deps;
|
|
1477
1525
|
return this.resourceCache = {
|
|
1478
|
-
[
|
|
1479
|
-
[
|
|
1480
|
-
[
|
|
1481
|
-
[
|
|
1482
|
-
[
|
|
1483
|
-
[pe]:
|
|
1484
|
-
[
|
|
1485
|
-
[
|
|
1486
|
-
[
|
|
1487
|
-
[
|
|
1488
|
-
...
|
|
1489
|
-
...!
|
|
1490
|
-
...!
|
|
1526
|
+
[xe]: e.serviceName,
|
|
1527
|
+
[ye]: e.serviceVersion,
|
|
1528
|
+
[he]: e.environment,
|
|
1529
|
+
[Ve]: oe,
|
|
1530
|
+
[ne]: s,
|
|
1531
|
+
[pe]: ie,
|
|
1532
|
+
[_e]: n.platform,
|
|
1533
|
+
[ue]: t.sessionId,
|
|
1534
|
+
[Ue]: t.tabId,
|
|
1535
|
+
[Ie]: t.contextId,
|
|
1536
|
+
...e.metadata.userAgent ? { [Se]: n.userAgent } : {},
|
|
1537
|
+
...!e.metadata.openfin || n.openfinUuid === void 0 ? {} : { [we]: n.openfinUuid },
|
|
1538
|
+
...!e.metadata.openfin || n.openfinName === void 0 ? {} : { [ke]: n.openfinName }
|
|
1491
1539
|
}, this.resourceCache;
|
|
1492
1540
|
}
|
|
1493
|
-
},
|
|
1541
|
+
}, Ar = 1e3, jr = {
|
|
1494
1542
|
start: "ui.start",
|
|
1495
1543
|
interaction: "ui.interaction",
|
|
1496
1544
|
navigation: "ui.navigation",
|
|
1497
1545
|
explicit: "ui.trace",
|
|
1498
1546
|
maxAge: "ui.trace"
|
|
1499
1547
|
};
|
|
1500
|
-
function
|
|
1501
|
-
return `${String(Math.round(e *
|
|
1548
|
+
function Mr(e) {
|
|
1549
|
+
return `${String(Math.round(e * Ar))}000`;
|
|
1502
1550
|
}
|
|
1503
|
-
function
|
|
1551
|
+
function Nr(e) {
|
|
1504
1552
|
return {
|
|
1505
|
-
name:
|
|
1553
|
+
name: jr[e.reason],
|
|
1506
1554
|
kind: "internal",
|
|
1507
1555
|
traceId: e.traceId,
|
|
1508
1556
|
spanId: e.spanId,
|
|
@@ -1513,38 +1561,41 @@ function Sr(e) {
|
|
|
1513
1561
|
attributes: {}
|
|
1514
1562
|
};
|
|
1515
1563
|
}
|
|
1516
|
-
function
|
|
1564
|
+
function Pr(e) {
|
|
1517
1565
|
return {
|
|
1518
|
-
[
|
|
1519
|
-
[
|
|
1520
|
-
[
|
|
1521
|
-
[
|
|
1522
|
-
[
|
|
1566
|
+
[_.kind]: e.kind,
|
|
1567
|
+
[_.parentId]: e.parentSpanId,
|
|
1568
|
+
[_.start]: Mr(e.startMs),
|
|
1569
|
+
[_.end]: Mr(e.endMs),
|
|
1570
|
+
[_.status]: e.error ? "error" : "unset",
|
|
1523
1571
|
...e.link ? {
|
|
1524
|
-
[
|
|
1525
|
-
[
|
|
1572
|
+
[_.linkTraceId]: e.link.traceId,
|
|
1573
|
+
[_.linkSpanId]: e.link.spanId
|
|
1526
1574
|
} : {}
|
|
1527
1575
|
};
|
|
1528
1576
|
}
|
|
1529
1577
|
// src/core/runtime.ts
|
|
1530
|
-
var
|
|
1531
|
-
errors: async () => (await import("./errors-
|
|
1532
|
-
network: async () => (await import("./network-
|
|
1533
|
-
interactions: async () => (await import("./interactions-
|
|
1534
|
-
webVitals: async () => (await import("./web-vitals-
|
|
1535
|
-
longFrames: async () => (await import("./long-frames-
|
|
1536
|
-
console: async () => (await import("./console-
|
|
1537
|
-
uncleanExit: async () => (await import("./unclean-exit-
|
|
1538
|
-
userTiming: async () => (await import("./user-timing-
|
|
1539
|
-
reports: async () => (await import("./reports-
|
|
1540
|
-
resourceTiming: async () => (await import("./resource-timing-
|
|
1541
|
-
lifecycle: async () => (await import("./lifecycle-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1578
|
+
var Fr = {
|
|
1579
|
+
errors: async () => (await import("./errors-D6bwgJtO.js")).ErrorCapture,
|
|
1580
|
+
network: async () => (await import("./network-C7SkLf4v.js")).NetworkCapture,
|
|
1581
|
+
interactions: async () => (await import("./interactions-B6z2I4tU.js")).InteractionCapture,
|
|
1582
|
+
webVitals: async () => (await import("./web-vitals-CsGCWnUr.js")).WebVitalsCapture,
|
|
1583
|
+
longFrames: async () => (await import("./long-frames-430_85Da.js")).LongFrameCapture,
|
|
1584
|
+
console: async () => (await import("./console-cwgHKXvM.js")).ConsoleCapture,
|
|
1585
|
+
uncleanExit: async () => (await import("./unclean-exit-Cob_jyTv.js")).UncleanExitCapture,
|
|
1586
|
+
userTiming: async () => (await import("./user-timing-DgHubxCI.js")).UserTimingCapture,
|
|
1587
|
+
reports: async () => (await import("./reports-BuXekPOS.js")).ReportCapture,
|
|
1588
|
+
resourceTiming: async () => (await import("./resource-timing-CXGHwFRD.js")).ResourceTimingCapture,
|
|
1589
|
+
lifecycle: async () => (await import("./lifecycle-CZ6RRXc6.js")).LifecycleCapture,
|
|
1590
|
+
framePhases: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePhasesCapture,
|
|
1591
|
+
framePacing: async () => (await import("./profiler-frames-CLXlT_xL.js")).FramePacingCapture,
|
|
1592
|
+
replay: async () => (await import("./replay-0zAJv9T3.js")).ReplayCapture
|
|
1593
|
+
}, Ir = /* @__PURE__ */ new WeakMap(), Lr = 0;
|
|
1594
|
+
function K(e) {
|
|
1595
|
+
let t = Ir.get(e);
|
|
1596
|
+
return t === void 0 && (t = ++Lr, Ir.set(e, t)), t;
|
|
1597
|
+
}
|
|
1598
|
+
var Rr = Symbol.for(e), zr = Symbol.for(ze), Br = ["batching", "retention"], Vr = {
|
|
1548
1599
|
endpoint: null,
|
|
1549
1600
|
metricsEndpoint: "",
|
|
1550
1601
|
tracesEndpoint: "",
|
|
@@ -1553,34 +1604,34 @@ var Or = Symbol.for(he), kr = Symbol.for(_e), Ar = ["batching", "retention"], jr
|
|
|
1553
1604
|
transport: void 0,
|
|
1554
1605
|
transportOnExit: void 0,
|
|
1555
1606
|
transportWorker: void 0
|
|
1556
|
-
},
|
|
1607
|
+
}, Hr = Object.keys(Vr), Ur = /* @__PURE__ */ new Set([
|
|
1557
1608
|
"bus.role_resolved",
|
|
1558
1609
|
"config.reconfigured",
|
|
1559
1610
|
"security.rotated",
|
|
1560
1611
|
"journey.adopted",
|
|
1561
1612
|
"journey.expired"
|
|
1562
1613
|
]);
|
|
1563
|
-
function
|
|
1614
|
+
function Wr(e) {
|
|
1564
1615
|
return JSON.stringify({
|
|
1565
1616
|
...e,
|
|
1566
|
-
urlTransform: e.urlTransform ?
|
|
1617
|
+
urlTransform: e.urlTransform ? K(e.urlTransform) : void 0,
|
|
1567
1618
|
webVitalsLoader: e.webVitalsLoader !== void 0,
|
|
1568
1619
|
ignoreUrls: e.ignoreUrls.map(String),
|
|
1569
1620
|
propagateTraceHeaderTo: e.propagateTraceHeaderTo.map(String),
|
|
1570
1621
|
userTimingInclude: e.userTimingInclude.map(String),
|
|
1571
|
-
plugins: e.plugins.map(
|
|
1622
|
+
plugins: e.plugins.map(K)
|
|
1572
1623
|
});
|
|
1573
1624
|
}
|
|
1574
|
-
function
|
|
1575
|
-
if (!
|
|
1625
|
+
function Gr(e) {
|
|
1626
|
+
if (!C(e)) return e;
|
|
1576
1627
|
let t = { ...e };
|
|
1577
1628
|
for (let e of ["url", "endpoint"]) {
|
|
1578
1629
|
let n = t[e];
|
|
1579
|
-
typeof n == "string" && (t[e] =
|
|
1630
|
+
typeof n == "string" && (t[e] = w(n, !1));
|
|
1580
1631
|
}
|
|
1581
1632
|
return t;
|
|
1582
1633
|
}
|
|
1583
|
-
function
|
|
1634
|
+
function Kr(e) {
|
|
1584
1635
|
return {
|
|
1585
1636
|
...e,
|
|
1586
1637
|
endpoint: null,
|
|
@@ -1595,14 +1646,15 @@ function Ir(e) {
|
|
|
1595
1646
|
}
|
|
1596
1647
|
};
|
|
1597
1648
|
}
|
|
1598
|
-
function
|
|
1649
|
+
function qr(e) {
|
|
1599
1650
|
return !!e.endpoint || !!e.metricsEndpoint || !!e.tracesEndpoint || e.transport !== void 0 || e.transportWorker !== void 0;
|
|
1600
1651
|
}
|
|
1601
|
-
function
|
|
1602
|
-
return e.sdkVersion ===
|
|
1652
|
+
function Jr(e) {
|
|
1653
|
+
return e.sdkVersion === s;
|
|
1603
1654
|
}
|
|
1604
1655
|
var q = class e {
|
|
1605
1656
|
rotating = !1;
|
|
1657
|
+
profilerOn = !1;
|
|
1606
1658
|
closingContext = !1;
|
|
1607
1659
|
mismatchVersion = null;
|
|
1608
1660
|
contextMismatch = !1;
|
|
@@ -1610,8 +1662,8 @@ var q = class e {
|
|
|
1610
1662
|
memoryStorage;
|
|
1611
1663
|
storagePersistence = "off";
|
|
1612
1664
|
recordingDiagnostic = !1;
|
|
1613
|
-
diagnosticLogger = new
|
|
1614
|
-
debugBuffer = new
|
|
1665
|
+
diagnosticLogger = new N(() => this, Ae);
|
|
1666
|
+
debugBuffer = new gr(() => this.config.debugBuffer);
|
|
1615
1667
|
explicitSecurityContext;
|
|
1616
1668
|
ownerAdopted = !1;
|
|
1617
1669
|
isRotating() {
|
|
@@ -1621,7 +1673,7 @@ var q = class e {
|
|
|
1621
1673
|
typeof e == "boolean" && (this.config.lockConfiguration = e);
|
|
1622
1674
|
}
|
|
1623
1675
|
static local = null;
|
|
1624
|
-
sdkVersion =
|
|
1676
|
+
sdkVersion = s;
|
|
1625
1677
|
diagnostics;
|
|
1626
1678
|
config;
|
|
1627
1679
|
platform;
|
|
@@ -1629,10 +1681,10 @@ var q = class e {
|
|
|
1629
1681
|
stores;
|
|
1630
1682
|
identityBuiltAs;
|
|
1631
1683
|
sessionTouch;
|
|
1632
|
-
context = new
|
|
1684
|
+
context = new hr();
|
|
1633
1685
|
breadcrumbs;
|
|
1634
1686
|
tracing;
|
|
1635
|
-
sequence = new
|
|
1687
|
+
sequence = new Wt();
|
|
1636
1688
|
journey;
|
|
1637
1689
|
builder;
|
|
1638
1690
|
remote = {
|
|
@@ -1642,8 +1694,12 @@ var q = class e {
|
|
|
1642
1694
|
}
|
|
1643
1695
|
};
|
|
1644
1696
|
identityEpoch = 0;
|
|
1697
|
+
errorHook;
|
|
1698
|
+
replayConsent;
|
|
1699
|
+
replay;
|
|
1645
1700
|
remoteCaptureTimer;
|
|
1646
1701
|
installedCaptureKey = "";
|
|
1702
|
+
replayBuiltKey = "";
|
|
1647
1703
|
console;
|
|
1648
1704
|
drops;
|
|
1649
1705
|
meter;
|
|
@@ -1653,7 +1709,7 @@ var q = class e {
|
|
|
1653
1709
|
storageBuiltAs;
|
|
1654
1710
|
sender;
|
|
1655
1711
|
senderLoad;
|
|
1656
|
-
pendingRecords = new
|
|
1712
|
+
pendingRecords = new br((e) => {
|
|
1657
1713
|
this.dropHeld(e);
|
|
1658
1714
|
});
|
|
1659
1715
|
captures = [];
|
|
@@ -1665,7 +1721,7 @@ var q = class e {
|
|
|
1665
1721
|
uncleanExit: !1,
|
|
1666
1722
|
userTiming: !1
|
|
1667
1723
|
};
|
|
1668
|
-
bootBuffer = new
|
|
1724
|
+
bootBuffer = new br((e) => {
|
|
1669
1725
|
this.dropHeld(e);
|
|
1670
1726
|
});
|
|
1671
1727
|
forwardBuffer = [];
|
|
@@ -1681,23 +1737,23 @@ var q = class e {
|
|
|
1681
1737
|
degraded;
|
|
1682
1738
|
serverReported = !1;
|
|
1683
1739
|
onPageHide = () => {
|
|
1684
|
-
|
|
1740
|
+
j(this), this.role() === "forwarder" && (this.tracing.end(), this.sendForwarded());
|
|
1685
1741
|
};
|
|
1686
1742
|
constructor(e, t = !1) {
|
|
1687
|
-
this.diagnostics = new
|
|
1688
|
-
let n = (e) =>
|
|
1689
|
-
this.tracing = new
|
|
1743
|
+
this.diagnostics = new _r(e.onDiagnostic), this.platform = Ze(this.diagnostics), this.degraded = t || this.onServer(), this.config = W(this.allowed(e), this.diagnostics), this.explicitSecurityContext = !!e.securityContext?.id, this.config.securityContext.id ||= O(this.diagnostics), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.identityBuiltAs = this.config.identity, this.stores = this.identityBuiltAs === "memory" || this.onServer() ? at() : st, this.identity = ot(this.diagnostics, this.stores, this.config.correlation.sessionIdleMs), this.sessionTouch = new rt(this.diagnostics, this.stores, this.config.correlation.sessionTouchMs, this.config.correlation.sessionIdleMs), this.breadcrumbs = new tn(this.config.capturePolicy.breadcrumbs);
|
|
1744
|
+
let n = (e) => mt(e, this.config.sampling.defaultRate);
|
|
1745
|
+
this.tracing = new en(this.diagnostics, this.config.correlation.traceMaxAgeMs || Infinity, this.config.otelLoader, {
|
|
1690
1746
|
enabled: () => this.config.tracesEndpoint !== "",
|
|
1691
1747
|
keeps: n,
|
|
1692
1748
|
onEnd: (e) => {
|
|
1693
|
-
n(e.traceId) && this.recordSpan(
|
|
1749
|
+
n(e.traceId) && this.recordSpan(Nr(e));
|
|
1694
1750
|
}
|
|
1695
|
-
}), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new
|
|
1696
|
-
...
|
|
1751
|
+
}), this.tracing.loadOtel(), this.limits = { ...this.config.limits }, this.console = new Ut(this.config.console, this.diagnostics, this.limits), this.drops = new yr(this.config, this.diagnostics), this.journeyOptions = {
|
|
1752
|
+
...ft,
|
|
1697
1753
|
maxAgeMs: this.config.journey.maxAgeMs
|
|
1698
|
-
}, this.journey = new
|
|
1754
|
+
}, this.journey = new dt(this.journeyOptions, this.diagnostics, this.identity.contextId, (e) => {
|
|
1699
1755
|
this.bus?.broadcastJourney(e);
|
|
1700
|
-
}, this.stores), this.builder = new
|
|
1756
|
+
}, this.stores), this.builder = new kr({
|
|
1701
1757
|
remote: this.remote,
|
|
1702
1758
|
config: this.config,
|
|
1703
1759
|
limits: this.limits,
|
|
@@ -1709,9 +1765,9 @@ var q = class e {
|
|
|
1709
1765
|
identity: this.identity,
|
|
1710
1766
|
platform: this.platform,
|
|
1711
1767
|
debug: this.debugBuffer
|
|
1712
|
-
}), this.meter = new
|
|
1768
|
+
}), this.meter = new Vt(() => this.config.batching.metricFlushIntervalMs, (e, t, n) => {
|
|
1713
1769
|
this.emitPoint(e, t, n);
|
|
1714
|
-
}, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler());
|
|
1770
|
+
}, this.diagnostics, this.config.metrics), this.diagnostics.setHandler(this.diagnosticHandler()), this.syncProfiler();
|
|
1715
1771
|
}
|
|
1716
1772
|
diagnosticHandler() {
|
|
1717
1773
|
return this.config.diagnostics.records === !1 ? this.config.onDiagnostic : (e) => {
|
|
@@ -1723,10 +1779,10 @@ var q = class e {
|
|
|
1723
1779
|
if ((t === !0 || t !== !1 && t.includes(e.code)) && !this.recordingDiagnostic) {
|
|
1724
1780
|
this.recordingDiagnostic = !0;
|
|
1725
1781
|
try {
|
|
1726
|
-
(
|
|
1782
|
+
(Ur.has(e.code) ? this.diagnosticLogger.info : this.diagnosticLogger.warn)(e.message, {
|
|
1727
1783
|
"diagnostic.code": e.code,
|
|
1728
1784
|
"diagnostic.count": e.count,
|
|
1729
|
-
"diagnostic.detail":
|
|
1785
|
+
"diagnostic.detail": Gr(e.detail)
|
|
1730
1786
|
});
|
|
1731
1787
|
} finally {
|
|
1732
1788
|
this.recordingDiagnostic = !1;
|
|
@@ -1738,11 +1794,11 @@ var q = class e {
|
|
|
1738
1794
|
let n = {
|
|
1739
1795
|
t: Date.now(),
|
|
1740
1796
|
category: "custom",
|
|
1741
|
-
message:
|
|
1797
|
+
message: et(String(e), this.limits.maxBodyChars)
|
|
1742
1798
|
};
|
|
1743
1799
|
if (t !== void 0) {
|
|
1744
|
-
let e =
|
|
1745
|
-
n.data =
|
|
1800
|
+
let e = tt(t, this.limits, this.diagnostics);
|
|
1801
|
+
n.data = C(e) ? e : { value: e };
|
|
1746
1802
|
}
|
|
1747
1803
|
this.breadcrumbs.push(n);
|
|
1748
1804
|
});
|
|
@@ -1751,8 +1807,8 @@ var q = class e {
|
|
|
1751
1807
|
!this.destroyed && !this.rotating && this.meter.record(e, t, n);
|
|
1752
1808
|
}
|
|
1753
1809
|
startMeasure(e, t) {
|
|
1754
|
-
let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n);
|
|
1755
|
-
return
|
|
1810
|
+
let n = this.identityEpoch, r = () => !this.destroyed && !this.rotating && (!this.config.securityContext.isolation || this.identityEpoch === n), i = this.diagnostics.guard("record.sanitize_failed", "The library could not read the attributes of the measure.", () => ({ ...t }));
|
|
1811
|
+
return Cr(this.diagnostics.guard("record.sanitize_failed", "The library could not read the name of the measure.", () => `${e}`) ?? "", i ?? {}, this.tracing.request().span, {
|
|
1756
1812
|
metric: (e, t, n) => {
|
|
1757
1813
|
r() && this.recordMetric(e, t, n);
|
|
1758
1814
|
},
|
|
@@ -1767,9 +1823,9 @@ var q = class e {
|
|
|
1767
1823
|
level: "INFO",
|
|
1768
1824
|
type: "span",
|
|
1769
1825
|
body: e.name,
|
|
1770
|
-
namespace:
|
|
1826
|
+
namespace: f,
|
|
1771
1827
|
payload: e.attributes,
|
|
1772
|
-
fixed:
|
|
1828
|
+
fixed: Pr(e),
|
|
1773
1829
|
trace: {
|
|
1774
1830
|
traceId: e.traceId,
|
|
1775
1831
|
spanId: e.spanId,
|
|
@@ -1783,13 +1839,49 @@ var q = class e {
|
|
|
1783
1839
|
level: "INFO",
|
|
1784
1840
|
type: "metric",
|
|
1785
1841
|
body: e,
|
|
1786
|
-
namespace:
|
|
1842
|
+
namespace: a,
|
|
1787
1843
|
payload: t,
|
|
1788
1844
|
fixed: n,
|
|
1789
1845
|
aggregated: !0
|
|
1790
1846
|
});
|
|
1791
1847
|
this.emit(r);
|
|
1792
1848
|
}
|
|
1849
|
+
syncProfiler() {
|
|
1850
|
+
let { enabled: e } = this.config.profiler;
|
|
1851
|
+
if (e === this.profilerOn) return;
|
|
1852
|
+
this.profilerOn = e;
|
|
1853
|
+
let t = T();
|
|
1854
|
+
if (!e) {
|
|
1855
|
+
t.collect(!1), t.detach();
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
let n = {
|
|
1859
|
+
capacity: this.config.profiler.maxProbes,
|
|
1860
|
+
intervalMs: () => this.config.profiler.flushIntervalMs,
|
|
1861
|
+
emit: (e, t, n) => {
|
|
1862
|
+
this.emitPoint(e, t, n);
|
|
1863
|
+
},
|
|
1864
|
+
diagnostics: this.diagnostics,
|
|
1865
|
+
ready: () => !this.rotating || this.closingContext,
|
|
1866
|
+
outlier: (e, t) => {
|
|
1867
|
+
this.breadcrumbs.push({
|
|
1868
|
+
t: Date.now(),
|
|
1869
|
+
category: "profile",
|
|
1870
|
+
message: `${e} ${String(Math.round(t))} ms`
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
};
|
|
1874
|
+
t.attach(n);
|
|
1875
|
+
}
|
|
1876
|
+
setReplay(e) {
|
|
1877
|
+
this.replayConsent = e, e ? this.replay?.start() : this.replay?.stop();
|
|
1878
|
+
}
|
|
1879
|
+
collectPoints() {
|
|
1880
|
+
this.meter.collect(), this.profilerOn && T().collect(!1);
|
|
1881
|
+
}
|
|
1882
|
+
advanceIdentity() {
|
|
1883
|
+
this.identityEpoch++, this.profilerOn && this.config.securityContext.isolation && T().reset();
|
|
1884
|
+
}
|
|
1793
1885
|
busCanAccept = (e, t) => this.bus?.isRegistered(e, t) ?? !1;
|
|
1794
1886
|
busAccept = (e, t, n) => {
|
|
1795
1887
|
this.destroyed || this.ensureBus().then((r) => {
|
|
@@ -1799,19 +1891,19 @@ var q = class e {
|
|
|
1799
1891
|
});
|
|
1800
1892
|
};
|
|
1801
1893
|
static pinned() {
|
|
1802
|
-
return globalThis[
|
|
1894
|
+
return globalThis[Rr] ?? null;
|
|
1803
1895
|
}
|
|
1804
1896
|
static current() {
|
|
1805
1897
|
let t = e.local;
|
|
1806
1898
|
if (t) return t.destroyed ? null : t;
|
|
1807
1899
|
let n = e.pinned();
|
|
1808
|
-
return n &&
|
|
1900
|
+
return n && Jr(n) ? n : null;
|
|
1809
1901
|
}
|
|
1810
1902
|
static stopped() {
|
|
1811
1903
|
let t = e.local;
|
|
1812
1904
|
if (t?.destroyed) return t;
|
|
1813
|
-
let n = globalThis[
|
|
1814
|
-
return n &&
|
|
1905
|
+
let n = globalThis[zr];
|
|
1906
|
+
return n && Jr(n) ? n : null;
|
|
1815
1907
|
}
|
|
1816
1908
|
isDestroyed() {
|
|
1817
1909
|
return this.destroyed;
|
|
@@ -1822,19 +1914,19 @@ var q = class e {
|
|
|
1822
1914
|
e.local = null;
|
|
1823
1915
|
let i = e.pinned();
|
|
1824
1916
|
if (i) {
|
|
1825
|
-
if (!
|
|
1917
|
+
if (!Jr(i)) return e.startDegraded(t, i.sdkVersion);
|
|
1826
1918
|
if (!i.destroyed) return i.reconfigure(t), i;
|
|
1827
1919
|
}
|
|
1828
1920
|
let a = new e(t);
|
|
1829
|
-
return a.tunablesLocked = !n, globalThis[
|
|
1921
|
+
return a.tunablesLocked = !n, globalThis[Rr] = a, Reflect.deleteProperty(globalThis, zr), a.init(), a;
|
|
1830
1922
|
}
|
|
1831
1923
|
static startDegraded(t, n) {
|
|
1832
1924
|
let r = new e(t, !0);
|
|
1833
1925
|
e.local = r;
|
|
1834
1926
|
let i = typeof n == "string" ? n : "before 0.9.0";
|
|
1835
|
-
return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${
|
|
1927
|
+
return r.mismatchVersion = i, r.diagnostics.report("runtime.version_mismatch", `Another copy of the library, version ${i}, owns the page runtime. This copy, version ${s}, runs in console-only mode and installs no capture. Load one version of the library on the page.`, {
|
|
1836
1928
|
found: i,
|
|
1837
|
-
own:
|
|
1929
|
+
own: s
|
|
1838
1930
|
}), r.init(), r;
|
|
1839
1931
|
}
|
|
1840
1932
|
reconfigure(e) {
|
|
@@ -1843,34 +1935,34 @@ var q = class e {
|
|
|
1843
1935
|
return;
|
|
1844
1936
|
}
|
|
1845
1937
|
if (this.config.lockConfiguration) {
|
|
1846
|
-
let t =
|
|
1938
|
+
let t = W(e, this.diagnostics, this.config);
|
|
1847
1939
|
J(this.config, t) || this.diagnostics.report("config.locked", "Runtime configuration is locked. Use setConfigurationLocked(false) to unlock it explicitly.");
|
|
1848
1940
|
return;
|
|
1849
1941
|
}
|
|
1850
|
-
|
|
1942
|
+
j(this);
|
|
1851
1943
|
let t = this.keepDestination(this.keepRouting(this.allowed(e)));
|
|
1852
1944
|
!this.tunablesLocked && t.securityContext?.id && (this.explicitSecurityContext = !0);
|
|
1853
1945
|
for (let e of ["correlation", "persistence"]) (e !== "persistence" || this.tunablesLocked || this.senderLoad !== void 0) && t[e] && !J({
|
|
1854
1946
|
...this.config[e],
|
|
1855
1947
|
...t[e]
|
|
1856
1948
|
}, this.config[e]) && (this.diagnostics.report("config.invalid", `${e} cannot change after startup.`), Object.assign(t, { [e]: this.config[e] }));
|
|
1857
|
-
let n =
|
|
1949
|
+
let n = W(t, this.diagnostics, this.config);
|
|
1858
1950
|
this.keepStartupTunables(n);
|
|
1859
1951
|
let { redact: r, processors: i } = this.config;
|
|
1860
|
-
|
|
1952
|
+
mr(this.config, n), (this.config.redact !== r || this.config.processors !== i) && this.debugBuffer.clear(), this.breadcrumbs.resize(this.config.capturePolicy.breadcrumbs), this.diagnostics.setHandler(this.diagnosticHandler()), this.diagnostics.setPolicy(this.config.diagnostics.throttleMs, this.config.diagnostics.consoleFallback), this.builder.invalidateResource(), this.console.update(this.config.console), this.keepBuiltStorage(), this.keepBuiltIdentity(), this.syncProfiler(), this.refreshCaptures(), this.roleResolved && this.syncSender(), this.diagnostics.report("config.reconfigured", "A later configure() call updated the runtime.");
|
|
1861
1953
|
}
|
|
1862
1954
|
onServer() {
|
|
1863
1955
|
return this.platform.platform === "node";
|
|
1864
1956
|
}
|
|
1865
1957
|
allowed(e) {
|
|
1866
|
-
return this.degraded ? (this.onServer() && !this.serverReported &&
|
|
1958
|
+
return this.degraded ? (this.onServer() && !this.serverReported && qr(e) && (this.serverReported = !0, this.diagnostics.report("config.invalid", "The library runs console-only on Node. It sends no record and installs no capture. It ignores endpoint, metricsEndpoint, tracesEndpoint, transport and transportWorker.")), Kr(e)) : e;
|
|
1867
1959
|
}
|
|
1868
1960
|
keepRouting(e) {
|
|
1869
1961
|
if (!this.tunablesLocked || this.degraded || !this.config.securityContext.isolation) return e;
|
|
1870
|
-
let t =
|
|
1962
|
+
let t = W(e, new _r(), this.config), n = Hr.filter((e) => !J(t[e], this.config[e]));
|
|
1871
1963
|
if (t.securityContext.id !== this.config.securityContext.id && n.push("securityContext.id"), n.length === 0) return e;
|
|
1872
1964
|
let r = { ...e };
|
|
1873
|
-
for (let e of
|
|
1965
|
+
for (let e of Hr) n.includes(e) && Reflect.deleteProperty(r, e);
|
|
1874
1966
|
if (n.includes("securityContext.id")) {
|
|
1875
1967
|
let t = { ...e.securityContext };
|
|
1876
1968
|
Reflect.deleteProperty(t, "id"), r.securityContext = t;
|
|
@@ -1878,16 +1970,18 @@ var q = class e {
|
|
|
1878
1970
|
return this.diagnostics.report("config.invalid", `Isolation refuses changes to ${n.join(", ")}. Use rotateSecurityContext() for these changes. To permit them, set securityContext.isolation: false in a separate configure() call. The other settings apply.`), r;
|
|
1879
1971
|
}
|
|
1880
1972
|
keepStartupTunables(e) {
|
|
1881
|
-
if (this.senderLoad !== void 0 && this.keepSections(e,
|
|
1973
|
+
if (this.senderLoad !== void 0 && this.keepSections(e, Br), !this.tunablesLocked) {
|
|
1882
1974
|
this.tunablesLocked = !0, Object.assign(this.limits, e.limits), this.journeyOptions.maxAgeMs = e.journey.maxAgeMs;
|
|
1883
1975
|
return;
|
|
1884
1976
|
}
|
|
1885
1977
|
this.keepSections(e, ["limits"]);
|
|
1886
1978
|
let { maxAgeMs: t } = this.config.journey;
|
|
1887
1979
|
e.journey.maxAgeMs !== t && (this.diagnostics.report("config.invalid", `journey.maxAgeMs cannot change after startup. It stays ${String(t)}.`, { requested: e.journey.maxAgeMs }), e.journey.maxAgeMs = t);
|
|
1980
|
+
let { maxProbes: n } = this.config.profiler;
|
|
1981
|
+
e.profiler.maxProbes !== n && (this.diagnostics.report("config.invalid", `profiler.maxProbes cannot change after startup. It stays ${String(n)}.`, { requested: e.profiler.maxProbes }), e.profiler.maxProbes = n);
|
|
1888
1982
|
}
|
|
1889
1983
|
keepSections(e, t) {
|
|
1890
|
-
for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The values
|
|
1984
|
+
for (let n of t) J(e[n], this.config[n]) || (this.diagnostics.report("config.invalid", `${n} cannot change after startup. The current values stay.`, { requested: e[n] }), Object.assign(e, { [n]: this.config[n] }));
|
|
1891
1985
|
}
|
|
1892
1986
|
keepBuiltStorage() {
|
|
1893
1987
|
let e = this.storageBuiltAs;
|
|
@@ -1896,8 +1990,8 @@ var q = class e {
|
|
|
1896
1990
|
keepDestination(e) {
|
|
1897
1991
|
if (this.senderLoad === void 0) return e;
|
|
1898
1992
|
let t = e;
|
|
1899
|
-
for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The transport
|
|
1900
|
-
return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The endpoint
|
|
1993
|
+
for (let n of ["transport", "transportWorker"]) n in e && e[n] === void 0 != (this.config[n] === void 0) && (this.diagnostics.report("config.invalid", `You cannot add or remove ${n} after the delivery stack loads. The current transport stays.`), t = { ...t }, Reflect.deleteProperty(t, n));
|
|
1994
|
+
return (t.endpoint === null || t.endpoint === "") && this.config.transport === void 0 && (this.diagnostics.report("config.invalid", "You cannot remove the endpoint after the delivery stack loads. The current endpoint stays."), t = {
|
|
1901
1995
|
...t,
|
|
1902
1996
|
endpoint: void 0
|
|
1903
1997
|
}), t;
|
|
@@ -1938,22 +2032,22 @@ var q = class e {
|
|
|
1938
2032
|
}
|
|
1939
2033
|
async buildBus() {
|
|
1940
2034
|
try {
|
|
1941
|
-
let { Bus: e } = await import("./bus-
|
|
2035
|
+
let { Bus: e } = await import("./bus-ecxUNTja.js");
|
|
1942
2036
|
if (this.destroyed) return null;
|
|
1943
2037
|
let t = new e(this.config, this.diagnostics, this.platform, this.identity.contextId, this.identity.tabId, {
|
|
1944
2038
|
onSecurityContext: (e) => {
|
|
1945
2039
|
if (this.explicitSecurityContext && this.config.securityContext.id !== e) return this.contextMismatch = !0, this.diagnostics.report("security.context_mismatch", "The configured security context differs from the upstream owner."), !1;
|
|
1946
2040
|
if (this.contextMismatch = !1, this.config.securityContext.id !== e) {
|
|
1947
2041
|
if (this.ownerAdopted) {
|
|
1948
|
-
|
|
2042
|
+
j(this), this.drops.add("security_context", [
|
|
1949
2043
|
...this.bootBuffer.take(),
|
|
1950
2044
|
...this.pendingRecords.take(),
|
|
1951
2045
|
...this.forwardBuffer
|
|
1952
2046
|
]), this.forwardBuffer = [], this.context.clear(), this.breadcrumbs.clear();
|
|
1953
2047
|
let e = this.rotating;
|
|
1954
|
-
this.rotating = !0, this.
|
|
2048
|
+
this.rotating = !0, this.collectPoints(), this.profilerOn && T().reset();
|
|
1955
2049
|
let t = this.sessionTouch.stored();
|
|
1956
|
-
this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t :
|
|
2050
|
+
this.resetSession(t !== void 0 && t !== this.identity.sessionId ? t : O(this.diagnostics)), this.rotating = e, this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures();
|
|
1957
2051
|
}
|
|
1958
2052
|
this.config.securityContext.id = e;
|
|
1959
2053
|
}
|
|
@@ -1991,7 +2085,7 @@ var q = class e {
|
|
|
1991
2085
|
async buildSender() {
|
|
1992
2086
|
this.storageBuiltAs = this.config.storage;
|
|
1993
2087
|
try {
|
|
1994
|
-
let { Sender: e } = await import("./sender-
|
|
2088
|
+
let { Sender: e } = await import("./sender-15zEsZpr.js"), t = this.destroyed ? null : await e.create({
|
|
1995
2089
|
storage: this.memoryStorage,
|
|
1996
2090
|
onStorage: (e) => {
|
|
1997
2091
|
e.name === "memory" && (this.memoryStorage = e);
|
|
@@ -2005,7 +2099,7 @@ var q = class e {
|
|
|
2005
2099
|
onLoss: this.reportLoss,
|
|
2006
2100
|
remote: this.remote,
|
|
2007
2101
|
beforeExit: () => {
|
|
2008
|
-
|
|
2102
|
+
j(this), this.collectPoints(), this.tracing.end();
|
|
2009
2103
|
}
|
|
2010
2104
|
});
|
|
2011
2105
|
if (!t || this.destroyed) {
|
|
@@ -2023,11 +2117,35 @@ var q = class e {
|
|
|
2023
2117
|
let e = this.remote.sampling?.wire();
|
|
2024
2118
|
e && (this.remoteCaptureTimer = setTimeout(() => {
|
|
2025
2119
|
this.refreshCaptures();
|
|
2026
|
-
}, e.ttlMs),
|
|
2120
|
+
}, e.ttlMs), Xe(this.remoteCaptureTimer)), this.captureState(this.effectiveCapture()) !== this.installedCaptureKey && this.installCaptures();
|
|
2121
|
+
}
|
|
2122
|
+
captureState(e) {
|
|
2123
|
+
let { enabled: t, framePhases: n, framePacing: r } = this.config.profiler;
|
|
2124
|
+
return `${Wr(e)}${String(t && n)}${String(t && r)}${this.replayState(e)}`;
|
|
2125
|
+
}
|
|
2126
|
+
replayState(e) {
|
|
2127
|
+
let { replay: t } = this.config;
|
|
2128
|
+
return t.enabled ? JSON.stringify([
|
|
2129
|
+
t.loader && K(t.loader),
|
|
2130
|
+
t.onSegment && K(t.onSegment),
|
|
2131
|
+
K(t.recordOptions),
|
|
2132
|
+
t.endpoint,
|
|
2133
|
+
t.requireConsent,
|
|
2134
|
+
t.mode,
|
|
2135
|
+
t.maskText,
|
|
2136
|
+
t.maskInputs,
|
|
2137
|
+
t.maskSelectors,
|
|
2138
|
+
t.blockSelectors,
|
|
2139
|
+
t.recordCanvas,
|
|
2140
|
+
t.bufferMs,
|
|
2141
|
+
t.plugins.map(K),
|
|
2142
|
+
e.fullUrls,
|
|
2143
|
+
e.ignoreUrls.map(String)
|
|
2144
|
+
]) : "";
|
|
2027
2145
|
}
|
|
2028
2146
|
effectiveCapture() {
|
|
2029
2147
|
let e = { ...this.config.capture }, t = this.remote.sampling?.current()?.capture;
|
|
2030
|
-
for (let n of
|
|
2148
|
+
for (let n of Te) {
|
|
2031
2149
|
let r = t?.[n];
|
|
2032
2150
|
if (e.remoteToggles.includes(n) && r !== void 0) {
|
|
2033
2151
|
if (r && typeof e[n] == "object") continue;
|
|
@@ -2039,19 +2157,21 @@ var q = class e {
|
|
|
2039
2157
|
async installCaptures() {
|
|
2040
2158
|
if (this.degraded) return;
|
|
2041
2159
|
let e = ++this.captureGeneration, t = this.effectiveCapture();
|
|
2042
|
-
this.installedCaptureKey =
|
|
2043
|
-
let n =
|
|
2044
|
-
|
|
2045
|
-
let
|
|
2160
|
+
this.installedCaptureKey = this.captureState(t);
|
|
2161
|
+
let n = this.replayState(t);
|
|
2162
|
+
n !== this.replayBuiltKey && (this.replayBuiltKey = "");
|
|
2163
|
+
let r = n !== "" && n === this.replayBuiltKey ? this.replay : void 0, i = [], { profiler: a } = this.config;
|
|
2164
|
+
(t.errors || t.rejections || t.resourceErrors) && i.push("errors"), (t.fetch || t.xhr) && i.push("network"), (t.interactions || t.navigation) && i.push("interactions"), t.webVitals && i.push("webVitals"), t.longFrames && i.push("longFrames"), (Array.isArray(t.console) ? t.console.length > 0 : t.console) && i.push("console"), t.uncleanExit && i.push("uncleanExit"), t.userTiming && i.push("userTiming"), t.reports && i.push("reports"), t.resourceTiming && i.push("resourceTiming"), t.lifecycle && i.push("lifecycle"), a.enabled && a.framePhases && i.push("framePhases"), a.enabled && a.framePacing && i.push("framePacing"), this.config.replay.enabled && !r && i.push("replay");
|
|
2165
|
+
let [o, s] = await Promise.all([Promise.all(i.map((e) => this.loadCapture(e))), t.webSocket ? this.loadWebSocket() : void 0]);
|
|
2046
2166
|
if (e !== this.captureGeneration || this.destroyed) return;
|
|
2047
|
-
this.uninstallCaptures();
|
|
2048
|
-
let
|
|
2167
|
+
this.uninstallCaptures(r);
|
|
2168
|
+
let c = {
|
|
2049
2169
|
isActive: () => !this.destroyed && !this.rotating,
|
|
2050
2170
|
config: Object.assign(Object.create(this.config), { capture: t }),
|
|
2051
2171
|
diagnostics: this.diagnostics,
|
|
2052
2172
|
breadcrumbs: this.breadcrumbs,
|
|
2053
2173
|
tracing: this.tracing,
|
|
2054
|
-
logger: new
|
|
2174
|
+
logger: new N(() => this, g),
|
|
2055
2175
|
once: this.captureOnce,
|
|
2056
2176
|
recordMetric: (e, t, n) => {
|
|
2057
2177
|
this.recordMetric(e, t, n);
|
|
@@ -2059,40 +2179,54 @@ var q = class e {
|
|
|
2059
2179
|
recordSpan: (e) => {
|
|
2060
2180
|
this.recordSpan(e);
|
|
2061
2181
|
},
|
|
2062
|
-
sessionId: () => this.identity.sessionId
|
|
2182
|
+
sessionId: () => this.identity.sessionId,
|
|
2183
|
+
onError: (e) => {
|
|
2184
|
+
this.errorHook = e;
|
|
2185
|
+
},
|
|
2186
|
+
setContext: (e, t) => {
|
|
2187
|
+
t === void 0 ? this.context.remove(e) : this.context.set(e, t);
|
|
2188
|
+
},
|
|
2189
|
+
replayConsent: () => this.replayConsent
|
|
2063
2190
|
};
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2191
|
+
o.forEach((e, t) => {
|
|
2192
|
+
if (e) {
|
|
2193
|
+
let r = new e(c);
|
|
2194
|
+
this.captures.push(r), i[t] === "replay" && (this.replay = r, this.replayBuiltKey = n);
|
|
2195
|
+
}
|
|
2196
|
+
});
|
|
2197
|
+
let l = s ? [...t.plugins, new s(this.diagnostics, c.config)] : t.plugins;
|
|
2198
|
+
for (let e of l) this.captures.push(this.pluginCapture(e));
|
|
2067
2199
|
for (let e of this.captures) this.diagnostics.guard("capture.install_failed", `The library could not install the ${e.name} capture.`, () => {
|
|
2068
2200
|
e.install();
|
|
2069
2201
|
});
|
|
2070
2202
|
}
|
|
2071
|
-
uninstallCaptures() {
|
|
2072
|
-
for (let
|
|
2073
|
-
|
|
2203
|
+
uninstallCaptures(e) {
|
|
2204
|
+
for (let t of this.captures) t !== e && this.diagnostics.guard("capture.install_failed", `The library could not uninstall the ${t.name} capture.`, () => {
|
|
2205
|
+
t.uninstall();
|
|
2074
2206
|
});
|
|
2075
|
-
this.captures.length = 0;
|
|
2207
|
+
this.captures.length = 0, this.replay = e, e && this.captures.push(e);
|
|
2076
2208
|
}
|
|
2077
2209
|
loadWebSocket() {
|
|
2078
|
-
return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-
|
|
2210
|
+
return this.diagnostics.guardAsync("capture.install_failed", "The library could not load the webSocket capture.", async () => (await import("./web-socket-DthJuSAg.js")).WebSocketCapture);
|
|
2079
2211
|
}
|
|
2080
2212
|
pluginCapture(e) {
|
|
2081
2213
|
let { name: t } = e, n = (e, t, n) => {
|
|
2082
2214
|
this.recordMetric(e, t, n);
|
|
2083
|
-
}, r = {
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2215
|
+
}, r = (e) => {
|
|
2216
|
+
this.diagnostics.report("config.invalid", de, void 0, e);
|
|
2217
|
+
}, i = {
|
|
2218
|
+
logger: new N(() => this, `${g}.${t}`),
|
|
2219
|
+
counter: (e, t = {}) => zt(e, t, n, r),
|
|
2220
|
+
histogram: (e, t = {}) => Bt(e, t, n, r),
|
|
2087
2221
|
addBreadcrumb: (e, t) => {
|
|
2088
2222
|
this.addBreadcrumb(e, t);
|
|
2089
2223
|
},
|
|
2090
|
-
ownRequest:
|
|
2224
|
+
ownRequest: ct
|
|
2091
2225
|
};
|
|
2092
2226
|
return {
|
|
2093
2227
|
name: t,
|
|
2094
2228
|
install: () => {
|
|
2095
|
-
e.install(
|
|
2229
|
+
e.install(i);
|
|
2096
2230
|
},
|
|
2097
2231
|
uninstall: () => {
|
|
2098
2232
|
e.uninstall();
|
|
@@ -2100,7 +2234,7 @@ var q = class e {
|
|
|
2100
2234
|
};
|
|
2101
2235
|
}
|
|
2102
2236
|
loadCapture(e) {
|
|
2103
|
-
return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`,
|
|
2237
|
+
return this.diagnostics.guardAsync("capture.install_failed", `The library could not load the ${e} capture.`, Fr[e]);
|
|
2104
2238
|
}
|
|
2105
2239
|
registerWorker(e, t = {}) {
|
|
2106
2240
|
let n = !1, r;
|
|
@@ -2122,15 +2256,16 @@ var q = class e {
|
|
|
2122
2256
|
}
|
|
2123
2257
|
async destroy() {
|
|
2124
2258
|
if (this.destroyed) return;
|
|
2125
|
-
|
|
2259
|
+
j(this), this.collectPoints(), this.profilerOn && (this.profilerOn = !1, T().detach()), this.tracing.end(), this.destroyed = !0, Tt(this), clearTimeout(this.remoteCaptureTimer), this.remoteCaptureTimer = void 0, this.degraded || removeEventListener("pagehide", this.onPageHide), this.uninstallCaptures();
|
|
2126
2260
|
let t = this.sender?.destroy();
|
|
2127
|
-
this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis,
|
|
2261
|
+
this.journey.destroy(), this.sendForwarded(), this.bus?.destroy(), this.drops.add("load_failed", this.pendingRecords.take()), await t, await this.senderLoad, await this.rotation?.catch(() => void 0), await this.memoryStorage?.close(), e.pinned() === this && (Reflect.deleteProperty(globalThis, Rr), globalThis[zr] = this);
|
|
2128
2262
|
}
|
|
2129
2263
|
emit(e) {
|
|
2130
2264
|
if (!e || this.destroyed || this.rotating && !this.closingContext) return;
|
|
2131
2265
|
this.sessionTouch.touch(this.identity.sessionId);
|
|
2132
|
-
let t = e.severityText === "ERROR" || e.severityText === "FATAL" ? [...this.debugBuffer.drain(), e] : [e];
|
|
2133
|
-
|
|
2266
|
+
let t = e.severityText === "ERROR" || e.severityText === "FATAL", n = t ? [...this.debugBuffer.drain(), e] : [e];
|
|
2267
|
+
t && this.errorHook?.(e);
|
|
2268
|
+
for (let e of n) this.ready ? this.route(e) : this.bootBuffer.push(e);
|
|
2134
2269
|
}
|
|
2135
2270
|
route(e) {
|
|
2136
2271
|
this.role() === "forwarder" ? this.forward(e) : this.deliver(e);
|
|
@@ -2158,11 +2293,11 @@ var q = class e {
|
|
|
2158
2293
|
}
|
|
2159
2294
|
let t = [];
|
|
2160
2295
|
for (let n of e) {
|
|
2161
|
-
if (!
|
|
2296
|
+
if (!We(n)) {
|
|
2162
2297
|
this.diagnostics.count("record.dropped_malformed");
|
|
2163
2298
|
continue;
|
|
2164
2299
|
}
|
|
2165
|
-
if (n.attributes["uiobs.debug_buffer"] !== !0 && !
|
|
2300
|
+
if (n.attributes["uiobs.debug_buffer"] !== !0 && !pt(n, this.config, this.remote.sampling?.current() ?? null)) {
|
|
2166
2301
|
this.diagnostics.count("record.dropped_by_sampling");
|
|
2167
2302
|
continue;
|
|
2168
2303
|
}
|
|
@@ -2182,51 +2317,51 @@ var q = class e {
|
|
|
2182
2317
|
reportGap = (e, t) => {
|
|
2183
2318
|
this.drops.add(e.reason, t.flatMap((e) => e.records), t.map((e) => e.id));
|
|
2184
2319
|
let n = Date.now();
|
|
2185
|
-
n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new
|
|
2320
|
+
n - this.lastGapAt < 6e4 || (this.lastGapAt = n, new N(() => this, u).warn("stored records were dropped before delivery", {
|
|
2186
2321
|
"gap.batches": e.batches,
|
|
2187
2322
|
"gap.records": e.records,
|
|
2188
2323
|
"gap.reason": e.reason
|
|
2189
2324
|
}));
|
|
2190
2325
|
};
|
|
2191
2326
|
regenerateTabId() {
|
|
2192
|
-
let e =
|
|
2327
|
+
let e = O(this.diagnostics);
|
|
2193
2328
|
this.diagnostics.report("bus.role_resolved", "Another context uses this tab id. A duplicated tab is the usual cause. The library makes a new tab id.", {
|
|
2194
2329
|
was: this.identity.tabId,
|
|
2195
2330
|
now: e
|
|
2196
|
-
}), this.identity.tabId = e,
|
|
2331
|
+
}), this.identity.tabId = e, nt(e, this.diagnostics, this.stores), this.builder.invalidateResource();
|
|
2197
2332
|
}
|
|
2198
2333
|
newSession() {
|
|
2199
|
-
this.destroyed || (
|
|
2334
|
+
this.destroyed || (j(this), this.resetSession(O(this.diagnostics)));
|
|
2200
2335
|
}
|
|
2201
2336
|
resetSession(e) {
|
|
2202
|
-
this.
|
|
2337
|
+
this.collectPoints(), this.tracing.rotate("explicit"), this.journey.end(), this.breadcrumbs.clear(), this.debugBuffer.clear(), this.replay?.reset(), this.identity.sessionId = e, this.sessionTouch.restart(e), this.builder.invalidateResource();
|
|
2203
2338
|
}
|
|
2204
2339
|
rotateSecurityContext(e, t = {}) {
|
|
2205
2340
|
if (this.rotation) return Promise.reject(/* @__PURE__ */ Error("A security-context rotation is already running."));
|
|
2206
2341
|
let n = t.pending ?? "discard", r = t.timeoutMs ?? 5e3;
|
|
2207
|
-
return !
|
|
2342
|
+
return !C(e) || !C(e.delivery) || ![
|
|
2208
2343
|
"discard",
|
|
2209
2344
|
"flush",
|
|
2210
2345
|
"retain",
|
|
2211
2346
|
"carry"
|
|
2212
|
-
].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (
|
|
2347
|
+
].includes(n) || !Number.isFinite(r) || r < 0 || e.id !== void 0 && (typeof e.id != "string" || e.id.length === 0) ? Promise.reject(/* @__PURE__ */ Error("Invalid security-context rotation options.")) : this.destroyed ? Promise.reject(/* @__PURE__ */ Error("The runtime has stopped.")) : (j(this), this.rotating = !0, this.rotation = this.rotateContext(e, n, r).finally(() => {
|
|
2213
2348
|
this.rotating = !1, this.rotation = void 0;
|
|
2214
2349
|
}), this.rotation);
|
|
2215
2350
|
}
|
|
2216
2351
|
async rotateContext(e, t, n) {
|
|
2217
2352
|
if (await this.started, this.role() === "forwarder") throw Error("Rotate the security context on the upstream owner, or use bus.mode: sender for an independent identity.");
|
|
2218
2353
|
await this.senderLoad;
|
|
2219
|
-
let r = this.config.securityContext.id, i = e.id ??
|
|
2354
|
+
let r = this.config.securityContext.id, i = e.id ?? O(this.diagnostics);
|
|
2220
2355
|
if (i === r) throw Error("A rotation requires a different security-context id.");
|
|
2221
2356
|
let a = {
|
|
2222
|
-
...
|
|
2357
|
+
...Vr,
|
|
2223
2358
|
...e.delivery
|
|
2224
|
-
}, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s =
|
|
2359
|
+
}, o = this.diagnostics.snapshot()["config.invalid"] ?? 0, s = W(this.allowed({
|
|
2225
2360
|
...a,
|
|
2226
2361
|
securityContext: { id: i }
|
|
2227
2362
|
}), this.diagnostics, {
|
|
2228
2363
|
...this.config,
|
|
2229
|
-
...
|
|
2364
|
+
...Vr
|
|
2230
2365
|
});
|
|
2231
2366
|
if ((this.diagnostics.snapshot()["config.invalid"] ?? 0) !== o) throw Error("Invalid delivery settings for the next security context.");
|
|
2232
2367
|
let c = e.context ? Object.fromEntries(Object.entries(e.context)) : void 0, l = /* @__PURE__ */ new Set([
|
|
@@ -2240,7 +2375,7 @@ var q = class e {
|
|
|
2240
2375
|
]);
|
|
2241
2376
|
s.capture.ignoreUrls = s.capture.ignoreUrls.filter((e) => !l.has(e) || u.has(e)), this.closingContext = !0;
|
|
2242
2377
|
try {
|
|
2243
|
-
this.
|
|
2378
|
+
this.collectPoints(), this.tracing.end(), this.journey.end();
|
|
2244
2379
|
} finally {
|
|
2245
2380
|
this.closingContext = !1;
|
|
2246
2381
|
}
|
|
@@ -2258,20 +2393,20 @@ var q = class e {
|
|
|
2258
2393
|
};
|
|
2259
2394
|
if (this.destroyed) return;
|
|
2260
2395
|
let m = [...d, ...p.buffered], h = p.stored.flatMap((e) => e.records);
|
|
2261
|
-
t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration,
|
|
2396
|
+
t !== "retain" && t !== "carry" && this.drops.add("security_context", [...m, ...h]), s.lockConfiguration = this.config.lockConfiguration, mr(this.config, s), this.advanceIdentity(), this.remote.sampling = null, this.refreshCaptures(), this.context.clear(), c && this.context.setMany(c), this.breadcrumbs.clear(), this.newSession(), this.builder.invalidateResource(), await this.syncSender(), this.bus?.rotateContext(), this.rotating = !1, t === "carry" && await this.carry(m, p.stored), this.diagnostics.report("security.rotated", "The runtime rotated its security context.", { pending: t });
|
|
2262
2397
|
}
|
|
2263
2398
|
async carry(e, t) {
|
|
2264
2399
|
for (let t of e) this.route(t);
|
|
2265
2400
|
this.sender && await this.sender.adopt(t, this.config.securityContext.id);
|
|
2266
2401
|
}
|
|
2267
2402
|
async debugBundle(e) {
|
|
2268
|
-
let { configSummary: t } = await import("./debug-bundle-
|
|
2403
|
+
let { configSummary: t } = await import("./debug-bundle-BOdYmCeV.js"), { record: n } = this.builder.build({
|
|
2269
2404
|
level: "INFO",
|
|
2270
2405
|
type: "system",
|
|
2271
2406
|
body: "debug bundle",
|
|
2272
|
-
namespace:
|
|
2273
|
-
payload: { [
|
|
2274
|
-
}, !0), r = n?.attributes ?? {}, i = r[
|
|
2407
|
+
namespace: Ae,
|
|
2408
|
+
payload: { [x]: this.breadcrumbs.snapshot() }
|
|
2409
|
+
}, !0), r = n?.attributes ?? {}, i = r[x], a = r[Le];
|
|
2275
2410
|
return {
|
|
2276
2411
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2277
2412
|
sdkVersion: this.sdkVersion,
|
|
@@ -2333,10 +2468,10 @@ var q = class e {
|
|
|
2333
2468
|
return;
|
|
2334
2469
|
}
|
|
2335
2470
|
let [{ createStorage: t, storageName: n }, { ContextStorage: r }, { storageLimits: i }, { clearEmergencyContext: a }] = await Promise.all([
|
|
2336
|
-
import("./factory-
|
|
2471
|
+
import("./factory-e9Qo3K0z.js"),
|
|
2337
2472
|
import("./context-storage-BzkoHzkQ.js"),
|
|
2338
2473
|
import("./storage-DZwed89z.js"),
|
|
2339
|
-
import("./emergency-queue-
|
|
2474
|
+
import("./emergency-queue-B9WZxanZ.js")
|
|
2340
2475
|
]), o = this.config.persistence.namespace, s = this.memoryStorage ?? await t(this.config.storage, n(o), i(this.config.retention), this.diagnostics, void 0, o), c = new r(s, this.config.securityContext, o);
|
|
2341
2476
|
try {
|
|
2342
2477
|
e === "namespace" ? await c.clearNamespace() : await c.clear(), a(this.config.securityContext.id, this.diagnostics, o, e === "namespace");
|
|
@@ -2348,7 +2483,7 @@ var q = class e {
|
|
|
2348
2483
|
return await this.senderLoad, await this.sender?.queueDepth() ?? 0;
|
|
2349
2484
|
}
|
|
2350
2485
|
async flush() {
|
|
2351
|
-
|
|
2486
|
+
j(this), this.collectPoints(), this.ready || await this.started, this.role() === "forwarder" ? this.sendForwarded() : (await this.senderLoad, await this.sender?.flush());
|
|
2352
2487
|
}
|
|
2353
2488
|
};
|
|
2354
2489
|
function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
@@ -2362,34 +2497,34 @@ function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
|
2362
2497
|
}
|
|
2363
2498
|
// src/transport/worker-entry.ts
|
|
2364
2499
|
var Y;
|
|
2365
|
-
function
|
|
2500
|
+
function Yr(e = {}) {
|
|
2366
2501
|
if (Y) return Y;
|
|
2367
|
-
let
|
|
2368
|
-
if (typeof document < "u" || typeof addEventListener != "function") return
|
|
2369
|
-
let
|
|
2370
|
-
|
|
2371
|
-
let
|
|
2372
|
-
if (!
|
|
2373
|
-
let
|
|
2374
|
-
|
|
2375
|
-
|
|
2502
|
+
let t = new _r(e.onDiagnostic);
|
|
2503
|
+
if (typeof document < "u" || typeof addEventListener != "function") return t.report("config.invalid", "Call serveTransportWorker() in a dedicated worker."), () => void 0;
|
|
2504
|
+
let n = !1, r, i, a = (e) => {
|
|
2505
|
+
t.guard("transport.http_error", "The transport worker could not read its connection.", () => {
|
|
2506
|
+
let a = e.data;
|
|
2507
|
+
if (!C(a) || a.p !== "ui-observability.transport/1" || a.t !== te.connect || e.ports.length === 0) return;
|
|
2508
|
+
let o = e.ports[0];
|
|
2509
|
+
r || a.v !== "0.12.0" ? (o.postMessage(ce), o.close()) : (r = o, import("./worker-server-Cne9MX9I.js").then((e) => {
|
|
2510
|
+
n || (i = e.serveWorkerPort(o, t));
|
|
2376
2511
|
}).catch((e) => {
|
|
2377
|
-
|
|
2378
|
-
|
|
2512
|
+
t.report("transport.http_error", "The transport worker delivery module could not load.", void 0, e), t.guard("transport.http_error", "The failed transport port could not be closed.", () => {
|
|
2513
|
+
o.postMessage(ce), o.close();
|
|
2379
2514
|
});
|
|
2380
2515
|
}));
|
|
2381
2516
|
});
|
|
2382
|
-
},
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
}),
|
|
2386
|
-
|
|
2517
|
+
}, o = () => {
|
|
2518
|
+
n || (n = !0, Y = void 0, removeEventListener("message", a), i?.(), t.guard("transport.http_error", "The transport service could not close its port.", () => {
|
|
2519
|
+
r?.postMessage(ce);
|
|
2520
|
+
}), t.guard("transport.http_error", "The transport port could not close.", () => {
|
|
2521
|
+
r?.close();
|
|
2387
2522
|
}));
|
|
2388
2523
|
};
|
|
2389
|
-
return addEventListener("message",
|
|
2524
|
+
return addEventListener("message", a), Y = o, o;
|
|
2390
2525
|
}
|
|
2391
2526
|
// src/transport/memory-transport.ts
|
|
2392
|
-
function
|
|
2527
|
+
function Xr() {
|
|
2393
2528
|
let e = [], t = [], n = { status: 200 };
|
|
2394
2529
|
return {
|
|
2395
2530
|
transport: (r) => (e.push(r), n.status >= 200 && n.status < 300 && t.push(r), Promise.resolve({ ...n })),
|
|
@@ -2411,19 +2546,19 @@ var X = /* @__PURE__ */ new Map();
|
|
|
2411
2546
|
function Z() {
|
|
2412
2547
|
return (q.current() ?? q.stopped()) || q.configure({}, !0);
|
|
2413
2548
|
}
|
|
2414
|
-
function
|
|
2549
|
+
function Zr(e = "context") {
|
|
2415
2550
|
return ["context", "namespace"].includes(e) ? Z().clearPersisted(e) : Promise.reject(/* @__PURE__ */ Error("Invalid persistence scope."));
|
|
2416
2551
|
}
|
|
2417
|
-
function
|
|
2552
|
+
function Qr(e) {
|
|
2418
2553
|
q.configure(e), Q();
|
|
2419
2554
|
}
|
|
2420
|
-
function
|
|
2555
|
+
function $r(e) {
|
|
2421
2556
|
Z().setConfigurationLocked(e);
|
|
2422
2557
|
}
|
|
2423
|
-
function
|
|
2558
|
+
function ei(e, t) {
|
|
2424
2559
|
return Z().rotateSecurityContext(e, t);
|
|
2425
2560
|
}
|
|
2426
|
-
async function
|
|
2561
|
+
async function ti() {
|
|
2427
2562
|
let e = Z();
|
|
2428
2563
|
return Q(), {
|
|
2429
2564
|
...await e.health(),
|
|
@@ -2433,8 +2568,8 @@ async function Gr() {
|
|
|
2433
2568
|
}
|
|
2434
2569
|
};
|
|
2435
2570
|
}
|
|
2436
|
-
async function
|
|
2437
|
-
let e = await
|
|
2571
|
+
async function ni() {
|
|
2572
|
+
let e = await ti();
|
|
2438
2573
|
return Z().debugBundle(e);
|
|
2439
2574
|
}
|
|
2440
2575
|
function Q() {
|
|
@@ -2445,118 +2580,131 @@ function Q() {
|
|
|
2445
2580
|
}
|
|
2446
2581
|
return t;
|
|
2447
2582
|
}
|
|
2448
|
-
function
|
|
2583
|
+
function ri(e, t) {
|
|
2449
2584
|
let n = Q();
|
|
2450
|
-
if (t || n === 0) return new
|
|
2585
|
+
if (t || n === 0) return new N(Z, e, t);
|
|
2451
2586
|
let r = X.get(e);
|
|
2452
|
-
return r ??= new
|
|
2587
|
+
return r ??= new N(Z, e), X.delete(e), X.set(e, r), Q(), r;
|
|
2453
2588
|
}
|
|
2454
2589
|
function $() {
|
|
2455
|
-
return
|
|
2590
|
+
return ri("app");
|
|
2456
2591
|
}
|
|
2457
|
-
function
|
|
2592
|
+
function ii(e, t) {
|
|
2458
2593
|
$().trace(e, t);
|
|
2459
2594
|
}
|
|
2460
|
-
function
|
|
2595
|
+
function ai(e, t) {
|
|
2461
2596
|
$().debug(e, t);
|
|
2462
2597
|
}
|
|
2463
|
-
function
|
|
2598
|
+
function oi(e, t) {
|
|
2464
2599
|
$().info(e, t);
|
|
2465
2600
|
}
|
|
2466
|
-
function
|
|
2601
|
+
function si(e, t) {
|
|
2467
2602
|
$().warn(e, t);
|
|
2468
2603
|
}
|
|
2469
|
-
function
|
|
2604
|
+
function ci(e, t, n) {
|
|
2470
2605
|
$().error(e, t, n);
|
|
2471
2606
|
}
|
|
2472
|
-
function
|
|
2607
|
+
function li(e, t, n) {
|
|
2473
2608
|
$().fatal(e, t, n);
|
|
2474
2609
|
}
|
|
2475
|
-
function
|
|
2610
|
+
function ui(e, t) {
|
|
2476
2611
|
$().logAction(e, t);
|
|
2477
2612
|
}
|
|
2478
|
-
function
|
|
2613
|
+
function di(e, t) {
|
|
2479
2614
|
$().logEvent(e, t);
|
|
2480
2615
|
}
|
|
2481
|
-
function
|
|
2616
|
+
function fi(e, t, n, r, i) {
|
|
2482
2617
|
$().logMetric(e, t, n, r, i);
|
|
2483
2618
|
}
|
|
2484
|
-
function
|
|
2485
|
-
|
|
2619
|
+
function pi(e) {
|
|
2620
|
+
q.current()?.diagnostics.report("config.invalid", de, void 0, e);
|
|
2621
|
+
}
|
|
2622
|
+
function mi(e, t = {}) {
|
|
2623
|
+
return zt(e, t, (e, t, n) => {
|
|
2486
2624
|
Z().recordMetric(e, t, n);
|
|
2487
|
-
});
|
|
2625
|
+
}, pi);
|
|
2488
2626
|
}
|
|
2489
|
-
function
|
|
2490
|
-
return
|
|
2627
|
+
function hi(e, t = {}) {
|
|
2628
|
+
return Bt(e, t, (e, t, n) => {
|
|
2491
2629
|
Z().recordMetric(e, t, n);
|
|
2492
|
-
});
|
|
2630
|
+
}, pi);
|
|
2493
2631
|
}
|
|
2494
|
-
function
|
|
2632
|
+
function gi(e, t) {
|
|
2495
2633
|
return Z().startMeasure(e, t);
|
|
2496
2634
|
}
|
|
2497
|
-
function
|
|
2635
|
+
function _i() {
|
|
2636
|
+
Z().setReplay(!0);
|
|
2637
|
+
}
|
|
2638
|
+
function vi() {
|
|
2639
|
+
Z().setReplay(!1);
|
|
2640
|
+
}
|
|
2641
|
+
var yi = {
|
|
2642
|
+
probe: (e, t) => T().probe(e, t, q.current()?.diagnostics),
|
|
2643
|
+
time: (e, t) => T().time(e, t, q.current()?.diagnostics)
|
|
2644
|
+
};
|
|
2645
|
+
function bi(e, t, n) {
|
|
2498
2646
|
return $().timeSync(e, t, n);
|
|
2499
2647
|
}
|
|
2500
|
-
function
|
|
2648
|
+
function xi(e, t, n) {
|
|
2501
2649
|
return $().timeAsync(e, t, n);
|
|
2502
2650
|
}
|
|
2503
|
-
function
|
|
2651
|
+
function Si(e, t) {
|
|
2504
2652
|
Z().addBreadcrumb(e, t);
|
|
2505
2653
|
}
|
|
2506
|
-
function
|
|
2654
|
+
function Ci(e, t) {
|
|
2507
2655
|
Z().context.set(e, t);
|
|
2508
2656
|
}
|
|
2509
|
-
function
|
|
2657
|
+
function wi(e) {
|
|
2510
2658
|
Z().context.setMany(e);
|
|
2511
2659
|
}
|
|
2512
|
-
function
|
|
2660
|
+
function Ti(e) {
|
|
2513
2661
|
Z().context.remove(e);
|
|
2514
2662
|
}
|
|
2515
|
-
function
|
|
2663
|
+
function Ei(e, t) {
|
|
2516
2664
|
return Z().journey.start(e, t);
|
|
2517
2665
|
}
|
|
2518
|
-
function
|
|
2666
|
+
function Di() {
|
|
2519
2667
|
Z().journey.end();
|
|
2520
2668
|
}
|
|
2521
|
-
function
|
|
2669
|
+
function Oi() {
|
|
2522
2670
|
return Z().journey.current();
|
|
2523
2671
|
}
|
|
2524
|
-
function
|
|
2672
|
+
function ki() {
|
|
2525
2673
|
return Z().journey.getToken();
|
|
2526
2674
|
}
|
|
2527
|
-
function
|
|
2675
|
+
function Ai(e) {
|
|
2528
2676
|
return Z().journey.adopt(e, "manual", !0);
|
|
2529
2677
|
}
|
|
2530
|
-
function
|
|
2678
|
+
function ji(e, t) {
|
|
2531
2679
|
return Z().registerWorker(e, t);
|
|
2532
2680
|
}
|
|
2533
|
-
function
|
|
2681
|
+
function Mi(e, t) {
|
|
2534
2682
|
return Z().registerFrame(e, t);
|
|
2535
2683
|
}
|
|
2536
|
-
function
|
|
2684
|
+
function Ni() {
|
|
2537
2685
|
Z().tracing.rotate("explicit");
|
|
2538
2686
|
}
|
|
2539
|
-
function
|
|
2687
|
+
function Pi() {
|
|
2540
2688
|
return Z().tracing.headers();
|
|
2541
2689
|
}
|
|
2542
|
-
function
|
|
2690
|
+
function Fi() {
|
|
2543
2691
|
return Z().flush();
|
|
2544
2692
|
}
|
|
2545
|
-
function
|
|
2693
|
+
function Ii() {
|
|
2546
2694
|
return Z().queueDepth();
|
|
2547
2695
|
}
|
|
2548
|
-
function
|
|
2696
|
+
function Li() {
|
|
2549
2697
|
return Z().stats();
|
|
2550
2698
|
}
|
|
2551
|
-
function
|
|
2699
|
+
function Ri() {
|
|
2552
2700
|
Z().newSession();
|
|
2553
2701
|
}
|
|
2554
|
-
function
|
|
2702
|
+
function zi() {
|
|
2555
2703
|
return Z().diagnostics.snapshot();
|
|
2556
2704
|
}
|
|
2557
|
-
async function
|
|
2705
|
+
async function Bi() {
|
|
2558
2706
|
await q.current()?.destroy();
|
|
2559
2707
|
}
|
|
2560
|
-
export {
|
|
2708
|
+
export { N as OneLogger, Si as addBreadcrumb, Ai as adoptJourney, Zr as clearPersistedLogs, ni as collectDebugBundle, Qr as configure, mi as counter, Xr as createMemoryTransport, Oi as currentJourney, ai as debug, Di as endJourney, ci as error, li as fatal, Fi as flush, zi as getDiagnosticCounters, ti as getHealth, ki as getJourneyToken, ri as getLogger, Ii as getQueueDepth, Li as getStats, Pi as getTraceHeaders, hi as histogram, oi as info, ui as logAction, di as logEvent, fi as logMetric, Ri as newSession, yi as profiler, Mi as registerFrame, ji as registerWorker, Ti as removeContext, ei as rotateSecurityContext, Yr as serveTransportWorker, $r as setConfigurationLocked, Ci as setContext, wi as setContextMap, Bi as shutdown, Ei as startJourney, gi as startMeasure, _i as startReplay, Ni as startTrace, vi as stopReplay, xi as timeAsync, bi as timeSync, ii as trace, si as warn };
|
|
2561
2709
|
|
|
2562
2710
|
//# sourceMappingURL=index.js.map
|