@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/models/config.d.ts
CHANGED
|
@@ -3,20 +3,24 @@ import type { DiagnosticCode, DiagnosticHandler } from "../core/diagnostics";
|
|
|
3
3
|
import type { DropSummary } from "./drop";
|
|
4
4
|
import type { LogLevel, LogRecord } from "./log-record";
|
|
5
5
|
import type { CapturePlugin } from "./plugin";
|
|
6
|
+
import type { ReplayLoader, ReplayMode, ReplayPluginLoader, ReplaySegment } from "./replay";
|
|
6
7
|
import type { LogSerializer } from "./serializer";
|
|
7
8
|
/** Backing store for undelivered records. "auto" picks the best one the host supports. */
|
|
8
9
|
export type StorageStrategy = "auto" | "indexeddb" | "localstorage" | "memory" | "none";
|
|
9
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Where the library keeps session, tab and journey ids. "storage" uses browser storage and
|
|
12
|
+
* "memory" writes nothing.
|
|
13
|
+
*/
|
|
10
14
|
export type IdentityStrategy = "storage" | "memory";
|
|
11
15
|
/**
|
|
12
|
-
* What this context does with its records. `sender` delivers its own records
|
|
13
|
-
*
|
|
14
|
-
*
|
|
16
|
+
* What this context does with its records. `sender` delivers its own records, `forwarder`
|
|
17
|
+
* hands them to another context, and `auto` picks a role at startup. `off` turns the bus off,
|
|
18
|
+
* so the context delivers its own records.
|
|
15
19
|
*/
|
|
16
20
|
export type BusMode = "auto" | "sender" | "forwarder" | "off";
|
|
17
21
|
/**
|
|
18
|
-
* Structural type for the metric shape of the `web-vitals` package
|
|
19
|
-
*
|
|
22
|
+
* Structural type for the metric shape of the `web-vitals` package, so the library has no
|
|
23
|
+
* hard dependency on it.
|
|
20
24
|
*/
|
|
21
25
|
export interface WebVitalsMetric {
|
|
22
26
|
/** Measurement value, in the metric's own unit. */
|
|
@@ -112,7 +116,7 @@ export interface OtelApi {
|
|
|
112
116
|
* @returns A promise that resolves to the module.
|
|
113
117
|
*/
|
|
114
118
|
export type OtelLoader = () => Promise<OtelApi>;
|
|
115
|
-
/** Sampling policy.
|
|
119
|
+
/** Sampling policy. Controls which records the library keeps. */
|
|
116
120
|
export interface SamplingOptions {
|
|
117
121
|
/**
|
|
118
122
|
* Default fraction of records kept, 0 to 1.
|
|
@@ -120,7 +124,7 @@ export interface SamplingOptions {
|
|
|
120
124
|
*/
|
|
121
125
|
defaultRate: number;
|
|
122
126
|
/**
|
|
123
|
-
*
|
|
127
|
+
* Per-namespace rate overrides, keyed by `app.namespace`. The most specific prefix wins.
|
|
124
128
|
* @default {}
|
|
125
129
|
*/
|
|
126
130
|
rates: Record<string, number>;
|
|
@@ -136,28 +140,29 @@ export interface SamplingOptions {
|
|
|
136
140
|
*/
|
|
137
141
|
alwaysSampleFrom: LogLevel;
|
|
138
142
|
/**
|
|
139
|
-
* Read sampling rules from the `X-UiObs-Sampling` header of
|
|
140
|
-
*
|
|
143
|
+
* Read sampling rules from the `X-UiObs-Sampling` header of every accepted batch. The rules
|
|
144
|
+
* stay in effect for their `ttlMs`. Set this in every context on the page.
|
|
141
145
|
* @default false
|
|
142
146
|
*/
|
|
143
147
|
remote: boolean;
|
|
144
148
|
/**
|
|
145
|
-
* Highest rate
|
|
149
|
+
* Highest rate a remote rule can set, 0 to 1. Applies to `defaultRate` and to every
|
|
150
|
+
* namespace rate.
|
|
146
151
|
* @default 1
|
|
147
152
|
*/
|
|
148
153
|
remoteMaxRate: number;
|
|
149
154
|
}
|
|
150
|
-
/** Bus settings.
|
|
155
|
+
/** Bus settings. Controls how this context finds, trusts and sends messages to others. */
|
|
151
156
|
export interface BusOptions {
|
|
152
157
|
/**
|
|
153
|
-
*
|
|
158
|
+
* Which child windows are accepted. "registered" requires a window registration, while
|
|
154
159
|
* "trusted-origin" accepts child windows from a trusted origin.
|
|
155
160
|
* @default "registered"
|
|
156
161
|
*/
|
|
157
162
|
sourcePolicy: "registered" | "trusted-origin";
|
|
158
163
|
/**
|
|
159
|
-
* Message checks. "strict" checks
|
|
160
|
-
*
|
|
164
|
+
* Message checks. "strict" checks every record and control message, while "envelope" checks
|
|
165
|
+
* only the protocol tag.
|
|
161
166
|
* @default "strict"
|
|
162
167
|
*/
|
|
163
168
|
validation: "strict" | "envelope";
|
|
@@ -188,26 +193,26 @@ export interface BusOptions {
|
|
|
188
193
|
mode: BusMode;
|
|
189
194
|
/**
|
|
190
195
|
* Additional trusted parent origins. With sourcePolicy "trusted-origin", the list also
|
|
191
|
-
* permits child origins. A registered child uses the exact origin
|
|
192
|
-
*
|
|
196
|
+
* permits child origins. A registered child uses the exact origin from its registration.
|
|
197
|
+
* "null" is never accepted, so a sandboxed frame must set `mode: "sender"`.
|
|
193
198
|
* @default []
|
|
194
199
|
*/
|
|
195
200
|
trustedOrigins: string[];
|
|
196
201
|
/**
|
|
197
|
-
* Which OpenFin context this is. Only the platform provider answers a handshake
|
|
198
|
-
*
|
|
199
|
-
*
|
|
202
|
+
* Which OpenFin context this is. Only the platform provider answers a handshake, so with
|
|
203
|
+
* the wrong value every view sends its own records. "auto" treats the window whose name
|
|
204
|
+
* equals its application uuid as the provider.
|
|
200
205
|
* @default "auto"
|
|
201
206
|
*/
|
|
202
207
|
openFinRole: "auto" | "provider" | "client";
|
|
203
208
|
}
|
|
204
209
|
/**
|
|
205
210
|
* Where a journey id applies.
|
|
206
|
-
* - "context":
|
|
207
|
-
* - "tab": a frame or
|
|
208
|
-
*
|
|
209
|
-
* - "origin":
|
|
210
|
-
* other tabs.
|
|
211
|
+
* - "context": every document, frame or worker keeps its own journey.
|
|
212
|
+
* - "tab": a frame or worker adopts the journey of the context that owns it. A journey never
|
|
213
|
+
* crosses to another tab.
|
|
214
|
+
* - "origin": every context on the origin adopts every journey. The broadcast link also
|
|
215
|
+
* reaches other tabs.
|
|
211
216
|
* - "auto": "origin" in OpenFin and "tab" in a browser.
|
|
212
217
|
*/
|
|
213
218
|
export type JourneyScope = "auto" | "context" | "tab" | "origin";
|
|
@@ -219,43 +224,43 @@ export interface JourneyOptions {
|
|
|
219
224
|
*/
|
|
220
225
|
scope: JourneyScope;
|
|
221
226
|
/**
|
|
222
|
-
*
|
|
223
|
-
*
|
|
227
|
+
* How long a journey can stay open, in milliseconds, before the library ends it. 1 minute
|
|
228
|
+
* to 24 hours. Can't be changed after startup.
|
|
224
229
|
* @default 1800000
|
|
225
230
|
*/
|
|
226
231
|
maxAgeMs: number;
|
|
227
232
|
}
|
|
228
|
-
/** Batch size and flush interval
|
|
233
|
+
/** Batch size and flush interval for each record stream. Can't be changed after startup. */
|
|
229
234
|
export interface BatchingOptions {
|
|
230
235
|
/**
|
|
231
|
-
*
|
|
236
|
+
* How long a partial log batch waits before it is sent, in milliseconds. 100 to 60000.
|
|
232
237
|
* @default 2000
|
|
233
238
|
*/
|
|
234
239
|
logFlushIntervalMs: number;
|
|
235
240
|
/**
|
|
236
|
-
* Maximum records in one log batch.
|
|
241
|
+
* Maximum records in one log batch. 1 to 1000.
|
|
237
242
|
* @default 100
|
|
238
243
|
*/
|
|
239
244
|
logBatchSize: number;
|
|
240
245
|
/**
|
|
241
|
-
*
|
|
246
|
+
* How long a partial metric batch waits before it is sent, in milliseconds. 100 to 60000.
|
|
242
247
|
* @default 10000
|
|
243
248
|
*/
|
|
244
249
|
metricFlushIntervalMs: number;
|
|
245
250
|
/**
|
|
246
|
-
* Maximum records in one metric batch.
|
|
251
|
+
* Maximum records in one metric batch. 1 to 1000.
|
|
247
252
|
* @default 500
|
|
248
253
|
*/
|
|
249
254
|
metricBatchSize: number;
|
|
250
255
|
}
|
|
251
256
|
/**
|
|
252
257
|
* How long the library keeps an undelivered batch.
|
|
253
|
-
* - "limited": the batch stays until `maxAgeMs` or `maxAttempts`.
|
|
254
|
-
* - "until-delivered":
|
|
255
|
-
*
|
|
258
|
+
* - "limited": the batch stays until it reaches `maxAgeMs` or `maxAttempts`.
|
|
259
|
+
* - "until-delivered": no age limit and no attempt limit. `maxBatches` still applies, and a
|
|
260
|
+
* permanent error still drops the batch.
|
|
256
261
|
*/
|
|
257
262
|
export type RetentionMode = "limited" | "until-delivered";
|
|
258
|
-
/** Retention of undelivered batches.
|
|
263
|
+
/** Retention of undelivered batches. Can't be changed after startup. */
|
|
259
264
|
export interface RetentionOptions {
|
|
260
265
|
/**
|
|
261
266
|
* Retention rule.
|
|
@@ -263,79 +268,82 @@ export interface RetentionOptions {
|
|
|
263
268
|
*/
|
|
264
269
|
mode: RetentionMode;
|
|
265
270
|
/**
|
|
266
|
-
* Maximum stored batches. A new batch evicts the oldest batch
|
|
267
|
-
*
|
|
271
|
+
* Maximum stored batches. A new batch evicts the oldest batch that holds no action first.
|
|
272
|
+
* 1 to 5000.
|
|
268
273
|
* @default 500
|
|
269
274
|
*/
|
|
270
275
|
maxBatches: number;
|
|
271
276
|
/**
|
|
272
|
-
* Maximum age of a stored batch, in milliseconds.
|
|
277
|
+
* Maximum age of a stored batch, in milliseconds. 1 minute to 7 days.
|
|
273
278
|
* @default 86400000
|
|
274
279
|
*/
|
|
275
280
|
maxAgeMs: number;
|
|
276
281
|
/**
|
|
277
|
-
* Maximum send attempts
|
|
282
|
+
* Maximum send attempts for a stored batch. 1 to 20.
|
|
278
283
|
* @default 5
|
|
279
284
|
*/
|
|
280
285
|
maxAttempts: number;
|
|
281
286
|
}
|
|
282
|
-
/** Size limits for each record.
|
|
287
|
+
/** Size limits for each record. Can't be changed after startup. */
|
|
283
288
|
export interface LimitOptions {
|
|
284
289
|
/**
|
|
285
|
-
* Maximum body length, in characters.
|
|
290
|
+
* Maximum body length, in characters. 256 to 65536.
|
|
286
291
|
* @default 4096
|
|
287
292
|
*/
|
|
288
293
|
maxBodyChars: number;
|
|
289
294
|
/**
|
|
290
|
-
* Maximum length of a string attribute, in characters.
|
|
295
|
+
* Maximum length of a string attribute, in characters. 256 to 65536.
|
|
291
296
|
* @default 8192
|
|
292
297
|
*/
|
|
293
298
|
maxAttributeChars: number;
|
|
294
299
|
/**
|
|
295
|
-
* Maximum keys in one object.
|
|
300
|
+
* Maximum keys in one object. 1 to 1024.
|
|
296
301
|
* @default 128
|
|
297
302
|
*/
|
|
298
303
|
maxAttributeCount: number;
|
|
299
304
|
/**
|
|
300
|
-
* Maximum length of an error stack, in characters.
|
|
305
|
+
* Maximum length of an error stack, in characters. 256 to 65536.
|
|
301
306
|
* @default 8192
|
|
302
307
|
*/
|
|
303
308
|
maxStackChars: number;
|
|
304
309
|
/**
|
|
305
|
-
* Maximum depth of a nested value.
|
|
310
|
+
* Maximum depth of a nested value. 1 to 16.
|
|
306
311
|
* @default 6
|
|
307
312
|
*/
|
|
308
313
|
maxDepth: number;
|
|
309
314
|
/**
|
|
310
|
-
* Maximum items in one array, set or map.
|
|
315
|
+
* Maximum items in one array, set or map. 1 to 10000.
|
|
311
316
|
* @default 100
|
|
312
317
|
*/
|
|
313
318
|
maxArrayLength: number;
|
|
314
319
|
/**
|
|
315
|
-
* Maximum values in one sanitize pass.
|
|
320
|
+
* Maximum values in one sanitize pass. 100 to 100000.
|
|
316
321
|
* @default 10000
|
|
317
322
|
*/
|
|
318
323
|
maxNodes: number;
|
|
319
324
|
/**
|
|
320
|
-
* Maximum attribute bytes
|
|
321
|
-
*
|
|
325
|
+
* Maximum attribute bytes in one record. Above that, the library drops the caller's
|
|
326
|
+
* attributes. 1024 to 60000.
|
|
322
327
|
* @default 32768
|
|
323
328
|
*/
|
|
324
329
|
maxRecordBytes: number;
|
|
325
330
|
}
|
|
326
331
|
/** Console method that the console capture can wrap. */
|
|
327
332
|
export type CapturedConsoleMethod = "error" | "warn" | "info" | "log";
|
|
328
|
-
/** Resource timing settings.
|
|
333
|
+
/** Resource timing settings. Passing an object turns the capture on. */
|
|
329
334
|
export interface ResourceTimingOptions {
|
|
330
|
-
/**
|
|
335
|
+
/**
|
|
336
|
+
* Minimum duration for a ui.resource.slow event, in milliseconds. Set 0 for no slow events.
|
|
337
|
+
* @default 1000
|
|
338
|
+
*/
|
|
331
339
|
slowMs?: number;
|
|
332
340
|
}
|
|
333
341
|
/** Capture switch that a remote rule can change. */
|
|
334
342
|
export type RemoteCaptureFlag = (typeof REMOTE_CAPTURE_FLAGS)[number];
|
|
335
|
-
/** Click settings. An object turns
|
|
343
|
+
/** Click settings. An object turns the capture on, and true uses the defaults below. */
|
|
336
344
|
export interface InteractionOptions {
|
|
337
345
|
/**
|
|
338
|
-
* Record the
|
|
346
|
+
* Record the clicked element's textContent.
|
|
339
347
|
* @default false
|
|
340
348
|
*/
|
|
341
349
|
text?: boolean;
|
|
@@ -355,55 +363,55 @@ export interface InteractionOptions {
|
|
|
355
363
|
*/
|
|
356
364
|
maxTextChars?: number;
|
|
357
365
|
/**
|
|
358
|
-
* Attribute that names the click action, for example "data-testid". The closest element
|
|
359
|
-
*
|
|
366
|
+
* Attribute that names the click action, for example "data-testid". The closest element
|
|
367
|
+
* that has it supplies the breadcrumb message. Use letters, digits, hyphens and underscores.
|
|
360
368
|
* @default "data-observability-action"
|
|
361
369
|
*/
|
|
362
370
|
actionAttribute?: string;
|
|
363
371
|
/**
|
|
364
|
-
* Record one
|
|
365
|
-
*
|
|
372
|
+
* Record one `ui.rage_click` event for every burst of `rageClickCount` clicks on one element
|
|
373
|
+
* within `rageClickWindowMs`. The event carries the action name and the click count.
|
|
366
374
|
* @default false
|
|
367
375
|
*/
|
|
368
376
|
rageClicks?: boolean;
|
|
369
377
|
/**
|
|
370
|
-
*
|
|
378
|
+
* Number of clicks that count as a rage click. 2 to 20.
|
|
371
379
|
* @default 3
|
|
372
380
|
*/
|
|
373
381
|
rageClickCount?: number;
|
|
374
382
|
/**
|
|
375
|
-
* Time
|
|
383
|
+
* Time window that the clicks of a rage click must fall in, in milliseconds. 100 to 10000.
|
|
376
384
|
* @default 1000
|
|
377
385
|
*/
|
|
378
386
|
rageClickWindowMs?: number;
|
|
379
387
|
/**
|
|
380
|
-
* Record
|
|
381
|
-
* and no scroll
|
|
382
|
-
* `target="_blank"` or `download` link
|
|
388
|
+
* Record a `ui.dead_click` event when a click on a control causes no DOM change, no
|
|
389
|
+
* navigation and no scroll within `deadClickMs`. The event carries only the action name. A
|
|
390
|
+
* click on a `target="_blank"` or `download` link produces no event.
|
|
383
391
|
* @default false
|
|
384
392
|
*/
|
|
385
393
|
deadClicks?: boolean;
|
|
386
394
|
/**
|
|
387
|
-
*
|
|
395
|
+
* How long to wait for a visible response to a click, in milliseconds. 100 to 10000.
|
|
388
396
|
* @default 1000
|
|
389
397
|
*/
|
|
390
398
|
deadClickMs?: number;
|
|
391
399
|
}
|
|
392
|
-
/** Cache settings. A logger
|
|
400
|
+
/** Cache settings. A logger the app still holds keeps working after it leaves the cache. */
|
|
393
401
|
export interface LoggerCacheOptions {
|
|
394
402
|
/**
|
|
395
|
-
* Maximum cached loggers. The
|
|
396
|
-
*
|
|
403
|
+
* Maximum cached loggers. The least recently used logger is removed first. Set 0 for no
|
|
404
|
+
* cache. Set null for no cache limit.
|
|
397
405
|
* @default 256
|
|
398
406
|
*/
|
|
399
407
|
maxEntries: number | null;
|
|
400
408
|
}
|
|
401
409
|
/** Identity of one delivery context. Do not put secrets or personal data in the id. */
|
|
402
410
|
export interface SecurityContextOptions {
|
|
403
|
-
/** Stable id for delivery after a page reload.
|
|
411
|
+
/** Stable id for delivery after a page reload. With an empty id, the runtime creates one. */
|
|
404
412
|
id: string;
|
|
405
413
|
/**
|
|
406
|
-
* Keep stored batches in separate contexts.
|
|
414
|
+
* Keep stored batches in separate contexts. When true, change delivery settings through
|
|
407
415
|
* rotateSecurityContext() instead of configure().
|
|
408
416
|
* @default true
|
|
409
417
|
*/
|
|
@@ -411,25 +419,26 @@ export interface SecurityContextOptions {
|
|
|
411
419
|
}
|
|
412
420
|
/** Delivery settings that the runtime replaces together when the security context changes. */
|
|
413
421
|
export type DeliveryOptions = Pick<ObservabilityConfig, "endpoint" | "metricsEndpoint" | "tracesEndpoint" | "headers" | "credentials" | "transport" | "transportOnExit" | "transportWorker">;
|
|
414
|
-
/** New security context.
|
|
422
|
+
/** New security context. Any delivery field that is left out resets to its default. */
|
|
415
423
|
export interface SecurityContextUpdate {
|
|
416
|
-
/** New delivery context id. If
|
|
424
|
+
/** New delivery context id. If omitted, the runtime creates one. */
|
|
417
425
|
id?: string;
|
|
418
|
-
/** New delivery settings.
|
|
426
|
+
/** New delivery settings. Any field that is left out resets to its default. */
|
|
419
427
|
delivery: DeliveryOptions;
|
|
420
|
-
/** New ambient attributes. If
|
|
428
|
+
/** New ambient attributes. If omitted, the runtime removes the old ones. */
|
|
421
429
|
context?: Record<string, unknown>;
|
|
422
430
|
}
|
|
423
431
|
/** Policy for old records. */
|
|
424
432
|
export interface SecurityContextRotationOptions {
|
|
425
433
|
/**
|
|
426
|
-
*
|
|
427
|
-
* "retain" keeps them in the old context
|
|
434
|
+
* What to do with old records. "discard" removes them, and "flush" tries to deliver them
|
|
435
|
+
* before it removes them. "retain" keeps them in the old context, and "carry" moves them to
|
|
436
|
+
* the new context.
|
|
428
437
|
* @default "discard"
|
|
429
438
|
*/
|
|
430
439
|
pending?: "discard" | "flush" | "retain" | "carry";
|
|
431
440
|
/**
|
|
432
|
-
*
|
|
441
|
+
* How long to wait for the old records to flush, in milliseconds.
|
|
433
442
|
* @default 5000
|
|
434
443
|
*/
|
|
435
444
|
timeoutMs?: number;
|
|
@@ -440,9 +449,10 @@ export interface SecurityContextRotationOptions {
|
|
|
440
449
|
*/
|
|
441
450
|
export interface CaptureOptions {
|
|
442
451
|
/**
|
|
443
|
-
*
|
|
452
|
+
* Rewrites a URL before the capture records it. Applies to page, HTTP, resource and
|
|
453
|
+
* WebSocket URLs.
|
|
444
454
|
* @param url Original URL, before the default URL changes.
|
|
445
|
-
* @returns URL to record. Null, an invalid result or an exception
|
|
455
|
+
* @returns URL to record. Null, an invalid result or an exception produces an empty URL.
|
|
446
456
|
*/
|
|
447
457
|
urlTransform?: (url: string) => string | null;
|
|
448
458
|
/**
|
|
@@ -471,8 +481,8 @@ export interface CaptureOptions {
|
|
|
471
481
|
*/
|
|
472
482
|
xhr: boolean;
|
|
473
483
|
/**
|
|
474
|
-
* Record the `http.client.request.duration` histogram
|
|
475
|
-
* capture sees. The histogram is in seconds.
|
|
484
|
+
* Record the `http.client.request.duration` histogram for every request the `fetch` or
|
|
485
|
+
* `xhr` capture sees. The histogram is in seconds.
|
|
476
486
|
* @default true
|
|
477
487
|
*/
|
|
478
488
|
httpMetrics: boolean;
|
|
@@ -487,12 +497,12 @@ export interface CaptureOptions {
|
|
|
487
497
|
*/
|
|
488
498
|
navigation: boolean;
|
|
489
499
|
/**
|
|
490
|
-
* Report web vitals as metrics.
|
|
500
|
+
* Report web vitals as metrics. Needs `webVitalsLoader`.
|
|
491
501
|
* @default false
|
|
492
502
|
*/
|
|
493
503
|
webVitals: boolean;
|
|
494
504
|
/**
|
|
495
|
-
* Report long animation frames as the
|
|
505
|
+
* Report long animation frames as the `ui.long_frame.duration` histogram. A long frame
|
|
496
506
|
* freezes the page. Browsers without `long-animation-frame` report `longtask` entries.
|
|
497
507
|
* @default false
|
|
498
508
|
*/
|
|
@@ -501,55 +511,55 @@ export interface CaptureOptions {
|
|
|
501
511
|
* Minimum frame duration that `longFrames` reports, in milliseconds.
|
|
502
512
|
* @default 100
|
|
503
513
|
*/
|
|
504
|
-
|
|
514
|
+
longFrameMs: number;
|
|
505
515
|
/**
|
|
506
|
-
* Record the app's console calls. `true` wraps `error` and `warn
|
|
507
|
-
* `error`
|
|
508
|
-
*
|
|
516
|
+
* Record the app's console calls. `true` wraps `error` and `warn`, and a list picks the
|
|
517
|
+
* methods. `error` produces an ERROR record and `warn` a WARN record, while `info` and `log`
|
|
518
|
+
* only add a breadcrumb.
|
|
509
519
|
* @default false
|
|
510
520
|
*/
|
|
511
521
|
console: boolean | CapturedConsoleMethod[];
|
|
512
522
|
/**
|
|
513
|
-
* Keep the query string and fragment on every URL the library records.
|
|
514
|
-
*
|
|
523
|
+
* Keep the query string and fragment on every URL the library records. When off, they are
|
|
524
|
+
* removed from page URLs, request targets and failed resource URLs.
|
|
515
525
|
* @default false
|
|
516
526
|
*/
|
|
517
527
|
fullUrls: boolean;
|
|
518
528
|
/**
|
|
519
|
-
* URLs
|
|
529
|
+
* URLs the library doesn't log. The ingest endpoint is always included.
|
|
520
530
|
* @default []
|
|
521
531
|
*/
|
|
522
532
|
ignoreUrls: (string | RegExp)[];
|
|
523
533
|
/**
|
|
524
|
-
* Targets that receive a `traceparent` header. A string is an origin and matches
|
|
525
|
-
* to that origin
|
|
526
|
-
* matches all URLs breaks CORS on third-party endpoints.
|
|
534
|
+
* Targets that receive a `traceparent` header. A string is an origin and matches only
|
|
535
|
+
* requests to that origin. A RegExp tests the full URL. Start every RegExp with `^`, because
|
|
536
|
+
* a pattern that matches all URLs breaks CORS on third-party endpoints.
|
|
527
537
|
* @default []
|
|
528
538
|
*/
|
|
529
539
|
propagateTraceHeaderTo: (string | RegExp)[];
|
|
530
540
|
/**
|
|
531
|
-
* Record
|
|
532
|
-
*
|
|
541
|
+
* Record every WebSocket's open, close and error events, and count its messages in the
|
|
542
|
+
* `ui.websocket.messages` counter. Message content is never recorded.
|
|
533
543
|
* @default false
|
|
534
544
|
*/
|
|
535
545
|
webSocket: boolean;
|
|
536
546
|
/**
|
|
537
|
-
* Report a page
|
|
538
|
-
* The next page
|
|
539
|
-
* A popup with an opener reports nothing
|
|
547
|
+
* Report a page in this tab that ended without a clean close, for example after a crash.
|
|
548
|
+
* The tab's next page logs WARN `ui.unclean_exit`. The capture writes one sessionStorage
|
|
549
|
+
* key. A popup with an opener reports nothing, and `identity: "memory"` turns this off.
|
|
540
550
|
* @default false
|
|
541
551
|
*/
|
|
542
552
|
uncleanExit: boolean;
|
|
543
553
|
/**
|
|
544
|
-
* Record
|
|
545
|
-
* in milliseconds, with `user_timing.name`.
|
|
546
|
-
* Names follow `fullUrls`.
|
|
554
|
+
* Record every `performance.measure()` the app makes in the `ui.user_timing.duration`
|
|
555
|
+
* histogram, in milliseconds, with `user_timing.name`. Every `performance.mark()` adds a
|
|
556
|
+
* breadcrumb. Names follow `fullUrls`.
|
|
547
557
|
* @default false
|
|
548
558
|
*/
|
|
549
559
|
userTiming: boolean;
|
|
550
560
|
/**
|
|
551
561
|
* Names of the marks and measures that userTiming records, as strings and RegExp patterns.
|
|
552
|
-
* A string matches
|
|
562
|
+
* A string matches any part of the name. An empty list records every name.
|
|
553
563
|
* @default []
|
|
554
564
|
*/
|
|
555
565
|
userTimingInclude: (string | RegExp)[];
|
|
@@ -559,7 +569,8 @@ export interface CaptureOptions {
|
|
|
559
569
|
*/
|
|
560
570
|
remoteToggles: RemoteCaptureFlag[];
|
|
561
571
|
/**
|
|
562
|
-
* Add response Server-Timing entries to fetch and XHR records
|
|
572
|
+
* Add the response's Server-Timing entries to fetch and XHR records, and link a traceparent
|
|
573
|
+
* entry to the client span.
|
|
563
574
|
* @default false
|
|
564
575
|
*/
|
|
565
576
|
serverTiming: boolean;
|
|
@@ -579,7 +590,7 @@ export interface CaptureOptions {
|
|
|
579
590
|
*/
|
|
580
591
|
lifecycle: boolean;
|
|
581
592
|
/**
|
|
582
|
-
* Capture modules
|
|
593
|
+
* Capture modules supplied by the app. A new list replaces the current one.
|
|
583
594
|
* @default []
|
|
584
595
|
*/
|
|
585
596
|
plugins: CapturePlugin[];
|
|
@@ -589,7 +600,10 @@ export interface CaptureOptions {
|
|
|
589
600
|
*/
|
|
590
601
|
webVitalsLoader?: () => Promise<WebVitalsModule>;
|
|
591
602
|
}
|
|
592
|
-
/**
|
|
603
|
+
/**
|
|
604
|
+
* Serializer option after resolution. A name stays a name, and the transport picks the
|
|
605
|
+
* implementation.
|
|
606
|
+
*/
|
|
593
607
|
export type SerializerChoice = "otlp" | "ecs" | LogSerializer;
|
|
594
608
|
/** Part of the console prefix that a style applies to: the namespace or one level. */
|
|
595
609
|
export type ConsoleStyleKey = "namespace" | LogLevel;
|
|
@@ -601,11 +615,11 @@ export type ConsoleStyles = Partial<Record<ConsoleStyleKey, string>>;
|
|
|
601
615
|
/** Object form of the console option. */
|
|
602
616
|
export interface ConsoleOptions {
|
|
603
617
|
/**
|
|
604
|
-
* Lowest level
|
|
605
|
-
*
|
|
618
|
+
* Lowest level the console prints. If you leave it unset, the current level stays. If there
|
|
619
|
+
* is no current level, the console prints from DEBUG up.
|
|
606
620
|
*/
|
|
607
621
|
level?: LogLevel;
|
|
608
|
-
/** CSS for the namespace and for each level.
|
|
622
|
+
/** CSS for the namespace and for each level. Any key you leave unset keeps its style. */
|
|
609
623
|
styles?: ConsoleStyles;
|
|
610
624
|
}
|
|
611
625
|
/**
|
|
@@ -621,21 +635,24 @@ export interface ResolvedConsole {
|
|
|
621
635
|
styles: Required<ConsoleStyles>;
|
|
622
636
|
}
|
|
623
637
|
/**
|
|
624
|
-
* Kind of
|
|
625
|
-
* is then an OTLP `ExportMetricsServiceRequest`. A batch of span records is "traces"
|
|
626
|
-
* an OTLP `ExportTraceServiceRequest
|
|
638
|
+
* Kind of batch. A batch of metric records is "metrics" when `metricsEndpoint` is set, and its
|
|
639
|
+
* body is then an OTLP `ExportMetricsServiceRequest`. A batch of span records is "traces",
|
|
640
|
+
* with an OTLP `ExportTraceServiceRequest` as its body.
|
|
627
641
|
*/
|
|
628
642
|
export type BatchKind = "logs" | "metrics" | "traces";
|
|
629
|
-
/** One batch that the library
|
|
643
|
+
/** One batch that the library hands to a custom transport. */
|
|
630
644
|
export interface TransportRequest {
|
|
631
645
|
/**
|
|
632
|
-
* Abort signal for this delivery context. It aborts
|
|
633
|
-
* transport must check it to cancel its work.
|
|
646
|
+
* Abort signal for this delivery context. It aborts on `shutdown()` and on a rotation. A
|
|
647
|
+
* custom transport must check it to cancel its work.
|
|
634
648
|
*/
|
|
635
649
|
signal?: AbortSignal;
|
|
636
650
|
/** Delivery context of this batch. */
|
|
637
651
|
routingContextId?: string;
|
|
638
|
-
/**
|
|
652
|
+
/**
|
|
653
|
+
* Kind of batch. Send a "metrics" body to your metrics endpoint and a "traces" body to your
|
|
654
|
+
* traces endpoint.
|
|
655
|
+
*/
|
|
639
656
|
kind: BatchKind;
|
|
640
657
|
/** Serialized batch from the configured serializer. The library does not compress it. */
|
|
641
658
|
body: string;
|
|
@@ -643,16 +660,16 @@ export interface TransportRequest {
|
|
|
643
660
|
contentType: string;
|
|
644
661
|
/** Batch id. Send it to the server for deduplication, for example as `X-UiObs-Batch-Id`. */
|
|
645
662
|
batchId: string;
|
|
646
|
-
/** Number of earlier send attempts
|
|
663
|
+
/** Number of earlier send attempts, 0 for the first send. */
|
|
647
664
|
attempt: number;
|
|
648
|
-
/** Built records after `redact`.
|
|
665
|
+
/** Built records after `redact`. Don't change them, because the retry engine can resend them. */
|
|
649
666
|
records: readonly LogRecord[];
|
|
650
667
|
}
|
|
651
|
-
/**
|
|
668
|
+
/** A custom transport's answer. The status code means what it does in the ingest contract. */
|
|
652
669
|
export interface TransportResponse {
|
|
653
670
|
/**
|
|
654
671
|
* HTTP-like status code. 2xx accepts the batch. 413 splits it. 429 and 503 throttle.
|
|
655
|
-
* 408 and 5xx retry.
|
|
672
|
+
* 408 and 5xx retry. Any other code drops the batch.
|
|
656
673
|
*/
|
|
657
674
|
status: number;
|
|
658
675
|
/** Delay before the next send, for 429 and 503, in milliseconds. */
|
|
@@ -660,18 +677,18 @@ export interface TransportResponse {
|
|
|
660
677
|
/** Largest payload that the server accepts, for 413, in bytes. */
|
|
661
678
|
maxBytes?: number;
|
|
662
679
|
/**
|
|
663
|
-
* Sampling rules for a 2xx answer, as the header text or as a parsed object.
|
|
664
|
-
*
|
|
680
|
+
* Sampling rules for a 2xx answer, as the header text or as a parsed object. Only read when
|
|
681
|
+
* `sampling.remote` is on.
|
|
665
682
|
*/
|
|
666
683
|
sampling?: unknown;
|
|
667
684
|
/** `Date` header of a 2xx answer. The library computes `uiobs.clock_offset_ms` from it. */
|
|
668
685
|
date?: string;
|
|
669
686
|
}
|
|
670
687
|
/**
|
|
671
|
-
* Sends one batch through
|
|
672
|
-
* A rejected promise counts as a network error
|
|
688
|
+
* Sends one batch through one of the app's own channels, such as an API client, a WebSocket
|
|
689
|
+
* or IPC. A rejected promise counts as a network error, so the library sends the batch again.
|
|
673
690
|
* @param request Batch to send.
|
|
674
|
-
* @returns Promise that resolves to the answer
|
|
691
|
+
* @returns Promise that resolves to the server's answer.
|
|
675
692
|
*/
|
|
676
693
|
export type Transport = (request: TransportRequest) => Promise<TransportResponse>;
|
|
677
694
|
/**
|
|
@@ -683,12 +700,12 @@ export type ExitTransport = (request: TransportRequest) => boolean;
|
|
|
683
700
|
/** Request timing, retry timing and delivery capacity. Durations are in milliseconds. */
|
|
684
701
|
export interface DeliveryPolicy {
|
|
685
702
|
/**
|
|
686
|
-
* Maximum wait for one request.
|
|
703
|
+
* Maximum wait for one request. Must be at least 1.
|
|
687
704
|
* @default 15000
|
|
688
705
|
*/
|
|
689
706
|
requestTimeoutMs: number;
|
|
690
707
|
/**
|
|
691
|
-
* Maximum requests
|
|
708
|
+
* Maximum requests in flight at once. Must be at least 1.
|
|
692
709
|
* @default 2
|
|
693
710
|
*/
|
|
694
711
|
maxConcurrentRequests: number;
|
|
@@ -698,7 +715,7 @@ export interface DeliveryPolicy {
|
|
|
698
715
|
*/
|
|
699
716
|
retryBaseDelayMs: number;
|
|
700
717
|
/**
|
|
701
|
-
* Maximum retry delay.
|
|
718
|
+
* Maximum retry delay. Must be at least retryBaseDelayMs.
|
|
702
719
|
* @default 60000
|
|
703
720
|
*/
|
|
704
721
|
retryMaxDelayMs: number;
|
|
@@ -708,13 +725,13 @@ export interface DeliveryPolicy {
|
|
|
708
725
|
*/
|
|
709
726
|
retryIdleDelayMs: number;
|
|
710
727
|
/**
|
|
711
|
-
* Maximum batches in one delivery pass.
|
|
728
|
+
* Maximum batches in one delivery pass. Must be at least 1.
|
|
712
729
|
* @default 20
|
|
713
730
|
*/
|
|
714
731
|
batchesPerDrain: number;
|
|
715
732
|
/**
|
|
716
|
-
* Fetch priority of
|
|
717
|
-
*
|
|
733
|
+
* Fetch priority of every batch request. With "low", the app's own requests go first. The
|
|
734
|
+
* exit flush and a keepalive send from a hidden page use the browser default.
|
|
718
735
|
* @default "low"
|
|
719
736
|
*/
|
|
720
737
|
priority: "low" | "auto" | "high";
|
|
@@ -732,7 +749,8 @@ export interface BufferingPolicy {
|
|
|
732
749
|
*/
|
|
733
750
|
maxPendingBytes: number;
|
|
734
751
|
/**
|
|
735
|
-
*
|
|
752
|
+
* What to do when a new record does not fit: remove old records, drop the new record, or
|
|
753
|
+
* try storage.
|
|
736
754
|
* @default "drop-oldest"
|
|
737
755
|
*/
|
|
738
756
|
overflow: "drop-oldest" | "drop-newest" | "persist";
|
|
@@ -745,12 +763,13 @@ export interface MetricsPolicy {
|
|
|
745
763
|
*/
|
|
746
764
|
maxHistogramBoundaries: number;
|
|
747
765
|
/**
|
|
748
|
-
* Maximum attribute sets per instrument. Extra sets
|
|
766
|
+
* Maximum attribute sets per instrument. Extra sets go into the overflow set. Set 0 for no
|
|
767
|
+
* limit.
|
|
749
768
|
* @default 100
|
|
750
769
|
*/
|
|
751
770
|
maxSeries: number;
|
|
752
771
|
/**
|
|
753
|
-
* Maximum instrument names.
|
|
772
|
+
* Maximum instrument names. Extra names are dropped. Set 0 for no limit.
|
|
754
773
|
* @default 1000
|
|
755
774
|
*/
|
|
756
775
|
maxInstruments: number;
|
|
@@ -758,17 +777,17 @@ export interface MetricsPolicy {
|
|
|
758
777
|
/** Session and trace timing. The runtime sets these values at startup. */
|
|
759
778
|
export interface CorrelationPolicy {
|
|
760
779
|
/**
|
|
761
|
-
*
|
|
780
|
+
* How long a stored session can stay idle, in milliseconds. Set 0 for no idle expiration.
|
|
762
781
|
* @default 1800000
|
|
763
782
|
*/
|
|
764
783
|
sessionIdleMs: number;
|
|
765
784
|
/**
|
|
766
|
-
* Minimum wait between session activity writes, in milliseconds. Set 0 to write
|
|
785
|
+
* Minimum wait between session activity writes, in milliseconds. Set 0 to write every time.
|
|
767
786
|
* @default 60000
|
|
768
787
|
*/
|
|
769
788
|
sessionTouchMs: number;
|
|
770
789
|
/**
|
|
771
|
-
*
|
|
790
|
+
* How long an ambient trace can stay idle, in milliseconds. Set 0 for no idle expiration.
|
|
772
791
|
* @default 300000
|
|
773
792
|
*/
|
|
774
793
|
traceMaxAgeMs: number;
|
|
@@ -776,20 +795,20 @@ export interface CorrelationPolicy {
|
|
|
776
795
|
/** Rules for diagnostic reports and the console fallback. */
|
|
777
796
|
export interface DiagnosticsPolicy {
|
|
778
797
|
/**
|
|
779
|
-
* Minimum wait between reports of one code, in milliseconds. Set 0 to report
|
|
798
|
+
* Minimum wait between reports of one code, in milliseconds. Set 0 to report every event.
|
|
780
799
|
* @default 1000
|
|
781
800
|
*/
|
|
782
801
|
throttleMs: number;
|
|
783
802
|
/**
|
|
784
|
-
* Print a fixed warning if onDiagnostic throws.
|
|
803
|
+
* Print a fixed warning if onDiagnostic throws. The exception itself is not printed.
|
|
785
804
|
* @default false
|
|
786
805
|
*/
|
|
787
806
|
consoleFallback: boolean;
|
|
788
807
|
/**
|
|
789
|
-
* Also send
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* fields have no query and no fragment
|
|
808
|
+
* Also send every reported diagnostic as a record in the `uiobs.diagnostics` namespace. A
|
|
809
|
+
* list of codes sends only those codes. The `throttleMs` interval applies. A diagnostic from
|
|
810
|
+
* the first `configure()` produces no record. In a record, the `url` and `endpoint` detail
|
|
811
|
+
* fields have no query and no fragment, while `onDiagnostic` gets the full values.
|
|
793
812
|
* @default false
|
|
794
813
|
*/
|
|
795
814
|
records: boolean | DiagnosticCode[];
|
|
@@ -811,7 +830,7 @@ export interface PersistencePolicy {
|
|
|
811
830
|
/** Resource and page fields that the SDK records. */
|
|
812
831
|
export interface MetadataPolicy {
|
|
813
832
|
/**
|
|
814
|
-
* Record the page URL.
|
|
833
|
+
* Record the page URL. When false, page.url is empty.
|
|
815
834
|
* @default true
|
|
816
835
|
*/
|
|
817
836
|
pageUrl: boolean;
|
|
@@ -826,8 +845,8 @@ export interface MetadataPolicy {
|
|
|
826
845
|
*/
|
|
827
846
|
openfin: boolean;
|
|
828
847
|
/**
|
|
829
|
-
* Add `uiobs.clock_offset_ms` to
|
|
830
|
-
* header of the last accepted answer
|
|
848
|
+
* Add `uiobs.clock_offset_ms` to every log and span record. The value comes from the `Date`
|
|
849
|
+
* header of the last accepted answer, so the server must expose that header.
|
|
831
850
|
* @default true
|
|
832
851
|
*/
|
|
833
852
|
clockOffset: boolean;
|
|
@@ -840,7 +859,7 @@ export interface CapturePolicy {
|
|
|
840
859
|
*/
|
|
841
860
|
breadcrumbs: number;
|
|
842
861
|
/**
|
|
843
|
-
*
|
|
862
|
+
* How long repeated errors are suppressed, in milliseconds. Set 0 to report every error.
|
|
844
863
|
* @default 5000
|
|
845
864
|
*/
|
|
846
865
|
errorDedupeMs: number;
|
|
@@ -876,14 +895,13 @@ export interface CapturePolicy {
|
|
|
876
895
|
/** Maximum lifecycle events in one window. Set 0 for no limit. @default 20 */
|
|
877
896
|
lifecyclePerWindow: number;
|
|
878
897
|
/**
|
|
879
|
-
* Rate limit window, in milliseconds. Set 0 to reset the window for
|
|
898
|
+
* Rate limit window, in milliseconds. Set 0 to reset the window for every event.
|
|
880
899
|
* @default 10000
|
|
881
900
|
*/
|
|
882
901
|
windowMs: number;
|
|
883
902
|
/**
|
|
884
903
|
* Maximum log records at or above `sampling.alwaysSampleFrom` in one window. Metric points
|
|
885
|
-
* and spans do not count.
|
|
886
|
-
* Set 0 for no limit.
|
|
904
|
+
* and spans do not count. Set 0 for no limit.
|
|
887
905
|
* @default 500
|
|
888
906
|
*/
|
|
889
907
|
errorCeiling: number;
|
|
@@ -891,14 +909,14 @@ export interface CapturePolicy {
|
|
|
891
909
|
/** Records that minLevel or sampling drops, kept for the next error. */
|
|
892
910
|
export interface DebugBufferPolicy {
|
|
893
911
|
/**
|
|
894
|
-
* Keep the records that minLevel or sampling drops. An ERROR or FATAL record
|
|
895
|
-
* sends them first, with `uiobs.debug_buffer: true`. A later change
|
|
896
|
-
* empties the buffer.
|
|
912
|
+
* Keep the records that minLevel or sampling drops. An ERROR or FATAL record from this
|
|
913
|
+
* context sends them first, with `uiobs.debug_buffer: true`. A later change to `redact` or
|
|
914
|
+
* `processors` empties the buffer.
|
|
897
915
|
* @default false
|
|
898
916
|
*/
|
|
899
917
|
enabled: boolean;
|
|
900
918
|
/**
|
|
901
|
-
* Maximum kept records. The oldest record
|
|
919
|
+
* Maximum kept records. The oldest record is dropped first. 1 to 10000.
|
|
902
920
|
* @default 200
|
|
903
921
|
*/
|
|
904
922
|
maxRecords: number;
|
|
@@ -908,6 +926,168 @@ export interface DebugBufferPolicy {
|
|
|
908
926
|
*/
|
|
909
927
|
maxAgeMs: number;
|
|
910
928
|
}
|
|
929
|
+
/** Duration probes. Each probe is reported as a histogram summary record. */
|
|
930
|
+
export interface ProfilerPolicy {
|
|
931
|
+
/**
|
|
932
|
+
* Record probe durations. When false, probes do nothing and don't even read the clock.
|
|
933
|
+
* @default false
|
|
934
|
+
*/
|
|
935
|
+
enabled: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* How often the profiler sends its summary records, in milliseconds. 1000 to 600000.
|
|
938
|
+
* @default 10000
|
|
939
|
+
*/
|
|
940
|
+
flushIntervalMs: number;
|
|
941
|
+
/**
|
|
942
|
+
* Maximum number of probes, 1 to 1024. Can't be changed after startup.
|
|
943
|
+
* @default 64
|
|
944
|
+
*/
|
|
945
|
+
maxProbes: number;
|
|
946
|
+
/**
|
|
947
|
+
* Attribute the phases of each long animation frame to every probe that had a span of 1 ms
|
|
948
|
+
* or more in it. The phases are script, render callbacks, style and layout, and forced
|
|
949
|
+
* layout. Needs `enabled` and a browser that supports long animation frames.
|
|
950
|
+
* @default false
|
|
951
|
+
*/
|
|
952
|
+
framePhases: boolean;
|
|
953
|
+
/**
|
|
954
|
+
* Measure the time between frames with the `frame.interval` probe. Needs `enabled`. Runs one
|
|
955
|
+
* frame callback per frame while the page is visible.
|
|
956
|
+
* @default false
|
|
957
|
+
*/
|
|
958
|
+
framePacing: boolean;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* Session replay. The app's recorder records the DOM, and the library keeps the recent events
|
|
962
|
+
* in memory and sends them in segments after an error.
|
|
963
|
+
*/
|
|
964
|
+
export interface ReplayPolicy {
|
|
965
|
+
/**
|
|
966
|
+
* Record the DOM. Needs `loader`, plus either `endpoint` or `onSegment`.
|
|
967
|
+
* @default false
|
|
968
|
+
*/
|
|
969
|
+
enabled: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* `"onError"` uploads the buffer after an ERROR or FATAL record.
|
|
972
|
+
* @default "onError"
|
|
973
|
+
*/
|
|
974
|
+
mode: ReplayMode;
|
|
975
|
+
/**
|
|
976
|
+
* URL that each segment is POSTed to. This is separate from the log endpoint.
|
|
977
|
+
* @default ""
|
|
978
|
+
*/
|
|
979
|
+
endpoint: string;
|
|
980
|
+
/**
|
|
981
|
+
* When true, nothing is recorded until `startReplay()` is called.
|
|
982
|
+
* @default false
|
|
983
|
+
*/
|
|
984
|
+
requireConsent: boolean;
|
|
985
|
+
/**
|
|
986
|
+
* How much time before an error the buffer keeps, in milliseconds. At any moment the buffer
|
|
987
|
+
* holds between 1x and 1.5x this much. 5000 to 600000.
|
|
988
|
+
* @default 60000
|
|
989
|
+
*/
|
|
990
|
+
bufferMs: number;
|
|
991
|
+
/**
|
|
992
|
+
* Maximum buffer size, measured as the JSON length of its events. When it is exceeded, the
|
|
993
|
+
* buffer drops its oldest part. 100000 to 200000000.
|
|
994
|
+
* @default 10000000
|
|
995
|
+
*/
|
|
996
|
+
maxBufferBytes: number;
|
|
997
|
+
/**
|
|
998
|
+
* How long the library keeps sending events after an error, in milliseconds. Another error
|
|
999
|
+
* inside that time doesn't extend it. 0 to 600000.
|
|
1000
|
+
* @default 5000
|
|
1001
|
+
*/
|
|
1002
|
+
afterErrorMs: number;
|
|
1003
|
+
/**
|
|
1004
|
+
* Maximum uploads per `capturePolicy.windowMs` window. 0 means no limit.
|
|
1005
|
+
* @default 3
|
|
1006
|
+
*/
|
|
1007
|
+
uploadsPerWindow: number;
|
|
1008
|
+
/**
|
|
1009
|
+
* Maximum events per segment. 1 to 10000.
|
|
1010
|
+
* @default 200
|
|
1011
|
+
*/
|
|
1012
|
+
batchSize: number;
|
|
1013
|
+
/**
|
|
1014
|
+
* Maximum segment size, measured as the JSON length of its events. A single event larger
|
|
1015
|
+
* than this gets a segment to itself. 10000 to 10000000.
|
|
1016
|
+
* @default 512000
|
|
1017
|
+
*/
|
|
1018
|
+
batchBytes: number;
|
|
1019
|
+
/**
|
|
1020
|
+
* How long a partial segment waits before it is sent, in milliseconds. 100 to 60000.
|
|
1021
|
+
* @default 2000
|
|
1022
|
+
*/
|
|
1023
|
+
flushIntervalMs: number;
|
|
1024
|
+
/**
|
|
1025
|
+
* Maximum total size of the segments waiting to be sent. When it is exceeded, the library
|
|
1026
|
+
* drops the oldest segment. 100000 to 200000000.
|
|
1027
|
+
* @default 20000000
|
|
1028
|
+
*/
|
|
1029
|
+
maxQueueBytes: number;
|
|
1030
|
+
/**
|
|
1031
|
+
* Maximum send attempts per segment. 1 to 10.
|
|
1032
|
+
* @default 3
|
|
1033
|
+
*/
|
|
1034
|
+
maxAttempts: number;
|
|
1035
|
+
/**
|
|
1036
|
+
* Mask all element text. Only text inside an element with `data-observability-unmask` is left alone.
|
|
1037
|
+
* The recorder does not mask attribute values, URLs, CSS text or comments.
|
|
1038
|
+
* @default true
|
|
1039
|
+
*/
|
|
1040
|
+
maskText: boolean;
|
|
1041
|
+
/**
|
|
1042
|
+
* Mask the value of every `input`, `textarea` and `select`, including hidden and file
|
|
1043
|
+
* inputs. Password inputs are always masked. The recorder does not mask the `value` of
|
|
1044
|
+
* checkboxes, radio buttons, buttons or `<option>` elements.
|
|
1045
|
+
* @default true
|
|
1046
|
+
*/
|
|
1047
|
+
maskInputs: boolean;
|
|
1048
|
+
/**
|
|
1049
|
+
* Record canvas elements.
|
|
1050
|
+
* @default false
|
|
1051
|
+
*/
|
|
1052
|
+
recordCanvas: boolean;
|
|
1053
|
+
/**
|
|
1054
|
+
* CSS selectors for elements whose text is always masked.
|
|
1055
|
+
* @default []
|
|
1056
|
+
*/
|
|
1057
|
+
maskSelectors: string[];
|
|
1058
|
+
/**
|
|
1059
|
+
* CSS selectors for elements the recorder should skip entirely.
|
|
1060
|
+
* @default []
|
|
1061
|
+
*/
|
|
1062
|
+
blockSelectors: string[];
|
|
1063
|
+
/**
|
|
1064
|
+
* Loads the recorder, e.g. `() => import("@rrweb/record")`.
|
|
1065
|
+
* @default null
|
|
1066
|
+
*/
|
|
1067
|
+
loader: ReplayLoader | null;
|
|
1068
|
+
/**
|
|
1069
|
+
* Receives each segment instead of the POST to `endpoint`.
|
|
1070
|
+
* @default null
|
|
1071
|
+
*/
|
|
1072
|
+
onSegment: ((segment: ReplaySegment) => void | Promise<void>) | null;
|
|
1073
|
+
/**
|
|
1074
|
+
* Request headers for `endpoint`, or a function that returns them. The log endpoint's
|
|
1075
|
+
* `headers` are never sent to the replay endpoint.
|
|
1076
|
+
* @default null
|
|
1077
|
+
*/
|
|
1078
|
+
headers: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>) | null;
|
|
1079
|
+
/**
|
|
1080
|
+
* Loaders for the recorder's record plugins.
|
|
1081
|
+
* @default []
|
|
1082
|
+
*/
|
|
1083
|
+
plugins: ReplayPluginLoader[];
|
|
1084
|
+
/**
|
|
1085
|
+
* Extra options for the `record` function, such as `sampling` and `slimDOMOptions`. The
|
|
1086
|
+
* library sets the mask, block, canvas, plugin and event options itself and ignores them here.
|
|
1087
|
+
* @default {}
|
|
1088
|
+
*/
|
|
1089
|
+
recordOptions: Record<string, unknown>;
|
|
1090
|
+
}
|
|
911
1091
|
/** Options passed to `configure()`. */
|
|
912
1092
|
export interface ObservabilityConfig {
|
|
913
1093
|
/** Capture capacity and rate limits. */
|
|
@@ -928,6 +1108,10 @@ export interface ObservabilityConfig {
|
|
|
928
1108
|
delivery?: Partial<DeliveryPolicy>;
|
|
929
1109
|
/** Records that minLevel or sampling drops, kept for the next error. */
|
|
930
1110
|
debugBuffer?: Partial<DebugBufferPolicy>;
|
|
1111
|
+
/** Duration probes. Each probe is reported as a histogram summary record. */
|
|
1112
|
+
profiler?: Partial<ProfilerPolicy>;
|
|
1113
|
+
/** Session replay. Off by default. */
|
|
1114
|
+
replay?: Partial<ReplayPolicy>;
|
|
931
1115
|
/**
|
|
932
1116
|
* Refuse changes through configure(). Call setConfigurationLocked(false) to permit changes again.
|
|
933
1117
|
* @default false
|
|
@@ -938,51 +1122,51 @@ export interface ObservabilityConfig {
|
|
|
938
1122
|
/** Delivery identity and isolation rule. Use rotateSecurityContext() to change the identity. */
|
|
939
1123
|
securityContext?: Partial<SecurityContextOptions>;
|
|
940
1124
|
/**
|
|
941
|
-
* Ingest endpoint URL. Set `null` for console-only mode
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
* If the key is missing or `""`, the library reports `config.invalid`.
|
|
1125
|
+
* Ingest endpoint URL. Set `null` for console-only mode, where the library sends nothing
|
|
1126
|
+
* and writes records to the console only if you set `console`. If the key is missing or
|
|
1127
|
+
* `""`, the library reports `config.invalid`.
|
|
945
1128
|
*/
|
|
946
1129
|
endpoint?: string | null;
|
|
947
1130
|
/**
|
|
948
|
-
* OTLP metrics endpoint URL, for example `"https://ingest.example/v1/metrics"`.
|
|
949
|
-
* the library sends
|
|
950
|
-
* Without it, metric records are log records on `endpoint`.
|
|
951
|
-
* Set `""` to turn it off.
|
|
1131
|
+
* OTLP metrics endpoint URL, for example `"https://ingest.example/v1/metrics"`. When set,
|
|
1132
|
+
* the library sends every batch of metric records there as an OTLP
|
|
1133
|
+
* `ExportMetricsServiceRequest`. Without it, metric records are log records on `endpoint`.
|
|
1134
|
+
* Needs `serializer: "otlp"`. Set `""` to turn it off.
|
|
952
1135
|
* @default ""
|
|
953
1136
|
*/
|
|
954
1137
|
metricsEndpoint?: string;
|
|
955
1138
|
/**
|
|
956
|
-
* OTLP traces endpoint URL, for example `"https://ingest.example/v1/traces"`.
|
|
957
|
-
* library records one root span for
|
|
958
|
-
* request that gets `traceparent
|
|
959
|
-
* Without it, the library sends no
|
|
960
|
-
* it off.
|
|
1139
|
+
* OTLP traces endpoint URL, for example `"https://ingest.example/v1/traces"`. When set, the
|
|
1140
|
+
* library records one root span for every trace it creates and one CLIENT span for every
|
|
1141
|
+
* request that gets `traceparent`, and sends them there as an OTLP
|
|
1142
|
+
* `ExportTraceServiceRequest`. Without it, the library sends no spans. Needs
|
|
1143
|
+
* `serializer: "otlp"`. Set `""` to turn it off.
|
|
961
1144
|
* @default ""
|
|
962
1145
|
*/
|
|
963
1146
|
tracesEndpoint?: string;
|
|
964
1147
|
/**
|
|
965
|
-
*
|
|
1148
|
+
* Reported as `service.name`.
|
|
966
1149
|
* @default ""
|
|
967
1150
|
*/
|
|
968
1151
|
serviceName?: string;
|
|
969
1152
|
/**
|
|
970
|
-
*
|
|
1153
|
+
* Reported as `service.version`.
|
|
971
1154
|
* @default ""
|
|
972
1155
|
*/
|
|
973
1156
|
serviceVersion?: string;
|
|
974
1157
|
/**
|
|
975
|
-
*
|
|
1158
|
+
* Reported as `deployment.environment`.
|
|
976
1159
|
* @default ""
|
|
977
1160
|
*/
|
|
978
1161
|
environment?: string;
|
|
979
1162
|
/**
|
|
980
|
-
* Master switch.
|
|
1163
|
+
* Master switch. When false, every log call does nothing.
|
|
981
1164
|
* @default true
|
|
982
1165
|
*/
|
|
983
1166
|
enabled?: boolean;
|
|
984
1167
|
/**
|
|
985
|
-
* Copy payloads at the call, or keep
|
|
1168
|
+
* Copy payloads at the call, or keep references to them until idle time. The debug buffer
|
|
1169
|
+
* always builds at the call.
|
|
986
1170
|
* @default "copy"
|
|
987
1171
|
*/
|
|
988
1172
|
payloadMode?: "copy" | "defer";
|
|
@@ -993,25 +1177,24 @@ export interface ObservabilityConfig {
|
|
|
993
1177
|
minLevel?: LogLevel;
|
|
994
1178
|
/**
|
|
995
1179
|
* Minimum level for each namespace prefix. The longest matching prefix wins. For example,
|
|
996
|
-
* `{ "trading.ticks": "DEBUG" }` logs the DEBUG records of `trading.ticks` and
|
|
997
|
-
* namespaces. A namespace with no match uses `minLevel`. A new map replaces the
|
|
1180
|
+
* `{ "trading.ticks": "DEBUG" }` logs the DEBUG records of `trading.ticks` and its child
|
|
1181
|
+
* namespaces. A namespace with no match uses `minLevel`. A new map replaces the current one.
|
|
998
1182
|
* @default {}
|
|
999
1183
|
*/
|
|
1000
1184
|
minLevels?: Record<string, LogLevel>;
|
|
1001
1185
|
/**
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
1186
|
+
* "gzip" compresses any payload larger than the compression threshold. Use "none" for an
|
|
1187
|
+
* ingest endpoint that rejects gzip.
|
|
1004
1188
|
* @default "gzip"
|
|
1005
1189
|
*/
|
|
1006
1190
|
compression?: "gzip" | "none";
|
|
1007
1191
|
/**
|
|
1008
|
-
* Payload format
|
|
1192
|
+
* Payload format, either a name or a custom implementation.
|
|
1009
1193
|
* @default "otlp"
|
|
1010
1194
|
*/
|
|
1011
1195
|
serializer?: SerializerChoice;
|
|
1012
1196
|
/**
|
|
1013
|
-
*
|
|
1014
|
-
* authenticates with cookies.
|
|
1197
|
+
* Passed to `fetch`. Set "include" for an ingest endpoint that authenticates with cookies.
|
|
1015
1198
|
* @default "omit"
|
|
1016
1199
|
*/
|
|
1017
1200
|
credentials?: RequestCredentials;
|
|
@@ -1023,10 +1206,9 @@ export interface ObservabilityConfig {
|
|
|
1023
1206
|
*/
|
|
1024
1207
|
storage?: StorageStrategy;
|
|
1025
1208
|
/**
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
* You cannot change this value after startup.
|
|
1209
|
+
* Where the library keeps session, tab and journey ids. "memory" writes no key to
|
|
1210
|
+
* localStorage or sessionStorage, so every page load starts a new session. Can't be changed
|
|
1211
|
+
* after startup.
|
|
1030
1212
|
* @default "storage"
|
|
1031
1213
|
*/
|
|
1032
1214
|
identity?: IdentityStrategy;
|
|
@@ -1046,7 +1228,7 @@ export interface ObservabilityConfig {
|
|
|
1046
1228
|
*/
|
|
1047
1229
|
journey?: Partial<JourneyOptions>;
|
|
1048
1230
|
/**
|
|
1049
|
-
* Batch size and flush interval
|
|
1231
|
+
* Batch size and flush interval for each record stream.
|
|
1050
1232
|
* @see {@link BatchingOptions}
|
|
1051
1233
|
*/
|
|
1052
1234
|
batching?: Partial<BatchingOptions>;
|
|
@@ -1071,14 +1253,14 @@ export interface ObservabilityConfig {
|
|
|
1071
1253
|
*/
|
|
1072
1254
|
console?: ConsoleOption;
|
|
1073
1255
|
/**
|
|
1074
|
-
* Sends batches through
|
|
1075
|
-
* is optional. The library does not compress the body for a custom transport.
|
|
1256
|
+
* Sends batches through one of the app's own channels instead of HTTP. With `transport`,
|
|
1257
|
+
* `endpoint` is optional. The library does not compress the body for a custom transport.
|
|
1076
1258
|
* @see {@link Transport}
|
|
1077
1259
|
*/
|
|
1078
1260
|
transport?: Transport;
|
|
1079
1261
|
/**
|
|
1080
1262
|
* Sends the last batch while the page closes, for a custom transport. Without it, the
|
|
1081
|
-
* library puts that batch in the emergency queue
|
|
1263
|
+
* library puts that batch in the emergency queue and the next page load sends it.
|
|
1082
1264
|
* @see {@link ExitTransport}
|
|
1083
1265
|
*/
|
|
1084
1266
|
transportOnExit?: ExitTransport;
|
|
@@ -1089,29 +1271,28 @@ export interface ObservabilityConfig {
|
|
|
1089
1271
|
transportWorker?: () => Worker;
|
|
1090
1272
|
/**
|
|
1091
1273
|
* Loads the `@opentelemetry/api` module. Example: `() => import("@opentelemetry/api")`.
|
|
1092
|
-
*
|
|
1274
|
+
* OTel stays off unless you set it.
|
|
1093
1275
|
* @see {@link OtelLoader}
|
|
1094
1276
|
*/
|
|
1095
1277
|
otelLoader?: OtelLoader;
|
|
1096
1278
|
/**
|
|
1097
|
-
*
|
|
1098
|
-
* values
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
* it adds nothing to the record.
|
|
1279
|
+
* Returns attributes for every record the library builds. Its values override `setContext()`
|
|
1280
|
+
* values, and the logger scope and the call payload override its values. It is called for
|
|
1281
|
+
* every built record, including records used only for the console or breadcrumbs. Keep it
|
|
1282
|
+
* fast and synchronous. If it throws or returns a non-object, it adds nothing to the record.
|
|
1102
1283
|
* @returns The attributes, or undefined for none.
|
|
1103
1284
|
*/
|
|
1104
1285
|
contextProvider?: () => Record<string, unknown> | undefined;
|
|
1105
1286
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
*
|
|
1108
|
-
* drops the record.
|
|
1287
|
+
* Change or drop a record. Processors run in list order, before `redact`, and follow the
|
|
1288
|
+
* same contract as `redact`. If one throws or returns something that isn't a record, the
|
|
1289
|
+
* library drops the record.
|
|
1109
1290
|
*/
|
|
1110
1291
|
processors?: ((record: LogRecord) => LogRecord | null)[];
|
|
1111
1292
|
/**
|
|
1112
|
-
* Changes or drops a record before the SDK prints or sends it. If the hook throws or returns
|
|
1113
|
-
*
|
|
1114
|
-
* @param record Record to process. It
|
|
1293
|
+
* Changes or drops a record before the SDK prints or sends it. If the hook throws or returns
|
|
1294
|
+
* something that isn't a record, the library drops the record.
|
|
1295
|
+
* @param record Record to process. It may be destined only for the console or breadcrumbs.
|
|
1115
1296
|
* @returns The record to send, or `null` to drop it.
|
|
1116
1297
|
*/
|
|
1117
1298
|
redact?: (record: LogRecord) => LogRecord | null;
|
|
@@ -1121,11 +1302,12 @@ export interface ObservabilityConfig {
|
|
|
1121
1302
|
*/
|
|
1122
1303
|
onDiagnostic?: DiagnosticHandler;
|
|
1123
1304
|
/**
|
|
1124
|
-
* Receives a summary when the library loses records
|
|
1125
|
-
* `processors` and `redact` do not cause a loss.
|
|
1126
|
-
* Do not log through the library in the hook
|
|
1127
|
-
* A batch that storage evicts during its send can
|
|
1128
|
-
*
|
|
1305
|
+
* Receives a summary when the library loses records it has already built. Sampling,
|
|
1306
|
+
* `minLevel`, `processors` and `redact` do not cause a loss. Losses with the same reason in
|
|
1307
|
+
* the same task are merged. Do not log through the library in the hook, because a record
|
|
1308
|
+
* from the hook can evict a stored batch. A batch that storage evicts during its send can
|
|
1309
|
+
* still reach the server.
|
|
1310
|
+
* @param summary The loss's reason, record count, batch ids, journey ids and action names.
|
|
1129
1311
|
* @see {@link DropSummary}
|
|
1130
1312
|
*/
|
|
1131
1313
|
onDrop?: (summary: DropSummary) => void;
|
|
@@ -1150,9 +1332,13 @@ export interface ResolvedConfig {
|
|
|
1150
1332
|
delivery: DeliveryPolicy;
|
|
1151
1333
|
/** Records that minLevel or sampling drops, kept for the next error. */
|
|
1152
1334
|
debugBuffer: DebugBufferPolicy;
|
|
1335
|
+
/** Duration probes. Each probe is reported as a histogram summary record. */
|
|
1336
|
+
profiler: ProfilerPolicy;
|
|
1337
|
+
/** Session replay settings. */
|
|
1338
|
+
replay: ReplayPolicy;
|
|
1153
1339
|
/** True if configure() must refuse changes to the active settings. */
|
|
1154
1340
|
lockConfiguration: boolean;
|
|
1155
|
-
/**
|
|
1341
|
+
/** Logger cache capacity. */
|
|
1156
1342
|
loggerCache: LoggerCacheOptions;
|
|
1157
1343
|
/** Active delivery context id and isolation rule. */
|
|
1158
1344
|
securityContext: SecurityContextOptions;
|
|
@@ -1162,15 +1348,15 @@ export interface ResolvedConfig {
|
|
|
1162
1348
|
metricsEndpoint: string;
|
|
1163
1349
|
/** OTLP traces endpoint URL, or "" when the library sends no span. */
|
|
1164
1350
|
tracesEndpoint: string;
|
|
1165
|
-
/**
|
|
1351
|
+
/** Reported as `service.name`. */
|
|
1166
1352
|
serviceName: string;
|
|
1167
|
-
/**
|
|
1353
|
+
/** Reported as `service.version`. */
|
|
1168
1354
|
serviceVersion: string;
|
|
1169
|
-
/**
|
|
1355
|
+
/** Reported as `deployment.environment`. */
|
|
1170
1356
|
environment: string;
|
|
1171
|
-
/** Master switch.
|
|
1357
|
+
/** Master switch. When false, every log call does nothing. */
|
|
1172
1358
|
enabled: boolean;
|
|
1173
|
-
/**
|
|
1359
|
+
/** When logger calls read their payloads. */
|
|
1174
1360
|
payloadMode: "copy" | "defer";
|
|
1175
1361
|
/** Minimum level that the library logs. */
|
|
1176
1362
|
minLevel: LogLevel;
|
|
@@ -1178,13 +1364,13 @@ export interface ResolvedConfig {
|
|
|
1178
1364
|
minLevels: Record<string, LogLevel>;
|
|
1179
1365
|
/** Hooks that change or drop a record before `redact`. */
|
|
1180
1366
|
processors: NonNullable<ObservabilityConfig["processors"]>;
|
|
1181
|
-
/** "gzip" compresses
|
|
1367
|
+
/** "gzip" compresses any payload larger than the compression threshold. */
|
|
1182
1368
|
compression: "gzip" | "none";
|
|
1183
|
-
/**
|
|
1369
|
+
/** Passed to `fetch`. */
|
|
1184
1370
|
credentials: RequestCredentials;
|
|
1185
1371
|
/** Backing store for undelivered records. */
|
|
1186
1372
|
storage: StorageStrategy;
|
|
1187
|
-
/**
|
|
1373
|
+
/** Where session, tab and journey ids are kept. */
|
|
1188
1374
|
identity: IdentityStrategy;
|
|
1189
1375
|
/**
|
|
1190
1376
|
* Sampling policy.
|
|
@@ -1202,7 +1388,7 @@ export interface ResolvedConfig {
|
|
|
1202
1388
|
*/
|
|
1203
1389
|
journey: JourneyOptions;
|
|
1204
1390
|
/**
|
|
1205
|
-
* Batch size and flush interval
|
|
1391
|
+
* Batch size and flush interval for each record stream.
|
|
1206
1392
|
* @see {@link BatchingOptions}
|
|
1207
1393
|
*/
|
|
1208
1394
|
batching: BatchingOptions;
|
|
@@ -1227,7 +1413,7 @@ export interface ResolvedConfig {
|
|
|
1227
1413
|
serializer: SerializerChoice;
|
|
1228
1414
|
/** Extra request headers, or a function returning them. */
|
|
1229
1415
|
headers?: ObservabilityConfig["headers"];
|
|
1230
|
-
/** Sends batches through
|
|
1416
|
+
/** Sends batches through one of the app's own channels instead of HTTP. */
|
|
1231
1417
|
transport?: Transport;
|
|
1232
1418
|
/** Sends the last batch while the page closes, for a custom transport. */
|
|
1233
1419
|
transportOnExit?: ExitTransport;
|
|
@@ -1235,11 +1421,11 @@ export interface ResolvedConfig {
|
|
|
1235
1421
|
transportWorker?: ObservabilityConfig["transportWorker"];
|
|
1236
1422
|
/** Supplies the `@opentelemetry/api` module in place of importing it. */
|
|
1237
1423
|
otelLoader?: OtelLoader;
|
|
1238
|
-
/**
|
|
1424
|
+
/** Returns attributes for every record the library builds. */
|
|
1239
1425
|
contextProvider?: ObservabilityConfig["contextProvider"];
|
|
1240
1426
|
/**
|
|
1241
1427
|
* Changes or drops a record before the SDK prints or sends it.
|
|
1242
|
-
* @param record Record to process. It
|
|
1428
|
+
* @param record Record to process. It may be destined only for the console or breadcrumbs.
|
|
1243
1429
|
* @returns The record to send, or `null` to drop it.
|
|
1244
1430
|
*/
|
|
1245
1431
|
redact?: ObservabilityConfig["redact"];
|
|
@@ -1248,6 +1434,6 @@ export interface ResolvedConfig {
|
|
|
1248
1434
|
* @see {@link DiagnosticHandler}
|
|
1249
1435
|
*/
|
|
1250
1436
|
onDiagnostic?: DiagnosticHandler;
|
|
1251
|
-
/** Receives a summary when the library loses records
|
|
1437
|
+
/** Receives a summary when the library loses records it has already built. */
|
|
1252
1438
|
onDrop?: ObservabilityConfig["onDrop"];
|
|
1253
1439
|
}
|