@utk09/ui-observability 0.11.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 +481 -0
- package/README.md +73 -669
- package/bin/uiobs.mjs +1 -1
- package/dist/{batch-CL9uWYY3.js → batch-CXmPmTse.js} +3 -3
- package/dist/batch-CXmPmTse.js.map +1 -0
- package/dist/{batch-C8OcWR2L.cjs → batch-mmPigCpi.cjs} +2 -2
- package/dist/batch-mmPigCpi.cjs.map +1 -0
- package/dist/bus/bus.d.cts +331 -0
- package/dist/bus/bus.d.ts +108 -57
- package/dist/bus/links.d.cts +132 -0
- package/dist/bus/links.d.ts +22 -7
- package/dist/bus/validation.d.cts +16 -0
- package/dist/bus/validation.d.ts +11 -2
- package/dist/bus-C39wspFV.js +775 -0
- 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 +11 -11
- package/dist/capture/errors.d.cts +32 -0
- package/dist/capture/errors.d.ts +7 -7
- package/dist/capture/interactions.d.cts +48 -0
- package/dist/capture/interactions.d.ts +15 -15
- package/dist/capture/lifecycle.d.cts +20 -0
- package/dist/capture/lifecycle.d.ts +4 -4
- package/dist/capture/long-frames.d.cts +31 -0
- package/dist/capture/long-frames.d.ts +7 -7
- package/dist/capture/network.d.cts +57 -0
- package/dist/capture/network.d.ts +18 -18
- package/dist/capture/profiler-frames.d.cts +44 -0
- package/dist/capture/profiler-frames.d.ts +44 -0
- package/dist/capture/replay-buffer.d.cts +45 -0
- package/dist/capture/replay-buffer.d.ts +45 -0
- package/dist/capture/replay-upload.d.cts +79 -0
- package/dist/capture/replay-upload.d.ts +79 -0
- package/dist/capture/replay.d.cts +114 -0
- package/dist/capture/replay.d.ts +114 -0
- package/dist/capture/reports.d.cts +17 -0
- package/dist/capture/reports.d.ts +3 -3
- package/dist/capture/resource-timing.d.cts +14 -0
- package/dist/capture/resource-timing.d.ts +2 -2
- package/dist/capture/server-timing.d.cts +19 -0
- package/dist/capture/server-timing.d.ts +3 -3
- package/dist/capture/storm.d.cts +13 -0
- package/dist/capture/storm.d.ts +7 -7
- package/dist/capture/types.d.cts +128 -0
- package/dist/capture/types.d.ts +54 -41
- package/dist/capture/unclean-exit.d.cts +31 -0
- package/dist/capture/unclean-exit.d.ts +9 -9
- package/dist/capture/user-timing.d.cts +22 -0
- package/dist/capture/user-timing.d.ts +4 -4
- package/dist/capture/web-socket.d.cts +40 -0
- package/dist/capture/web-socket.d.ts +14 -14
- package/dist/capture/web-vitals.d.cts +40 -0
- package/dist/capture/web-vitals.d.ts +21 -8
- package/dist/compression-CvED_Jel.cjs +2 -0
- package/dist/compression-CvED_Jel.cjs.map +1 -0
- package/dist/compression-tVtXwVjX.js +11 -0
- package/dist/compression-tVtXwVjX.js.map +1 -0
- 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 +231 -116
- package/dist/core/breadcrumbs.d.cts +54 -0
- package/dist/core/breadcrumbs.d.ts +21 -15
- package/dist/core/config.d.cts +45 -0
- package/dist/core/config.d.ts +33 -5
- package/dist/core/context.d.cts +24 -0
- package/dist/core/context.d.ts +8 -13
- package/dist/core/debug-buffer.d.cts +34 -0
- package/dist/core/debug-buffer.d.ts +13 -13
- package/dist/core/debug-bundle.d.cts +12 -0
- package/dist/core/debug-bundle.d.ts +6 -6
- package/dist/core/deferred.d.cts +7 -0
- package/dist/core/deferred.d.ts +4 -4
- package/dist/core/diagnostics.d.cts +86 -0
- package/dist/core/diagnostics.d.ts +25 -22
- package/dist/core/drops.d.cts +39 -0
- package/dist/core/drops.d.ts +22 -12
- 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 +28 -29
- package/dist/core/logger.d.cts +141 -0
- package/dist/core/logger.d.ts +45 -51
- package/dist/core/measure.d.cts +30 -0
- package/dist/core/measure.d.ts +21 -10
- package/dist/core/meter.d.cts +78 -0
- package/dist/core/meter.d.ts +38 -28
- package/dist/core/pipeline.d.cts +227 -0
- package/dist/core/pipeline.d.ts +114 -50
- package/dist/core/profile-buckets.d.cts +31 -0
- package/dist/core/profile-buckets.d.ts +31 -0
- package/dist/core/profiler.d.cts +218 -0
- package/dist/core/profiler.d.ts +218 -0
- package/dist/core/record.d.cts +190 -0
- package/dist/core/record.d.ts +67 -35
- package/dist/core/remote-rules.d.cts +17 -0
- package/dist/core/remote-rules.d.ts +7 -7
- package/dist/core/remote-sampling.d.cts +74 -0
- package/dist/core/remote-sampling.d.ts +24 -23
- 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 +430 -186
- package/dist/core/sampling.d.cts +86 -0
- package/dist/core/sampling.d.ts +22 -22
- package/dist/core/sender.d.cts +161 -0
- package/dist/core/sender.d.ts +80 -34
- package/dist/core/spans.d.cts +39 -0
- package/dist/core/spans.d.ts +6 -6
- package/dist/{deadline-BOjOxNHj.js → deadline-C4ccAuk5.js} +3 -6
- package/dist/deadline-C4ccAuk5.js.map +1 -0
- package/dist/deadline-CUGbto-y.cjs +2 -0
- package/dist/deadline-CUGbto-y.cjs.map +1 -0
- package/dist/debug-bundle-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 +19 -6
- package/dist/doctor.js +180 -53
- package/dist/doctor.js.map +1 -1
- package/dist/error-like-B11pB4aL.js.map +1 -1
- package/dist/error-like-gGRx2s36.cjs.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/fixed-window-CvESpFYV.cjs.map +1 -1
- package/dist/fixed-window-Dq3MLUUv.js.map +1 -1
- package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
- package/dist/global-scope-D9I8s-oN.js.map +1 -1
- package/dist/guards-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-DT5VmvXy.js → identity-DdhKgrpk.js} +11 -15
- 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 +165 -141
- package/dist/index.js +1283 -1468
- 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-BJVtiQKm.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-DTgKy_6K.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-CuJrHzEg.js → journey-D2_sia57.js} +51 -53
- package/dist/journey-D2_sia57.js.map +1 -0
- package/dist/{library-console-C1m6g1BR.js → library-console-Btrzt814.js} +2 -2
- package/dist/library-console-Btrzt814.js.map +1 -0
- package/dist/{library-console-D2GY9Or6.cjs → library-console-CPW6bvZH.cjs} +2 -2
- package/dist/library-console-CPW6bvZH.cjs.map +1 -0
- package/dist/{library-request-BQBT9N9Q.js → library-request-BJ9PLRaD.js} +2 -2
- package/dist/library-request-BJ9PLRaD.js.map +1 -0
- package/dist/{library-request-1BX_UlaX.cjs → library-request-D7OvTxZV.cjs} +2 -2
- package/dist/library-request-D7OvTxZV.cjs.map +1 -0
- package/dist/{lifecycle-BaKx_-32.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-CAoGBBf3.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-DNFaRnC3.js +62 -0
- package/dist/long-frames-DNFaRnC3.js.map +1 -0
- package/dist/models/batch.d.cts +57 -0
- package/dist/models/batch.d.ts +16 -17
- package/dist/models/bus.d.cts +158 -0
- package/dist/models/bus.d.ts +46 -26
- package/dist/models/config.d.cts +1540 -0
- package/dist/models/config.d.ts +692 -405
- package/dist/models/drop.d.cts +54 -0
- package/dist/models/drop.d.ts +29 -14
- package/dist/models/health.d.cts +148 -0
- package/dist/models/health.d.ts +119 -23
- package/dist/models/log-record.d.cts +61 -0
- package/dist/models/log-record.d.ts +13 -14
- package/dist/models/metric.d.cts +139 -0
- package/dist/models/metric.d.ts +94 -18
- package/dist/models/plugin.d.cts +47 -0
- package/dist/models/plugin.d.ts +16 -16
- package/dist/models/replay.d.cts +60 -0
- package/dist/models/replay.d.ts +60 -0
- package/dist/models/serializer.d.cts +23 -0
- package/dist/models/serializer.d.ts +3 -4
- package/dist/models/storage.d.cts +95 -0
- package/dist/models/storage.d.ts +17 -14
- package/dist/network-CGMLQ-mA.cjs +2 -0
- package/dist/network-CGMLQ-mA.cjs.map +1 -0
- package/dist/{network-DBNwApoF.js → network-on2zZT6H.js} +57 -57
- package/dist/network-on2zZT6H.js.map +1 -0
- package/dist/openfin-Bxelt0yg.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/otlp-BENHf3g9.cjs +2 -0
- package/dist/otlp-BENHf3g9.cjs.map +1 -0
- package/dist/{otlp-BTJdIa6F.js → otlp-DimfrRor.js} +22 -29
- package/dist/otlp-DimfrRor.js.map +1 -0
- package/dist/patch-BX8KrPCT.cjs.map +1 -1
- package/dist/patch-UdPz1ea8.js.map +1 -1
- package/dist/{platform-DkcuXwe-.js → platform-BaaFIPCU.js} +8 -8
- package/dist/platform-BaaFIPCU.js.map +1 -0
- package/dist/{platform-C2Ez5kDc.cjs → platform-CfA3-7sJ.cjs} +2 -2
- package/dist/platform-CfA3-7sJ.cjs.map +1 -0
- package/dist/profiler-BAZoh7A4.js +292 -0
- 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-cJMx9wNM.js +78 -0
- 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-TA-zInnq.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-BLv3EA2A.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-6ymPlVvP.js → sanitize-Ba0KqU06.js} +2 -2
- package/dist/sanitize-Ba0KqU06.js.map +1 -0
- package/dist/{sanitize-BAWzkZt0.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 +38 -37
- package/dist/storage/emergency-queue.d.cts +27 -0
- package/dist/storage/emergency-queue.d.ts +13 -13
- package/dist/storage/eviction.d.cts +40 -0
- package/dist/storage/eviction.d.ts +13 -13
- package/dist/storage/factory.d.cts +21 -0
- package/dist/storage/factory.d.ts +11 -10
- package/dist/storage/gap.d.cts +20 -0
- package/dist/storage/gap.d.ts +9 -9
- package/dist/storage/idb-driver.d.cts +93 -0
- package/dist/storage/idb-driver.d.ts +32 -33
- package/dist/storage/indexeddb-storage.d.cts +97 -0
- package/dist/storage/indexeddb-storage.d.ts +38 -31
- package/dist/storage/keys.d.cts +17 -0
- package/dist/storage/keys.d.ts +9 -9
- package/dist/storage/local-storage.d.cts +139 -0
- package/dist/storage/local-storage.d.ts +49 -42
- package/dist/storage/memory-storage.d.cts +73 -0
- package/dist/storage/memory-storage.d.ts +25 -25
- package/dist/storage/persistence.d.cts +8 -0
- package/dist/storage/persistence.d.ts +3 -3
- 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/compression.d.ts +2 -2
- 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/errors.d.ts +7 -7
- package/dist/transport/exit-flush.d.cts +135 -0
- package/dist/transport/exit-flush.d.ts +62 -45
- package/dist/transport/headers.d.cts +8 -0
- package/dist/transport/headers.d.ts +4 -4
- package/dist/transport/http-transport.d.cts +116 -0
- package/dist/transport/http-transport.d.ts +48 -35
- package/dist/transport/memory-transport.d.cts +30 -0
- package/dist/transport/memory-transport.d.ts +8 -8
- 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 +62 -43
- package/dist/transport/serializers/ecs.d.cts +3 -0
- package/dist/transport/serializers/ecs.d.ts +2 -2
- package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
- package/dist/transport/serializers/otlp-metrics.d.ts +2 -2
- package/dist/transport/serializers/otlp-traces.d.cts +3 -0
- package/dist/transport/serializers/otlp-traces.d.ts +2 -2
- package/dist/transport/serializers/otlp.d.cts +47 -0
- package/dist/transport/serializers/otlp.d.ts +18 -18
- package/dist/transport/serializers/select.d.cts +38 -0
- package/dist/transport/serializers/select.d.ts +11 -11
- package/dist/transport/status-transport.d.cts +129 -0
- package/dist/transport/status-transport.d.ts +45 -28
- 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 +7 -5
- 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-CwcUhFOn.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/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-_jZIhDKI.js → user-timing-BePqb1uN.js} +18 -18
- 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 +6 -6
- package/dist/utils/deadline.d.cts +14 -0
- package/dist/utils/deadline.d.ts +4 -4
- package/dist/utils/error-like.d.cts +25 -0
- package/dist/utils/error-like.d.ts +7 -7
- package/dist/utils/fixed-window.d.cts +25 -0
- package/dist/utils/fixed-window.d.ts +9 -8
- package/dist/utils/global-scope.d.cts +20 -0
- package/dist/utils/global-scope.d.ts +8 -8
- package/dist/utils/guards.d.cts +14 -0
- package/dist/utils/guards.d.ts +10 -2
- package/dist/utils/identity.d.cts +109 -0
- package/dist/utils/identity.d.ts +20 -21
- package/dist/utils/library-console.d.cts +11 -0
- package/dist/utils/library-console.d.ts +4 -4
- package/dist/utils/library-request.d.cts +24 -0
- package/dist/utils/library-request.d.ts +10 -10
- package/dist/utils/lock.d.cts +24 -0
- package/dist/utils/lock.d.ts +11 -10
- package/dist/utils/openfin.d.cts +48 -0
- package/dist/utils/openfin.d.ts +5 -5
- package/dist/utils/patch.d.cts +9 -0
- package/dist/utils/patch.d.ts +6 -6
- package/dist/utils/platform.d.cts +62 -0
- package/dist/utils/platform.d.ts +15 -13
- package/dist/utils/sanitize.d.cts +52 -0
- package/dist/utils/sanitize.d.ts +5 -5
- package/dist/utils/sequence.d.cts +10 -0
- package/dist/utils/tracing.d.cts +158 -0
- package/dist/utils/tracing.d.ts +49 -42
- package/dist/utils/unref.d.cts +9 -0
- package/dist/utils/unref.d.ts +3 -3
- package/dist/web-socket-CoIUBM3C.cjs +2 -0
- package/dist/web-socket-CoIUBM3C.cjs.map +1 -0
- package/dist/{web-socket-CV7yIMnm.js → web-socket-DSHgDiZ6.js} +23 -28
- package/dist/web-socket-DSHgDiZ6.js.map +1 -0
- package/dist/web-vitals-4pWACwaR.js +71 -0
- 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-CrsdSDLn.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 +55 -41
- package/dist/batch-C8OcWR2L.cjs.map +0 -1
- package/dist/batch-CL9uWYY3.js.map +0 -1
- package/dist/bus-BZ0GldpT.js +0 -660
- package/dist/bus-BZ0GldpT.js.map +0 -1
- package/dist/bus-VWlmM5xs.cjs +0 -2
- package/dist/bus-VWlmM5xs.cjs.map +0 -1
- package/dist/console-BPZCuSLc.cjs +0 -2
- package/dist/console-BPZCuSLc.cjs.map +0 -1
- package/dist/console-BeCF7n59.js +0 -82
- package/dist/console-BeCF7n59.js.map +0 -1
- package/dist/constants-DqKJH_MP.cjs +0 -2
- package/dist/constants-DqKJH_MP.cjs.map +0 -1
- package/dist/constants-zyrqveN4.js +0 -304
- package/dist/constants-zyrqveN4.js.map +0 -1
- package/dist/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/deadline-BOjOxNHj.js.map +0 -1
- package/dist/deadline-XSnm95pg.cjs +0 -2
- package/dist/deadline-XSnm95pg.cjs.map +0 -1
- package/dist/debug-bundle-BzJNpbF0.cjs +0 -2
- package/dist/debug-bundle-BzJNpbF0.cjs.map +0 -1
- package/dist/debug-bundle-C7UkHZ-q.js +0 -25
- package/dist/debug-bundle-C7UkHZ-q.js.map +0 -1
- package/dist/emergency-queue-CNTRui5t.cjs +0 -2
- package/dist/emergency-queue-CNTRui5t.cjs.map +0 -1
- package/dist/emergency-queue-Zy6lNafo.js +0 -67
- package/dist/emergency-queue-Zy6lNafo.js.map +0 -1
- package/dist/errors-Dh7kef0i.js +0 -92
- package/dist/errors-Dh7kef0i.js.map +0 -1
- package/dist/errors-tfEr48bS.cjs +0 -3
- package/dist/errors-tfEr48bS.cjs.map +0 -1
- package/dist/factory-BonqI3NL.js +0 -276
- package/dist/factory-BonqI3NL.js.map +0 -1
- package/dist/factory-CJXVYp0R.cjs +0 -2
- package/dist/factory-CJXVYp0R.cjs.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-Cxgj6pZX.cjs +0 -2
- package/dist/identity-Cxgj6pZX.cjs.map +0 -1
- package/dist/identity-DT5VmvXy.js.map +0 -1
- package/dist/indexeddb-storage-BJVtiQKm.js.map +0 -1
- package/dist/indexeddb-storage-CIoW21Xd.cjs +0 -2
- package/dist/indexeddb-storage-CIoW21Xd.cjs.map +0 -1
- package/dist/interactions-DTgKy_6K.js.map +0 -1
- package/dist/interactions-fEN6FbVo.cjs +0 -2
- package/dist/interactions-fEN6FbVo.cjs.map +0 -1
- package/dist/journey-CuJrHzEg.js.map +0 -1
- package/dist/journey-pffMVMfa.cjs +0 -2
- package/dist/journey-pffMVMfa.cjs.map +0 -1
- package/dist/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/library-console-C1m6g1BR.js.map +0 -1
- package/dist/library-console-D2GY9Or6.cjs.map +0 -1
- package/dist/library-request-1BX_UlaX.cjs.map +0 -1
- package/dist/library-request-BQBT9N9Q.js.map +0 -1
- package/dist/lifecycle-2EtUaRpo.cjs +0 -2
- package/dist/lifecycle-2EtUaRpo.cjs.map +0 -1
- package/dist/lifecycle-BaKx_-32.js.map +0 -1
- package/dist/log-record-CAoGBBf3.js.map +0 -1
- package/dist/log-record-i9zOTkpQ.cjs +0 -2
- package/dist/log-record-i9zOTkpQ.cjs.map +0 -1
- package/dist/long-frames-BVg4i5SC.cjs +0 -2
- package/dist/long-frames-BVg4i5SC.cjs.map +0 -1
- package/dist/long-frames-Czk7IupC.js +0 -64
- package/dist/long-frames-Czk7IupC.js.map +0 -1
- package/dist/models/stats.d.ts +0 -11
- package/dist/network-DBNwApoF.js.map +0 -1
- package/dist/network-xbbuvG_6.cjs +0 -2
- package/dist/network-xbbuvG_6.cjs.map +0 -1
- package/dist/otlp-BDvFrLnc.cjs +0 -2
- package/dist/otlp-BDvFrLnc.cjs.map +0 -1
- package/dist/otlp-BTJdIa6F.js.map +0 -1
- package/dist/platform-C2Ez5kDc.cjs.map +0 -1
- package/dist/platform-DkcuXwe-.js.map +0 -1
- package/dist/remote-rules-Cfb4K-Nl.js +0 -98
- package/dist/remote-rules-Cfb4K-Nl.js.map +0 -1
- package/dist/remote-rules-vzvk7aKf.cjs +0 -2
- package/dist/remote-rules-vzvk7aKf.cjs.map +0 -1
- package/dist/reports-Dk2YhKIh.cjs +0 -2
- package/dist/reports-Dk2YhKIh.cjs.map +0 -1
- package/dist/reports-TA-zInnq.js.map +0 -1
- package/dist/resource-timing-BLv3EA2A.js.map +0 -1
- package/dist/resource-timing-Cysw1S1f.cjs +0 -2
- package/dist/resource-timing-Cysw1S1f.cjs.map +0 -1
- package/dist/sampling-C4VV-1MS.js +0 -60
- package/dist/sampling-C4VV-1MS.js.map +0 -1
- package/dist/sampling-Ckh2yW9k.cjs +0 -2
- package/dist/sampling-Ckh2yW9k.cjs.map +0 -1
- package/dist/sanitize-6ymPlVvP.js.map +0 -1
- package/dist/sanitize-BAWzkZt0.cjs.map +0 -1
- package/dist/select-ZF4by-lF.cjs +0 -3
- package/dist/select-ZF4by-lF.cjs.map +0 -1
- package/dist/select-xtQaenIi.js +0 -270
- package/dist/select-xtQaenIi.js.map +0 -1
- package/dist/sender-CiMHC9YG.js +0 -856
- package/dist/sender-CiMHC9YG.js.map +0 -1
- package/dist/sender-D5wBoXA8.cjs +0 -2
- package/dist/sender-D5wBoXA8.cjs.map +0 -1
- package/dist/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-CYi9Swpx.cjs +0 -2
- package/dist/storm-CYi9Swpx.cjs.map +0 -1
- package/dist/storm-VR024_QN.js +0 -9
- package/dist/storm-VR024_QN.js.map +0 -1
- package/dist/unclean-exit-CwcUhFOn.js.map +0 -1
- package/dist/unclean-exit-DFUN57wY.cjs +0 -2
- package/dist/unclean-exit-DFUN57wY.cjs.map +0 -1
- package/dist/user-timing-C9kfRq3J.cjs +0 -2
- package/dist/user-timing-C9kfRq3J.cjs.map +0 -1
- package/dist/user-timing-_jZIhDKI.js.map +0 -1
- package/dist/utils/timer.d.ts +0 -19
- package/dist/web-socket-BWUoqBh8.cjs +0 -2
- package/dist/web-socket-BWUoqBh8.cjs.map +0 -1
- package/dist/web-socket-CV7yIMnm.js.map +0 -1
- package/dist/web-vitals-Bq4WFHQo.js +0 -52
- package/dist/web-vitals-Bq4WFHQo.js.map +0 -1
- package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
- package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
- package/dist/worker-protocol-Bai7GAIA.cjs +0 -2
- package/dist/worker-protocol-Bai7GAIA.cjs.map +0 -1
- package/dist/worker-protocol-CrsdSDLn.js.map +0 -1
- package/dist/worker-server-BrIYkfoa.cjs +0 -2
- package/dist/worker-server-BrIYkfoa.cjs.map +0 -1
- package/dist/worker-server-Dp5HYm4b.js +0 -83
- package/dist/worker-server-Dp5HYm4b.js.map +0 -1
- package/dist/worker-transport-Bwej4N2e.cjs +0 -2
- package/dist/worker-transport-Bwej4N2e.cjs.map +0 -1
- package/dist/worker-transport-D6jtgpqN.js +0 -199
- package/dist/worker-transport-D6jtgpqN.js.map +0 -1
package/dist/core/runtime.d.ts
CHANGED
|
@@ -1,68 +1,80 @@
|
|
|
1
|
-
import type { Receive, WorkerLike } from "../bus/links";
|
|
2
|
-
import type { BusMessage } from "../models/bus";
|
|
3
|
-
import type { FrameOptions, SourceOptions } from "../models/bus";
|
|
4
|
-
import type { ObservabilityConfig, ResolvedConfig, SecurityContextUpdate, SecurityContextRotationOptions } from "../models/config";
|
|
5
|
-
import type { InstrumentDef, Measure, MetricAttributes } from "../models/metric";
|
|
6
|
-
import { type LogRecord } from "../models/log-record";
|
|
7
|
-
import type {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { type
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { RecordBuilder } from "./record";
|
|
1
|
+
import type { Receive, WorkerLike } from "../bus/links.js";
|
|
2
|
+
import type { BusMessage } from "../models/bus.js";
|
|
3
|
+
import type { FrameOptions, SourceOptions } from "../models/bus.js";
|
|
4
|
+
import type { ObservabilityConfig, ResolvedConfig, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "../models/config.js";
|
|
5
|
+
import type { InstrumentDef, Measure, MetricAttributes } from "../models/metric.js";
|
|
6
|
+
import { type LogRecord } from "../models/log-record.js";
|
|
7
|
+
import type { DebugBundle, FlushResult, ObservabilityHealth } from "../models/health.js";
|
|
8
|
+
import { ConsoleSink } from "../utils/console.js";
|
|
9
|
+
import { type Identity } from "../utils/identity.js";
|
|
10
|
+
import { type PlatformMetadata } from "../utils/platform.js";
|
|
11
|
+
import { Sequence } from "../utils/sequence.js";
|
|
12
|
+
import { TraceEngine } from "../utils/tracing.js";
|
|
13
|
+
import { BreadcrumbBuffer } from "./breadcrumbs.js";
|
|
14
|
+
import { ContextStore } from "./context.js";
|
|
15
|
+
import { Diagnostics } from "./diagnostics.js";
|
|
16
|
+
import { JourneyEngine } from "./journey.js";
|
|
17
|
+
import { RecordBuilder } from "./record.js";
|
|
19
18
|
/** Manages subsystem lifecycles, bus coordination and record delivery. */
|
|
20
19
|
export declare class ObservabilityRuntime {
|
|
21
|
-
/** True while the
|
|
20
|
+
/** True while the security context is changing. */
|
|
22
21
|
private rotating;
|
|
23
|
-
/**
|
|
22
|
+
/** Number of the latest rotateSecurityContext() call, so a queued call keeps `rotating` up. */
|
|
23
|
+
private rotationSeq;
|
|
24
|
+
/**
|
|
25
|
+
* True while this runtime has the profiler core attached. Tracking it keeps configure() from
|
|
26
|
+
* restarting the sampling every time, and keeps a runtime with the profiler off from ever
|
|
27
|
+
* creating the core and its global symbol.
|
|
28
|
+
*/
|
|
29
|
+
private profilerOn;
|
|
30
|
+
/** True while the old context's last records are being collected. */
|
|
24
31
|
private closingContext;
|
|
25
32
|
/** Version of another SDK copy that owns the page runtime, or null. */
|
|
26
33
|
private mismatchVersion;
|
|
27
|
-
/** True if the configured context id differs from the owner context id. */
|
|
34
|
+
/** True if the configured context id differs from the owner's context id. */
|
|
28
35
|
private contextMismatch;
|
|
29
|
-
/**
|
|
36
|
+
/** The context change in progress. Shutdown waits for this promise. */
|
|
30
37
|
private rotation?;
|
|
31
38
|
/** Memory store kept for later context changes. */
|
|
32
39
|
private memoryStorage?;
|
|
33
|
-
/** State of the
|
|
40
|
+
/** State of the persistent storage request. getHealth() reports it. */
|
|
34
41
|
private storagePersistence;
|
|
35
|
-
/** True while a diagnostic record goes out.
|
|
42
|
+
/** True while a diagnostic record goes out. Diagnostics raised meanwhile produce no record. */
|
|
36
43
|
private recordingDiagnostic;
|
|
37
|
-
/** Logger
|
|
44
|
+
/** Logger for the records that diagnostics.records produces. */
|
|
38
45
|
private readonly diagnosticLogger;
|
|
39
|
-
/** Records that minLevel or sampling dropped. An error
|
|
46
|
+
/** Records that minLevel or sampling dropped. An error in this context sends them first. */
|
|
40
47
|
private readonly debugBuffer;
|
|
41
48
|
/** True if the app supplied a context id at startup. */
|
|
42
49
|
private explicitSecurityContext;
|
|
43
|
-
/** True
|
|
50
|
+
/** True once this forwarder has taken a context id from its owner. */
|
|
44
51
|
private ownerAdopted;
|
|
45
52
|
/**
|
|
46
|
-
* Checks
|
|
53
|
+
* Checks whether a security context change is in progress.
|
|
47
54
|
* @returns True until the current change completes.
|
|
48
55
|
*/
|
|
49
56
|
isRotating(): boolean;
|
|
50
57
|
/**
|
|
51
|
-
* Locks or unlocks configuration
|
|
52
|
-
*
|
|
58
|
+
* Locks or unlocks configuration when the app asks. Any other code on this origin can call
|
|
59
|
+
* this too, so the lock is not access control.
|
|
53
60
|
* @param locked True to refuse changes through configure().
|
|
54
61
|
*/
|
|
55
62
|
setConfigurationLocked(locked: boolean): void;
|
|
56
63
|
/**
|
|
57
|
-
*
|
|
64
|
+
* This copy's runtime when another version of the library owns the page runtime.
|
|
58
65
|
* It stays off the global key.
|
|
59
66
|
*/
|
|
60
67
|
private static local;
|
|
61
68
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
69
|
+
* This runtime's library version. Another copy reads it from the global key, because two
|
|
70
|
+
* versions sharing one runtime would call methods the other version doesn't have.
|
|
64
71
|
*/
|
|
65
72
|
readonly sdkVersion: string;
|
|
73
|
+
/**
|
|
74
|
+
* This runtime's bus protocol tag. A same-origin child frame reads it from the global key
|
|
75
|
+
* before it opens a direct link, because a direct call has no envelope to carry the tag.
|
|
76
|
+
*/
|
|
77
|
+
readonly protocol: string;
|
|
66
78
|
/** Diagnostics reporter for internal faults. */
|
|
67
79
|
readonly diagnostics: Diagnostics;
|
|
68
80
|
/** Active configuration instance. A reconfigure changes it in place. */
|
|
@@ -71,12 +83,14 @@ export declare class ObservabilityRuntime {
|
|
|
71
83
|
readonly platform: PlatformMetadata;
|
|
72
84
|
/** Identity context containing session, tab, and context identifiers. */
|
|
73
85
|
readonly identity: Identity;
|
|
74
|
-
/**
|
|
86
|
+
/** Where the ids and the journey live. Memory until the start, so nothing touches storage. */
|
|
87
|
+
private backing;
|
|
88
|
+
/** Stores for identity and journey keys. They read the backing on every call. */
|
|
75
89
|
private readonly stores;
|
|
76
|
-
/**
|
|
77
|
-
private
|
|
78
|
-
/** Throttled writer of the session's last-seen timestamp. */
|
|
79
|
-
private
|
|
90
|
+
/** The identity strategy that the start uses. The app's startup call fixes it. */
|
|
91
|
+
private identityBuiltAs;
|
|
92
|
+
/** Throttled writer of the session's last-seen timestamp. The start builds it again. */
|
|
93
|
+
private sessionTouch;
|
|
80
94
|
/** Store for ambient application context attributes. */
|
|
81
95
|
readonly context: ContextStore;
|
|
82
96
|
/** Ring buffer holding contextual user breadcrumbs. */
|
|
@@ -89,14 +103,25 @@ export declare class ObservabilityRuntime {
|
|
|
89
103
|
readonly journey: JourneyEngine;
|
|
90
104
|
/** Record builder assembling structured log records. */
|
|
91
105
|
readonly builder: RecordBuilder;
|
|
92
|
-
/** Slot
|
|
106
|
+
/** Slot for the remote sampling rules. The sender or the bus fills it. */
|
|
93
107
|
private readonly remote;
|
|
94
|
-
/**
|
|
108
|
+
/** Number of delivery identity changes. A context's first id doesn't count as a change. */
|
|
95
109
|
private identityEpoch;
|
|
96
|
-
/**
|
|
110
|
+
/** Session replay's hook. It gets every ERROR and FATAL record. */
|
|
111
|
+
private errorHook;
|
|
112
|
+
/**
|
|
113
|
+
* True after startReplay(), false after stopReplay(), undefined until either is called. The
|
|
114
|
+
* app's last choice survives a reinstall of the capture modules.
|
|
115
|
+
*/
|
|
116
|
+
private replayConsent;
|
|
117
|
+
/** The installed session replay capture. */
|
|
118
|
+
private replay;
|
|
119
|
+
/** Timer that restores the local capture switches once the remote TTL ends. */
|
|
97
120
|
private remoteCaptureTimer;
|
|
98
121
|
/** Settings of the current capture load or install. */
|
|
99
122
|
private installedCaptureKey;
|
|
123
|
+
/** The replay settings the running replay capture was built with. */
|
|
124
|
+
private replayBuiltKey;
|
|
100
125
|
/** Console sink for local developer output. */
|
|
101
126
|
readonly console: ConsoleSink;
|
|
102
127
|
/** Collects lost records into onDrop summaries. */
|
|
@@ -104,60 +129,100 @@ export declare class ObservabilityRuntime {
|
|
|
104
129
|
/** Sums the values of the counter and histogram instruments. */
|
|
105
130
|
private readonly meter;
|
|
106
131
|
/**
|
|
107
|
-
* Cross-realm communication bus.
|
|
108
|
-
*
|
|
132
|
+
* Cross-realm communication bus. Null until its chunk loads. In bus.mode "off", it loads
|
|
133
|
+
* only when a child frame or a worker needs it.
|
|
109
134
|
*/
|
|
110
135
|
private bus;
|
|
111
|
-
/**
|
|
136
|
+
/** Promise for the bus load and construction. Undefined until first needed. */
|
|
112
137
|
private busBuilt?;
|
|
113
|
-
/**
|
|
138
|
+
/** Promise for the bus load and start. Undefined until first needed. */
|
|
114
139
|
private busLoad?;
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Delivery stack. Set in the sender role with an endpoint or a custom transport, once the
|
|
142
|
+
* chunk has loaded.
|
|
143
|
+
*/
|
|
118
144
|
private sender?;
|
|
119
|
-
/**
|
|
145
|
+
/** The delivery stack load. Undefined when nothing loads, so records have no destination. */
|
|
120
146
|
private senderLoad?;
|
|
121
|
-
/** Records that arrive while the delivery stack loads. */
|
|
147
|
+
/** Records that arrive while the delivery stack loads, or while a pause holds them. */
|
|
122
148
|
private readonly pendingRecords;
|
|
149
|
+
/** Records that dropPaused() reported, so a second pagehide doesn't count them again. */
|
|
150
|
+
private readonly pausedLoss;
|
|
151
|
+
/** Stored batches that a carry during a pause left for the next sender to adopt. */
|
|
152
|
+
private carried;
|
|
153
|
+
/** True once resetSession() ran. start() then keeps that session over the stored one. */
|
|
154
|
+
private sessionPicked;
|
|
155
|
+
/**
|
|
156
|
+
* True after a rotation fails. The app asked to leave the context, so the runtime sends no
|
|
157
|
+
* record with its endpoint or headers until a rotation succeeds.
|
|
158
|
+
*/
|
|
159
|
+
private deliveryClosed;
|
|
160
|
+
/**
|
|
161
|
+
* The stopped sender of the context that a failed rotation closed. The next rotation that
|
|
162
|
+
* succeeds retires it with its own rule, so the old records don't stay or move by accident.
|
|
163
|
+
*/
|
|
164
|
+
private parkedSender;
|
|
165
|
+
/** The sender that a rotation retires. Its records wait for the rotation's rule. */
|
|
166
|
+
private retiring;
|
|
167
|
+
/**
|
|
168
|
+
* True after the first configure() call failed. The runtime stays unconfigured and refuses
|
|
169
|
+
* each record, because it can't know what the app needs to redact.
|
|
170
|
+
*/
|
|
171
|
+
private startFailed;
|
|
172
|
+
/**
|
|
173
|
+
* True once the runtime has started: the first configure() call that works, with enabled true.
|
|
174
|
+
* Before that, nothing is patched, stored or sent.
|
|
175
|
+
*/
|
|
176
|
+
private running;
|
|
177
|
+
/** Opens the start gate below. Its promise sets it, and start() calls it. */
|
|
178
|
+
private openGate;
|
|
179
|
+
/** Resolves at the start. A frame or worker that registers before it joins the bus then. */
|
|
180
|
+
private readonly startGate;
|
|
123
181
|
/** Active auto-capture instrumentation modules. */
|
|
124
182
|
private readonly captures;
|
|
125
|
-
/**
|
|
183
|
+
/** Number of capture installs. An install replaced by a later one stops after its load. */
|
|
126
184
|
private captureGeneration;
|
|
127
|
-
/** Capture work that
|
|
185
|
+
/** Capture work that rebuilding the capture modules must not repeat. */
|
|
128
186
|
private readonly captureOnce;
|
|
129
|
-
/**
|
|
187
|
+
/** Holds records created before the bus role is resolved. */
|
|
130
188
|
private readonly bootBuffer;
|
|
131
|
-
/**
|
|
189
|
+
/** Records staged for forwarding on the next microtask. */
|
|
132
190
|
private forwardBuffer;
|
|
133
191
|
/** True if a microtask drain of the forward buffer is pending. */
|
|
134
192
|
private forwardScheduled;
|
|
135
|
-
/** True
|
|
193
|
+
/** True once startup has decided the bus role. A sender load waits for it. */
|
|
136
194
|
private roleResolved;
|
|
137
|
-
/** Resolves when startup releases the boot records.
|
|
195
|
+
/** Resolves when startup releases the boot records. Set by init(), awaited by flush(). */
|
|
138
196
|
private started;
|
|
139
197
|
/** True if asynchronous initialization is complete. */
|
|
140
198
|
private ready;
|
|
141
199
|
/** True if shutdown stopped the runtime. */
|
|
142
200
|
private destroyed;
|
|
143
|
-
/**
|
|
201
|
+
/** The first shutdown. A later shutdown() waits for it before it removes the stored data. */
|
|
202
|
+
private stopping?;
|
|
203
|
+
/** When the server last accepted a batch, in epoch milliseconds. A rotation keeps it. */
|
|
204
|
+
private lastSendAt;
|
|
205
|
+
/** When the last storage gap warning was reported, in epoch milliseconds. */
|
|
144
206
|
private lastGapAt;
|
|
145
|
-
/** Record limits
|
|
207
|
+
/** Record limits for the builder and the console. The app's first configure() sets them. */
|
|
146
208
|
private readonly limits;
|
|
147
|
-
/** Lifetime rules
|
|
209
|
+
/** Lifetime rules for the journey engine. The app's first configure() sets the age. */
|
|
148
210
|
private readonly journeyOptions;
|
|
149
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* False until the app's startup call, the first configure() call that works. That call sets
|
|
213
|
+
* every startup-fixed setting, also after an early log call.
|
|
214
|
+
*/
|
|
150
215
|
private tunablesLocked;
|
|
151
216
|
/**
|
|
152
|
-
* True for a console-only runtime
|
|
153
|
-
*
|
|
217
|
+
* True for a console-only runtime, which sends nothing, joins no bus and installs no capture.
|
|
218
|
+
* That happens next to another version of the library on the page, or on a server.
|
|
154
219
|
*/
|
|
155
220
|
private readonly degraded;
|
|
156
|
-
/** True
|
|
221
|
+
/** True once a destination on a server has been reported. It is reported only once. */
|
|
157
222
|
private serverReported;
|
|
158
223
|
/**
|
|
159
|
-
* Ends
|
|
160
|
-
*
|
|
224
|
+
* Ends a forwarder's root span when its document unloads. The exit flush only ends it in the
|
|
225
|
+
* sender, so without this the client spans of a frame or a view have no parent.
|
|
161
226
|
*/
|
|
162
227
|
private readonly onPageHide;
|
|
163
228
|
/**
|
|
@@ -166,100 +231,139 @@ export declare class ObservabilityRuntime {
|
|
|
166
231
|
*/
|
|
167
232
|
private constructor();
|
|
168
233
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* @returns The handler, or undefined
|
|
234
|
+
* Returns the diagnostics handler. With diagnostics.records, it also sends every event as
|
|
235
|
+
* a record.
|
|
236
|
+
* @returns The handler, or undefined with no onDiagnostic and no diagnostic records.
|
|
172
237
|
*/
|
|
173
238
|
private diagnosticHandler;
|
|
174
239
|
/**
|
|
175
240
|
* Sends a diagnostic event as a record when diagnostics.records selects its code.
|
|
176
|
-
* A diagnostic during that send
|
|
241
|
+
* A diagnostic raised during that send produces no record, which stops a loop.
|
|
177
242
|
* @param event Diagnostic event.
|
|
178
243
|
*/
|
|
179
244
|
private recordDiagnostic;
|
|
180
245
|
/**
|
|
181
|
-
* Adds a breadcrumb from app code.
|
|
182
|
-
*
|
|
183
|
-
* @param message Description of the event. A JavaScript caller can pass a
|
|
184
|
-
*
|
|
246
|
+
* Adds a breadcrumb from app code. The data is copied now, so a later change to the app's
|
|
247
|
+
* object doesn't change the trail.
|
|
248
|
+
* @param message Description of the event. A JavaScript caller can pass a non-string, which
|
|
249
|
+
* is converted.
|
|
185
250
|
* @param data Optional metadata.
|
|
186
251
|
*/
|
|
187
252
|
addBreadcrumb(message: unknown, data?: Record<string, unknown>): void;
|
|
188
253
|
/**
|
|
189
|
-
* Adds a value to a counter or a histogram. The meter sends one point
|
|
190
|
-
* @param def
|
|
254
|
+
* Adds a value to a counter or a histogram. The meter sends one point per interval.
|
|
255
|
+
* @param def The instrument's definition.
|
|
191
256
|
* @param value Value to add.
|
|
192
|
-
* @param attributes
|
|
257
|
+
* @param attributes The value's attribute set.
|
|
193
258
|
*/
|
|
194
259
|
recordMetric(def: InstrumentDef, value: number, attributes?: MetricAttributes): void;
|
|
195
260
|
/**
|
|
196
|
-
* Starts a timed operation.
|
|
261
|
+
* Starts a timed operation. Its values are dropped if the runtime has shut down or a rotation
|
|
262
|
+
* is running when it ends. With `securityContext.isolation`, a new delivery identity before
|
|
263
|
+
* the end drops them too.
|
|
197
264
|
* @param name Operation name.
|
|
198
|
-
* @param attributes Attribute set
|
|
199
|
-
* @returns The handle
|
|
265
|
+
* @param attributes Attribute set for every histogram point.
|
|
266
|
+
* @returns The operation's handle.
|
|
200
267
|
*/
|
|
201
268
|
startMeasure(name: string, attributes?: MetricAttributes): Measure;
|
|
202
269
|
/**
|
|
203
|
-
* Builds and emits the record
|
|
204
|
-
* drop it. The trace engine sampled the trace before the span existed.
|
|
270
|
+
* Builds and emits the record for one span. The console doesn't print it and minLevel
|
|
271
|
+
* doesn't drop it. The trace engine already sampled the trace before the span existed.
|
|
205
272
|
* @param span The span data.
|
|
206
273
|
*/
|
|
207
274
|
private recordSpan;
|
|
208
275
|
/**
|
|
209
|
-
* Builds and emits the record
|
|
276
|
+
* Builds and emits the record for one aggregated point. The console doesn't print it.
|
|
210
277
|
* @param name Metric name.
|
|
211
|
-
* @param attributes
|
|
212
|
-
* @param fields
|
|
278
|
+
* @param attributes The call's attributes. The record limits apply to them.
|
|
279
|
+
* @param fields The point's metric fields. The record limits don't truncate them.
|
|
213
280
|
*/
|
|
214
281
|
private emitPoint;
|
|
282
|
+
/**
|
|
283
|
+
* Turns the profiler on or off to match profiler.enabled. Before switching off it sends the
|
|
284
|
+
* points that are waiting, because the switch would otherwise drop them.
|
|
285
|
+
*/
|
|
286
|
+
private syncProfiler;
|
|
287
|
+
/**
|
|
288
|
+
* Gives or withdraws consent for session replay, and starts or stops the recorder if the
|
|
289
|
+
* capture is installed.
|
|
290
|
+
* @param consent True starts the recorder, false stops it.
|
|
291
|
+
*/
|
|
292
|
+
setReplay(consent: boolean): void;
|
|
293
|
+
/**
|
|
294
|
+
* Sends the open interval of the meter and the profiler. The profiler doesn't calibrate here,
|
|
295
|
+
* which keeps flush and the exit path short and synchronous.
|
|
296
|
+
*/
|
|
297
|
+
private collectPoints;
|
|
298
|
+
/**
|
|
299
|
+
* Starts a new identity epoch. With isolation on, the profiler also drops its data and open
|
|
300
|
+
* spans, so a span from the old identity can't add to the new one. The old identity's remote
|
|
301
|
+
* rules and capture switches don't apply to the new one.
|
|
302
|
+
*/
|
|
303
|
+
private advanceIdentity;
|
|
215
304
|
/**
|
|
216
305
|
* Checks the source policy before a direct child link opens.
|
|
217
306
|
* @param source Child window.
|
|
218
|
-
* @param origin
|
|
219
|
-
* @returns True if the bus
|
|
307
|
+
* @param origin The child window's origin.
|
|
308
|
+
* @returns True if the bus allows this source.
|
|
220
309
|
*/
|
|
221
310
|
readonly busCanAccept: (source: Window, origin: string) => boolean;
|
|
222
311
|
/**
|
|
223
312
|
* Receives direct messages from same-origin child frames.
|
|
224
313
|
* @param message Inbound bus message.
|
|
225
314
|
* @param reply Direct response callback.
|
|
226
|
-
* @param source
|
|
315
|
+
* @param source The child frame's window.
|
|
227
316
|
*/
|
|
228
317
|
readonly busAccept: (message: BusMessage, reply: Receive, source?: Window) => void;
|
|
229
318
|
/**
|
|
230
|
-
* Returns the runtime on
|
|
319
|
+
* Returns the runtime on this realm's global key. Another copy of the library can own it.
|
|
231
320
|
* @returns Pinned runtime instance or null.
|
|
232
321
|
*/
|
|
233
322
|
private static pinned;
|
|
234
323
|
/**
|
|
235
|
-
* Returns
|
|
236
|
-
*
|
|
324
|
+
* Returns this copy's local runtime, or the pinned runtime if there is none. A pinned
|
|
325
|
+
* runtime from another version returns null, and a log call then starts the local runtime.
|
|
237
326
|
* @returns Active runtime instance or null.
|
|
238
327
|
*/
|
|
239
328
|
static current(): ObservabilityRuntime | null;
|
|
240
329
|
/**
|
|
241
330
|
* Returns the runtime that shutdown() stopped, until the next configure().
|
|
242
|
-
* A stopped runtime
|
|
331
|
+
* A stopped runtime from another version returns null.
|
|
243
332
|
* @returns Stopped runtime instance or null.
|
|
244
333
|
*/
|
|
245
334
|
static stopped(): ObservabilityRuntime | null;
|
|
246
335
|
/**
|
|
247
|
-
*
|
|
248
|
-
* @returns True
|
|
336
|
+
* Checks whether shutdown() stopped this runtime.
|
|
337
|
+
* @returns True once destroy() starts.
|
|
249
338
|
*/
|
|
250
339
|
isDestroyed(): boolean;
|
|
251
340
|
/**
|
|
252
341
|
* Initializes a new runtime instance or updates the existing singleton.
|
|
253
342
|
* @param input Consumer configuration options.
|
|
254
|
-
* @param implicit True for the
|
|
343
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
255
344
|
* @returns Active runtime instance.
|
|
256
345
|
*/
|
|
257
346
|
static configure(input: Partial<ObservabilityConfig>, implicit?: boolean): ObservabilityRuntime;
|
|
258
347
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
348
|
+
* Fails closed after the app's first configure() call couldn't be read. The library can't
|
|
349
|
+
* tell what the app must redact, so it refuses each record, the held ones too, until a call
|
|
350
|
+
* sets redact itself. The runtime stays unconfigured, so it writes no id to storage.
|
|
351
|
+
* @param error What reading the options threw.
|
|
352
|
+
*/
|
|
353
|
+
private refuse;
|
|
354
|
+
/**
|
|
355
|
+
* Starts a runtime, or updates the one that runs. A getter in the input can throw here.
|
|
261
356
|
* @param input Consumer configuration options.
|
|
262
|
-
* @param
|
|
357
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
358
|
+
* @returns Active runtime instance.
|
|
359
|
+
*/
|
|
360
|
+
private static startOrUpdate;
|
|
361
|
+
/**
|
|
362
|
+
* Starts a console-only runtime next to another version's runtime. It sends nothing, joins
|
|
363
|
+
* no bus and installs no capture. The other version keeps the page runtime.
|
|
364
|
+
* @param input Consumer configuration options.
|
|
365
|
+
* @param found The pinned runtime's sdkVersion. A runtime older than 0.9.0 has none.
|
|
366
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
263
367
|
* @returns The local runtime.
|
|
264
368
|
*/
|
|
265
369
|
private static startDegraded;
|
|
@@ -269,73 +373,86 @@ export declare class ObservabilityRuntime {
|
|
|
269
373
|
*/
|
|
270
374
|
private reconfigure;
|
|
271
375
|
/**
|
|
272
|
-
*
|
|
376
|
+
* Checks whether the runtime is on a server, for example Node during server-side rendering.
|
|
273
377
|
* @returns True on Node.
|
|
274
378
|
*/
|
|
275
379
|
private onServer;
|
|
276
380
|
/**
|
|
277
|
-
* Removes the
|
|
278
|
-
* reports a destination
|
|
381
|
+
* Removes the routing settings from a console-only runtime's input. On a server, it
|
|
382
|
+
* reports a destination once.
|
|
279
383
|
* @param input Consumer configuration options.
|
|
280
|
-
* @returns The options
|
|
384
|
+
* @returns The options the runtime accepts.
|
|
281
385
|
*/
|
|
282
386
|
private allowed;
|
|
283
387
|
/**
|
|
284
|
-
* Removes
|
|
388
|
+
* Removes routing and identity changes while isolation is on. The other settings still apply.
|
|
285
389
|
* @param input Consumer configuration options.
|
|
286
|
-
* @returns The options without the refused
|
|
390
|
+
* @returns The options without the refused routing or identity changes.
|
|
287
391
|
*/
|
|
288
392
|
private keepRouting;
|
|
289
393
|
/**
|
|
290
|
-
* Restores the startup tunables in the next config.
|
|
291
|
-
*
|
|
292
|
-
* @param next
|
|
394
|
+
* Restores the startup tunables in the next config. Each tunable is read once by some part
|
|
395
|
+
* of the runtime, so a later change would have no effect and is refused.
|
|
396
|
+
* @param next The resolved config from a later configure() call.
|
|
293
397
|
*/
|
|
294
398
|
private keepStartupTunables;
|
|
295
399
|
/**
|
|
296
|
-
* Refuses a change
|
|
297
|
-
* @param next
|
|
298
|
-
* @param sections Sections that
|
|
400
|
+
* Refuses a change to config sections by restoring the current values in the next config.
|
|
401
|
+
* @param next The resolved config from a later configure() call.
|
|
402
|
+
* @param sections Sections that can't change.
|
|
299
403
|
*/
|
|
300
404
|
private keepSections;
|
|
301
|
-
/**
|
|
302
|
-
* Restores the storage strategy of the built adapter. The runtime reads all other keys
|
|
303
|
-
* live. It builds the adapter only one time. A new adapter strands the batches in the
|
|
304
|
-
* old adapter. That loss is worse than a refused change.
|
|
305
|
-
*/
|
|
306
|
-
private keepBuiltStorage;
|
|
307
405
|
/**
|
|
308
406
|
* Refuses a change that leaves the built delivery stack with no destination.
|
|
309
|
-
* Without
|
|
407
|
+
* Without one, the retry engine removes every stored batch as if it were delivered.
|
|
310
408
|
* @param input Partial configuration to merge.
|
|
311
409
|
* @returns Input without the refused changes.
|
|
312
410
|
*/
|
|
313
411
|
private keepDestination;
|
|
314
412
|
/**
|
|
315
|
-
* Restores the identity strategy from startup. The ids
|
|
316
|
-
*
|
|
413
|
+
* Restores the identity strategy from startup. The ids have existed since startup, and a
|
|
414
|
+
* later change can't move them to another store.
|
|
317
415
|
*/
|
|
318
416
|
private keepBuiltIdentity;
|
|
417
|
+
/**
|
|
418
|
+
* Fixes the startup settings at the first configure() call that works, then starts the
|
|
419
|
+
* runtime once enabled is true. A failed first call leaves the runtime unconfigured.
|
|
420
|
+
*/
|
|
421
|
+
private launch;
|
|
422
|
+
/**
|
|
423
|
+
* Starts the runtime: reads the configured ids, gives the held records the app's hooks and
|
|
424
|
+
* resource, then installs the captures and starts the bus and the sender. Runs once.
|
|
425
|
+
*/
|
|
426
|
+
private start;
|
|
427
|
+
/**
|
|
428
|
+
* Takes the records that log calls held before the app's startup call, and runs the app's
|
|
429
|
+
* hooks on them now.
|
|
430
|
+
* @returns The records the hooks kept, with the configured resource.
|
|
431
|
+
*/
|
|
432
|
+
private rehookHeld;
|
|
319
433
|
/** Initializes asynchronous subsystems and flushes the boot buffer. */
|
|
320
434
|
private init;
|
|
321
|
-
/**
|
|
435
|
+
/**
|
|
436
|
+
* Resolves the bus role, loads the delivery stack and releases the boot records.
|
|
437
|
+
* Never rejects.
|
|
438
|
+
*/
|
|
322
439
|
private boot;
|
|
323
440
|
/**
|
|
324
|
-
* Starts the
|
|
325
|
-
* @returns Promise that resolves to the started bus, or null if it
|
|
441
|
+
* Starts the bus load once.
|
|
442
|
+
* @returns Promise that resolves to the started bus, or null if it didn't load.
|
|
326
443
|
*/
|
|
327
444
|
private ensureBus;
|
|
328
445
|
/**
|
|
329
|
-
* Loads and constructs the bus
|
|
330
|
-
* @returns Promise that resolves to the constructed bus, or null if it
|
|
446
|
+
* Loads and constructs the bus once. Does not call start().
|
|
447
|
+
* @returns Promise that resolves to the constructed bus, or null if it didn't load.
|
|
331
448
|
*/
|
|
332
449
|
private constructBus;
|
|
333
450
|
/**
|
|
334
|
-
* Starts the constructed bus.
|
|
335
|
-
* @returns Promise that resolves to the started bus, or null if it
|
|
451
|
+
* Starts the constructed bus. Never rejects.
|
|
452
|
+
* @returns Promise that resolves to the started bus, or null if it didn't load or start.
|
|
336
453
|
*/
|
|
337
454
|
private startBus;
|
|
338
|
-
/** Imports and constructs the bus.
|
|
455
|
+
/** Imports and constructs the bus. Never rejects. */
|
|
339
456
|
private buildBus;
|
|
340
457
|
/**
|
|
341
458
|
* Reads the bus role. Without a bus, this context is the sender.
|
|
@@ -343,43 +460,71 @@ export declare class ObservabilityRuntime {
|
|
|
343
460
|
*/
|
|
344
461
|
private role;
|
|
345
462
|
/**
|
|
346
|
-
* Loads the delivery stack if this context is the sender and has an
|
|
463
|
+
* Loads the delivery stack if this context is the sender and has a destination, that is an
|
|
464
|
+
* endpoint or a custom transport.
|
|
347
465
|
* @returns Promise that resolves when the load completes, or immediately when nothing loads.
|
|
348
466
|
*/
|
|
349
467
|
private syncSender;
|
|
350
468
|
/**
|
|
351
|
-
*
|
|
352
|
-
* @returns True
|
|
469
|
+
* Checks whether the config names a destination for the records.
|
|
470
|
+
* @returns True if it has an endpoint or a custom transport.
|
|
353
471
|
*/
|
|
354
472
|
private hasDestination;
|
|
355
473
|
/**
|
|
356
|
-
* Starts the
|
|
474
|
+
* Starts the delivery stack load once.
|
|
357
475
|
* @returns Promise that resolves when the load completes or fails.
|
|
358
476
|
*/
|
|
359
477
|
private loadSender;
|
|
360
|
-
/**
|
|
478
|
+
/**
|
|
479
|
+
* Imports and builds the delivery stack, then moves the held records into it.
|
|
480
|
+
* Never rejects.
|
|
481
|
+
*/
|
|
361
482
|
private buildSender;
|
|
483
|
+
/**
|
|
484
|
+
* Stores an earlier context's batches under this context.
|
|
485
|
+
* @param sender The sender that adopts them.
|
|
486
|
+
* @param stored The earlier context's stored batches.
|
|
487
|
+
*/
|
|
488
|
+
private adoptStored;
|
|
362
489
|
/** Refreshes temporary switches and restores local settings when their TTL ends. */
|
|
363
490
|
private refreshCaptures;
|
|
491
|
+
/**
|
|
492
|
+
* Serializes the current capture settings and profiler observers into one string. When the
|
|
493
|
+
* string changes, the captures are reinstalled.
|
|
494
|
+
* @param settings Current capture settings.
|
|
495
|
+
* @returns The string.
|
|
496
|
+
*/
|
|
497
|
+
private captureState;
|
|
498
|
+
/**
|
|
499
|
+
* Serializes what the replay recorder reads when it starts. The replay capture has its own
|
|
500
|
+
* key because a restart drops the buffer, so an unrelated capture change must not cause one.
|
|
501
|
+
* The other replay values are read on use and apply without a restart.
|
|
502
|
+
* @param settings Current capture settings.
|
|
503
|
+
* @returns The string. Empty while replay is off, so a replay change then installs nothing.
|
|
504
|
+
*/
|
|
505
|
+
private replayState;
|
|
364
506
|
/** Returns local capture settings with the permitted remote switches. */
|
|
365
507
|
private effectiveCapture;
|
|
366
|
-
/** Loads, builds and installs the enabled capture modules.
|
|
508
|
+
/** Loads, builds and installs the enabled capture modules. Never rejects. */
|
|
367
509
|
private installCaptures;
|
|
368
|
-
/**
|
|
510
|
+
/**
|
|
511
|
+
* Uninstalls the active capture modules.
|
|
512
|
+
* @param kept A replay capture that stays installed, if there is one.
|
|
513
|
+
*/
|
|
369
514
|
private uninstallCaptures;
|
|
370
515
|
/**
|
|
371
|
-
* Imports the WebSocket capture plugin. A failed import
|
|
516
|
+
* Imports the WebSocket capture plugin. A failed import is reported and skipped.
|
|
372
517
|
* @returns Promise that resolves to the class, or undefined if the import failed.
|
|
373
518
|
*/
|
|
374
519
|
private loadWebSocket;
|
|
375
520
|
/**
|
|
376
|
-
* Wraps a plugin as a capture module. The plugin gets public tools
|
|
377
|
-
* @param plugin
|
|
521
|
+
* Wraps a plugin as a capture module. The plugin only gets public tools.
|
|
522
|
+
* @param plugin The app's plugin, or a built-in one.
|
|
378
523
|
* @returns The capture module.
|
|
379
524
|
*/
|
|
380
525
|
private pluginCapture;
|
|
381
526
|
/**
|
|
382
|
-
* Imports one capture module. A failed import
|
|
527
|
+
* Imports one capture module. A failed import is reported and skips only that module.
|
|
383
528
|
* @param name Capture module name.
|
|
384
529
|
* @returns Promise that resolves to the class, or undefined if the import failed.
|
|
385
530
|
*/
|
|
@@ -396,16 +541,45 @@ export declare class ObservabilityRuntime {
|
|
|
396
541
|
* @returns Function that removes this registration.
|
|
397
542
|
*/
|
|
398
543
|
registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
|
|
399
|
-
/**
|
|
400
|
-
|
|
544
|
+
/**
|
|
545
|
+
* Stops every subsystem and unpins the runtime. By default it flushes the records first. A
|
|
546
|
+
* discard sends nothing, and a clearStorage scope also removes the stored batches and ids. A
|
|
547
|
+
* later call stops nothing more, but its clearStorage scope still applies.
|
|
548
|
+
* @param options What to do with the records that wait, and which storage to remove.
|
|
549
|
+
*/
|
|
550
|
+
destroy(options?: ShutdownOptions): Promise<void>;
|
|
551
|
+
/**
|
|
552
|
+
* Stops every subsystem once, then unpins the runtime.
|
|
553
|
+
* @param discard True to send nothing and report the records in memory as discarded.
|
|
554
|
+
*/
|
|
555
|
+
private stop;
|
|
556
|
+
/**
|
|
557
|
+
* Reads the shutdown() options. A value it can't use reports config.invalid and discards,
|
|
558
|
+
* because an app that asks to discard or to remove storage doesn't want a send.
|
|
559
|
+
* @param options The app's options.
|
|
560
|
+
* @returns True to discard, and the storage scope to remove.
|
|
561
|
+
*/
|
|
562
|
+
private shutdownRule;
|
|
563
|
+
/** Flushes the sender's records and runs the exit flush. Reports what can't go out. */
|
|
564
|
+
private flushHeld;
|
|
565
|
+
/**
|
|
566
|
+
* Drops the records in memory without a send and reports each one as "discarded". A record
|
|
567
|
+
* in a request that is in flight isn't reported, because the request can still arrive.
|
|
568
|
+
*/
|
|
569
|
+
private discardHeld;
|
|
570
|
+
/**
|
|
571
|
+
* Removes the stored batches, the emergency queue entries and the stored ids. Before the
|
|
572
|
+
* first configure() call that works, no store is known, so it removes nothing.
|
|
573
|
+
* @param scope Whose stored batches to remove.
|
|
574
|
+
*/
|
|
575
|
+
private clearStorage;
|
|
401
576
|
/**
|
|
402
577
|
* Routes a completed log record to the pipeline or forward buffer.
|
|
403
578
|
* @param record Log record to emit, or null when the build dropped it.
|
|
404
579
|
*/
|
|
405
580
|
emit(record: LogRecord | null): void;
|
|
406
581
|
/**
|
|
407
|
-
* Sends a record to the forward buffer or to the local pipeline
|
|
408
|
-
* the path.
|
|
582
|
+
* Sends a record to the forward buffer or to the local pipeline, depending on the bus role.
|
|
409
583
|
* @param record Log record to route.
|
|
410
584
|
*/
|
|
411
585
|
private route;
|
|
@@ -416,7 +590,18 @@ export declare class ObservabilityRuntime {
|
|
|
416
590
|
*/
|
|
417
591
|
private deliver;
|
|
418
592
|
/**
|
|
419
|
-
*
|
|
593
|
+
* Reports the sender's records in memory as lost during a pause. A pause has no exit flush,
|
|
594
|
+
* so a pagehide or a shutdown leaves nothing to send them.
|
|
595
|
+
*/
|
|
596
|
+
private dropPaused;
|
|
597
|
+
/**
|
|
598
|
+
* Leaves out the records that a pause already reported, so onDrop counts each loss once.
|
|
599
|
+
* @param records Lost records.
|
|
600
|
+
* @returns The records with no report yet.
|
|
601
|
+
*/
|
|
602
|
+
private unreported;
|
|
603
|
+
/**
|
|
604
|
+
* Counts a record dropped by a full hold buffer and passes it to the onDrop report.
|
|
420
605
|
* @param record Dropped record.
|
|
421
606
|
*/
|
|
422
607
|
private dropHeld;
|
|
@@ -425,97 +610,156 @@ export declare class ObservabilityRuntime {
|
|
|
425
610
|
* @param record Log record to forward.
|
|
426
611
|
*/
|
|
427
612
|
private forward;
|
|
428
|
-
/**
|
|
613
|
+
/**
|
|
614
|
+
* Hands the forward buffer's records to the bus.
|
|
615
|
+
* @returns How many records went upstream.
|
|
616
|
+
*/
|
|
429
617
|
private sendForwarded;
|
|
430
618
|
/**
|
|
431
|
-
* Validates, samples and queues records from child frames or workers.
|
|
432
|
-
*
|
|
433
|
-
*
|
|
619
|
+
* Validates, samples and queues records from child frames or workers. A forwarded record
|
|
620
|
+
* arrives already built, so this is the first point in this context where sampling can run.
|
|
621
|
+
* Local records are sampled by RecordBuilder.
|
|
434
622
|
* @param records Inbound payload from bus.
|
|
435
623
|
*/
|
|
436
624
|
private ingestForwarded;
|
|
437
|
-
/** Flushes the startup records
|
|
625
|
+
/** Flushes the startup records, adding the active journey to records that have none. */
|
|
438
626
|
private releaseBootBuffer;
|
|
439
627
|
/**
|
|
440
|
-
*
|
|
441
|
-
* @param reason
|
|
628
|
+
* Passes lost records to the onDrop report.
|
|
629
|
+
* @param reason Why they were lost.
|
|
442
630
|
* @param records Lost records.
|
|
443
631
|
* @param batchIds Ids of the lost batches.
|
|
444
632
|
*/
|
|
445
633
|
private readonly reportLoss;
|
|
446
634
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
635
|
+
* Passes the evicted batches to the onDrop report and emits a warning record. The warning
|
|
636
|
+
* records are throttled.
|
|
449
637
|
* @param result Storage prune summary metrics.
|
|
450
638
|
* @param dropped The evicted batches.
|
|
451
639
|
*/
|
|
452
640
|
private readonly reportGap;
|
|
453
|
-
/**
|
|
641
|
+
/** Creates and stores a new tab ID after a tab ID collision. */
|
|
454
642
|
private regenerateTabId;
|
|
455
643
|
/**
|
|
456
|
-
* Starts a new session in this context.
|
|
457
|
-
* ends the active journey and clears the breadcrumbs. Other tabs
|
|
458
|
-
* startup.
|
|
644
|
+
* Starts a new session in this context. Sends the open metric points, starts a new trace,
|
|
645
|
+
* ends the active journey and clears the breadcrumbs. Other tabs pick up the new id at
|
|
646
|
+
* their next startup.
|
|
459
647
|
*/
|
|
460
648
|
newSession(): void;
|
|
461
649
|
/**
|
|
462
|
-
* Closes the
|
|
650
|
+
* Closes the old session's work and starts the given session.
|
|
463
651
|
* @param sessionId Id of the session to start.
|
|
464
652
|
*/
|
|
465
653
|
private resetSession;
|
|
466
654
|
/**
|
|
467
|
-
* Changes the delivery context in one operation.
|
|
468
|
-
*
|
|
469
|
-
* @param
|
|
655
|
+
* Changes the delivery context in one operation. Rotations run in call order, so a logout
|
|
656
|
+
* that starts during a login still runs, after the login.
|
|
657
|
+
* @param update New identity, routing settings and context attributes.
|
|
658
|
+
* @param options What to do with the old context's records, and the flush deadline.
|
|
470
659
|
* @returns Promise that resolves when the change completes. Invalid settings reject it.
|
|
471
660
|
*/
|
|
472
661
|
rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
|
|
473
662
|
/**
|
|
474
|
-
*
|
|
475
|
-
* @param update New identity,
|
|
476
|
-
* @param
|
|
477
|
-
* @param
|
|
478
|
-
* @returns Promise that resolves when the
|
|
663
|
+
* Runs one rotation once the earlier ones are done. The rotation code loads on the first call.
|
|
664
|
+
* @param update New identity, routing settings and context attributes.
|
|
665
|
+
* @param options What to do with the old context's records, and the flush deadline.
|
|
666
|
+
* @param seq Number of this call.
|
|
667
|
+
* @returns Promise that resolves when the change completes.
|
|
479
668
|
*/
|
|
480
|
-
private
|
|
669
|
+
private runRotation;
|
|
481
670
|
/**
|
|
482
|
-
*
|
|
483
|
-
* @
|
|
484
|
-
* @param stored Batches that were stored. The new sender stores them again.
|
|
485
|
-
* @returns Promise that resolves when the stored batches are stored again.
|
|
671
|
+
* Returns the changes the rotation code can make to this runtime's private state.
|
|
672
|
+
* @returns The rotation host.
|
|
486
673
|
*/
|
|
487
|
-
private
|
|
674
|
+
private rotationHost;
|
|
488
675
|
/**
|
|
489
|
-
*
|
|
676
|
+
* Stops delivery after a rotation fails. The app asked to leave this context, so its endpoint
|
|
677
|
+
* and headers send no record until a rotation succeeds. The old records stay stored under
|
|
678
|
+
* the old id, and the next rotation that succeeds applies its rule to them.
|
|
679
|
+
*/
|
|
680
|
+
private closeDelivery;
|
|
681
|
+
/**
|
|
682
|
+
* Stops a sender of a closed context and keeps it, so the next rotation that succeeds can
|
|
683
|
+
* apply its rule to the records of that context.
|
|
684
|
+
* @param sender The sender to stop.
|
|
685
|
+
*/
|
|
686
|
+
private parkSender;
|
|
687
|
+
/**
|
|
688
|
+
* Collects this runtime's state for a support ticket. The app decides where to send it.
|
|
490
689
|
* @param health Health snapshot from the facade, with the logger cache counts.
|
|
491
690
|
* @returns Promise that resolves to the JSON-safe bundle.
|
|
492
691
|
*/
|
|
493
692
|
debugBundle(health: ObservabilityHealth): Promise<DebugBundle>;
|
|
494
693
|
/**
|
|
495
|
-
* Reads
|
|
694
|
+
* Reads this runtime's state. Doesn't wait for startup or for the sender to load.
|
|
496
695
|
* @returns State, delivery counts and policies. The facade adds the logger cache counts.
|
|
497
696
|
*/
|
|
498
697
|
health(): Promise<Omit<ObservabilityHealth, "loggerCache">>;
|
|
499
698
|
/**
|
|
500
|
-
*
|
|
501
|
-
* @returns
|
|
699
|
+
* Returns what opening the store needs when no sender runs.
|
|
700
|
+
* @returns The config, the reporter and the kept memory store.
|
|
701
|
+
*/
|
|
702
|
+
private storeAccess;
|
|
703
|
+
/**
|
|
704
|
+
* Counts the stored batches. After a failed rotation, the parked sender's store still holds
|
|
705
|
+
* the closed context's batches, and they count until a rotation retires them.
|
|
706
|
+
* @returns Promise that resolves to the number of stored batches.
|
|
707
|
+
*/
|
|
708
|
+
private storedBatches;
|
|
709
|
+
/**
|
|
710
|
+
* Sends the records in memory and waits until each one has a final state or the time limit
|
|
711
|
+
* passes. A forwarder hands its records to its sender, then asks the sender to flush.
|
|
712
|
+
* @param options How long to wait. A value it can't use reports config.invalid.
|
|
713
|
+
* @returns Promise that resolves to what became of the records in memory at the call. It
|
|
714
|
+
* never rejects.
|
|
715
|
+
*/
|
|
716
|
+
flush(options?: unknown): Promise<FlushResult>;
|
|
717
|
+
/**
|
|
718
|
+
* Runs a flush with a time limit that is already in range.
|
|
719
|
+
* @param timeoutMs How long to wait, in milliseconds.
|
|
720
|
+
* @param collect True to send the open interval of the meter and the profiler first. A flush
|
|
721
|
+
* that a child asks for doesn't, otherwise each request would make this context build points.
|
|
722
|
+
* @returns Promise that resolves to the flush result.
|
|
723
|
+
*/
|
|
724
|
+
private flushFor;
|
|
725
|
+
/**
|
|
726
|
+
* Waits for startup and the delivery stack, then flushes the sender or asks the upstream one.
|
|
727
|
+
* @param ends Epoch time in milliseconds of the deadline.
|
|
728
|
+
* @param expired Resolves at the deadline.
|
|
729
|
+
* @returns The flush result.
|
|
730
|
+
*/
|
|
731
|
+
private flushBefore;
|
|
732
|
+
/**
|
|
733
|
+
* Returns the result for a runtime that sends nothing now: before the start, after a failed
|
|
734
|
+
* first configure(), during a pause and after shutdown().
|
|
735
|
+
* @returns The "inactive" result with the records that wait in memory, or null.
|
|
736
|
+
*/
|
|
737
|
+
private idle;
|
|
738
|
+
/**
|
|
739
|
+
* Counts the records in the hold buffers and the forward buffer.
|
|
740
|
+
* @returns The record count.
|
|
502
741
|
*/
|
|
503
|
-
|
|
742
|
+
private heldRecords;
|
|
504
743
|
/**
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
* @returns
|
|
744
|
+
* Counts the records in memory: the hold buffers, the forward buffer, and the buffers, the
|
|
745
|
+
* queue and the requests of the sender and of a sender that a rotation retires.
|
|
746
|
+
* @returns The record count.
|
|
508
747
|
*/
|
|
509
|
-
|
|
748
|
+
private waiting;
|
|
510
749
|
/**
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
750
|
+
* Copies a call's options. A value that isn't an object reports config.invalid with the text,
|
|
751
|
+
* and so does a getter that throws.
|
|
752
|
+
* @param options The app's options. undefined and null read as no options.
|
|
753
|
+
* @param text The text of the report.
|
|
754
|
+
* @returns The copy, or undefined after a report.
|
|
514
755
|
*/
|
|
515
|
-
|
|
756
|
+
private readOptions;
|
|
516
757
|
/**
|
|
517
|
-
*
|
|
518
|
-
*
|
|
758
|
+
* Reads flush()'s time limit. A value it can't use reports config.invalid, and the default
|
|
759
|
+
* applies. null options and a null timeoutMs give the default, as in shutdown() and
|
|
760
|
+
* rotateSecurityContext().
|
|
761
|
+
* @param options The app's options.
|
|
762
|
+
* @returns The time limit in milliseconds.
|
|
519
763
|
*/
|
|
520
|
-
|
|
764
|
+
private flushTimeout;
|
|
521
765
|
}
|