@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
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import type { Receive, WorkerLike } from "../bus/links.cjs";
|
|
2
|
+
import type { BusMessage } from "../models/bus.cjs";
|
|
3
|
+
import type { FrameOptions, SourceOptions } from "../models/bus.cjs";
|
|
4
|
+
import type { ObservabilityConfig, ResolvedConfig, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "../models/config.cjs";
|
|
5
|
+
import type { InstrumentDef, Measure, MetricAttributes } from "../models/metric.cjs";
|
|
6
|
+
import { type LogRecord } from "../models/log-record.cjs";
|
|
7
|
+
import type { DebugBundle, FlushResult, ObservabilityHealth } from "../models/health.cjs";
|
|
8
|
+
import { ConsoleSink } from "../utils/console.cjs";
|
|
9
|
+
import { type Identity } from "../utils/identity.cjs";
|
|
10
|
+
import { type PlatformMetadata } from "../utils/platform.cjs";
|
|
11
|
+
import { Sequence } from "../utils/sequence.cjs";
|
|
12
|
+
import { TraceEngine } from "../utils/tracing.cjs";
|
|
13
|
+
import { BreadcrumbBuffer } from "./breadcrumbs.cjs";
|
|
14
|
+
import { ContextStore } from "./context.cjs";
|
|
15
|
+
import { Diagnostics } from "./diagnostics.cjs";
|
|
16
|
+
import { JourneyEngine } from "./journey.cjs";
|
|
17
|
+
import { RecordBuilder } from "./record.cjs";
|
|
18
|
+
/** Manages subsystem lifecycles, bus coordination and record delivery. */
|
|
19
|
+
export declare class ObservabilityRuntime {
|
|
20
|
+
/** True while the security context is changing. */
|
|
21
|
+
private rotating;
|
|
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. */
|
|
31
|
+
private closingContext;
|
|
32
|
+
/** Version of another SDK copy that owns the page runtime, or null. */
|
|
33
|
+
private mismatchVersion;
|
|
34
|
+
/** True if the configured context id differs from the owner's context id. */
|
|
35
|
+
private contextMismatch;
|
|
36
|
+
/** The context change in progress. Shutdown waits for this promise. */
|
|
37
|
+
private rotation?;
|
|
38
|
+
/** Memory store kept for later context changes. */
|
|
39
|
+
private memoryStorage?;
|
|
40
|
+
/** State of the persistent storage request. getHealth() reports it. */
|
|
41
|
+
private storagePersistence;
|
|
42
|
+
/** True while a diagnostic record goes out. Diagnostics raised meanwhile produce no record. */
|
|
43
|
+
private recordingDiagnostic;
|
|
44
|
+
/** Logger for the records that diagnostics.records produces. */
|
|
45
|
+
private readonly diagnosticLogger;
|
|
46
|
+
/** Records that minLevel or sampling dropped. An error in this context sends them first. */
|
|
47
|
+
private readonly debugBuffer;
|
|
48
|
+
/** True if the app supplied a context id at startup. */
|
|
49
|
+
private explicitSecurityContext;
|
|
50
|
+
/** True once this forwarder has taken a context id from its owner. */
|
|
51
|
+
private ownerAdopted;
|
|
52
|
+
/**
|
|
53
|
+
* Checks whether a security context change is in progress.
|
|
54
|
+
* @returns True until the current change completes.
|
|
55
|
+
*/
|
|
56
|
+
isRotating(): boolean;
|
|
57
|
+
/**
|
|
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.
|
|
60
|
+
* @param locked True to refuse changes through configure().
|
|
61
|
+
*/
|
|
62
|
+
setConfigurationLocked(locked: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* This copy's runtime when another version of the library owns the page runtime.
|
|
65
|
+
* It stays off the global key.
|
|
66
|
+
*/
|
|
67
|
+
private static local;
|
|
68
|
+
/**
|
|
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.
|
|
71
|
+
*/
|
|
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;
|
|
78
|
+
/** Diagnostics reporter for internal faults. */
|
|
79
|
+
readonly diagnostics: Diagnostics;
|
|
80
|
+
/** Active configuration instance. A reconfigure changes it in place. */
|
|
81
|
+
readonly config: ResolvedConfig;
|
|
82
|
+
/** Detected host platform metadata. */
|
|
83
|
+
readonly platform: PlatformMetadata;
|
|
84
|
+
/** Identity context containing session, tab, and context identifiers. */
|
|
85
|
+
readonly identity: Identity;
|
|
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. */
|
|
89
|
+
private readonly stores;
|
|
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;
|
|
94
|
+
/** Store for ambient application context attributes. */
|
|
95
|
+
readonly context: ContextStore;
|
|
96
|
+
/** Ring buffer holding contextual user breadcrumbs. */
|
|
97
|
+
readonly breadcrumbs: BreadcrumbBuffer;
|
|
98
|
+
/** Distributed tracing context engine. */
|
|
99
|
+
readonly tracing: TraceEngine;
|
|
100
|
+
/** Monotonic sequence counter for records emitted in this context. */
|
|
101
|
+
readonly sequence: Sequence;
|
|
102
|
+
/** Journey tracking engine managing workflow correlation. */
|
|
103
|
+
readonly journey: JourneyEngine;
|
|
104
|
+
/** Record builder assembling structured log records. */
|
|
105
|
+
readonly builder: RecordBuilder;
|
|
106
|
+
/** Slot for the remote sampling rules. The sender or the bus fills it. */
|
|
107
|
+
private readonly remote;
|
|
108
|
+
/** Number of delivery identity changes. A context's first id doesn't count as a change. */
|
|
109
|
+
private identityEpoch;
|
|
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. */
|
|
120
|
+
private remoteCaptureTimer;
|
|
121
|
+
/** Settings of the current capture load or install. */
|
|
122
|
+
private installedCaptureKey;
|
|
123
|
+
/** The replay settings the running replay capture was built with. */
|
|
124
|
+
private replayBuiltKey;
|
|
125
|
+
/** Console sink for local developer output. */
|
|
126
|
+
readonly console: ConsoleSink;
|
|
127
|
+
/** Collects lost records into onDrop summaries. */
|
|
128
|
+
private readonly drops;
|
|
129
|
+
/** Sums the values of the counter and histogram instruments. */
|
|
130
|
+
private readonly meter;
|
|
131
|
+
/**
|
|
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.
|
|
134
|
+
*/
|
|
135
|
+
private bus;
|
|
136
|
+
/** Promise for the bus load and construction. Undefined until first needed. */
|
|
137
|
+
private busBuilt?;
|
|
138
|
+
/** Promise for the bus load and start. Undefined until first needed. */
|
|
139
|
+
private busLoad?;
|
|
140
|
+
/**
|
|
141
|
+
* Delivery stack. Set in the sender role with an endpoint or a custom transport, once the
|
|
142
|
+
* chunk has loaded.
|
|
143
|
+
*/
|
|
144
|
+
private sender?;
|
|
145
|
+
/** The delivery stack load. Undefined when nothing loads, so records have no destination. */
|
|
146
|
+
private senderLoad?;
|
|
147
|
+
/** Records that arrive while the delivery stack loads, or while a pause holds them. */
|
|
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;
|
|
181
|
+
/** Active auto-capture instrumentation modules. */
|
|
182
|
+
private readonly captures;
|
|
183
|
+
/** Number of capture installs. An install replaced by a later one stops after its load. */
|
|
184
|
+
private captureGeneration;
|
|
185
|
+
/** Capture work that rebuilding the capture modules must not repeat. */
|
|
186
|
+
private readonly captureOnce;
|
|
187
|
+
/** Holds records created before the bus role is resolved. */
|
|
188
|
+
private readonly bootBuffer;
|
|
189
|
+
/** Records staged for forwarding on the next microtask. */
|
|
190
|
+
private forwardBuffer;
|
|
191
|
+
/** True if a microtask drain of the forward buffer is pending. */
|
|
192
|
+
private forwardScheduled;
|
|
193
|
+
/** True once startup has decided the bus role. A sender load waits for it. */
|
|
194
|
+
private roleResolved;
|
|
195
|
+
/** Resolves when startup releases the boot records. Set by init(), awaited by flush(). */
|
|
196
|
+
private started;
|
|
197
|
+
/** True if asynchronous initialization is complete. */
|
|
198
|
+
private ready;
|
|
199
|
+
/** True if shutdown stopped the runtime. */
|
|
200
|
+
private destroyed;
|
|
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. */
|
|
206
|
+
private lastGapAt;
|
|
207
|
+
/** Record limits for the builder and the console. The app's first configure() sets them. */
|
|
208
|
+
private readonly limits;
|
|
209
|
+
/** Lifetime rules for the journey engine. The app's first configure() sets the age. */
|
|
210
|
+
private readonly journeyOptions;
|
|
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
|
+
*/
|
|
215
|
+
private tunablesLocked;
|
|
216
|
+
/**
|
|
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.
|
|
219
|
+
*/
|
|
220
|
+
private readonly degraded;
|
|
221
|
+
/** True once a destination on a server has been reported. It is reported only once. */
|
|
222
|
+
private serverReported;
|
|
223
|
+
/**
|
|
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.
|
|
226
|
+
*/
|
|
227
|
+
private readonly onPageHide;
|
|
228
|
+
/**
|
|
229
|
+
* @param input Initial consumer configuration options.
|
|
230
|
+
* @param mismatch True for a console-only runtime next to another version.
|
|
231
|
+
*/
|
|
232
|
+
private constructor();
|
|
233
|
+
/**
|
|
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.
|
|
237
|
+
*/
|
|
238
|
+
private diagnosticHandler;
|
|
239
|
+
/**
|
|
240
|
+
* Sends a diagnostic event as a record when diagnostics.records selects its code.
|
|
241
|
+
* A diagnostic raised during that send produces no record, which stops a loop.
|
|
242
|
+
* @param event Diagnostic event.
|
|
243
|
+
*/
|
|
244
|
+
private recordDiagnostic;
|
|
245
|
+
/**
|
|
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.
|
|
250
|
+
* @param data Optional metadata.
|
|
251
|
+
*/
|
|
252
|
+
addBreadcrumb(message: unknown, data?: Record<string, unknown>): void;
|
|
253
|
+
/**
|
|
254
|
+
* Adds a value to a counter or a histogram. The meter sends one point per interval.
|
|
255
|
+
* @param def The instrument's definition.
|
|
256
|
+
* @param value Value to add.
|
|
257
|
+
* @param attributes The value's attribute set.
|
|
258
|
+
*/
|
|
259
|
+
recordMetric(def: InstrumentDef, value: number, attributes?: MetricAttributes): void;
|
|
260
|
+
/**
|
|
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.
|
|
264
|
+
* @param name Operation name.
|
|
265
|
+
* @param attributes Attribute set for every histogram point.
|
|
266
|
+
* @returns The operation's handle.
|
|
267
|
+
*/
|
|
268
|
+
startMeasure(name: string, attributes?: MetricAttributes): Measure;
|
|
269
|
+
/**
|
|
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.
|
|
272
|
+
* @param span The span data.
|
|
273
|
+
*/
|
|
274
|
+
private recordSpan;
|
|
275
|
+
/**
|
|
276
|
+
* Builds and emits the record for one aggregated point. The console doesn't print it.
|
|
277
|
+
* @param name Metric name.
|
|
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.
|
|
280
|
+
*/
|
|
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;
|
|
304
|
+
/**
|
|
305
|
+
* Checks the source policy before a direct child link opens.
|
|
306
|
+
* @param source Child window.
|
|
307
|
+
* @param origin The child window's origin.
|
|
308
|
+
* @returns True if the bus allows this source.
|
|
309
|
+
*/
|
|
310
|
+
readonly busCanAccept: (source: Window, origin: string) => boolean;
|
|
311
|
+
/**
|
|
312
|
+
* Receives direct messages from same-origin child frames.
|
|
313
|
+
* @param message Inbound bus message.
|
|
314
|
+
* @param reply Direct response callback.
|
|
315
|
+
* @param source The child frame's window.
|
|
316
|
+
*/
|
|
317
|
+
readonly busAccept: (message: BusMessage, reply: Receive, source?: Window) => void;
|
|
318
|
+
/**
|
|
319
|
+
* Returns the runtime on this realm's global key. Another copy of the library can own it.
|
|
320
|
+
* @returns Pinned runtime instance or null.
|
|
321
|
+
*/
|
|
322
|
+
private static pinned;
|
|
323
|
+
/**
|
|
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.
|
|
326
|
+
* @returns Active runtime instance or null.
|
|
327
|
+
*/
|
|
328
|
+
static current(): ObservabilityRuntime | null;
|
|
329
|
+
/**
|
|
330
|
+
* Returns the runtime that shutdown() stopped, until the next configure().
|
|
331
|
+
* A stopped runtime from another version returns null.
|
|
332
|
+
* @returns Stopped runtime instance or null.
|
|
333
|
+
*/
|
|
334
|
+
static stopped(): ObservabilityRuntime | null;
|
|
335
|
+
/**
|
|
336
|
+
* Checks whether shutdown() stopped this runtime.
|
|
337
|
+
* @returns True once destroy() starts.
|
|
338
|
+
*/
|
|
339
|
+
isDestroyed(): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Initializes a new runtime instance or updates the existing singleton.
|
|
342
|
+
* @param input Consumer configuration options.
|
|
343
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
344
|
+
* @returns Active runtime instance.
|
|
345
|
+
*/
|
|
346
|
+
static configure(input: Partial<ObservabilityConfig>, implicit?: boolean): ObservabilityRuntime;
|
|
347
|
+
/**
|
|
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.
|
|
356
|
+
* @param input Consumer configuration options.
|
|
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.
|
|
367
|
+
* @returns The local runtime.
|
|
368
|
+
*/
|
|
369
|
+
private static startDegraded;
|
|
370
|
+
/**
|
|
371
|
+
* Updates runtime configuration and refreshes affected subsystems.
|
|
372
|
+
* @param input Partial configuration to merge.
|
|
373
|
+
*/
|
|
374
|
+
private reconfigure;
|
|
375
|
+
/**
|
|
376
|
+
* Checks whether the runtime is on a server, for example Node during server-side rendering.
|
|
377
|
+
* @returns True on Node.
|
|
378
|
+
*/
|
|
379
|
+
private onServer;
|
|
380
|
+
/**
|
|
381
|
+
* Removes the routing settings from a console-only runtime's input. On a server, it
|
|
382
|
+
* reports a destination once.
|
|
383
|
+
* @param input Consumer configuration options.
|
|
384
|
+
* @returns The options the runtime accepts.
|
|
385
|
+
*/
|
|
386
|
+
private allowed;
|
|
387
|
+
/**
|
|
388
|
+
* Removes routing and identity changes while isolation is on. The other settings still apply.
|
|
389
|
+
* @param input Consumer configuration options.
|
|
390
|
+
* @returns The options without the refused routing or identity changes.
|
|
391
|
+
*/
|
|
392
|
+
private keepRouting;
|
|
393
|
+
/**
|
|
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.
|
|
397
|
+
*/
|
|
398
|
+
private keepStartupTunables;
|
|
399
|
+
/**
|
|
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.
|
|
403
|
+
*/
|
|
404
|
+
private keepSections;
|
|
405
|
+
/**
|
|
406
|
+
* Refuses a change that leaves the built delivery stack with no destination.
|
|
407
|
+
* Without one, the retry engine removes every stored batch as if it were delivered.
|
|
408
|
+
* @param input Partial configuration to merge.
|
|
409
|
+
* @returns Input without the refused changes.
|
|
410
|
+
*/
|
|
411
|
+
private keepDestination;
|
|
412
|
+
/**
|
|
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.
|
|
415
|
+
*/
|
|
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;
|
|
433
|
+
/** Initializes asynchronous subsystems and flushes the boot buffer. */
|
|
434
|
+
private init;
|
|
435
|
+
/**
|
|
436
|
+
* Resolves the bus role, loads the delivery stack and releases the boot records.
|
|
437
|
+
* Never rejects.
|
|
438
|
+
*/
|
|
439
|
+
private boot;
|
|
440
|
+
/**
|
|
441
|
+
* Starts the bus load once.
|
|
442
|
+
* @returns Promise that resolves to the started bus, or null if it didn't load.
|
|
443
|
+
*/
|
|
444
|
+
private ensureBus;
|
|
445
|
+
/**
|
|
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.
|
|
448
|
+
*/
|
|
449
|
+
private constructBus;
|
|
450
|
+
/**
|
|
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.
|
|
453
|
+
*/
|
|
454
|
+
private startBus;
|
|
455
|
+
/** Imports and constructs the bus. Never rejects. */
|
|
456
|
+
private buildBus;
|
|
457
|
+
/**
|
|
458
|
+
* Reads the bus role. Without a bus, this context is the sender.
|
|
459
|
+
* @returns Active bus role.
|
|
460
|
+
*/
|
|
461
|
+
private role;
|
|
462
|
+
/**
|
|
463
|
+
* Loads the delivery stack if this context is the sender and has a destination, that is an
|
|
464
|
+
* endpoint or a custom transport.
|
|
465
|
+
* @returns Promise that resolves when the load completes, or immediately when nothing loads.
|
|
466
|
+
*/
|
|
467
|
+
private syncSender;
|
|
468
|
+
/**
|
|
469
|
+
* Checks whether the config names a destination for the records.
|
|
470
|
+
* @returns True if it has an endpoint or a custom transport.
|
|
471
|
+
*/
|
|
472
|
+
private hasDestination;
|
|
473
|
+
/**
|
|
474
|
+
* Starts the delivery stack load once.
|
|
475
|
+
* @returns Promise that resolves when the load completes or fails.
|
|
476
|
+
*/
|
|
477
|
+
private loadSender;
|
|
478
|
+
/**
|
|
479
|
+
* Imports and builds the delivery stack, then moves the held records into it.
|
|
480
|
+
* Never rejects.
|
|
481
|
+
*/
|
|
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;
|
|
489
|
+
/** Refreshes temporary switches and restores local settings when their TTL ends. */
|
|
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;
|
|
506
|
+
/** Returns local capture settings with the permitted remote switches. */
|
|
507
|
+
private effectiveCapture;
|
|
508
|
+
/** Loads, builds and installs the enabled capture modules. Never rejects. */
|
|
509
|
+
private installCaptures;
|
|
510
|
+
/**
|
|
511
|
+
* Uninstalls the active capture modules.
|
|
512
|
+
* @param kept A replay capture that stays installed, if there is one.
|
|
513
|
+
*/
|
|
514
|
+
private uninstallCaptures;
|
|
515
|
+
/**
|
|
516
|
+
* Imports the WebSocket capture plugin. A failed import is reported and skipped.
|
|
517
|
+
* @returns Promise that resolves to the class, or undefined if the import failed.
|
|
518
|
+
*/
|
|
519
|
+
private loadWebSocket;
|
|
520
|
+
/**
|
|
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.
|
|
523
|
+
* @returns The capture module.
|
|
524
|
+
*/
|
|
525
|
+
private pluginCapture;
|
|
526
|
+
/**
|
|
527
|
+
* Imports one capture module. A failed import is reported and skips only that module.
|
|
528
|
+
* @param name Capture module name.
|
|
529
|
+
* @returns Promise that resolves to the class, or undefined if the import failed.
|
|
530
|
+
*/
|
|
531
|
+
private loadCapture;
|
|
532
|
+
/**
|
|
533
|
+
* Attaches a Web Worker or MessagePort to the bus for record forwarding.
|
|
534
|
+
* @param worker Target Worker or MessagePort instance.
|
|
535
|
+
*/
|
|
536
|
+
registerWorker(worker: WorkerLike, options?: SourceOptions): () => void;
|
|
537
|
+
/**
|
|
538
|
+
* Registers a frame after the bus loads. Early removal cancels the registration.
|
|
539
|
+
* @param frame Child frame or window.
|
|
540
|
+
* @param options Expected origin and source permissions.
|
|
541
|
+
* @returns Function that removes this registration.
|
|
542
|
+
*/
|
|
543
|
+
registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
|
|
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;
|
|
576
|
+
/**
|
|
577
|
+
* Routes a completed log record to the pipeline or forward buffer.
|
|
578
|
+
* @param record Log record to emit, or null when the build dropped it.
|
|
579
|
+
*/
|
|
580
|
+
emit(record: LogRecord | null): void;
|
|
581
|
+
/**
|
|
582
|
+
* Sends a record to the forward buffer or to the local pipeline, depending on the bus role.
|
|
583
|
+
* @param record Log record to route.
|
|
584
|
+
*/
|
|
585
|
+
private route;
|
|
586
|
+
/**
|
|
587
|
+
* Hands a record to the delivery stack. Holds the record while the stack loads.
|
|
588
|
+
* Drops the record when nothing loads, for example in console-only mode.
|
|
589
|
+
* @param record Log record to deliver.
|
|
590
|
+
*/
|
|
591
|
+
private deliver;
|
|
592
|
+
/**
|
|
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.
|
|
605
|
+
* @param record Dropped record.
|
|
606
|
+
*/
|
|
607
|
+
private dropHeld;
|
|
608
|
+
/**
|
|
609
|
+
* Batches records for asynchronous transmission to the upstream sender.
|
|
610
|
+
* @param record Log record to forward.
|
|
611
|
+
*/
|
|
612
|
+
private forward;
|
|
613
|
+
/**
|
|
614
|
+
* Hands the forward buffer's records to the bus.
|
|
615
|
+
* @returns How many records went upstream.
|
|
616
|
+
*/
|
|
617
|
+
private sendForwarded;
|
|
618
|
+
/**
|
|
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.
|
|
622
|
+
* @param records Inbound payload from bus.
|
|
623
|
+
*/
|
|
624
|
+
private ingestForwarded;
|
|
625
|
+
/** Flushes the startup records, adding the active journey to records that have none. */
|
|
626
|
+
private releaseBootBuffer;
|
|
627
|
+
/**
|
|
628
|
+
* Passes lost records to the onDrop report.
|
|
629
|
+
* @param reason Why they were lost.
|
|
630
|
+
* @param records Lost records.
|
|
631
|
+
* @param batchIds Ids of the lost batches.
|
|
632
|
+
*/
|
|
633
|
+
private readonly reportLoss;
|
|
634
|
+
/**
|
|
635
|
+
* Passes the evicted batches to the onDrop report and emits a warning record. The warning
|
|
636
|
+
* records are throttled.
|
|
637
|
+
* @param result Storage prune summary metrics.
|
|
638
|
+
* @param dropped The evicted batches.
|
|
639
|
+
*/
|
|
640
|
+
private readonly reportGap;
|
|
641
|
+
/** Creates and stores a new tab ID after a tab ID collision. */
|
|
642
|
+
private regenerateTabId;
|
|
643
|
+
/**
|
|
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.
|
|
647
|
+
*/
|
|
648
|
+
newSession(): void;
|
|
649
|
+
/**
|
|
650
|
+
* Closes the old session's work and starts the given session.
|
|
651
|
+
* @param sessionId Id of the session to start.
|
|
652
|
+
*/
|
|
653
|
+
private resetSession;
|
|
654
|
+
/**
|
|
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.
|
|
659
|
+
* @returns Promise that resolves when the change completes. Invalid settings reject it.
|
|
660
|
+
*/
|
|
661
|
+
rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
|
|
662
|
+
/**
|
|
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.
|
|
668
|
+
*/
|
|
669
|
+
private runRotation;
|
|
670
|
+
/**
|
|
671
|
+
* Returns the changes the rotation code can make to this runtime's private state.
|
|
672
|
+
* @returns The rotation host.
|
|
673
|
+
*/
|
|
674
|
+
private rotationHost;
|
|
675
|
+
/**
|
|
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.
|
|
689
|
+
* @param health Health snapshot from the facade, with the logger cache counts.
|
|
690
|
+
* @returns Promise that resolves to the JSON-safe bundle.
|
|
691
|
+
*/
|
|
692
|
+
debugBundle(health: ObservabilityHealth): Promise<DebugBundle>;
|
|
693
|
+
/**
|
|
694
|
+
* Reads this runtime's state. Doesn't wait for startup or for the sender to load.
|
|
695
|
+
* @returns State, delivery counts and policies. The facade adds the logger cache counts.
|
|
696
|
+
*/
|
|
697
|
+
health(): Promise<Omit<ObservabilityHealth, "loggerCache">>;
|
|
698
|
+
/**
|
|
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.
|
|
741
|
+
*/
|
|
742
|
+
private heldRecords;
|
|
743
|
+
/**
|
|
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.
|
|
747
|
+
*/
|
|
748
|
+
private waiting;
|
|
749
|
+
/**
|
|
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.
|
|
755
|
+
*/
|
|
756
|
+
private readOptions;
|
|
757
|
+
/**
|
|
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.
|
|
763
|
+
*/
|
|
764
|
+
private flushTimeout;
|
|
765
|
+
}
|