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