@utk09/ui-observability 0.12.0 → 1.0.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 +420 -0
- package/README.md +72 -839
- package/dist/{batch-BjQUwjA6.js → batch-CXmPmTse.js} +4 -4
- package/dist/{batch-BjQUwjA6.js.map → batch-CXmPmTse.js.map} +1 -1
- package/dist/{batch-D5LlU4Q9.cjs → batch-mmPigCpi.cjs} +2 -2
- package/dist/{batch-D5LlU4Q9.cjs.map → batch-mmPigCpi.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +331 -0
- package/dist/bus/bus.d.ts +60 -10
- package/dist/bus/links.d.cts +132 -0
- package/dist/bus/links.d.ts +18 -3
- package/dist/bus/validation.d.cts +16 -0
- package/dist/bus/validation.d.ts +10 -1
- package/dist/{bus-ecxUNTja.js → bus-C39wspFV.js} +308 -193
- package/dist/bus-C39wspFV.js.map +1 -0
- package/dist/bus-_EaOVPGq.cjs +2 -0
- package/dist/bus-_EaOVPGq.cjs.map +1 -0
- package/dist/capture/console.d.cts +37 -0
- package/dist/capture/console.d.ts +1 -1
- package/dist/capture/errors.d.cts +32 -0
- package/dist/capture/errors.d.ts +1 -1
- package/dist/capture/interactions.d.cts +48 -0
- package/dist/capture/interactions.d.ts +1 -1
- package/dist/capture/lifecycle.d.cts +20 -0
- package/dist/capture/lifecycle.d.ts +1 -1
- package/dist/capture/long-frames.d.cts +31 -0
- package/dist/capture/long-frames.d.ts +1 -1
- package/dist/capture/network.d.cts +57 -0
- package/dist/capture/network.d.ts +1 -1
- package/dist/capture/profiler-frames.d.cts +44 -0
- package/dist/capture/profiler-frames.d.ts +1 -1
- package/dist/capture/replay-buffer.d.cts +45 -0
- package/dist/capture/replay-buffer.d.ts +9 -10
- package/dist/capture/replay-upload.d.cts +79 -0
- package/dist/capture/replay-upload.d.ts +7 -2
- package/dist/capture/replay.d.cts +114 -0
- package/dist/capture/replay.d.ts +1 -1
- package/dist/capture/reports.d.cts +17 -0
- package/dist/capture/reports.d.ts +1 -1
- package/dist/capture/resource-timing.d.cts +14 -0
- package/dist/capture/resource-timing.d.ts +1 -1
- package/dist/capture/server-timing.d.cts +19 -0
- package/dist/capture/storm.d.cts +13 -0
- package/dist/capture/storm.d.ts +5 -5
- package/dist/capture/types.d.cts +128 -0
- package/dist/capture/types.d.ts +10 -9
- package/dist/capture/unclean-exit.d.cts +31 -0
- package/dist/capture/unclean-exit.d.ts +1 -1
- package/dist/capture/user-timing.d.cts +22 -0
- package/dist/capture/user-timing.d.ts +2 -2
- package/dist/capture/web-socket.d.cts +40 -0
- package/dist/capture/web-socket.d.ts +3 -3
- package/dist/capture/web-vitals.d.cts +40 -0
- package/dist/capture/web-vitals.d.ts +1 -1
- package/dist/{compression-lD9abCcO.cjs → compression-CvED_Jel.cjs} +2 -2
- package/dist/{compression-lD9abCcO.cjs.map → compression-CvED_Jel.cjs.map} +1 -1
- package/dist/{compression-AJJCMBOa.js → compression-tVtXwVjX.js} +2 -2
- package/dist/{compression-AJJCMBOa.js.map → compression-tVtXwVjX.js.map} +1 -1
- package/dist/config-DUs7uHHt.cjs +2 -0
- package/dist/config-DUs7uHHt.cjs.map +1 -0
- package/dist/config-SgQcCP1_.js +560 -0
- package/dist/config-SgQcCP1_.js.map +1 -0
- package/dist/console-BGgGnjSi.js +81 -0
- package/dist/console-BGgGnjSi.js.map +1 -0
- package/dist/console-CSZ5_Vx5.cjs +2 -0
- package/dist/console-CSZ5_Vx5.cjs.map +1 -0
- package/dist/constants-CUyd9cTZ.js +357 -0
- package/dist/constants-CUyd9cTZ.js.map +1 -0
- package/dist/constants-CqdJhTxH.cjs +2 -0
- package/dist/constants-CqdJhTxH.cjs.map +1 -0
- package/dist/constants.d.cts +751 -0
- package/dist/constants.d.ts +88 -20
- package/dist/core/breadcrumbs.d.cts +54 -0
- package/dist/core/breadcrumbs.d.ts +5 -0
- package/dist/core/config.d.cts +45 -0
- package/dist/core/config.d.ts +30 -2
- package/dist/core/context.d.cts +24 -0
- package/dist/core/context.d.ts +3 -8
- package/dist/core/debug-buffer.d.cts +34 -0
- package/dist/core/debug-buffer.d.ts +3 -3
- package/dist/core/debug-bundle.d.cts +12 -0
- package/dist/core/debug-bundle.d.ts +3 -3
- package/dist/core/deferred.d.cts +7 -0
- package/dist/core/deferred.d.ts +2 -2
- package/dist/core/diagnostics.d.cts +86 -0
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/drops.d.cts +39 -0
- package/dist/core/drops.d.ts +16 -6
- package/dist/core/hold-buffer.d.cts +36 -0
- package/dist/core/hold-buffer.d.ts +16 -7
- package/dist/core/journey.d.cts +148 -0
- package/dist/core/journey.d.ts +7 -7
- package/dist/core/logger.d.cts +141 -0
- package/dist/core/logger.d.ts +23 -30
- package/dist/core/measure.d.cts +30 -0
- package/dist/core/measure.d.ts +14 -3
- package/dist/core/meter.d.cts +78 -0
- package/dist/core/meter.d.ts +14 -8
- package/dist/core/pipeline.d.cts +227 -0
- package/dist/core/pipeline.d.ts +73 -10
- package/dist/core/profile-buckets.d.cts +31 -0
- package/dist/core/profiler.d.cts +218 -0
- package/dist/core/profiler.d.ts +2 -2
- package/dist/core/record.d.cts +190 -0
- package/dist/core/record.d.ts +44 -12
- package/dist/core/remote-rules.d.cts +17 -0
- package/dist/core/remote-rules.d.ts +3 -3
- package/dist/core/remote-sampling.d.cts +74 -0
- package/dist/core/remote-sampling.d.ts +3 -3
- package/dist/core/rotation.d.cts +75 -0
- package/dist/core/rotation.d.ts +75 -0
- package/dist/core/runtime.d.cts +765 -0
- package/dist/core/runtime.d.ts +245 -70
- package/dist/core/sampling.d.cts +86 -0
- package/dist/core/sampling.d.ts +5 -5
- package/dist/core/sender.d.cts +161 -0
- package/dist/core/sender.d.ts +59 -15
- package/dist/core/spans.d.cts +39 -0
- package/dist/core/spans.d.ts +1 -1
- package/dist/debug-bundle-BXIlwDKM.cjs +2 -0
- package/dist/debug-bundle-BXIlwDKM.cjs.map +1 -0
- package/dist/debug-bundle-CRpYV_ui.js +35 -0
- package/dist/debug-bundle-CRpYV_ui.js.map +1 -0
- package/dist/defineProperty-X1c4tIPD.cjs +1 -0
- package/dist/defineProperty-s2S8BXUc.js +35 -0
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.cjs.map +1 -1
- package/dist/doctor.d.cts +36 -0
- package/dist/doctor.d.ts +5 -2
- package/dist/doctor.js +121 -89
- package/dist/doctor.js.map +1 -1
- package/dist/errors-BE_EZV7Q.js +86 -0
- package/dist/errors-BE_EZV7Q.js.map +1 -0
- package/dist/errors-CNPbesMs.cjs +3 -0
- package/dist/errors-CNPbesMs.cjs.map +1 -0
- package/dist/factory-CTi0Is3F.js +404 -0
- package/dist/factory-CTi0Is3F.js.map +1 -0
- package/dist/factory-hRrH32v5.cjs +2 -0
- package/dist/factory-hRrH32v5.cjs.map +1 -0
- package/dist/guards-BlYGRK4l.js +10 -0
- package/dist/guards-BlYGRK4l.js.map +1 -0
- package/dist/guards-EjG3ahFp.cjs +2 -0
- package/dist/guards-EjG3ahFp.cjs.map +1 -0
- package/dist/{identity-BrQp_5J5.js → identity-DdhKgrpk.js} +20 -24
- package/dist/identity-DdhKgrpk.js.map +1 -0
- package/dist/identity-DlWRIuwy.cjs +2 -0
- package/dist/identity-DlWRIuwy.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +300 -0
- package/dist/index.d.ts +89 -98
- package/dist/index.js +1173 -1506
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-storage-CL9uqBCy.cjs +2 -0
- package/dist/indexeddb-storage-CL9uqBCy.cjs.map +1 -0
- package/dist/{indexeddb-storage-DLXQzAGh.js → indexeddb-storage-GHdl0t8A.js} +51 -47
- package/dist/indexeddb-storage-GHdl0t8A.js.map +1 -0
- package/dist/interactions-CUkzK8sR.cjs +2 -0
- package/dist/interactions-CUkzK8sR.cjs.map +1 -0
- package/dist/{interactions-B6z2I4tU.js → interactions-DiFvCosX.js} +41 -49
- package/dist/interactions-DiFvCosX.js.map +1 -0
- package/dist/journey-B4Adltjm.cjs +2 -0
- package/dist/journey-B4Adltjm.cjs.map +1 -0
- package/dist/{journey-35yCMNFo.js → journey-D2_sia57.js} +45 -48
- package/dist/journey-D2_sia57.js.map +1 -0
- package/dist/{library-console-Dl_Ly6DQ.js → library-console-Btrzt814.js} +2 -2
- package/dist/{library-console-Dl_Ly6DQ.js.map → library-console-Btrzt814.js.map} +1 -1
- package/dist/{library-console-BFWEuQsl.cjs → library-console-CPW6bvZH.cjs} +2 -2
- package/dist/{library-console-BFWEuQsl.cjs.map → library-console-CPW6bvZH.cjs.map} +1 -1
- package/dist/{library-request-nI6pvI6I.js → library-request-BJ9PLRaD.js} +2 -2
- package/dist/{library-request-nI6pvI6I.js.map → library-request-BJ9PLRaD.js.map} +1 -1
- package/dist/{library-request-Da-CHKzT.cjs → library-request-D7OvTxZV.cjs} +2 -2
- package/dist/{library-request-Da-CHKzT.cjs.map → library-request-D7OvTxZV.cjs.map} +1 -1
- package/dist/{lifecycle-CZ6RRXc6.js → lifecycle-22CUCrc9.js} +21 -29
- package/dist/lifecycle-22CUCrc9.js.map +1 -0
- package/dist/lifecycle-IaAm1mOC.cjs +2 -0
- package/dist/lifecycle-IaAm1mOC.cjs.map +1 -0
- package/dist/{log-record-DIA6McNr.js → log-record-BNiLfqtL.js} +8 -7
- package/dist/log-record-BNiLfqtL.js.map +1 -0
- package/dist/log-record-CkivuiEl.cjs +2 -0
- package/dist/log-record-CkivuiEl.cjs.map +1 -0
- package/dist/long-frames-BUUbXd-B.cjs +2 -0
- package/dist/long-frames-BUUbXd-B.cjs.map +1 -0
- package/dist/{long-frames-430_85Da.js → long-frames-DNFaRnC3.js} +18 -22
- package/dist/long-frames-DNFaRnC3.js.map +1 -0
- package/dist/models/batch.d.cts +57 -0
- package/dist/models/batch.d.ts +2 -2
- package/dist/models/bus.d.cts +158 -0
- package/dist/models/bus.d.ts +22 -2
- package/dist/models/config.d.cts +1540 -0
- package/dist/models/config.d.ts +360 -259
- package/dist/models/drop.d.cts +54 -0
- package/dist/models/drop.d.ts +16 -3
- package/dist/models/health.d.cts +148 -0
- package/dist/models/health.d.ts +108 -12
- package/dist/models/log-record.d.cts +61 -0
- package/dist/models/metric.d.cts +139 -0
- package/dist/models/metric.d.ts +13 -2
- package/dist/models/plugin.d.cts +47 -0
- package/dist/models/plugin.d.ts +3 -3
- package/dist/models/replay.d.cts +60 -0
- package/dist/models/serializer.d.cts +23 -0
- package/dist/models/serializer.d.ts +1 -1
- package/dist/models/storage.d.cts +95 -0
- package/dist/models/storage.d.ts +7 -5
- package/dist/network-CGMLQ-mA.cjs +2 -0
- package/dist/network-CGMLQ-mA.cjs.map +1 -0
- package/dist/{network-C7SkLf4v.js → network-on2zZT6H.js} +51 -51
- package/dist/network-on2zZT6H.js.map +1 -0
- package/dist/{otlp-2MCrC3kd.cjs → otlp-BENHf3g9.cjs} +2 -2
- package/dist/{otlp-2MCrC3kd.cjs.map → otlp-BENHf3g9.cjs.map} +1 -1
- package/dist/{otlp-COq033e3.js → otlp-DimfrRor.js} +12 -12
- package/dist/{otlp-COq033e3.js.map → otlp-DimfrRor.js.map} +1 -1
- package/dist/{platform-CVewe4wQ.js → platform-BaaFIPCU.js} +10 -10
- package/dist/{platform-CVewe4wQ.js.map → platform-BaaFIPCU.js.map} +1 -1
- package/dist/{platform-12uR7kBQ.cjs → platform-CfA3-7sJ.cjs} +2 -2
- package/dist/{platform-12uR7kBQ.cjs.map → platform-CfA3-7sJ.cjs.map} +1 -1
- package/dist/{profiler-BVWIOgnq.js → profiler-BAZoh7A4.js} +89 -107
- package/dist/profiler-BAZoh7A4.js.map +1 -0
- package/dist/profiler-D4tJpDRc.cjs +2 -0
- package/dist/profiler-D4tJpDRc.cjs.map +1 -0
- package/dist/profiler-frames-C4xr7KfH.cjs +2 -0
- package/dist/profiler-frames-C4xr7KfH.cjs.map +1 -0
- package/dist/{profiler-frames-CLXlT_xL.js → profiler-frames-cJMx9wNM.js} +29 -37
- package/dist/profiler-frames-cJMx9wNM.js.map +1 -0
- package/dist/remote-rules-Dz9MRAsB.js +95 -0
- package/dist/remote-rules-Dz9MRAsB.js.map +1 -0
- package/dist/remote-rules-_tY0zj5o.cjs +2 -0
- package/dist/remote-rules-_tY0zj5o.cjs.map +1 -0
- package/dist/replay-B3gFXIZd.cjs +2 -0
- package/dist/replay-B3gFXIZd.cjs.map +1 -0
- package/dist/replay-Ds-ANH34.js +310 -0
- package/dist/replay-Ds-ANH34.js.map +1 -0
- package/dist/reports-BDSe4dFH.cjs +2 -0
- package/dist/reports-BDSe4dFH.cjs.map +1 -0
- package/dist/{reports-BuXekPOS.js → reports-C-thq-bk.js} +25 -30
- package/dist/reports-C-thq-bk.js.map +1 -0
- package/dist/resource-timing-C576gFIQ.cjs +2 -0
- package/dist/resource-timing-C576gFIQ.cjs.map +1 -0
- package/dist/{resource-timing-CXGHwFRD.js → resource-timing-eUl2dNgC.js} +20 -23
- package/dist/resource-timing-eUl2dNgC.js.map +1 -0
- package/dist/response-body-YdNl-HkR.cjs +3 -0
- package/dist/response-body-YdNl-HkR.cjs.map +1 -0
- package/dist/response-body-eoSQpLiH.js +331 -0
- package/dist/response-body-eoSQpLiH.js.map +1 -0
- package/dist/rotation-Cwct4ckk.js +94 -0
- package/dist/rotation-Cwct4ckk.js.map +1 -0
- package/dist/rotation-D4qUAHAu.cjs +2 -0
- package/dist/rotation-D4qUAHAu.cjs.map +1 -0
- package/dist/sampling-BlrI8jor.js +63 -0
- package/dist/sampling-BlrI8jor.js.map +1 -0
- package/dist/sampling-mXt4dstx.cjs +2 -0
- package/dist/sampling-mXt4dstx.cjs.map +1 -0
- package/dist/{sanitize-CNmsD9r3.js → sanitize-Ba0KqU06.js} +2 -2
- package/dist/sanitize-Ba0KqU06.js.map +1 -0
- package/dist/{sanitize-ChLn97Ch.cjs → sanitize-DQyiI_KY.cjs} +2 -2
- package/dist/sanitize-DQyiI_KY.cjs.map +1 -0
- package/dist/sender-BdRuNVhF.cjs +2 -0
- package/dist/sender-BdRuNVhF.cjs.map +1 -0
- package/dist/sender-Dv8rAmpV.js +979 -0
- package/dist/sender-Dv8rAmpV.js.map +1 -0
- package/dist/storage/context-storage.d.cts +90 -0
- package/dist/storage/context-storage.d.ts +5 -5
- package/dist/storage/emergency-queue.d.cts +27 -0
- package/dist/storage/emergency-queue.d.ts +4 -4
- package/dist/storage/eviction.d.cts +40 -0
- package/dist/storage/eviction.d.ts +1 -1
- package/dist/storage/factory.d.cts +21 -0
- package/dist/storage/factory.d.ts +3 -3
- package/dist/storage/gap.d.cts +20 -0
- package/dist/storage/gap.d.ts +3 -3
- package/dist/storage/idb-driver.d.cts +93 -0
- package/dist/storage/idb-driver.d.ts +1 -1
- package/dist/storage/indexeddb-storage.d.cts +97 -0
- package/dist/storage/indexeddb-storage.d.ts +12 -4
- package/dist/storage/keys.d.cts +17 -0
- package/dist/storage/keys.d.ts +2 -2
- package/dist/storage/local-storage.d.cts +139 -0
- package/dist/storage/local-storage.d.ts +11 -4
- package/dist/storage/memory-storage.d.cts +73 -0
- package/dist/storage/memory-storage.d.ts +4 -3
- package/dist/storage/persistence.d.cts +8 -0
- package/dist/storage/persistence.d.ts +2 -2
- package/dist/storage/stored-context.d.cts +34 -0
- package/dist/storage/stored-context.d.ts +34 -0
- package/dist/stored-context-B2EzVuYm.js +51 -0
- package/dist/stored-context-B2EzVuYm.js.map +1 -0
- package/dist/stored-context-CXt7eHZL.cjs +2 -0
- package/dist/stored-context-CXt7eHZL.cjs.map +1 -0
- package/dist/storm-C-zYSdDX.cjs +2 -0
- package/dist/storm-C-zYSdDX.cjs.map +1 -0
- package/dist/storm-DjKetLKZ.js +9 -0
- package/dist/storm-DjKetLKZ.js.map +1 -0
- package/dist/transport/compression.d.cts +7 -0
- package/dist/transport/custom-transport.d.cts +22 -0
- package/dist/transport/custom-transport.d.ts +6 -5
- package/dist/transport/errors.d.cts +31 -0
- package/dist/transport/exit-flush.d.cts +135 -0
- package/dist/transport/exit-flush.d.ts +30 -13
- package/dist/transport/headers.d.cts +8 -0
- package/dist/transport/headers.d.ts +2 -2
- package/dist/transport/http-transport.d.cts +116 -0
- package/dist/transport/http-transport.d.ts +20 -8
- package/dist/transport/memory-transport.d.cts +30 -0
- package/dist/transport/memory-transport.d.ts +2 -2
- package/dist/transport/response-body.d.cts +49 -0
- package/dist/transport/response-body.d.ts +49 -0
- package/dist/transport/retry-engine.d.cts +129 -0
- package/dist/transport/retry-engine.d.ts +27 -9
- package/dist/transport/serializers/ecs.d.cts +3 -0
- package/dist/transport/serializers/ecs.d.ts +1 -1
- package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
- package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
- package/dist/transport/serializers/otlp-traces.d.cts +3 -0
- package/dist/transport/serializers/otlp-traces.d.ts +1 -1
- package/dist/transport/serializers/otlp.d.cts +47 -0
- package/dist/transport/serializers/otlp.d.ts +2 -2
- package/dist/transport/serializers/select.d.cts +38 -0
- package/dist/transport/serializers/select.d.ts +5 -5
- package/dist/transport/status-transport.d.cts +129 -0
- package/dist/transport/status-transport.d.ts +25 -8
- package/dist/transport/worker-client.d.cts +23 -0
- package/dist/transport/worker-client.d.ts +12 -3
- package/dist/transport/worker-entry.d.cts +5 -0
- package/dist/transport/worker-entry.d.ts +1 -1
- package/dist/transport/worker-protocol.d.cts +38 -0
- package/dist/transport/worker-protocol.d.ts +4 -2
- package/dist/transport/worker-server.d.cts +3 -0
- package/dist/transport/worker-server.d.ts +1 -1
- package/dist/transport/worker-transport.d.cts +10 -0
- package/dist/transport/worker-transport.d.ts +5 -4
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-Cob_jyTv.js → unclean-exit-DQD1cT7c.js} +23 -30
- package/dist/unclean-exit-DQD1cT7c.js.map +1 -0
- package/dist/unclean-exit-py99ApzT.cjs +2 -0
- package/dist/unclean-exit-py99ApzT.cjs.map +1 -0
- package/dist/{user-timing-DgHubxCI.js → user-timing-BePqb1uN.js} +15 -17
- package/dist/user-timing-BePqb1uN.js.map +1 -0
- package/dist/user-timing-D6XTmpuM.cjs +2 -0
- package/dist/user-timing-D6XTmpuM.cjs.map +1 -0
- package/dist/utils/console.d.cts +36 -0
- package/dist/utils/console.d.ts +4 -4
- package/dist/utils/deadline.d.cts +14 -0
- package/dist/utils/error-like.d.cts +25 -0
- package/dist/utils/fixed-window.d.cts +25 -0
- package/dist/utils/global-scope.d.cts +20 -0
- package/dist/utils/guards.d.cts +14 -0
- package/dist/utils/guards.d.ts +8 -0
- package/dist/utils/identity.d.cts +109 -0
- package/dist/utils/identity.d.ts +3 -4
- package/dist/utils/library-console.d.cts +11 -0
- package/dist/utils/library-request.d.cts +24 -0
- package/dist/utils/lock.d.cts +24 -0
- package/dist/utils/lock.d.ts +1 -1
- package/dist/utils/openfin.d.cts +48 -0
- package/dist/utils/patch.d.cts +9 -0
- package/dist/utils/platform.d.cts +62 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/sanitize.d.cts +52 -0
- package/dist/utils/sanitize.d.ts +1 -1
- package/dist/utils/sequence.d.cts +10 -0
- package/dist/utils/tracing.d.cts +158 -0
- package/dist/utils/tracing.d.ts +11 -4
- package/dist/utils/unref.d.cts +9 -0
- package/dist/web-socket-CoIUBM3C.cjs +2 -0
- package/dist/{web-socket-DthJuSAg.js.map → web-socket-CoIUBM3C.cjs.map} +1 -1
- package/dist/{web-socket-DthJuSAg.js → web-socket-DSHgDiZ6.js} +23 -28
- package/dist/web-socket-DSHgDiZ6.js.map +1 -0
- package/dist/{web-vitals-CsGCWnUr.js → web-vitals-4pWACwaR.js} +15 -21
- package/dist/web-vitals-4pWACwaR.js.map +1 -0
- package/dist/web-vitals-__X7t4pj.cjs +2 -0
- package/dist/web-vitals-__X7t4pj.cjs.map +1 -0
- package/dist/worker-protocol-QbvqNazn.cjs +2 -0
- package/dist/worker-protocol-QbvqNazn.cjs.map +1 -0
- package/dist/{worker-protocol-B0_8rWy5.js → worker-protocol-x074Rpet.js} +14 -11
- package/dist/worker-protocol-x074Rpet.js.map +1 -0
- package/dist/worker-server-CFe4nvos.cjs +2 -0
- package/dist/worker-server-CFe4nvos.cjs.map +1 -0
- package/dist/worker-server-iUVSjH8L.js +94 -0
- package/dist/worker-server-iUVSjH8L.js.map +1 -0
- package/dist/worker-transport-CRAX-09c.cjs +2 -0
- package/dist/worker-transport-CRAX-09c.cjs.map +1 -0
- package/dist/worker-transport-Dy1KMA7t.js +190 -0
- package/dist/worker-transport-Dy1KMA7t.js.map +1 -0
- package/llms.txt +397 -0
- package/package.json +54 -46
- package/dist/bus-D_7pd7RN.cjs +0 -2
- package/dist/bus-D_7pd7RN.cjs.map +0 -1
- package/dist/bus-ecxUNTja.js.map +0 -1
- package/dist/console-CLz_PvFn.cjs +0 -2
- package/dist/console-CLz_PvFn.cjs.map +0 -1
- package/dist/console-cwgHKXvM.js +0 -82
- package/dist/console-cwgHKXvM.js.map +0 -1
- package/dist/constants-Bwl_YtQi.js +0 -349
- package/dist/constants-Bwl_YtQi.js.map +0 -1
- package/dist/constants-DakMxVB2.cjs +0 -2
- package/dist/constants-DakMxVB2.cjs.map +0 -1
- package/dist/context-storage-BjzeBSxH.cjs +0 -2
- package/dist/context-storage-BjzeBSxH.cjs.map +0 -1
- package/dist/context-storage-BzkoHzkQ.js +0 -51
- package/dist/context-storage-BzkoHzkQ.js.map +0 -1
- package/dist/debug-bundle-BOdYmCeV.js +0 -32
- package/dist/debug-bundle-BOdYmCeV.js.map +0 -1
- package/dist/debug-bundle-Ex4L_LSP.cjs +0 -2
- package/dist/debug-bundle-Ex4L_LSP.cjs.map +0 -1
- package/dist/emergency-queue-B9WZxanZ.js +0 -67
- package/dist/emergency-queue-B9WZxanZ.js.map +0 -1
- package/dist/emergency-queue-HBpL5r3V.cjs +0 -2
- package/dist/emergency-queue-HBpL5r3V.cjs.map +0 -1
- package/dist/errors-D6bwgJtO.js +0 -92
- package/dist/errors-D6bwgJtO.js.map +0 -1
- package/dist/errors-DCOCRdSi.cjs +0 -3
- package/dist/errors-DCOCRdSi.cjs.map +0 -1
- package/dist/factory-DLFDjdLv.cjs +0 -2
- package/dist/factory-DLFDjdLv.cjs.map +0 -1
- package/dist/factory-e9Qo3K0z.js +0 -276
- package/dist/factory-e9Qo3K0z.js.map +0 -1
- package/dist/guards-Cidk71ME.js +0 -7
- package/dist/guards-Cidk71ME.js.map +0 -1
- package/dist/guards-nJ70syPt.cjs +0 -2
- package/dist/guards-nJ70syPt.cjs.map +0 -1
- package/dist/identity-BlvlgjrU.cjs +0 -2
- package/dist/identity-BlvlgjrU.cjs.map +0 -1
- package/dist/identity-BrQp_5J5.js.map +0 -1
- package/dist/indexeddb-storage-CtLvZH1r.cjs +0 -2
- package/dist/indexeddb-storage-CtLvZH1r.cjs.map +0 -1
- package/dist/indexeddb-storage-DLXQzAGh.js.map +0 -1
- package/dist/interactions-B6z2I4tU.js.map +0 -1
- package/dist/interactions-P6pz08Jn.cjs +0 -2
- package/dist/interactions-P6pz08Jn.cjs.map +0 -1
- package/dist/journey-35yCMNFo.js.map +0 -1
- package/dist/journey-DAGh5h9k.cjs +0 -2
- package/dist/journey-DAGh5h9k.cjs.map +0 -1
- package/dist/keys-BHhw_0Wh.cjs +0 -2
- package/dist/keys-BHhw_0Wh.cjs.map +0 -1
- package/dist/keys-BU9j5YqW.js +0 -16
- package/dist/keys-BU9j5YqW.js.map +0 -1
- package/dist/lifecycle-BGGOcN4N.cjs +0 -2
- package/dist/lifecycle-BGGOcN4N.cjs.map +0 -1
- package/dist/lifecycle-CZ6RRXc6.js.map +0 -1
- package/dist/log-record-D7bA1RPb.cjs +0 -2
- package/dist/log-record-D7bA1RPb.cjs.map +0 -1
- package/dist/log-record-DIA6McNr.js.map +0 -1
- package/dist/long-frames-430_85Da.js.map +0 -1
- package/dist/long-frames-Dd8tsi2U.cjs +0 -2
- package/dist/long-frames-Dd8tsi2U.cjs.map +0 -1
- package/dist/models/stats.d.ts +0 -11
- package/dist/network-C7SkLf4v.js.map +0 -1
- package/dist/network-pEX3PAJv.cjs +0 -2
- package/dist/network-pEX3PAJv.cjs.map +0 -1
- package/dist/profiler-BVWIOgnq.js.map +0 -1
- package/dist/profiler-eVCknCzS.cjs +0 -2
- package/dist/profiler-eVCknCzS.cjs.map +0 -1
- package/dist/profiler-frames-CLXlT_xL.js.map +0 -1
- package/dist/profiler-frames-Dg2OebB2.cjs +0 -2
- package/dist/profiler-frames-Dg2OebB2.cjs.map +0 -1
- package/dist/remote-rules-BJGDJGwA.js +0 -98
- package/dist/remote-rules-BJGDJGwA.js.map +0 -1
- package/dist/remote-rules-CJD3ToVk.cjs +0 -2
- package/dist/remote-rules-CJD3ToVk.cjs.map +0 -1
- package/dist/replay-0zAJv9T3.js +0 -338
- package/dist/replay-0zAJv9T3.js.map +0 -1
- package/dist/replay-DomJpXqW.cjs +0 -2
- package/dist/replay-DomJpXqW.cjs.map +0 -1
- package/dist/reports-BsbqmP8h.cjs +0 -2
- package/dist/reports-BsbqmP8h.cjs.map +0 -1
- package/dist/reports-BuXekPOS.js.map +0 -1
- package/dist/resource-timing-CXGHwFRD.js.map +0 -1
- package/dist/resource-timing-DkycFGDa.cjs +0 -2
- package/dist/resource-timing-DkycFGDa.cjs.map +0 -1
- package/dist/sampling-Dd0wllyq.cjs +0 -2
- package/dist/sampling-Dd0wllyq.cjs.map +0 -1
- package/dist/sampling-UUDbi3K0.js +0 -60
- package/dist/sampling-UUDbi3K0.js.map +0 -1
- package/dist/sanitize-CNmsD9r3.js.map +0 -1
- package/dist/sanitize-ChLn97Ch.cjs.map +0 -1
- package/dist/select-CTk-K5mG.cjs +0 -3
- package/dist/select-CTk-K5mG.cjs.map +0 -1
- package/dist/select-DPv_j6wq.js +0 -270
- package/dist/select-DPv_j6wq.js.map +0 -1
- package/dist/sender-15zEsZpr.js +0 -857
- package/dist/sender-15zEsZpr.js.map +0 -1
- package/dist/sender-Bfpv9tad.cjs +0 -2
- package/dist/sender-Bfpv9tad.cjs.map +0 -1
- package/dist/storage-BA9RqRO-.cjs +0 -2
- package/dist/storage-BA9RqRO-.cjs.map +0 -1
- package/dist/storage-DZwed89z.js +0 -16
- package/dist/storage-DZwed89z.js.map +0 -1
- package/dist/storm-BTSNTIWI.js +0 -9
- package/dist/storm-BTSNTIWI.js.map +0 -1
- package/dist/storm-D0_qZOEg.cjs +0 -2
- package/dist/storm-D0_qZOEg.cjs.map +0 -1
- package/dist/unclean-exit-ClGzrc2A.cjs +0 -2
- package/dist/unclean-exit-ClGzrc2A.cjs.map +0 -1
- package/dist/unclean-exit-Cob_jyTv.js.map +0 -1
- package/dist/user-timing-CdYqx3PF.cjs +0 -2
- package/dist/user-timing-CdYqx3PF.cjs.map +0 -1
- package/dist/user-timing-DgHubxCI.js.map +0 -1
- package/dist/utils/timer.d.ts +0 -19
- package/dist/web-socket-BTuvYoJI.cjs +0 -2
- package/dist/web-socket-BTuvYoJI.cjs.map +0 -1
- package/dist/web-vitals-Ch5BpDmo.cjs +0 -2
- package/dist/web-vitals-Ch5BpDmo.cjs.map +0 -1
- package/dist/web-vitals-CsGCWnUr.js.map +0 -1
- package/dist/worker-protocol-B0_8rWy5.js.map +0 -1
- package/dist/worker-protocol-BjzFORfq.cjs +0 -2
- package/dist/worker-protocol-BjzFORfq.cjs.map +0 -1
- package/dist/worker-server-4en-Lt-3.cjs +0 -2
- package/dist/worker-server-4en-Lt-3.cjs.map +0 -1
- package/dist/worker-server-Cne9MX9I.js +0 -83
- package/dist/worker-server-Cne9MX9I.js.map +0 -1
- package/dist/worker-transport-B-GF4Aqn.cjs +0 -2
- package/dist/worker-transport-B-GF4Aqn.cjs.map +0 -1
- package/dist/worker-transport-C3SjJAEC.js +0 -200
- package/dist/worker-transport-C3SjJAEC.js.map +0 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import type { WorkerLike } from "./bus/links.cjs";
|
|
2
|
+
import type { Journey } from "./core/journey.cjs";
|
|
3
|
+
import { type OneLogger as Logger, type OneLoggerOptions } from "./core/logger.cjs";
|
|
4
|
+
import type { ObservabilityConfig } from "./models/config.cjs";
|
|
5
|
+
export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay.cjs";
|
|
6
|
+
import type { FlushOptions, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "./models/config.cjs";
|
|
7
|
+
import type { DebugBundle, FlushResult, ObservabilityHealth } from "./models/health.cjs";
|
|
8
|
+
import type { FrameOptions, SourceOptions } from "./models/bus.cjs";
|
|
9
|
+
export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus.cjs";
|
|
10
|
+
import type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Profiler } from "./models/metric.cjs";
|
|
11
|
+
export { serveTransportWorker } from "./transport/worker-entry.cjs";
|
|
12
|
+
export { createMemoryTransport, type MemoryTransport } from "./transport/memory-transport.cjs";
|
|
13
|
+
export type { Journey, Logger, ObservabilityConfig, OneLoggerOptions };
|
|
14
|
+
export type { BatchingOptions, BufferingOptions, BusOptions, CaptureLimitsOptions, CaptureOptions, ConsoleCaptureOptions, ConsoleOutputOptions, ConsoleStyles, CorrelationOptions, DebugBufferOptions, DeliveryOptions, DiagnosticsOptions, FlushOptions, InteractionOptions, JourneyOptions, LimitsOptions, LoggerCacheOptions, LongFramesOptions, MetadataOptions, MetricsOptions, ProfilerOptions, RemoteCaptureFlag, ReplayOptions, ResourceTimingOptions, RetentionOptions, RoutingOptions, SamplingOptions, SecurityContextOptions, SecurityContextRotationOptions, SecurityContextUpdate, ShutdownOptions, StorageOptions, StorageScope, UserTimingOptions, WebVitalsOptions, ExitTransport, Transport, TransportRequest, TransportResponse, } from "./models/config.cjs";
|
|
15
|
+
export type { DebugBundle, DeliveryHealth, FlushResult, FlushStatus, ObservabilityHealth, } from "./models/health.cjs";
|
|
16
|
+
export type { WorkerLike } from "./bus/links.cjs";
|
|
17
|
+
export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics.cjs";
|
|
18
|
+
export type { DropSummary, LossReason } from "./models/drop.cjs";
|
|
19
|
+
export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record.cjs";
|
|
20
|
+
export type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Probe, ProbeOptions, Profiler, } from "./models/metric.cjs";
|
|
21
|
+
export type { CapturePlugin, PluginContext } from "./models/plugin.cjs";
|
|
22
|
+
export type { LogSerializer, SerializedBatch } from "./models/serializer.cjs";
|
|
23
|
+
export type { StorageAdapter } from "./models/storage.cjs";
|
|
24
|
+
/**
|
|
25
|
+
* Initializes or reconfigures the observability runtime. The first call that works starts the
|
|
26
|
+
* runtime. Before it, the library patches, stores and sends nothing, and the records logged
|
|
27
|
+
* before it go out with its hooks and identity. With `enabled: false`, the start waits for the
|
|
28
|
+
* first `enabled: true`.
|
|
29
|
+
* With `payloadMode: "defer"`, logger records are built in idle time. With the debug buffer on,
|
|
30
|
+
* they are still built at the call.
|
|
31
|
+
* @param config Consumer configuration options.
|
|
32
|
+
*/
|
|
33
|
+
export declare function configure(config: Partial<ObservabilityConfig>): void;
|
|
34
|
+
/**
|
|
35
|
+
* Locks or unlocks the configuration. The lock isn't access control against other code on
|
|
36
|
+
* this origin. Call it after configure(), because a lock before the first configure() refuses
|
|
37
|
+
* that call too, and the runtime then never starts.
|
|
38
|
+
* @param locked True to refuse changes through configure().
|
|
39
|
+
*/
|
|
40
|
+
export declare function setConfigurationLocked(locked: boolean): void;
|
|
41
|
+
/**
|
|
42
|
+
* Stops delivery for the old context and starts it for the new one. A call during another
|
|
43
|
+
* rotation runs after it.
|
|
44
|
+
* @param update New identity, routing settings and context attributes.
|
|
45
|
+
* @param options What to do with old records, and the flush deadline.
|
|
46
|
+
* @returns Promise that resolves once the change is complete. It rejects before the first
|
|
47
|
+
* configure() call that works, while a failed first call still refuses records, and after
|
|
48
|
+
* shutdown().
|
|
49
|
+
*/
|
|
50
|
+
export declare function rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Reads this SDK copy's runtime state, policies and delivery state. The `delivery` block holds
|
|
53
|
+
* the record and batch counts, the send and failure times, the throttle end and the losses. It
|
|
54
|
+
* doesn't wait for startup or for the delivery stack to load.
|
|
55
|
+
* @returns Promise that resolves to the current state.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getHealth(): Promise<ObservabilityHealth>;
|
|
58
|
+
/**
|
|
59
|
+
* Collects the library's state for a support ticket. The bundle holds the health, the
|
|
60
|
+
* diagnostic counters, the resource, the breadcrumbs, the debug buffer and a config summary.
|
|
61
|
+
* The summary has no headers and no URL query, and a plugin or custom serializer shows up by
|
|
62
|
+
* name only. The breadcrumbs go through the privacy hooks. A debug buffer record keeps its
|
|
63
|
+
* context attributes. Where the bundle gets sent is up to the app.
|
|
64
|
+
* @returns Promise that resolves to a JSON-safe bundle.
|
|
65
|
+
*/
|
|
66
|
+
export declare function collectDebugBundle(): Promise<DebugBundle>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the cached logger for a namespace, or a new scoped logger.
|
|
69
|
+
* @param namespace Application subsystem or module namespace.
|
|
70
|
+
* @param options Context attributes for this logger only.
|
|
71
|
+
* @returns Logger for the namespace. You get a new logger if you pass options or the cache
|
|
72
|
+
* is disabled.
|
|
73
|
+
*/
|
|
74
|
+
export declare function getLogger(namespace: string, options?: OneLoggerOptions): Logger;
|
|
75
|
+
/**
|
|
76
|
+
* Logs a trace-level debug record.
|
|
77
|
+
* @param message Detail message.
|
|
78
|
+
* @param payload Optional context attributes.
|
|
79
|
+
*/
|
|
80
|
+
export declare function trace(message: string, payload?: Record<string, unknown>): void;
|
|
81
|
+
/**
|
|
82
|
+
* Logs a debug-level record.
|
|
83
|
+
* @param message Detail message.
|
|
84
|
+
* @param payload Optional context attributes.
|
|
85
|
+
*/
|
|
86
|
+
export declare function debug(message: string, payload?: Record<string, unknown>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Logs an informational record.
|
|
89
|
+
* @param message Informational message.
|
|
90
|
+
* @param payload Optional context attributes.
|
|
91
|
+
*/
|
|
92
|
+
export declare function info(message: string, payload?: Record<string, unknown>): void;
|
|
93
|
+
/**
|
|
94
|
+
* Logs a warning record.
|
|
95
|
+
* @param message Warning message.
|
|
96
|
+
* @param payload Optional context attributes.
|
|
97
|
+
*/
|
|
98
|
+
export declare function warn(message: string, payload?: Record<string, unknown>): void;
|
|
99
|
+
/**
|
|
100
|
+
* Logs an error record, with the error that caused it and the breadcrumbs.
|
|
101
|
+
* @param message Error summary.
|
|
102
|
+
* @param err The caught error or reason.
|
|
103
|
+
* @param payload Optional context attributes.
|
|
104
|
+
*/
|
|
105
|
+
export declare function error(message: string, err?: unknown, payload?: Record<string, unknown>): void;
|
|
106
|
+
/**
|
|
107
|
+
* Logs a fatal record, with the error that caused it and the breadcrumbs.
|
|
108
|
+
* @param message Fatal error summary.
|
|
109
|
+
* @param err The caught error or reason.
|
|
110
|
+
* @param payload Optional context attributes.
|
|
111
|
+
*/
|
|
112
|
+
export declare function fatal(message: string, err?: unknown, payload?: Record<string, unknown>): void;
|
|
113
|
+
/**
|
|
114
|
+
* Logs a single user action.
|
|
115
|
+
* @param name Action identifier.
|
|
116
|
+
* @param payload Optional action attributes.
|
|
117
|
+
*/
|
|
118
|
+
export declare function logAction(name: string, payload?: Record<string, unknown>): void;
|
|
119
|
+
/**
|
|
120
|
+
* Logs an application lifecycle or domain event.
|
|
121
|
+
* @param name Event identifier.
|
|
122
|
+
* @param payload Optional event attributes.
|
|
123
|
+
*/
|
|
124
|
+
export declare function logEvent(name: string, payload?: Record<string, unknown>): void;
|
|
125
|
+
/**
|
|
126
|
+
* Returns a counter. Values are summed in memory, and every interval the library sends one
|
|
127
|
+
* point per attribute set. A handle stays valid across configure() and shutdown().
|
|
128
|
+
* @param name Metric name.
|
|
129
|
+
* @param options Unit of the values.
|
|
130
|
+
* @returns The counter.
|
|
131
|
+
*/
|
|
132
|
+
export declare function counter(name: string, options?: InstrumentOptions): Counter;
|
|
133
|
+
/**
|
|
134
|
+
* Returns a gauge. It keeps the last value for each attribute set in memory, and every interval
|
|
135
|
+
* the library sends that value as one point. With `metricsEndpoint`, the point is an OTLP gauge.
|
|
136
|
+
* A handle stays valid across configure() and shutdown().
|
|
137
|
+
* @param name Metric name.
|
|
138
|
+
* @param options Unit of the values.
|
|
139
|
+
* @returns The gauge.
|
|
140
|
+
*/
|
|
141
|
+
export declare function gauge(name: string, options?: InstrumentOptions): Gauge;
|
|
142
|
+
/**
|
|
143
|
+
* Returns a histogram. Values are counted into buckets in memory, and every interval the
|
|
144
|
+
* library sends one point per attribute set. A handle stays valid across configure() and
|
|
145
|
+
* shutdown().
|
|
146
|
+
* @param name Metric name.
|
|
147
|
+
* @param options Unit of the values and the bucket boundaries.
|
|
148
|
+
* @returns The histogram.
|
|
149
|
+
*/
|
|
150
|
+
export declare function histogram(name: string, options?: HistogramOptions): Histogram;
|
|
151
|
+
/**
|
|
152
|
+
* Times an operation with named phases. Every phase and the total go into duration histograms.
|
|
153
|
+
* With `tracesEndpoint` set, the operation is also a span with one child span per phase.
|
|
154
|
+
* @param name Operation name. Every name creates one series.
|
|
155
|
+
* @param attributes Attribute set for every histogram point. Keep it small.
|
|
156
|
+
* @returns The operation's handle.
|
|
157
|
+
*/
|
|
158
|
+
export declare function startMeasure(name: string, attributes?: MetricAttributes): Measure;
|
|
159
|
+
/**
|
|
160
|
+
* Times a function call with a measure, as `startMeasure()` does. If the result has a `then`
|
|
161
|
+
* function, the measure ends when it settles. A throw or a rejection ends it with the outcome
|
|
162
|
+
* "error", and the error goes to the caller unchanged.
|
|
163
|
+
* @param name Operation name. Every name creates one series.
|
|
164
|
+
* @param fn The function to call.
|
|
165
|
+
* @param attributes Attribute set for every histogram point. Keep it small.
|
|
166
|
+
* @returns Whatever `fn` returned, or the result of its `then` call.
|
|
167
|
+
*/
|
|
168
|
+
export declare function measure<T>(name: string, fn: () => T, attributes?: MetricAttributes): T;
|
|
169
|
+
/**
|
|
170
|
+
* Starts the session replay recorder. With `replay.requireConsent` set, nothing is recorded
|
|
171
|
+
* until you call this, so call it once the user agrees. Does nothing while `replay.enabled`
|
|
172
|
+
* is false.
|
|
173
|
+
*/
|
|
174
|
+
export declare function startReplay(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Stops the session replay recorder and drops any replay events that haven't been sent. With
|
|
177
|
+
* `replay.requireConsent` set, the recorder stays off until the next `startReplay()`.
|
|
178
|
+
*/
|
|
179
|
+
export declare function stopReplay(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Times spans of app code with probes. A probe is a named handle with `begin()`, `end()`,
|
|
182
|
+
* `endAfterPaint()` and `record()`, and `time()` times a single function call. Once per
|
|
183
|
+
* interval the library sends one `ui.profile.duration` histogram for every probe that has data.
|
|
184
|
+
*
|
|
185
|
+
* The profiler is off by default. Set `profiler.enabled` to true to turn it on. While it is
|
|
186
|
+
* off, probes don't read the clock. After `shutdown()` a probe does nothing until a later
|
|
187
|
+
* `configure()` turns the profiler back on. Probes stay valid across `configure()` and
|
|
188
|
+
* `shutdown()`, and you can create them before `configure()`. No call ever throws.
|
|
189
|
+
* @example
|
|
190
|
+
* const render = profiler.probe("grid.render");
|
|
191
|
+
* const token = render.begin();
|
|
192
|
+
* drawGrid();
|
|
193
|
+
* render.end(token);
|
|
194
|
+
*/
|
|
195
|
+
export declare const profiler: Profiler;
|
|
196
|
+
/**
|
|
197
|
+
* Adds a breadcrumb to the trail. The next error record carries the trail.
|
|
198
|
+
* @param message Description of the event.
|
|
199
|
+
* @param data Optional metadata. It is copied right away.
|
|
200
|
+
*/
|
|
201
|
+
export declare function addBreadcrumb(message: string, data?: Record<string, unknown>): void;
|
|
202
|
+
/**
|
|
203
|
+
* Merges attributes into the ambient context. Every later record includes them. A null value
|
|
204
|
+
* removes its key, and an undefined value keeps the current value. A value that isn't an object
|
|
205
|
+
* reports `config.invalid` and changes nothing.
|
|
206
|
+
* @param values Attributes to merge.
|
|
207
|
+
*/
|
|
208
|
+
export declare function setContext(values: Record<string, unknown>): void;
|
|
209
|
+
/**
|
|
210
|
+
* Removes an attribute from the ambient context.
|
|
211
|
+
* @param key Attribute key to delete.
|
|
212
|
+
*/
|
|
213
|
+
export declare function removeContext(key: string): void;
|
|
214
|
+
/**
|
|
215
|
+
* Starts a new journey correlation context.
|
|
216
|
+
* @param name Journey workflow identifier.
|
|
217
|
+
* @param options `parent` links the active journey as the parent. `id` sets the journey id, a
|
|
218
|
+
* string of 1 to 64 letters, digits, "_", ".", ":" or "-". Without it, the library generates one.
|
|
219
|
+
* @returns The started Journey.
|
|
220
|
+
*/
|
|
221
|
+
export declare function startJourney(name: string, options?: {
|
|
222
|
+
parent?: boolean;
|
|
223
|
+
id?: string;
|
|
224
|
+
}): Journey;
|
|
225
|
+
/** Ends the active journey correlation context. */
|
|
226
|
+
export declare function endJourney(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Returns the active journey, or null if none is in progress.
|
|
229
|
+
* @returns The active Journey, or null.
|
|
230
|
+
*/
|
|
231
|
+
export declare function currentJourney(): Journey | null;
|
|
232
|
+
/**
|
|
233
|
+
* Serializes the active journey's metadata into a URL token that another context can adopt.
|
|
234
|
+
* @returns The token, or null if no journey is active or the token is above the size limit.
|
|
235
|
+
*/
|
|
236
|
+
export declare function getJourneyToken(): string | null;
|
|
237
|
+
/**
|
|
238
|
+
* Adopts a serialized journey token in this application realm.
|
|
239
|
+
* @param token Serialized journey token.
|
|
240
|
+
* @returns True if the token is valid and the runtime adopted it.
|
|
241
|
+
*/
|
|
242
|
+
export declare function adoptJourney(token: string): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Connects a Web Worker or MessagePort to the document bus, so its records get routed.
|
|
245
|
+
* @param worker The Worker or MessagePort to connect.
|
|
246
|
+
* @param options The worker's permissions. Defaults to "records".
|
|
247
|
+
* @returns Function that removes this registration.
|
|
248
|
+
*/
|
|
249
|
+
export declare function registerWorker(worker: WorkerLike, options?: SourceOptions): () => void;
|
|
250
|
+
/**
|
|
251
|
+
* Registers one frame or window at an exact origin.
|
|
252
|
+
* @param frame Child frame or window to register.
|
|
253
|
+
* @param options Expected origin and source permissions.
|
|
254
|
+
* @returns Function that removes this registration.
|
|
255
|
+
*/
|
|
256
|
+
export declare function registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
|
|
257
|
+
/** Starts a new distributed trace. Later records and requests carry the new trace id. */
|
|
258
|
+
export declare function newTrace(): void;
|
|
259
|
+
/**
|
|
260
|
+
* Returns the W3C traceparent headers to put on an outgoing HTTP request.
|
|
261
|
+
* @returns Map of trace header names to values.
|
|
262
|
+
*/
|
|
263
|
+
export declare function getTraceHeaders(): Record<string, string>;
|
|
264
|
+
/**
|
|
265
|
+
* Builds any deferred calls and the open metric interval, sends the records in memory, and
|
|
266
|
+
* waits until each one has a final state or the time limit passes. The snapshot is the records
|
|
267
|
+
* in memory at the call. A record logged later isn't in it. Before startup ends, the call waits
|
|
268
|
+
* for startup and the delivery stack first, and the snapshot then also holds the records logged
|
|
269
|
+
* during that wait. A forwarder hands its records to its sender and asks the sender to flush.
|
|
270
|
+
* At the limit the call returns, and the work goes on in the background. The stored batches
|
|
271
|
+
* from earlier failures and the replay segments are outside the snapshot. Before the first
|
|
272
|
+
* `configure()` call that works, during a pause and after `shutdown()`, it sends nothing and
|
|
273
|
+
* returns the status "inactive" at once.
|
|
274
|
+
* @param options How long to wait. `timeoutMs` is 0 to 600000 ms, and the default is 5000.
|
|
275
|
+
* @returns Promise that resolves to the counts of the snapshot's records. It never rejects.
|
|
276
|
+
*/
|
|
277
|
+
export declare function flush(options?: FlushOptions): Promise<FlushResult>;
|
|
278
|
+
/**
|
|
279
|
+
* Starts a new correlation in this tab. Ends the active journey and starts a new trace. Other
|
|
280
|
+
* tabs pick up the new id at their next startup. For a logout or a tenant change, use
|
|
281
|
+
* rotateSecurityContext().
|
|
282
|
+
*/
|
|
283
|
+
export declare function newSession(): void;
|
|
284
|
+
/**
|
|
285
|
+
* Returns a snapshot of the cumulative diagnostic event counts.
|
|
286
|
+
* @returns Map of diagnostic codes to how often each one occurred.
|
|
287
|
+
*/
|
|
288
|
+
export declare function getDiagnosticCounters(): Record<string, number>;
|
|
289
|
+
/**
|
|
290
|
+
* Stops every runtime subsystem. By default it flushes the records first, then runs the exit
|
|
291
|
+
* flush, and a request still open after that is cancelled with its stored batch kept. With
|
|
292
|
+
* `pending: "discard"` it sends nothing and reports each record in memory to `onDrop` with the
|
|
293
|
+
* reason "discarded". `clearStorage` also removes the stored batches and the stored ids, for a
|
|
294
|
+
* logout on a shared device. A call before any log call or `configure()` does nothing. A call
|
|
295
|
+
* after `shutdown()` stops nothing more, but its `clearStorage` still removes the stored data,
|
|
296
|
+
* once the first call ends. The next `configure()` starts a new runtime.
|
|
297
|
+
* @param options What to do with the records that wait, and which storage to remove.
|
|
298
|
+
* @returns Promise that resolves once shutdown is complete.
|
|
299
|
+
*/
|
|
300
|
+
export declare function shutdown(options?: ShutdownOptions): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import type { WorkerLike } from "./bus/links";
|
|
2
|
-
import type { Journey } from "./core/journey";
|
|
3
|
-
import { OneLogger, type OneLoggerOptions } from "./core/logger";
|
|
4
|
-
import type { ObservabilityConfig } from "./models/config";
|
|
5
|
-
export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay";
|
|
6
|
-
import type { SecurityContextUpdate, SecurityContextRotationOptions } from "./models/config";
|
|
7
|
-
import type { DebugBundle, ObservabilityHealth } from "./models/health";
|
|
8
|
-
import type { FrameOptions, SourceOptions } from "./models/bus";
|
|
9
|
-
export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus";
|
|
10
|
-
import type {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export type {
|
|
17
|
-
export type {
|
|
18
|
-
export type {
|
|
19
|
-
export type {
|
|
20
|
-
export type {
|
|
21
|
-
export type {
|
|
22
|
-
export type {
|
|
23
|
-
export type {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* Removes stored logs. Records and requests that are still pending can write to storage again
|
|
30
|
-
* afterwards.
|
|
31
|
-
* @param scope Whose stored records to remove: the context's or the namespace's.
|
|
32
|
-
* @returns Promise that resolves once the logs are removed.
|
|
33
|
-
*/
|
|
34
|
-
export declare function clearPersistedLogs(scope?: "context" | "namespace"): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Initializes or reconfigures the observability runtime.
|
|
1
|
+
import type { WorkerLike } from "./bus/links.js";
|
|
2
|
+
import type { Journey } from "./core/journey.js";
|
|
3
|
+
import { type OneLogger as Logger, type OneLoggerOptions } from "./core/logger.js";
|
|
4
|
+
import type { ObservabilityConfig } from "./models/config.js";
|
|
5
|
+
export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay.js";
|
|
6
|
+
import type { FlushOptions, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "./models/config.js";
|
|
7
|
+
import type { DebugBundle, FlushResult, ObservabilityHealth } from "./models/health.js";
|
|
8
|
+
import type { FrameOptions, SourceOptions } from "./models/bus.js";
|
|
9
|
+
export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus.js";
|
|
10
|
+
import type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Profiler } from "./models/metric.js";
|
|
11
|
+
export { serveTransportWorker } from "./transport/worker-entry.js";
|
|
12
|
+
export { createMemoryTransport, type MemoryTransport } from "./transport/memory-transport.js";
|
|
13
|
+
export type { Journey, Logger, ObservabilityConfig, OneLoggerOptions };
|
|
14
|
+
export type { BatchingOptions, BufferingOptions, BusOptions, CaptureLimitsOptions, CaptureOptions, ConsoleCaptureOptions, ConsoleOutputOptions, ConsoleStyles, CorrelationOptions, DebugBufferOptions, DeliveryOptions, DiagnosticsOptions, FlushOptions, InteractionOptions, JourneyOptions, LimitsOptions, LoggerCacheOptions, LongFramesOptions, MetadataOptions, MetricsOptions, ProfilerOptions, RemoteCaptureFlag, ReplayOptions, ResourceTimingOptions, RetentionOptions, RoutingOptions, SamplingOptions, SecurityContextOptions, SecurityContextRotationOptions, SecurityContextUpdate, ShutdownOptions, StorageOptions, StorageScope, UserTimingOptions, WebVitalsOptions, ExitTransport, Transport, TransportRequest, TransportResponse, } from "./models/config.js";
|
|
15
|
+
export type { DebugBundle, DeliveryHealth, FlushResult, FlushStatus, ObservabilityHealth, } from "./models/health.js";
|
|
16
|
+
export type { WorkerLike } from "./bus/links.js";
|
|
17
|
+
export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics.js";
|
|
18
|
+
export type { DropSummary, LossReason } from "./models/drop.js";
|
|
19
|
+
export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record.js";
|
|
20
|
+
export type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Probe, ProbeOptions, Profiler, } from "./models/metric.js";
|
|
21
|
+
export type { CapturePlugin, PluginContext } from "./models/plugin.js";
|
|
22
|
+
export type { LogSerializer, SerializedBatch } from "./models/serializer.js";
|
|
23
|
+
export type { StorageAdapter } from "./models/storage.js";
|
|
24
|
+
/**
|
|
25
|
+
* Initializes or reconfigures the observability runtime. The first call that works starts the
|
|
26
|
+
* runtime. Before it, the library patches, stores and sends nothing, and the records logged
|
|
27
|
+
* before it go out with its hooks and identity. With `enabled: false`, the start waits for the
|
|
28
|
+
* first `enabled: true`.
|
|
37
29
|
* With `payloadMode: "defer"`, logger records are built in idle time. With the debug buffer on,
|
|
38
30
|
* they are still built at the call.
|
|
39
31
|
* @param config Consumer configuration options.
|
|
@@ -41,19 +33,25 @@ export declare function clearPersistedLogs(scope?: "context" | "namespace"): Pro
|
|
|
41
33
|
export declare function configure(config: Partial<ObservabilityConfig>): void;
|
|
42
34
|
/**
|
|
43
35
|
* Locks or unlocks the configuration. The lock isn't access control against other code on
|
|
44
|
-
* this origin.
|
|
36
|
+
* this origin. Call it after configure(), because a lock before the first configure() refuses
|
|
37
|
+
* that call too, and the runtime then never starts.
|
|
45
38
|
* @param locked True to refuse changes through configure().
|
|
46
39
|
*/
|
|
47
40
|
export declare function setConfigurationLocked(locked: boolean): void;
|
|
48
41
|
/**
|
|
49
|
-
* Stops delivery for the old context and starts it for the new one.
|
|
50
|
-
*
|
|
42
|
+
* Stops delivery for the old context and starts it for the new one. A call during another
|
|
43
|
+
* rotation runs after it.
|
|
44
|
+
* @param update New identity, routing settings and context attributes.
|
|
51
45
|
* @param options What to do with old records, and the flush deadline.
|
|
52
|
-
* @returns Promise that resolves once the change is complete.
|
|
46
|
+
* @returns Promise that resolves once the change is complete. It rejects before the first
|
|
47
|
+
* configure() call that works, while a failed first call still refuses records, and after
|
|
48
|
+
* shutdown().
|
|
53
49
|
*/
|
|
54
50
|
export declare function rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
|
|
55
51
|
/**
|
|
56
|
-
* Reads this SDK copy's runtime state, delivery
|
|
52
|
+
* Reads this SDK copy's runtime state, policies and delivery state. The `delivery` block holds
|
|
53
|
+
* the record and batch counts, the send and failure times, the throttle end and the losses. It
|
|
54
|
+
* doesn't wait for startup or for the delivery stack to load.
|
|
57
55
|
* @returns Promise that resolves to the current state.
|
|
58
56
|
*/
|
|
59
57
|
export declare function getHealth(): Promise<ObservabilityHealth>;
|
|
@@ -73,7 +71,7 @@ export declare function collectDebugBundle(): Promise<DebugBundle>;
|
|
|
73
71
|
* @returns Logger for the namespace. You get a new logger if you pass options or the cache
|
|
74
72
|
* is disabled.
|
|
75
73
|
*/
|
|
76
|
-
export declare function getLogger(namespace: string, options?: OneLoggerOptions):
|
|
74
|
+
export declare function getLogger(namespace: string, options?: OneLoggerOptions): Logger;
|
|
77
75
|
/**
|
|
78
76
|
* Logs a trace-level debug record.
|
|
79
77
|
* @param message Detail message.
|
|
@@ -124,15 +122,6 @@ export declare function logAction(name: string, payload?: Record<string, unknown
|
|
|
124
122
|
* @param payload Optional event attributes.
|
|
125
123
|
*/
|
|
126
124
|
export declare function logEvent(name: string, payload?: Record<string, unknown>): void;
|
|
127
|
-
/**
|
|
128
|
-
* Logs a numeric metric measurement.
|
|
129
|
-
* @param name Metric identifier.
|
|
130
|
-
* @param value Measured value.
|
|
131
|
-
* @param unit Unit of measurement.
|
|
132
|
-
* @param type Metric type.
|
|
133
|
-
* @param attributes Optional metric attributes.
|
|
134
|
-
*/
|
|
135
|
-
export declare function logMetric(name: string, value: number, unit?: string, type?: MetricType, attributes?: Record<string, unknown>): void;
|
|
136
125
|
/**
|
|
137
126
|
* Returns a counter. Values are summed in memory, and every interval the library sends one
|
|
138
127
|
* point per attribute set. A handle stays valid across configure() and shutdown().
|
|
@@ -141,6 +130,15 @@ export declare function logMetric(name: string, value: number, unit?: string, ty
|
|
|
141
130
|
* @returns The counter.
|
|
142
131
|
*/
|
|
143
132
|
export declare function counter(name: string, options?: InstrumentOptions): Counter;
|
|
133
|
+
/**
|
|
134
|
+
* Returns a gauge. It keeps the last value for each attribute set in memory, and every interval
|
|
135
|
+
* the library sends that value as one point. With `metricsEndpoint`, the point is an OTLP gauge.
|
|
136
|
+
* A handle stays valid across configure() and shutdown().
|
|
137
|
+
* @param name Metric name.
|
|
138
|
+
* @param options Unit of the values.
|
|
139
|
+
* @returns The gauge.
|
|
140
|
+
*/
|
|
141
|
+
export declare function gauge(name: string, options?: InstrumentOptions): Gauge;
|
|
144
142
|
/**
|
|
145
143
|
* Returns a histogram. Values are counted into buckets in memory, and every interval the
|
|
146
144
|
* library sends one point per attribute set. A handle stays valid across configure() and
|
|
@@ -158,6 +156,16 @@ export declare function histogram(name: string, options?: HistogramOptions): His
|
|
|
158
156
|
* @returns The operation's handle.
|
|
159
157
|
*/
|
|
160
158
|
export declare function startMeasure(name: string, attributes?: MetricAttributes): Measure;
|
|
159
|
+
/**
|
|
160
|
+
* Times a function call with a measure, as `startMeasure()` does. If the result has a `then`
|
|
161
|
+
* function, the measure ends when it settles. A throw or a rejection ends it with the outcome
|
|
162
|
+
* "error", and the error goes to the caller unchanged.
|
|
163
|
+
* @param name Operation name. Every name creates one series.
|
|
164
|
+
* @param fn The function to call.
|
|
165
|
+
* @param attributes Attribute set for every histogram point. Keep it small.
|
|
166
|
+
* @returns Whatever `fn` returned, or the result of its `then` call.
|
|
167
|
+
*/
|
|
168
|
+
export declare function measure<T>(name: string, fn: () => T, attributes?: MetricAttributes): T;
|
|
161
169
|
/**
|
|
162
170
|
* Starts the session replay recorder. With `replay.requireConsent` set, nothing is recorded
|
|
163
171
|
* until you call this, so call it once the user agrees. Does nothing while `replay.enabled`
|
|
@@ -185,22 +193,6 @@ export declare function stopReplay(): void;
|
|
|
185
193
|
* render.end(token);
|
|
186
194
|
*/
|
|
187
195
|
export declare const profiler: Profiler;
|
|
188
|
-
/**
|
|
189
|
-
* Times a synchronous function and logs a duration metric.
|
|
190
|
-
* @param label Metric name prefix.
|
|
191
|
-
* @param fn Synchronous function to time.
|
|
192
|
-
* @param attributes Optional context attributes.
|
|
193
|
-
* @returns Whatever the timed function returns.
|
|
194
|
-
*/
|
|
195
|
-
export declare function timeSync<T>(label: string, fn: () => T, attributes?: Record<string, unknown>): T;
|
|
196
|
-
/**
|
|
197
|
-
* Times an asynchronous function and logs a duration metric.
|
|
198
|
-
* @param label Metric name prefix.
|
|
199
|
-
* @param fn Asynchronous function to time.
|
|
200
|
-
* @param attributes Optional context attributes.
|
|
201
|
-
* @returns Promise that resolves to the timed function's result.
|
|
202
|
-
*/
|
|
203
|
-
export declare function timeAsync<T>(label: string, fn: () => Promise<T>, attributes?: Record<string, unknown>): Promise<T>;
|
|
204
196
|
/**
|
|
205
197
|
* Adds a breadcrumb to the trail. The next error record carries the trail.
|
|
206
198
|
* @param message Description of the event.
|
|
@@ -208,16 +200,12 @@ export declare function timeAsync<T>(label: string, fn: () => Promise<T>, attrib
|
|
|
208
200
|
*/
|
|
209
201
|
export declare function addBreadcrumb(message: string, data?: Record<string, unknown>): void;
|
|
210
202
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
export declare function setContext(key: string, value: unknown): void;
|
|
216
|
-
/**
|
|
217
|
-
* Merges several key-value pairs into the ambient context.
|
|
218
|
-
* @param values Key-value map of attributes to add.
|
|
203
|
+
* Merges attributes into the ambient context. Every later record includes them. A null value
|
|
204
|
+
* removes its key, and an undefined value keeps the current value. A value that isn't an object
|
|
205
|
+
* reports `config.invalid` and changes nothing.
|
|
206
|
+
* @param values Attributes to merge.
|
|
219
207
|
*/
|
|
220
|
-
export declare function
|
|
208
|
+
export declare function setContext(values: Record<string, unknown>): void;
|
|
221
209
|
/**
|
|
222
210
|
* Removes an attribute from the ambient context.
|
|
223
211
|
* @param key Attribute key to delete.
|
|
@@ -243,9 +231,9 @@ export declare function endJourney(): void;
|
|
|
243
231
|
export declare function currentJourney(): Journey | null;
|
|
244
232
|
/**
|
|
245
233
|
* Serializes the active journey's metadata into a URL token that another context can adopt.
|
|
246
|
-
* @returns The token, or
|
|
234
|
+
* @returns The token, or null if no journey is active or the token is above the size limit.
|
|
247
235
|
*/
|
|
248
|
-
export declare function getJourneyToken(): string |
|
|
236
|
+
export declare function getJourneyToken(): string | null;
|
|
249
237
|
/**
|
|
250
238
|
* Adopts a serialized journey token in this application realm.
|
|
251
239
|
* @param token Serialized journey token.
|
|
@@ -266,30 +254,27 @@ export declare function registerWorker(worker: WorkerLike, options?: SourceOptio
|
|
|
266
254
|
* @returns Function that removes this registration.
|
|
267
255
|
*/
|
|
268
256
|
export declare function registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
|
|
269
|
-
/**
|
|
270
|
-
export declare function
|
|
257
|
+
/** Starts a new distributed trace. Later records and requests carry the new trace id. */
|
|
258
|
+
export declare function newTrace(): void;
|
|
271
259
|
/**
|
|
272
260
|
* Returns the W3C traceparent headers to put on an outgoing HTTP request.
|
|
273
261
|
* @returns Map of trace header names to values.
|
|
274
262
|
*/
|
|
275
263
|
export declare function getTraceHeaders(): Record<string, string>;
|
|
276
264
|
/**
|
|
277
|
-
* Builds any deferred calls and
|
|
278
|
-
*
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
* Reads this context's delivery state.
|
|
289
|
-
* @returns Promise that resolves to the records waiting, the records in requests, the batches
|
|
290
|
-
* in storage and the time of the last accepted send. A forwarder reports only its own buffers.
|
|
265
|
+
* Builds any deferred calls and the open metric interval, sends the records in memory, and
|
|
266
|
+
* waits until each one has a final state or the time limit passes. The snapshot is the records
|
|
267
|
+
* in memory at the call. A record logged later isn't in it. Before startup ends, the call waits
|
|
268
|
+
* for startup and the delivery stack first, and the snapshot then also holds the records logged
|
|
269
|
+
* during that wait. A forwarder hands its records to its sender and asks the sender to flush.
|
|
270
|
+
* At the limit the call returns, and the work goes on in the background. The stored batches
|
|
271
|
+
* from earlier failures and the replay segments are outside the snapshot. Before the first
|
|
272
|
+
* `configure()` call that works, during a pause and after `shutdown()`, it sends nothing and
|
|
273
|
+
* returns the status "inactive" at once.
|
|
274
|
+
* @param options How long to wait. `timeoutMs` is 0 to 600000 ms, and the default is 5000.
|
|
275
|
+
* @returns Promise that resolves to the counts of the snapshot's records. It never rejects.
|
|
291
276
|
*/
|
|
292
|
-
export declare function
|
|
277
|
+
export declare function flush(options?: FlushOptions): Promise<FlushResult>;
|
|
293
278
|
/**
|
|
294
279
|
* Starts a new correlation in this tab. Ends the active journey and starts a new trace. Other
|
|
295
280
|
* tabs pick up the new id at their next startup. For a logout or a tenant change, use
|
|
@@ -302,8 +287,14 @@ export declare function newSession(): void;
|
|
|
302
287
|
*/
|
|
303
288
|
export declare function getDiagnosticCounters(): Record<string, number>;
|
|
304
289
|
/**
|
|
305
|
-
*
|
|
306
|
-
*
|
|
290
|
+
* Stops every runtime subsystem. By default it flushes the records first, then runs the exit
|
|
291
|
+
* flush, and a request still open after that is cancelled with its stored batch kept. With
|
|
292
|
+
* `pending: "discard"` it sends nothing and reports each record in memory to `onDrop` with the
|
|
293
|
+
* reason "discarded". `clearStorage` also removes the stored batches and the stored ids, for a
|
|
294
|
+
* logout on a shared device. A call before any log call or `configure()` does nothing. A call
|
|
295
|
+
* after `shutdown()` stops nothing more, but its `clearStorage` still removes the stored data,
|
|
296
|
+
* once the first call ends. The next `configure()` starts a new runtime.
|
|
297
|
+
* @param options What to do with the records that wait, and which storage to remove.
|
|
307
298
|
* @returns Promise that resolves once shutdown is complete.
|
|
308
299
|
*/
|
|
309
|
-
export declare function shutdown(): Promise<void>;
|
|
300
|
+
export declare function shutdown(options?: ShutdownOptions): Promise<void>;
|