@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
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Runs a function inside the library request scope.
|
|
3
|
-
*
|
|
4
|
-
* @param fn
|
|
5
|
-
* @returns The return value
|
|
2
|
+
* Runs a function inside the library request scope. Only the synchronous part of the function
|
|
3
|
+
* is covered, so a request that starts after an await is outside the scope.
|
|
4
|
+
* @param fn The function that starts the request.
|
|
5
|
+
* @returns The function's return value.
|
|
6
6
|
*/
|
|
7
7
|
export declare function runAsLibraryRequest<T>(fn: () => T): T;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @returns True while the library
|
|
9
|
+
* Checks whether a library request scope is open.
|
|
10
|
+
* @returns True while the library is starting a request.
|
|
11
11
|
*/
|
|
12
12
|
export declare function isLibraryRequest(): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* Runs a custom transport call and counts it until it settles. The count includes the time after
|
|
15
15
|
* each await, which the library request scope does not cover.
|
|
16
|
-
* @param fn
|
|
17
|
-
* @returns
|
|
16
|
+
* @param fn The function that calls the custom transport.
|
|
17
|
+
* @returns A promise that settles with the call's result.
|
|
18
18
|
*/
|
|
19
19
|
export declare function trackTransportCall<T>(fn: () => T | PromiseLike<T>): Promise<T>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @returns True while a call
|
|
21
|
+
* Checks whether a custom transport call is still waiting for an answer.
|
|
22
|
+
* @returns True while a call hasn't settled.
|
|
23
23
|
*/
|
|
24
24
|
export declare function isTransportPending(): boolean;
|
package/dist/utils/lock.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import type { Diagnostics } from "../core/diagnostics";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Runs an async function under an origin-wide Web Locks API lock. Runs the task directly when
|
|
4
|
+
* the Web Locks API isn't available.
|
|
5
5
|
* @param name Origin-scoped lock identifier.
|
|
6
6
|
* @param diagnostics Diagnostics reporter.
|
|
7
|
-
* @param fn
|
|
7
|
+
* @param fn The async task to run while holding the lock.
|
|
8
8
|
* @param options Lock acquisition options.
|
|
9
|
-
* @param options.skipIfBusy When true, the task
|
|
10
|
-
* @returns
|
|
11
|
-
* lock. A caller that reads undefined as a task result stops rescheduling.
|
|
9
|
+
* @param options.skipIfBusy When true, the task doesn't run if another context holds the lock.
|
|
10
|
+
* @returns A promise of the task's result. Resolves to undefined when another context holds
|
|
11
|
+
* the lock. A caller that reads undefined as a task result stops rescheduling.
|
|
12
12
|
*/
|
|
13
13
|
export declare function withDrainLock<T>(name: string, diagnostics: Diagnostics, fn: () => Promise<T>, { skipIfBusy }?: {
|
|
14
14
|
skipIfBusy?: boolean;
|
|
15
15
|
}): Promise<T | undefined>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Returns the lock name for one application namespace, so two namespaces on one origin don't
|
|
18
|
+
* wait for each other. Otherwise one application's retry pass would be skipped while the
|
|
19
|
+
* other holds the lock.
|
|
19
20
|
* @param name Base lock name.
|
|
20
21
|
* @param namespace Application storage namespace. An empty value keeps the base name.
|
|
21
|
-
* @returns
|
|
22
|
+
* @returns The lock name for this namespace.
|
|
22
23
|
*/
|
|
23
24
|
export declare function lockName(name: string, namespace: string): string;
|
package/dist/utils/openfin.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface FinIab {
|
|
|
16
16
|
uuid: string;
|
|
17
17
|
}, topic: string, listener: (message: unknown, uuid?: string, name?: string) => void): Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
/** The
|
|
19
|
+
/** The fin.me members that the library reads. */
|
|
20
20
|
export interface FinMe {
|
|
21
21
|
/** True in an OpenFin view. */
|
|
22
22
|
isView?: boolean;
|
|
@@ -25,7 +25,7 @@ export interface FinMe {
|
|
|
25
25
|
uuid?: string;
|
|
26
26
|
name?: string;
|
|
27
27
|
};
|
|
28
|
-
/** Resolves the creation options
|
|
28
|
+
/** Resolves the window's creation options, including customData. */
|
|
29
29
|
getOptions?: () => Promise<{
|
|
30
30
|
customData?: Record<string, unknown>;
|
|
31
31
|
}>;
|
|
@@ -36,13 +36,13 @@ export interface FinMe {
|
|
|
36
36
|
}
|
|
37
37
|
/** The members of the OpenFin global that the library reads. */
|
|
38
38
|
export interface FinLike {
|
|
39
|
-
/**
|
|
39
|
+
/** This document's window or view. */
|
|
40
40
|
me?: FinMe;
|
|
41
|
-
/** The message bus
|
|
41
|
+
/** The OpenFin runtime's message bus. */
|
|
42
42
|
InterApplicationBus?: FinIab;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Returns the OpenFin global.
|
|
46
46
|
* @returns The fin global, or undefined outside OpenFin.
|
|
47
47
|
*/
|
|
48
48
|
export declare function getFin(): FinLike | undefined;
|
package/dist/utils/patch.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Replaces `target[key]` with a wrapper
|
|
3
|
-
* @param target
|
|
4
|
-
* @param key
|
|
5
|
-
* @param wrap
|
|
6
|
-
* @returns
|
|
7
|
-
*
|
|
2
|
+
* Replaces `target[key]` with a wrapper around the current value.
|
|
3
|
+
* @param target The object that holds the function, for example `console` or `globalThis`.
|
|
4
|
+
* @param key The property to replace.
|
|
5
|
+
* @param wrap Builds the wrapper from the original value.
|
|
6
|
+
* @returns A restore function. It writes the original back and returns true only if the
|
|
7
|
+
* property still holds the wrapper. Otherwise it changes nothing and returns false.
|
|
8
8
|
*/
|
|
9
9
|
export declare function patch<T extends object, K extends keyof T>(target: T, key: K, wrap: (original: T[K]) => T[K]): () => boolean;
|
package/dist/utils/platform.d.ts
CHANGED
|
@@ -23,36 +23,38 @@ export interface PlatformMetadata {
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function detectPlatform(diagnostics: Diagnostics): PlatformMetadata;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @param diagnostics Diagnostics reporter.
|
|
26
|
+
* Checks whether the current window is the top-level browsing context.
|
|
27
|
+
* @param diagnostics Diagnostics reporter. Counts a blocked read of window.top.
|
|
28
28
|
* @returns True if top-level, false if framed or inaccessible due to cross-origin boundaries.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isTopLevel(diagnostics: Diagnostics): boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @param diagnostics Diagnostics reporter.
|
|
34
|
-
* @returns
|
|
32
|
+
* Reads the current document URL without caching.
|
|
33
|
+
* @param diagnostics Diagnostics reporter. Counts a blocked read of location.href.
|
|
34
|
+
* @returns The current location.href, or an empty string.
|
|
35
35
|
*/
|
|
36
36
|
export declare function currentUrl(diagnostics: Diagnostics): string;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* Returns the form of a URL that the library records. A transform's result is recorded as is,
|
|
39
|
+
* or "" if it throws or returns no string. Without a transform, the user info is always
|
|
40
|
+
* removed, because it is a credential, and without fullUrls the query and the fragment go too.
|
|
40
41
|
* @param url Absolute or relative URL.
|
|
41
42
|
* @param fullUrls Value of `capture.fullUrls`.
|
|
42
|
-
* @param transform Value of `capture.urlTransform`.
|
|
43
|
+
* @param transform Value of `capture.urlTransform`. Replaces the default rule.
|
|
43
44
|
* @param diagnostics Diagnostics reporter for a transform that throws.
|
|
44
45
|
* @returns The URL to record.
|
|
45
46
|
*/
|
|
46
47
|
export declare function recordedUrl(url: string, fullUrls: boolean, transform?: (url: string) => string | null, diagnostics?: Diagnostics): string;
|
|
47
48
|
/**
|
|
48
|
-
* Drops the query string and fragment from a URL.
|
|
49
|
-
*
|
|
49
|
+
* Drops the query string and fragment from a URL. Cuts the string instead of parsing it,
|
|
50
|
+
* because a relative request target has no base URL.
|
|
50
51
|
* @param url Absolute or relative URL.
|
|
51
52
|
* @returns The URL up to the first "?" or "#".
|
|
52
53
|
*/
|
|
53
54
|
export declare function stripUrlQuery(url: string): string;
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
+
* Checks whether the browser can reach the network. A host without navigator.onLine counts as
|
|
57
|
+
* online.
|
|
56
58
|
* @returns False only when navigator.onLine is false.
|
|
57
59
|
*/
|
|
58
60
|
export declare function isOnline(): boolean;
|
package/dist/utils/sanitize.d.ts
CHANGED
|
@@ -15,10 +15,10 @@ export interface SanitizeLimits {
|
|
|
15
15
|
maxNodes: number;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Truncates a string to maximum character length while preserving UTF-16 surrogate pairs.
|
|
18
|
+
* Truncates a string to a maximum character length while preserving UTF-16 surrogate pairs.
|
|
19
19
|
* @param value Target string.
|
|
20
20
|
* @param max Maximum allowed character length.
|
|
21
|
-
* @returns
|
|
21
|
+
* @returns The truncated string, with a suffix that gives the dropped character count.
|
|
22
22
|
*/
|
|
23
23
|
export declare function truncate(value: string, max: number): string;
|
|
24
24
|
/** Sanitized JSON-safe output with estimated serialized byte size. */
|
|
@@ -32,7 +32,7 @@ export interface SanitizeResult {
|
|
|
32
32
|
* Sanitizes arbitrary values into JSON-safe structures without throwing.
|
|
33
33
|
* @param value Raw value to sanitize.
|
|
34
34
|
* @param limits Configuration limits for depth, count, and character lengths.
|
|
35
|
-
* @param diagnostics Diagnostics reporter.
|
|
35
|
+
* @param diagnostics Diagnostics reporter. Counts a value that throws during the walk.
|
|
36
36
|
* @returns JSON-safe sanitized value.
|
|
37
37
|
*/
|
|
38
38
|
export declare function sanitize(value: unknown, limits: SanitizeLimits, diagnostics: Diagnostics): unknown;
|
|
@@ -40,7 +40,7 @@ export declare function sanitize(value: unknown, limits: SanitizeLimits, diagnos
|
|
|
40
40
|
* Sanitizes arbitrary values and calculates approximate serialized byte sizes.
|
|
41
41
|
* @param value Raw value to sanitize.
|
|
42
42
|
* @param limits Configuration limits.
|
|
43
|
-
* @param diagnostics Diagnostics reporter.
|
|
43
|
+
* @param diagnostics Diagnostics reporter. Counts a value that throws during the walk.
|
|
44
44
|
* @returns SanitizeResult containing sanitized value and byte count.
|
|
45
45
|
*/
|
|
46
46
|
export declare function sanitizeWithSize(value: unknown, limits: SanitizeLimits, diagnostics: Diagnostics): SanitizeResult;
|
package/dist/utils/timer.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export declare function timeSync<T>(logger: CaptureLogger, label: string, fn: ()
|
|
|
14
14
|
* @param label Metric name prefix.
|
|
15
15
|
* @param fn Asynchronous function to execute.
|
|
16
16
|
* @param attributes Optional contextual attributes.
|
|
17
|
-
* @returns
|
|
17
|
+
* @returns A promise that resolves to the wrapped function's result.
|
|
18
18
|
*/
|
|
19
19
|
export declare function timeAsync<T>(logger: CaptureLogger, label: string, fn: () => Promise<T>, attributes?: Record<string, unknown>): Promise<T>;
|
package/dist/utils/tracing.d.ts
CHANGED
|
@@ -9,48 +9,48 @@ export interface TraceContext {
|
|
|
9
9
|
/** Bitfield byte containing W3C trace flags. */
|
|
10
10
|
traceFlags: number;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
12
|
+
/** Why the ambient trace context rotated. */
|
|
13
13
|
export type RotateReason = "start" | "interaction" | "navigation" | "explicit" | "maxAge";
|
|
14
|
-
/**
|
|
14
|
+
/** An ambient trace that ended. Its root span covers it. */
|
|
15
15
|
export interface EndedTrace {
|
|
16
16
|
/** Trace ID. */
|
|
17
17
|
traceId: string;
|
|
18
18
|
/** Span ID of the root span. */
|
|
19
19
|
spanId: string;
|
|
20
|
-
/**
|
|
20
|
+
/** Why the trace started. */
|
|
21
21
|
reason: RotateReason;
|
|
22
22
|
/** Start time in epoch milliseconds. */
|
|
23
23
|
startedAt: number;
|
|
24
24
|
/** End time in epoch milliseconds. */
|
|
25
25
|
endedAt: number;
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/** The client span that a traceparent header names. */
|
|
28
28
|
export interface ClientSpan {
|
|
29
29
|
/** Trace ID. */
|
|
30
30
|
traceId: string;
|
|
31
31
|
/** Span ID of the client span. */
|
|
32
32
|
spanId: string;
|
|
33
|
-
/** Span ID of the root span
|
|
33
|
+
/** Span ID of the trace's root span. */
|
|
34
34
|
parentSpanId: string;
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
36
|
+
/** One request's headers, and the client span they name. */
|
|
37
37
|
export interface RequestTrace {
|
|
38
38
|
/** Header map containing traceparent. */
|
|
39
39
|
headers: Record<string, string>;
|
|
40
|
-
/**
|
|
40
|
+
/** The request's client span. Undefined when the library records no span for it. */
|
|
41
41
|
span?: ClientSpan;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
43
|
+
/** The runtime's span decisions. */
|
|
44
44
|
export interface SpanHooks {
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @returns True
|
|
46
|
+
* Checks whether the library records spans.
|
|
47
|
+
* @returns True when there is a traces endpoint.
|
|
48
48
|
*/
|
|
49
49
|
enabled(): boolean;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Checks whether sampling keeps a trace's spans.
|
|
52
52
|
* @param traceId Trace ID.
|
|
53
|
-
* @returns True if the library sends the spans
|
|
53
|
+
* @returns True if the library sends the trace's spans.
|
|
54
54
|
*/
|
|
55
55
|
keeps(traceId: string): boolean;
|
|
56
56
|
/**
|
|
@@ -60,9 +60,8 @@ export interface SpanHooks {
|
|
|
60
60
|
onEnd(ended: EndedTrace): void;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Generates a random 32-character hex string in the W3C trace ID format.
|
|
64
|
-
*
|
|
65
|
-
* and reports no error.
|
|
63
|
+
* Generates a random 32-character hex string in the W3C trace ID format. Use it to start
|
|
64
|
+
* your own trace. The backend drops an id with the wrong width without reporting an error.
|
|
66
65
|
* @returns 32-character hexadecimal trace ID.
|
|
67
66
|
*/
|
|
68
67
|
export declare function newTraceId(): string;
|
|
@@ -78,24 +77,25 @@ export declare class TraceEngine {
|
|
|
78
77
|
private readonly load?;
|
|
79
78
|
private readonly spans?;
|
|
80
79
|
/**
|
|
81
|
-
*
|
|
82
|
-
* runtimes in one document must not share a trace id.
|
|
80
|
+
* The active ambient trace context. This state lives on the instance, not the module,
|
|
81
|
+
* because two runtimes in one document must not share a trace id.
|
|
83
82
|
*/
|
|
84
83
|
private ambient;
|
|
85
|
-
/** The optional peer
|
|
84
|
+
/** The optional peer, once loaded. Undefined while it loads or when it is absent. */
|
|
86
85
|
private otel;
|
|
87
86
|
/**
|
|
88
87
|
* @param diagnostics Diagnostics reporter.
|
|
89
88
|
* @param maxAgeMs Maximum lifetime of an un-rotated ambient trace in milliseconds.
|
|
90
|
-
* @param load Loader for the OpenTelemetry API. If it
|
|
91
|
-
* Do not import the peer by name
|
|
92
|
-
*
|
|
89
|
+
* @param load Loader for the OpenTelemetry API. If it isn't set, OTel is off.
|
|
90
|
+
* Do not import the peer by name, because the Vite dev server fails if the peer isn't
|
|
91
|
+
* installed.
|
|
92
|
+
* @param spans The runtime's span decisions. Without them, the library records no span.
|
|
93
93
|
*/
|
|
94
94
|
constructor(diagnostics: Diagnostics, maxAgeMs?: number, load?: OtelLoader | undefined, spans?: SpanHooks | undefined);
|
|
95
95
|
/**
|
|
96
96
|
* Loads the OpenTelemetry API. Until the load completes, records use the ambient trace.
|
|
97
97
|
* If there is no loader or the load fails, all records use the ambient trace.
|
|
98
|
-
* @returns
|
|
98
|
+
* @returns A promise that resolves when the attempt settles.
|
|
99
99
|
*/
|
|
100
100
|
loadOtel(): Promise<void>;
|
|
101
101
|
/**
|
|
@@ -104,41 +104,41 @@ export declare class TraceEngine {
|
|
|
104
104
|
*/
|
|
105
105
|
resolve(): TraceContext;
|
|
106
106
|
/**
|
|
107
|
-
* Reads the ambient trace
|
|
108
|
-
* @returns
|
|
107
|
+
* Reads the ambient trace, rotating it first if it is too old.
|
|
108
|
+
* @returns The ambient TraceContext.
|
|
109
109
|
*/
|
|
110
110
|
private ambientContext;
|
|
111
111
|
/**
|
|
112
|
-
* Reads the active span
|
|
113
|
-
* @returns
|
|
112
|
+
* Reads the host's active span, if the peer module loaded and a span is running.
|
|
113
|
+
* @returns The active span's trace context, or undefined.
|
|
114
114
|
*/
|
|
115
115
|
private activeSpanContext;
|
|
116
116
|
/**
|
|
117
|
-
* Rotates the ambient trace context to mark the start of a new logical operation
|
|
118
|
-
*
|
|
119
|
-
* @param reason
|
|
120
|
-
* @returns
|
|
117
|
+
* Rotates the ambient trace context to mark the start of a new logical operation, and ends
|
|
118
|
+
* the old trace's root span.
|
|
119
|
+
* @param reason The event that triggers the rotation.
|
|
120
|
+
* @returns The newly created TraceContext.
|
|
121
121
|
*/
|
|
122
122
|
rotate(reason: RotateReason): TraceContext;
|
|
123
123
|
/**
|
|
124
|
-
* Ends the
|
|
125
|
-
*
|
|
124
|
+
* Ends the ambient trace's root span, once. Later records can still use the trace. The exit
|
|
125
|
+
* flush calls this, because a closing document has no later rotation.
|
|
126
126
|
*/
|
|
127
127
|
end(): void;
|
|
128
128
|
/**
|
|
129
|
-
* Ends
|
|
130
|
-
* @param ambient
|
|
129
|
+
* Ends a trace's root span, once.
|
|
130
|
+
* @param ambient The trace to end.
|
|
131
131
|
*/
|
|
132
132
|
private finish;
|
|
133
133
|
/**
|
|
134
|
-
* Generates W3C traceparent headers with the registered OpenTelemetry propagators.
|
|
135
|
-
*
|
|
134
|
+
* Generates W3C traceparent headers with the registered OpenTelemetry propagators. Falls
|
|
135
|
+
* back to the ambient trace when OpenTelemetry provides no traceparent.
|
|
136
136
|
* @returns Header map containing traceparent.
|
|
137
137
|
*/
|
|
138
138
|
headers(): Record<string, string>;
|
|
139
139
|
/**
|
|
140
|
-
* Generates the headers
|
|
141
|
-
* names a new client span of the ambient trace.
|
|
140
|
+
* Generates the headers for one request from the network capture. With spans on, the
|
|
141
|
+
* traceparent names a new client span of the ambient trace.
|
|
142
142
|
* @returns The headers, and the client span that the library records.
|
|
143
143
|
*/
|
|
144
144
|
request(): RequestTrace;
|
package/dist/utils/unref.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** A timer handle. A number in a browser, a Timeout object in Node. */
|
|
2
2
|
export type TimerHandle = number | {
|
|
3
3
|
unref?: () => void;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Unreferences a timer handle
|
|
7
|
-
* @param timer
|
|
6
|
+
* Unreferences a timer handle, so a pending timer doesn't keep a Node.js process alive.
|
|
7
|
+
* @param timer The timer handle returned by setTimeout.
|
|
8
8
|
*/
|
|
9
9
|
export declare function unrefTimer(timer: TimerHandle): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./
|
|
2
|
-
//# sourceMappingURL=web-socket-
|
|
1
|
+
const e=require("./library-request-Da-CHKzT.cjs"),t=require("./platform-12uR7kBQ.cjs"),n=require("./patch-BX8KrPCT.cjs"),r=require("./storm-D0_qZOEg.cjs"),i=require("./types-C7WNpnG1.cjs");var a=`ui.websocket.messages`;function o(e,n,r){let i=new URL(e);return{target:t.i(e,!1,n.capture.urlTransform,r),server:i.hostname}}function s(t,n,r){let i=t.servers.get(n),a=r===`transmit`&&e.t();if(!t.active||i===void 0||a||t.config.securityContext.isolation&&t.contexts.get(n)!==t.config.securityContext.id)return;let o={"network.io.direction":r,"server.address":i};t.messages.add(1,o)}var c=class{diagnostics;config;name=`websocket`;restore;state;window={start:0,count:0};constructor(e,t){this.diagnostics=e,this.config=t}install(e){if(this.restore||typeof WebSocket>`u`)return;let t={active:!0,ctx:e,messages:e.counter(a),servers:new WeakMap,contexts:new WeakMap,config:this.config};this.state=t;let r=e=>{this.track(e,t)};this.restore=n.t(globalThis,`WebSocket`,e=>class extends e{static[Symbol.hasInstance](t){return t instanceof e}constructor(e,t){super(e,t),r(this)}send(e){super.send(e),s(t,this,`transmit`)}})}uninstall(){this.state&&(this.state.active=!1),this.restore&&!this.restore()&&this.diagnostics.report(`capture.install_failed`,`Another script wrapped WebSocket after the library. The library keeps that wrapper.`),this.restore=void 0,this.state=void 0}track(e,t){t.active&&this.diagnostics.guard(`capture.record_failed`,`The library could not track a WebSocket. The socket works without capture.`,()=>{if(i.t(e.url,this.config.capture.ignoreUrls))return;let{target:n,server:r}=o(e.url,this.config,this.diagnostics),a={"url.full":n,"server.address":r},{logger:c}=t.ctx;t.servers.set(e,r),t.contexts.set(e,this.config.securityContext.id);let l=n=>{(!this.config.securityContext.isolation||t.contexts.get(e)===this.config.securityContext.id)&&this.allow(t)&&n()};e.addEventListener(`open`,()=>{l(()=>{c.logEvent(`websocket.open`,a)})}),e.addEventListener(`error`,()=>{l(()=>{c.warn(`websocket.error`,a)})}),e.addEventListener(`close`,e=>{l(()=>{c.logEvent(`websocket.close`,{...a,"websocket.close.code":e.code,"websocket.close.clean":e.wasClean})})}),e.addEventListener(`message`,()=>{s(t,e,`receive`)})})}allow(e){return e.active&&r.t(this.window,this.config.capturePolicy.webSocketPerWindow,this.diagnostics,`WebSocket events`,this.config.capturePolicy.windowMs)}};exports.WebSocketCapture=c;
|
|
2
|
+
//# sourceMappingURL=web-socket-BTuvYoJI.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-socket-BTuvYoJI.cjs","names":["recordedUrl","isLibraryRequest","patch","matchesAny","allowInWindow","require_library_request","require_platform","require_patch","require_storm","require_types","MESSAGES_METRIC","socketTarget","parsed","url","config","diagnostics","count","server","state","socket","own","direction","attributes","WebSocketCapture","ctx","track","Original","value","protocols","data","target","lifecycle","write","logger","event"],"sources":["../src/capture/web-socket.ts"],"sourcesContent":["// src/capture/web-socket.ts\n//\n// Records the open, close and error events of every WebSocket, and counts messages by direction\n// and server. It never reads message content. This is a capture plugin, so the runtime loads it\n// as a separate chunk.\n\nimport type { Diagnostics } from \"../core/diagnostics\";\nimport type { ResolvedConfig } from \"../models/config\";\nimport type { Counter, MetricAttributes } from \"../models/metric\";\nimport type { CapturePlugin, PluginContext } from \"../models/plugin\";\nimport { isLibraryRequest } from \"../utils/library-request\";\nimport { recordedUrl } from \"../utils/platform\";\nimport { patch } from \"../utils/patch\";\nimport { allowInWindow, type StormWindow } from \"./storm\";\nimport { matchesAny } from \"./types\";\n\n/** Name of the message counter. */\nconst MESSAGES_METRIC = \"ui.websocket.messages\";\n\n/** The data argument of one WebSocket.send call. */\ntype SendData = Parameters<WebSocket[\"send\"]>[0];\n\n/** State of one install. A wrapper left behind after uninstall reads it and records nothing. */\ninterface InstallState {\n /** False after uninstall. */\n active: boolean;\n /** The plugin's tools. */\n ctx: PluginContext;\n /** Message counter. */\n messages: Counter;\n /** Server host name of every tracked socket. */\n servers: WeakMap<WebSocket, string>;\n /** The delivery context that was current when each socket opened. */\n contexts: WeakMap<WebSocket, string>;\n /** Active capture settings and isolation rule. */\n config: ResolvedConfig;\n}\n\n/**\n * Strips the user info, query and fragment from a socket URL, since any of them can hold a token.\n * @param url The socket's absolute URL.\n * @param config Active capture settings.\n * @param diagnostics Diagnostics reporter, for a URL transform that throws.\n * @returns The URL to record and the server's host name.\n */\nfunction socketTarget(\n url: string,\n config: ResolvedConfig,\n diagnostics: Diagnostics,\n): { target: string; server: string } {\n const parsed = new URL(url);\n\n return {\n // Ignore fullUrls. A browser can't set a header on a socket, so apps often put a token in\n // the query. Only urlTransform can record more of the URL.\n target: recordedUrl(url, false, config.capture.urlTransform, diagnostics),\n server: parsed.hostname,\n };\n}\n\n/**\n * Counts one message on a tracked socket.\n * @param state State of the install that created the socket.\n * @param socket The socket the message belongs to.\n * @param direction Direction of the message.\n */\nfunction count(state: InstallState, socket: WebSocket, direction: \"transmit\" | \"receive\"): void {\n const server = state.servers.get(socket);\n\n // Don't count the library's own sends, for example a custom transport's, or one send would\n // cause the next.\n const own = direction === \"transmit\" && isLibraryRequest();\n if (\n !state.active ||\n server === undefined ||\n own ||\n (state.config.securityContext.isolation &&\n state.contexts.get(socket) !== state.config.securityContext.id)\n ) {\n return;\n }\n\n const attributes: MetricAttributes = {\n \"network.io.direction\": direction,\n \"server.address\": server,\n };\n state.messages.add(1, attributes);\n}\n\n/** Records the lifecycle and message counts of every WebSocket the app opens. */\nexport class WebSocketCapture implements CapturePlugin {\n /** Capture module identifier. */\n readonly name = \"websocket\";\n\n /** Restores the WebSocket constructor. Undefined while the capture isn't installed. */\n private restore: (() => boolean) | undefined;\n\n /** State of the active install. */\n private state: InstallState | undefined;\n\n /** Rate limit for the lifecycle records, so a reconnect loop can't flood the pipeline. */\n private readonly window: StormWindow = { start: 0, count: 0 };\n\n /**\n * @param diagnostics Diagnostics reporter.\n * @param config Active configuration. The capture reads `capture.ignoreUrls`.\n */\n constructor(\n private readonly diagnostics: Diagnostics,\n private readonly config: ResolvedConfig,\n ) {}\n\n /**\n * Replaces the WebSocket constructor with a subclass that tracks every socket.\n * @param ctx The plugin's tools.\n */\n install(ctx: PluginContext): void {\n if (this.restore || typeof WebSocket === \"undefined\") {\n return;\n }\n\n const state: InstallState = {\n active: true,\n ctx,\n messages: ctx.counter(MESSAGES_METRIC),\n servers: new WeakMap(),\n contexts: new WeakMap(),\n config: this.config,\n };\n this.state = state;\n\n const track = (socket: WebSocket): void => {\n this.track(socket, state);\n };\n\n this.restore = patch(\n globalThis,\n \"WebSocket\",\n (Original) =>\n class TrackedWebSocket extends Original {\n /**\n * Keeps instanceof true for a socket the app opened before the install.\n * @param value Value to test.\n * @returns True for every native socket.\n */\n static override [Symbol.hasInstance](value: unknown): boolean {\n return value instanceof Original;\n }\n\n /**\n * @param url The server's URL.\n * @param protocols The app's sub-protocols.\n */\n constructor(url: string | URL, protocols?: string | string[]) {\n super(url, protocols);\n track(this);\n }\n\n /**\n * Sends the data, then counts one message. A send that throws counts nothing.\n * @param data The app's data. We never read it.\n */\n override send(data: SendData): void {\n super.send(data);\n count(state, this, \"transmit\");\n }\n },\n );\n }\n\n /** Restores the WebSocket constructor and stops every tracked socket from recording. */\n uninstall(): void {\n if (this.state) {\n this.state.active = false;\n }\n\n // Another script may have wrapped the constructor after us. Keep its wrapper.\n if (this.restore && !this.restore()) {\n this.diagnostics.report(\n \"capture.install_failed\",\n \"Another script wrapped WebSocket after the library. The library keeps that wrapper.\",\n );\n }\n\n this.restore = undefined;\n this.state = undefined;\n }\n\n /**\n * Adds the listeners that record one socket's lifecycle and received messages.\n * @param socket The app's new socket.\n * @param state State of the install that created the socket.\n */\n private track(socket: WebSocket, state: InstallState): void {\n if (!state.active) {\n return;\n }\n\n // This read runs inside the app's constructor call, so a throw must not fail it.\n this.diagnostics.guard(\n \"capture.record_failed\",\n \"The library could not track a WebSocket. The socket works without capture.\",\n () => {\n // ignoreUrls matches the full URL. A custom transport may send over its own socket.\n if (matchesAny(socket.url, this.config.capture.ignoreUrls)) {\n return;\n }\n\n const { target, server } = socketTarget(socket.url, this.config, this.diagnostics);\n const attributes = { \"url.full\": target, \"server.address\": server };\n const { logger } = state.ctx;\n state.servers.set(socket, server);\n state.contexts.set(socket, this.config.securityContext.id);\n\n const lifecycle = (write: () => void): void => {\n if (\n (!this.config.securityContext.isolation ||\n state.contexts.get(socket) === this.config.securityContext.id) &&\n this.allow(state)\n ) {\n write();\n }\n };\n\n socket.addEventListener(\"open\", () => {\n lifecycle(() => {\n logger.logEvent(\"websocket.open\", attributes);\n });\n });\n socket.addEventListener(\"error\", () => {\n lifecycle(() => {\n logger.warn(\"websocket.error\", attributes);\n });\n });\n socket.addEventListener(\"close\", (event) => {\n lifecycle(() => {\n logger.logEvent(\"websocket.close\", {\n ...attributes,\n \"websocket.close.code\": event.code,\n \"websocket.close.clean\": event.wasClean,\n });\n });\n });\n socket.addEventListener(\"message\", () => {\n count(state, socket, \"receive\");\n });\n },\n );\n }\n\n /**\n * Checks whether a lifecycle record can go out.\n * @param state State of the install that created the socket.\n * @returns False after uninstall, or when the window has no allowance left.\n */\n private allow(state: InstallState): boolean {\n return (\n state.active &&\n allowInWindow(\n this.window,\n this.config.capturePolicy.webSocketPerWindow,\n this.diagnostics,\n \"WebSocket events\",\n this.config.capturePolicy.windowMs,\n )\n );\n }\n}\n"],"mappings":"A,6LAiBA,IAAMU,EAAkB,wBA4BxB,SAASC,EACP,EACA,EACA,EACoC,CACpC,IAAMC,EAAS,IAAI,IAAIC,CAAG,EAE1B,MAAO,CAGL,OAAQb,EAAAA,EAAYa,EAAK,GAAOC,EAAO,QAAQ,aAAcC,CAAW,EACxE,OAAQH,EAAO,QACjB,CACF,CAQA,SAASI,EAAM,EAAqB,EAAmB,EAAyC,CAC9F,IAAMC,EAASC,EAAM,QAAQ,IAAIC,CAAM,EAIjCC,EAAMC,IAAc,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./patch-
|
|
4
|
-
import { t as r } from "./storm-
|
|
5
|
-
import { t as i } from "./types-
|
|
6
|
-
|
|
1
|
+
import { t as e } from "./library-request-nI6pvI6I.js";
|
|
2
|
+
import { i as t } from "./platform-CVewe4wQ.js";
|
|
3
|
+
import { t as n } from "./patch-UdPz1ea8.js";
|
|
4
|
+
import { t as r } from "./storm-BTSNTIWI.js";
|
|
5
|
+
import { t as i } from "./types-BAerHgCq.js";
|
|
6
|
+
// src/capture/web-socket.ts
|
|
7
7
|
var a = "ui.websocket.messages";
|
|
8
|
-
function o(
|
|
9
|
-
let i = new URL(
|
|
8
|
+
function o(e, n, r) {
|
|
9
|
+
let i = new URL(e);
|
|
10
10
|
return {
|
|
11
|
-
target: e
|
|
11
|
+
target: t(e, !1, n.capture.urlTransform, r),
|
|
12
12
|
server: i.hostname
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
function s(
|
|
16
|
-
let i =
|
|
17
|
-
if (!
|
|
15
|
+
function s(t, n, r) {
|
|
16
|
+
let i = t.servers.get(n), a = r === "transmit" && e();
|
|
17
|
+
if (!t.active || i === void 0 || a || t.config.securityContext.isolation && t.contexts.get(n) !== t.config.securityContext.id) return;
|
|
18
18
|
let o = {
|
|
19
19
|
"network.io.direction": r,
|
|
20
20
|
"server.address": i
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
t.messages.add(1, o);
|
|
23
23
|
}
|
|
24
24
|
var c = class {
|
|
25
25
|
diagnostics;
|
|
@@ -99,7 +99,6 @@ var c = class {
|
|
|
99
99
|
return e.active && r(this.window, this.config.capturePolicy.webSocketPerWindow, this.diagnostics, "WebSocket events", this.config.capturePolicy.windowMs);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
//#endregion
|
|
103
102
|
export { c as WebSocketCapture };
|
|
104
103
|
|
|
105
|
-
//# sourceMappingURL=web-socket-
|
|
104
|
+
//# sourceMappingURL=web-socket-DthJuSAg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-socket-DthJuSAg.js","names":["isLibraryRequest","recordedUrl","patch","allowInWindow","matchesAny","MESSAGES_METRIC","socketTarget","parsed","url","config","diagnostics","count","server","state","socket","own","direction","attributes","WebSocketCapture","ctx","track","Original","value","protocols","data","target","lifecycle","write","event"],"sources":["../src/capture/web-socket.ts"],"sourcesContent":["// src/capture/web-socket.ts\n//\n// Records the open, close and error events of every WebSocket, and counts messages by direction\n// and server. It never reads message content. This is a capture plugin, so the runtime loads it\n// as a separate chunk.\n\nimport type { Diagnostics } from \"../core/diagnostics\";\nimport type { ResolvedConfig } from \"../models/config\";\nimport type { Counter, MetricAttributes } from \"../models/metric\";\nimport type { CapturePlugin, PluginContext } from \"../models/plugin\";\nimport { isLibraryRequest } from \"../utils/library-request\";\nimport { recordedUrl } from \"../utils/platform\";\nimport { patch } from \"../utils/patch\";\nimport { allowInWindow, type StormWindow } from \"./storm\";\nimport { matchesAny } from \"./types\";\n\n/** Name of the message counter. */\nconst MESSAGES_METRIC = \"ui.websocket.messages\";\n\n/** The data argument of one WebSocket.send call. */\ntype SendData = Parameters<WebSocket[\"send\"]>[0];\n\n/** State of one install. A wrapper left behind after uninstall reads it and records nothing. */\ninterface InstallState {\n /** False after uninstall. */\n active: boolean;\n /** The plugin's tools. */\n ctx: PluginContext;\n /** Message counter. */\n messages: Counter;\n /** Server host name of every tracked socket. */\n servers: WeakMap<WebSocket, string>;\n /** The delivery context that was current when each socket opened. */\n contexts: WeakMap<WebSocket, string>;\n /** Active capture settings and isolation rule. */\n config: ResolvedConfig;\n}\n\n/**\n * Strips the user info, query and fragment from a socket URL, since any of them can hold a token.\n * @param url The socket's absolute URL.\n * @param config Active capture settings.\n * @param diagnostics Diagnostics reporter, for a URL transform that throws.\n * @returns The URL to record and the server's host name.\n */\nfunction socketTarget(\n url: string,\n config: ResolvedConfig,\n diagnostics: Diagnostics,\n): { target: string; server: string } {\n const parsed = new URL(url);\n\n return {\n // Ignore fullUrls. A browser can't set a header on a socket, so apps often put a token in\n // the query. Only urlTransform can record more of the URL.\n target: recordedUrl(url, false, config.capture.urlTransform, diagnostics),\n server: parsed.hostname,\n };\n}\n\n/**\n * Counts one message on a tracked socket.\n * @param state State of the install that created the socket.\n * @param socket The socket the message belongs to.\n * @param direction Direction of the message.\n */\nfunction count(state: InstallState, socket: WebSocket, direction: \"transmit\" | \"receive\"): void {\n const server = state.servers.get(socket);\n\n // Don't count the library's own sends, for example a custom transport's, or one send would\n // cause the next.\n const own = direction === \"transmit\" && isLibraryRequest();\n if (\n !state.active ||\n server === undefined ||\n own ||\n (state.config.securityContext.isolation &&\n state.contexts.get(socket) !== state.config.securityContext.id)\n ) {\n return;\n }\n\n const attributes: MetricAttributes = {\n \"network.io.direction\": direction,\n \"server.address\": server,\n };\n state.messages.add(1, attributes);\n}\n\n/** Records the lifecycle and message counts of every WebSocket the app opens. */\nexport class WebSocketCapture implements CapturePlugin {\n /** Capture module identifier. */\n readonly name = \"websocket\";\n\n /** Restores the WebSocket constructor. Undefined while the capture isn't installed. */\n private restore: (() => boolean) | undefined;\n\n /** State of the active install. */\n private state: InstallState | undefined;\n\n /** Rate limit for the lifecycle records, so a reconnect loop can't flood the pipeline. */\n private readonly window: StormWindow = { start: 0, count: 0 };\n\n /**\n * @param diagnostics Diagnostics reporter.\n * @param config Active configuration. The capture reads `capture.ignoreUrls`.\n */\n constructor(\n private readonly diagnostics: Diagnostics,\n private readonly config: ResolvedConfig,\n ) {}\n\n /**\n * Replaces the WebSocket constructor with a subclass that tracks every socket.\n * @param ctx The plugin's tools.\n */\n install(ctx: PluginContext): void {\n if (this.restore || typeof WebSocket === \"undefined\") {\n return;\n }\n\n const state: InstallState = {\n active: true,\n ctx,\n messages: ctx.counter(MESSAGES_METRIC),\n servers: new WeakMap(),\n contexts: new WeakMap(),\n config: this.config,\n };\n this.state = state;\n\n const track = (socket: WebSocket): void => {\n this.track(socket, state);\n };\n\n this.restore = patch(\n globalThis,\n \"WebSocket\",\n (Original) =>\n class TrackedWebSocket extends Original {\n /**\n * Keeps instanceof true for a socket the app opened before the install.\n * @param value Value to test.\n * @returns True for every native socket.\n */\n static override [Symbol.hasInstance](value: unknown): boolean {\n return value instanceof Original;\n }\n\n /**\n * @param url The server's URL.\n * @param protocols The app's sub-protocols.\n */\n constructor(url: string | URL, protocols?: string | string[]) {\n super(url, protocols);\n track(this);\n }\n\n /**\n * Sends the data, then counts one message. A send that throws counts nothing.\n * @param data The app's data. We never read it.\n */\n override send(data: SendData): void {\n super.send(data);\n count(state, this, \"transmit\");\n }\n },\n );\n }\n\n /** Restores the WebSocket constructor and stops every tracked socket from recording. */\n uninstall(): void {\n if (this.state) {\n this.state.active = false;\n }\n\n // Another script may have wrapped the constructor after us. Keep its wrapper.\n if (this.restore && !this.restore()) {\n this.diagnostics.report(\n \"capture.install_failed\",\n \"Another script wrapped WebSocket after the library. The library keeps that wrapper.\",\n );\n }\n\n this.restore = undefined;\n this.state = undefined;\n }\n\n /**\n * Adds the listeners that record one socket's lifecycle and received messages.\n * @param socket The app's new socket.\n * @param state State of the install that created the socket.\n */\n private track(socket: WebSocket, state: InstallState): void {\n if (!state.active) {\n return;\n }\n\n // This read runs inside the app's constructor call, so a throw must not fail it.\n this.diagnostics.guard(\n \"capture.record_failed\",\n \"The library could not track a WebSocket. The socket works without capture.\",\n () => {\n // ignoreUrls matches the full URL. A custom transport may send over its own socket.\n if (matchesAny(socket.url, this.config.capture.ignoreUrls)) {\n return;\n }\n\n const { target, server } = socketTarget(socket.url, this.config, this.diagnostics);\n const attributes = { \"url.full\": target, \"server.address\": server };\n const { logger } = state.ctx;\n state.servers.set(socket, server);\n state.contexts.set(socket, this.config.securityContext.id);\n\n const lifecycle = (write: () => void): void => {\n if (\n (!this.config.securityContext.isolation ||\n state.contexts.get(socket) === this.config.securityContext.id) &&\n this.allow(state)\n ) {\n write();\n }\n };\n\n socket.addEventListener(\"open\", () => {\n lifecycle(() => {\n logger.logEvent(\"websocket.open\", attributes);\n });\n });\n socket.addEventListener(\"error\", () => {\n lifecycle(() => {\n logger.warn(\"websocket.error\", attributes);\n });\n });\n socket.addEventListener(\"close\", (event) => {\n lifecycle(() => {\n logger.logEvent(\"websocket.close\", {\n ...attributes,\n \"websocket.close.code\": event.code,\n \"websocket.close.clean\": event.wasClean,\n });\n });\n });\n socket.addEventListener(\"message\", () => {\n count(state, socket, \"receive\");\n });\n },\n );\n }\n\n /**\n * Checks whether a lifecycle record can go out.\n * @param state State of the install that created the socket.\n * @returns False after uninstall, or when the window has no allowance left.\n */\n private allow(state: InstallState): boolean {\n return (\n state.active &&\n allowInWindow(\n this.window,\n this.config.capturePolicy.webSocketPerWindow,\n this.diagnostics,\n \"WebSocket events\",\n this.config.capturePolicy.windowMs,\n )\n );\n }\n}\n"],"mappings":";;;;;;AAiBA,IAAMK,IAAkB;AA4BxB,SAASC,EACP,GACA,GACA,GACoC;CACpC,IAAMC,IAAS,IAAI,IAAIC,CAAG;CAE1B,OAAO;EAGL,QAAQP,EAAYO,GAAK,IAAOC,EAAO,QAAQ,cAAcC,CAAW;EACxE,QAAQH,EAAO;CACjB;AACF;AAQA,SAASI,EAAM,GAAqB,GAAmB,GAAyC;CAC9F,IAAMC,IAASC,EAAM,QAAQ,IAAIC,CAAM,GAIjCC,IAAMC,MAAc,cAAchB,EAAiB;CACzD,IACE,CAACa,EAAM,UACPD,MAAW,KAAA,KACXG,KACCF,EAAM,OAAO,gBAAgB,aAC5BA,EAAM,SAAS,IAAIC,CAAM,MAAMD,EAAM,OAAO,gBAAgB,IAE9D;CAGF,IAAMI,IAA+B;EACnC,wBAAwBD;EACxB,kBAAkBJ;CACpB;CACA,EAAM,SAAS,IAAI,GAAGK,CAAU;AAClC;AAGA,IAAaC,IAAb,MAAuD;CAkBlC;CACA;CAjBnB,OAAgB;CAGhB;CAGA;CAGA,SAAuC;EAAE,OAAO;EAAG,OAAO;CAAE;CAM5D,YACE,GACA,GACA;EADiB,AADA,KAAA,cAAAR,GACA,KAAA,SAAAD;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CACG,CAAC,KAAK,OAAO,gBAAgB,aAC5Bb,EAAM,SAAS,IAAIC,CAAM,MAAM,KAAK,OAAO,gBAAgB,OAC7D,KAAK,MAAMD,CAAK,KAEhBc,EAAM;GAEV;GAqBA,AAnBAb,EAAO,iBAAiB,cAAc;IACpC,QAAgB;KACd,EAAO,SAAS,kBAAkBG,CAAU;IAC9C,CAAC;GACH,CAAC,GACDH,EAAO,iBAAiB,eAAe;IACrC,QAAgB;KACd,EAAO,KAAK,mBAAmBG,CAAU;IAC3C,CAAC;GACH,CAAC,GACDH,EAAO,iBAAiB,UAAU,MAAU;IAC1C,QAAgB;KACd,EAAO,SAAS,mBAAmB;MACjC,GAAGG;MACH,wBAAwBW,EAAM;MAC9B,yBAAyBA,EAAM;KACjC,CAAC;IACH,CAAC;GACH,CAAC,GACDd,EAAO,iBAAiB,iBAAiB;IACvC,EAAMD,GAAOC,GAAQ,SAAS;GAChC,CAAC;EACH,CACF;CACF;CAOA,MAAc,GAA8B;EAC1C,OACED,EAAM,UACNV,EACE,KAAK,QACL,KAAK,OAAO,cAAc,oBAC1B,KAAK,aACL,oBACA,KAAK,OAAO,cAAc,QAC5B;CAEJ;AACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=()=>document.prerendering===!0,t=class{ctx;name=`web-vitals`;installed=!1;logged=new Set;constructor(e){this.ctx=e}install(){if(this.installed||(this.installed=!0,this.reportNavigationTiming(),this.ctx.once.webVitals))return;let e=this.ctx.config.capture.webVitalsLoader;e?this.loadWebVitals(e):this.ctx.diagnostics.report(`config.invalid`,`capture.webVitals needs capture.webVitalsLoader. LCP, CLS and INP are off. Navigation timing continues.`)}uninstall(){this.installed=!1}async loadWebVitals(e){let t=await this.ctx.diagnostics.guardAsync(`capture.install_failed`,`The library could not load web-vitals.`,e);if(!t){this.ctx.diagnostics.report(`capture.install_failed`,`The web-vitals module is not available. LCP, CLS and INP are off. Navigation timing continues.`);return}if(this.ctx.once.webVitals)return;this.ctx.once.webVitals=!0;let n=(e,t)=>n=>{this.ctx.logger.logMetric(`web_vitals.${e}`,Math.round(n.value*1e3)/1e3,t,`gauge`,{"metric.rating":n.rating,"metric.id":n.id})};t.onLCP(n(`lcp`,`ms`)),t.onCLS(n(`cls`,`1`)),t.onINP(n(`inp`,`ms`)),t.onFCP(n(`fcp`,`ms`)),t.onTTFB(n(`ttfb`,`ms`))}reportNavigationTiming(){this.ctx.once.navigationTiming||(this.ctx.once.navigationTiming=!0,this.guardNavigation(()=>{let t=performance.getEntriesByType(`navigation`)[0];if(!t)return;let n=()=>{this.guardNavigation(()=>{this.logNavigation(t)})},r=()=>{e()?document.addEventListener(`prerenderingchange`,n,{once:!0}):n()};if(t.loadEventEnd>0){r();return}let i=()=>{setTimeout(()=>{document.removeEventListener(`visibilitychange`,a),r()},0)},a=()=>{document.visibilityState===`hidden`&&!e()&&n()};document.addEventListener(`visibilitychange`,a),document.readyState===`complete`?i():addEventListener(`load`,i,{once:!0})}))}guardNavigation(e){this.ctx.diagnostics.guard(`capture.install_failed`,`The library could not read the navigation timing.`,e)}logNavigation(e){let t=e.activationStart??0,n=e=>e>0?Math.max(e-t,0):NaN,r=t>0?`prerender`:e.type,i={"navigation.dns_ms":e.domainLookupEnd-e.domainLookupStart,"navigation.tcp_ms":e.connectEnd-e.connectStart,"navigation.ttfb_ms":e.responseStart-e.requestStart,"navigation.response_ms":e.responseEnd-e.responseStart,"navigation.dom_interactive_ms":n(e.domInteractive),"navigation.dom_complete_ms":n(e.domComplete),"navigation.load_ms":n(e.loadEventEnd)};for(let[e,t]of Object.entries(i))Number.isFinite(t)&&t>=0&&!this.logged.has(e)&&(this.logged.add(e),this.ctx.logger.logMetric(e,Math.round(t),`ms`,`gauge`,{"navigation.type":r}))}};exports.WebVitalsCapture=t;
|
|
2
|
+
//# sourceMappingURL=web-vitals-Ch5BpDmo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-vitals-Ch5BpDmo.cjs","names":["prerendering","WebVitalsCapture","ctx","loader","module","send","name","metric","unit","nav","log","whenOpened","later","early","step","opened","since","time","type","metrics","value"],"sources":["../src/capture/web-vitals.ts"],"sourcesContent":["// src/capture/web-vitals.ts\n//\n// Captures browser navigation timing and Core Web Vitals metrics through an optional peer.\n\nimport type { WebVitalsMetric, WebVitalsModule, WebVitalsReporter } from \"../models/config\";\nimport type { Capture, CaptureContext } from \"./types\";\n\n/** True while the browser prerenders the page. The DOM typings don't declare the field yet. */\nconst prerendering = (): boolean => (document as { prerendering?: boolean }).prerendering === true;\n\n/** Captures browser navigation timing and Core Web Vitals. */\nexport class WebVitalsCapture implements Capture {\n /** Capture module identifier. */\n readonly name = \"web-vitals\";\n\n /** Prevents duplicate listener registration. */\n private installed = false;\n\n /** Navigation metrics already logged, so the early and the late read never repeat one. */\n private readonly logged = new Set<string>();\n\n /**\n * @param ctx Capture context: configuration, diagnostics and logger.\n */\n constructor(private readonly ctx: CaptureContext) {}\n\n /** Reports navigation timing and starts loading web-vitals. */\n install(): void {\n if (this.installed) {\n return;\n }\n this.installed = true;\n\n this.reportNavigationTiming();\n\n if (this.ctx.once.webVitals) {\n return;\n }\n\n // Don't import the peer by name, because the Vite dev server fails if it isn't installed.\n // Don't set `once` here either. A later configure() call with a loader must still subscribe.\n const loader = this.ctx.config.capture.webVitalsLoader;\n if (!loader) {\n this.ctx.diagnostics.report(\n \"config.invalid\",\n \"capture.webVitals needs capture.webVitalsLoader. LCP, CLS and INP are off. Navigation timing continues.\",\n );\n return;\n }\n\n // Set the flag after a successful load, not before, so a failed load gets another\n // attempt on a later install.\n void this.loadWebVitals(loader);\n }\n\n /**\n * Marks the module as uninstalled. The web-vitals reporters stay subscribed\n * because the package has no unsubscribe, and `ctx.once` prevents a second set.\n */\n uninstall(): void {\n this.installed = false;\n }\n\n /**\n * Loads the web-vitals module and registers the metric reporters.\n * @param loader The loader the consumer supplies.\n */\n private async loadWebVitals(loader: () => Promise<WebVitalsModule>): Promise<void> {\n const module = await this.ctx.diagnostics.guardAsync(\n \"capture.install_failed\",\n \"The library could not load web-vitals.\",\n loader,\n );\n\n if (!module) {\n this.ctx.diagnostics.report(\n \"capture.install_failed\",\n \"The web-vitals module is not available. LCP, CLS and INP are off. Navigation timing continues.\",\n );\n return;\n }\n\n // Two installs in one turn both load the module, but only the first subscribes.\n // web-vitals has no unsubscribe, and a second set would report every metric twice.\n if (this.ctx.once.webVitals) {\n return;\n }\n this.ctx.once.webVitals = true;\n\n const send =\n (name: string, unit: string): WebVitalsReporter =>\n (metric: WebVitalsMetric): void => {\n this.ctx.logger.logMetric(\n `web_vitals.${name}`,\n // Keep three decimals. CLS is a small fraction, and rounding it to an integer\n // would report every layout shift as zero.\n Math.round(metric.value * 1000) / 1000,\n unit,\n \"gauge\",\n { \"metric.rating\": metric.rating, \"metric.id\": metric.id },\n );\n };\n\n module.onLCP(send(\"lcp\", \"ms\"));\n module.onCLS(send(\"cls\", \"1\"));\n module.onINP(send(\"inp\", \"ms\"));\n module.onFCP(send(\"fcp\", \"ms\"));\n module.onTTFB(send(\"ttfb\", \"ms\"));\n }\n\n /** Logs the navigation timing metrics, once per document and only after the load event. */\n private reportNavigationTiming(): void {\n // The entry describes this document's one navigation, so a second report after a\n // reconfigure would duplicate the seven metrics.\n if (this.ctx.once.navigationTiming) {\n return;\n }\n this.ctx.once.navigationTiming = true;\n\n this.guardNavigation(() => {\n const nav = performance.getEntriesByType(\"navigation\")[0] as\n PerformanceNavigationTiming | undefined;\n if (!nav) {\n return;\n }\n\n const log = (): void => {\n this.guardNavigation(() => {\n this.logNavigation(nav);\n });\n };\n\n // A prerendered page has no activationStart until the user opens it, and a page nobody\n // opens must report nothing. So the full report waits for the activation.\n const whenOpened = (): void => {\n if (prerendering()) {\n document.addEventListener(\"prerenderingchange\", log, { once: true });\n } else {\n log();\n }\n };\n\n if (nav.loadEventEnd > 0) {\n whenOpened();\n return;\n }\n\n // An app usually starts the library before the load event, when domComplete and\n // loadEventEnd are still 0. Read one task after load, because the browser sets\n // loadEventEnd only once the load handlers have returned. The entry is live.\n const later = (): void => {\n setTimeout(() => {\n document.removeEventListener(\"visibilitychange\", early);\n whenOpened();\n }, 0);\n };\n\n // A user who leaves a slow page before it has loaded would otherwise report nothing,\n // and the slowest loads would be missing from the data. Log what is ready by then.\n // A page that is still prerendering is hidden too, but nobody has left it.\n const early = (): void => {\n if (document.visibilityState === \"hidden\" && !prerendering()) {\n log();\n }\n };\n document.addEventListener(\"visibilitychange\", early);\n\n // Inside a load handler the state is already \"complete\" and no second load event comes.\n if (document.readyState === \"complete\") {\n later();\n } else {\n addEventListener(\"load\", later, { once: true });\n }\n });\n }\n\n /**\n * Runs one step of the navigation timing read. The browser calls the late steps directly,\n * so anything they throw would be an uncaught error on the page.\n * @param step The step to run.\n */\n private guardNavigation(step: () => void): void {\n this.ctx.diagnostics.guard(\n \"capture.install_failed\",\n \"The library could not read the navigation timing.\",\n step,\n );\n }\n\n /**\n * Logs every navigation metric that is ready and hasn't been logged yet.\n * @param nav The document's navigation entry.\n */\n private logNavigation(nav: PerformanceNavigationTiming): void {\n // On a prerendered page the entry's clock starts long before the user sees anything.\n // Count the milestones from the activation and never below 0, as the web-vitals package\n // does for its own metrics. Older browsers have no activationStart.\n const opened = (nav as { activationStart?: number }).activationStart ?? 0;\n // 0 means \"not reached yet\", and NaN makes the check below skip it.\n const since = (time: number): number => (time > 0 ? Math.max(time - opened, 0) : NaN);\n const type = opened > 0 ? \"prerender\" : nav.type;\n const metrics: Record<string, number> = {\n \"navigation.dns_ms\": nav.domainLookupEnd - nav.domainLookupStart,\n \"navigation.tcp_ms\": nav.connectEnd - nav.connectStart,\n \"navigation.ttfb_ms\": nav.responseStart - nav.requestStart,\n \"navigation.response_ms\": nav.responseEnd - nav.responseStart,\n \"navigation.dom_interactive_ms\": since(nav.domInteractive),\n \"navigation.dom_complete_ms\": since(nav.domComplete),\n \"navigation.load_ms\": since(nav.loadEventEnd),\n };\n\n for (const [name, value] of Object.entries(metrics)) {\n // Skip timings that are missing or negative, so they don't show up as false zeros.\n if (Number.isFinite(value) && value >= 0 && !this.logged.has(name)) {\n this.logged.add(name);\n this.ctx.logger.logMetric(name, Math.round(value), \"ms\", \"gauge\", {\n \"navigation.type\": type,\n });\n }\n }\n }\n}\n"],"mappings":"AAQA,IAAMA,MAA+B,SAAwC,eAAiB,GAGjFC,EAAb,KAAiD,CAalB,IAX7B,KAAgB,aAGhB,UAAoB,GAGpB,OAA0B,IAAI,IAK9B,YAAY,EAAsC,CAArB,KAAA,IAAAC,CAAsB,CAGnD,SAAgB,CAQd,GAPI,KAAK,YAGT,KAAK,UAAY,GAEjB,KAAK,uBAAuB,EAExB,KAAK,IAAI,KAAK,WAChB,OAKF,IAAMC,EAAS,KAAK,IAAI,OAAO,QAAQ,gBAClCA,EAUL,KAAU,cAAcA,CAAM,EAT5B,KAAK,IAAI,YAAY,OACnB,iBACA,yGACF,CAOJ,CAMA,WAAkB,CAChB,KAAK,UAAY,EACnB,CAMA,MAAc,cAAc,EAAuD,CACjF,IAAMC,EAAS,MAAM,KAAK,IAAI,YAAY,WACxC,yBACA,yCACAD,CACF,EAEA,GAAI,CAACC,EAAQ,CACX,KAAK,IAAI,YAAY,OACnB,yBACA,gGACF,EACA,MACF,CAIA,GAAI,KAAK,IAAI,KAAK,UAChB,OAEF,KAAK,IAAI,KAAK,UAAY,GAE1B,IAAMC,GACH,EAAc,IACd,GAAkC,CACjC,KAAK,IAAI,OAAO,UACd,cAAcC,IAGd,KAAK,MAAMC,EAAO,MAAQ,GAAI,EAAI,IAClCC,EACA,QACA,CAAE,gBAAiBD,EAAO,OAAQ,YAAaA,EAAO,EAAG,CAC3D,CACF,EAEFH,EAAO,MAAMC,EAAK,MAAO,IAAI,CAAC,EAC9BD,EAAO,MAAMC,EAAK,MAAO,GAAG,CAAC,EAC7BD,EAAO,MAAMC,EAAK,MAAO,IAAI,CAAC,EAC9BD,EAAO,MAAMC,EAAK,MAAO,IAAI,CAAC,EAC9BD,EAAO,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