@utk09/ui-observability 0.12.0 → 1.1.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 +280 -10
- package/README.md +70 -839
- package/dist/{batch-BjQUwjA6.js → batch-D3NHhF9L.js} +4 -4
- package/dist/{batch-BjQUwjA6.js.map → batch-D3NHhF9L.js.map} +1 -1
- package/dist/{batch-D5LlU4Q9.cjs → batch-DnYRJqhU.cjs} +2 -2
- package/dist/{batch-D5LlU4Q9.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +355 -0
- package/dist/bus/bus.d.ts +86 -12
- package/dist/bus/links.d.cts +132 -0
- package/dist/bus/links.d.ts +18 -3
- package/dist/bus/validation.d.cts +16 -0
- package/dist/bus/validation.d.ts +10 -1
- package/dist/bus-B__467mL.cjs +2 -0
- package/dist/bus-B__467mL.cjs.map +1 -0
- package/dist/bus-dw7T92sO.js +788 -0
- package/dist/bus-dw7T92sO.js.map +1 -0
- package/dist/capture/console.d.cts +37 -0
- package/dist/capture/console.d.ts +1 -1
- package/dist/capture/errors.d.cts +32 -0
- package/dist/capture/errors.d.ts +1 -1
- package/dist/capture/interactions.d.cts +80 -0
- package/dist/capture/interactions.d.ts +36 -4
- package/dist/capture/lifecycle.d.cts +20 -0
- package/dist/capture/lifecycle.d.ts +1 -1
- package/dist/capture/long-frames.d.cts +31 -0
- package/dist/capture/long-frames.d.ts +1 -1
- package/dist/capture/network.d.cts +57 -0
- package/dist/capture/network.d.ts +1 -1
- package/dist/capture/observed-windows.d.cts +51 -0
- package/dist/capture/observed-windows.d.ts +51 -0
- package/dist/capture/profiler-frames.d.cts +44 -0
- package/dist/capture/profiler-frames.d.ts +1 -1
- package/dist/capture/replay-buffer.d.cts +45 -0
- package/dist/capture/replay-buffer.d.ts +9 -10
- package/dist/capture/replay-upload.d.cts +79 -0
- package/dist/capture/replay-upload.d.ts +7 -2
- package/dist/capture/replay.d.cts +114 -0
- package/dist/capture/replay.d.ts +1 -1
- package/dist/capture/reports.d.cts +17 -0
- package/dist/capture/reports.d.ts +1 -1
- package/dist/capture/resource-timing.d.cts +14 -0
- package/dist/capture/resource-timing.d.ts +1 -1
- package/dist/capture/server-timing.d.cts +19 -0
- package/dist/capture/storm.d.cts +13 -0
- package/dist/capture/storm.d.ts +5 -5
- package/dist/capture/types.d.cts +128 -0
- package/dist/capture/types.d.ts +10 -9
- package/dist/capture/unclean-exit.d.cts +31 -0
- package/dist/capture/unclean-exit.d.ts +1 -1
- package/dist/capture/user-timing.d.cts +22 -0
- package/dist/capture/user-timing.d.ts +2 -2
- package/dist/capture/web-socket.d.cts +40 -0
- package/dist/capture/web-socket.d.ts +3 -3
- package/dist/capture/web-vitals.d.cts +40 -0
- package/dist/capture/web-vitals.d.ts +1 -1
- package/dist/{compression-lD9abCcO.cjs → compression-C0hUHKR-.cjs} +2 -2
- package/dist/{compression-lD9abCcO.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
- package/dist/{compression-AJJCMBOa.js → compression-SHPAvS4U.js} +2 -2
- package/dist/{compression-AJJCMBOa.js.map → compression-SHPAvS4U.js.map} +1 -1
- package/dist/config-CSNcS7OZ.js +558 -0
- package/dist/config-CSNcS7OZ.js.map +1 -0
- package/dist/config-CybPP5VM.cjs +2 -0
- package/dist/config-CybPP5VM.cjs.map +1 -0
- package/dist/console-BsM-fSCQ.js +81 -0
- package/dist/console-BsM-fSCQ.js.map +1 -0
- package/dist/console-Dkxs6IVQ.cjs +2 -0
- package/dist/console-Dkxs6IVQ.cjs.map +1 -0
- package/dist/constants-BwJDXzj6.js +357 -0
- package/dist/constants-BwJDXzj6.js.map +1 -0
- package/dist/constants-CtF52hIV.cjs +2 -0
- package/dist/constants-CtF52hIV.cjs.map +1 -0
- package/dist/constants.d.cts +763 -0
- package/dist/constants.d.ts +100 -20
- package/dist/core/breadcrumbs.d.cts +54 -0
- package/dist/core/breadcrumbs.d.ts +5 -0
- package/dist/core/config.d.cts +45 -0
- package/dist/core/config.d.ts +30 -2
- package/dist/core/context.d.cts +24 -0
- package/dist/core/context.d.ts +3 -8
- package/dist/core/debug-buffer.d.cts +34 -0
- package/dist/core/debug-buffer.d.ts +3 -3
- package/dist/core/debug-bundle.d.cts +12 -0
- package/dist/core/debug-bundle.d.ts +3 -3
- package/dist/core/deferred.d.cts +7 -0
- package/dist/core/deferred.d.ts +2 -2
- package/dist/core/diagnostics.d.cts +86 -0
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/drops.d.cts +39 -0
- package/dist/core/drops.d.ts +16 -6
- package/dist/core/hold-buffer.d.cts +36 -0
- package/dist/core/hold-buffer.d.ts +16 -7
- package/dist/core/journey.d.cts +148 -0
- package/dist/core/journey.d.ts +7 -7
- package/dist/core/logger.d.cts +141 -0
- package/dist/core/logger.d.ts +23 -30
- package/dist/core/measure.d.cts +30 -0
- package/dist/core/measure.d.ts +14 -3
- package/dist/core/meter.d.cts +78 -0
- package/dist/core/meter.d.ts +14 -8
- package/dist/core/pipeline.d.cts +227 -0
- package/dist/core/pipeline.d.ts +73 -10
- package/dist/core/profile-buckets.d.cts +31 -0
- package/dist/core/profiler.d.cts +218 -0
- package/dist/core/profiler.d.ts +2 -2
- package/dist/core/record.d.cts +190 -0
- package/dist/core/record.d.ts +44 -12
- package/dist/core/remote-rules.d.cts +17 -0
- package/dist/core/remote-rules.d.ts +3 -3
- package/dist/core/remote-sampling.d.cts +74 -0
- package/dist/core/remote-sampling.d.ts +3 -3
- package/dist/core/rotation.d.cts +99 -0
- package/dist/core/rotation.d.ts +99 -0
- package/dist/core/runtime.d.cts +774 -0
- package/dist/core/runtime.d.ts +254 -70
- package/dist/core/sampling.d.cts +86 -0
- package/dist/core/sampling.d.ts +5 -5
- package/dist/core/sender.d.cts +161 -0
- package/dist/core/sender.d.ts +59 -15
- package/dist/core/spans.d.cts +39 -0
- package/dist/core/spans.d.ts +1 -1
- package/dist/debug-bundle-B2v6Cym-.cjs +2 -0
- package/dist/debug-bundle-B2v6Cym-.cjs.map +1 -0
- package/dist/debug-bundle-Cs_YWzTa.js +35 -0
- package/dist/debug-bundle-Cs_YWzTa.js.map +1 -0
- package/dist/defineProperty-X1c4tIPD.cjs +1 -0
- package/dist/defineProperty-s2S8BXUc.js +35 -0
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.cjs.map +1 -1
- package/dist/doctor.d.cts +36 -0
- package/dist/doctor.d.ts +5 -2
- package/dist/doctor.js +119 -87
- package/dist/doctor.js.map +1 -1
- package/dist/errors-DP2RUm4V.cjs +3 -0
- package/dist/errors-DP2RUm4V.cjs.map +1 -0
- package/dist/errors-Q3Ng1ciC.js +86 -0
- package/dist/errors-Q3Ng1ciC.js.map +1 -0
- package/dist/factory-DV17sm2p.js +404 -0
- package/dist/factory-DV17sm2p.js.map +1 -0
- package/dist/factory-K8O6gpux.cjs +2 -0
- package/dist/factory-K8O6gpux.cjs.map +1 -0
- package/dist/guards-BlYGRK4l.js +10 -0
- package/dist/guards-BlYGRK4l.js.map +1 -0
- package/dist/guards-EjG3ahFp.cjs +2 -0
- package/dist/guards-EjG3ahFp.cjs.map +1 -0
- package/dist/{identity-BrQp_5J5.js → identity-BgtHyY4u.js} +33 -26
- package/dist/identity-BgtHyY4u.js.map +1 -0
- package/dist/identity-CvuyqZk7.cjs +2 -0
- package/dist/identity-CvuyqZk7.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +301 -0
- package/dist/index.d.ts +90 -98
- package/dist/index.js +1253 -1555
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-storage-D4KVcqdD.cjs +2 -0
- package/dist/indexeddb-storage-D4KVcqdD.cjs.map +1 -0
- package/dist/{indexeddb-storage-DLXQzAGh.js → indexeddb-storage-e-13ZLWm.js} +61 -57
- package/dist/indexeddb-storage-e-13ZLWm.js.map +1 -0
- package/dist/interactions-Byxf1C82.js +207 -0
- package/dist/interactions-Byxf1C82.js.map +1 -0
- package/dist/interactions-OK85T-Dk.cjs +2 -0
- package/dist/interactions-OK85T-Dk.cjs.map +1 -0
- package/dist/{journey-35yCMNFo.js → journey-C93FTYcs.js} +46 -49
- package/dist/journey-C93FTYcs.js.map +1 -0
- package/dist/journey-nMbob3OB.cjs +2 -0
- package/dist/journey-nMbob3OB.cjs.map +1 -0
- package/dist/{library-console-BFWEuQsl.cjs → library-console-DJUQzcgM.cjs} +2 -2
- package/dist/{library-console-BFWEuQsl.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
- package/dist/{library-console-Dl_Ly6DQ.js → library-console-DklSmucS.js} +2 -2
- package/dist/{library-console-Dl_Ly6DQ.js.map → library-console-DklSmucS.js.map} +1 -1
- package/dist/{library-request-nI6pvI6I.js → library-request-UGEwOHpf.js} +2 -2
- package/dist/{library-request-nI6pvI6I.js.map → library-request-UGEwOHpf.js.map} +1 -1
- package/dist/{library-request-Da-CHKzT.cjs → library-request-kY9iTpIF.cjs} +2 -2
- package/dist/{library-request-Da-CHKzT.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
- package/dist/{lifecycle-CZ6RRXc6.js → lifecycle-B2PlIuQu.js} +21 -29
- package/dist/lifecycle-B2PlIuQu.js.map +1 -0
- package/dist/lifecycle-DaMdH_X7.cjs +2 -0
- package/dist/lifecycle-DaMdH_X7.cjs.map +1 -0
- package/dist/log-record-Bmx6etMh.cjs +2 -0
- package/dist/log-record-Bmx6etMh.cjs.map +1 -0
- package/dist/{log-record-DIA6McNr.js → log-record-DSt2P-Sr.js} +8 -7
- package/dist/log-record-DSt2P-Sr.js.map +1 -0
- package/dist/{long-frames-430_85Da.js → long-frames-Bamjs1WV.js} +18 -22
- package/dist/long-frames-Bamjs1WV.js.map +1 -0
- package/dist/long-frames-lhtONgGt.cjs +2 -0
- package/dist/long-frames-lhtONgGt.cjs.map +1 -0
- package/dist/models/batch.d.cts +57 -0
- package/dist/models/batch.d.ts +2 -2
- package/dist/models/bus.d.cts +163 -0
- package/dist/models/bus.d.ts +28 -3
- package/dist/models/config.d.cts +1555 -0
- package/dist/models/config.d.ts +377 -261
- package/dist/models/drop.d.cts +54 -0
- package/dist/models/drop.d.ts +16 -3
- package/dist/models/health.d.cts +148 -0
- package/dist/models/health.d.ts +108 -12
- package/dist/models/log-record.d.cts +61 -0
- package/dist/models/metric.d.cts +139 -0
- package/dist/models/metric.d.ts +13 -2
- package/dist/models/plugin.d.cts +47 -0
- package/dist/models/plugin.d.ts +3 -3
- package/dist/models/replay.d.cts +60 -0
- package/dist/models/serializer.d.cts +25 -0
- package/dist/models/serializer.d.ts +4 -2
- package/dist/models/storage.d.cts +95 -0
- package/dist/models/storage.d.ts +7 -5
- package/dist/network-BCn8Gn47.cjs +2 -0
- package/dist/network-BCn8Gn47.cjs.map +1 -0
- package/dist/{network-C7SkLf4v.js → network-Cg1L2w2r.js} +57 -57
- package/dist/network-Cg1L2w2r.js.map +1 -0
- package/dist/observed-windows-B3gJkdql.cjs +2 -0
- package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
- package/dist/observed-windows-BrwaJNlj.js +64 -0
- package/dist/observed-windows-BrwaJNlj.js.map +1 -0
- package/dist/{otlp-2MCrC3kd.cjs → otlp-CrAWkQdO.cjs} +2 -2
- package/dist/{otlp-2MCrC3kd.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
- package/dist/{otlp-COq033e3.js → otlp-D6dRZyB8.js} +9 -9
- package/dist/{otlp-COq033e3.js.map → otlp-D6dRZyB8.js.map} +1 -1
- package/dist/{platform-CVewe4wQ.js → platform-8DLhjddo.js} +9 -9
- package/dist/{platform-CVewe4wQ.js.map → platform-8DLhjddo.js.map} +1 -1
- package/dist/{platform-12uR7kBQ.cjs → platform-BqRc-7RO.cjs} +2 -2
- package/dist/{platform-12uR7kBQ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
- package/dist/{profiler-BVWIOgnq.js → profiler-BaXSqCfz.js} +78 -96
- package/dist/profiler-BaXSqCfz.js.map +1 -0
- package/dist/profiler-BvWW2kNM.cjs +2 -0
- package/dist/profiler-BvWW2kNM.cjs.map +1 -0
- package/dist/{profiler-frames-CLXlT_xL.js → profiler-frames-C4ySHN0X.js} +21 -29
- package/dist/profiler-frames-C4ySHN0X.js.map +1 -0
- package/dist/profiler-frames-DeaBiB-5.cjs +2 -0
- package/dist/profiler-frames-DeaBiB-5.cjs.map +1 -0
- package/dist/remote-rules-D7L6D_D2.cjs +2 -0
- package/dist/remote-rules-D7L6D_D2.cjs.map +1 -0
- package/dist/remote-rules-Dq9xe7Qn.js +95 -0
- package/dist/remote-rules-Dq9xe7Qn.js.map +1 -0
- package/dist/replay-B0M8kWz_.js +310 -0
- package/dist/replay-B0M8kWz_.js.map +1 -0
- package/dist/replay-QOFBpAXh.cjs +2 -0
- package/dist/replay-QOFBpAXh.cjs.map +1 -0
- package/dist/{reports-BuXekPOS.js → reports--8APRLa-.js} +25 -30
- package/dist/reports--8APRLa-.js.map +1 -0
- package/dist/reports-ojuMKGO7.cjs +2 -0
- package/dist/reports-ojuMKGO7.cjs.map +1 -0
- package/dist/{resource-timing-CXGHwFRD.js → resource-timing-BzR05rE-.js} +20 -23
- package/dist/resource-timing-BzR05rE-.js.map +1 -0
- package/dist/resource-timing-pAG3ZhB5.cjs +2 -0
- package/dist/resource-timing-pAG3ZhB5.cjs.map +1 -0
- package/dist/response-body-BWvwKQ2p.js +331 -0
- package/dist/response-body-BWvwKQ2p.js.map +1 -0
- package/dist/response-body-CKEJ5itk.cjs +3 -0
- package/dist/response-body-CKEJ5itk.cjs.map +1 -0
- package/dist/rotation-BylN1B9e.js +93 -0
- package/dist/rotation-BylN1B9e.js.map +1 -0
- package/dist/rotation-E2eKClIs.cjs +2 -0
- package/dist/rotation-E2eKClIs.cjs.map +1 -0
- package/dist/sampling-B46LW0cy.cjs +2 -0
- package/dist/sampling-B46LW0cy.cjs.map +1 -0
- package/dist/sampling-zXA6r-Nw.js +63 -0
- package/dist/sampling-zXA6r-Nw.js.map +1 -0
- package/dist/{sanitize-CNmsD9r3.js → sanitize-DjnR6RXR.js} +2 -2
- package/dist/sanitize-DjnR6RXR.js.map +1 -0
- package/dist/{sanitize-ChLn97Ch.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
- package/dist/sanitize-Qj6LuZqp.cjs.map +1 -0
- package/dist/sender-Bdp-TAS4.js +979 -0
- package/dist/sender-Bdp-TAS4.js.map +1 -0
- package/dist/sender-DR7ZycZY.cjs +2 -0
- package/dist/sender-DR7ZycZY.cjs.map +1 -0
- package/dist/storage/context-storage.d.cts +90 -0
- package/dist/storage/context-storage.d.ts +5 -5
- package/dist/storage/emergency-queue.d.cts +27 -0
- package/dist/storage/emergency-queue.d.ts +4 -4
- package/dist/storage/eviction.d.cts +40 -0
- package/dist/storage/eviction.d.ts +1 -1
- package/dist/storage/factory.d.cts +21 -0
- package/dist/storage/factory.d.ts +3 -3
- package/dist/storage/gap.d.cts +20 -0
- package/dist/storage/gap.d.ts +3 -3
- package/dist/storage/idb-driver.d.cts +93 -0
- package/dist/storage/idb-driver.d.ts +1 -1
- package/dist/storage/indexeddb-storage.d.cts +97 -0
- package/dist/storage/indexeddb-storage.d.ts +12 -4
- package/dist/storage/keys.d.cts +17 -0
- package/dist/storage/keys.d.ts +2 -2
- package/dist/storage/local-storage.d.cts +139 -0
- package/dist/storage/local-storage.d.ts +11 -4
- package/dist/storage/memory-storage.d.cts +73 -0
- package/dist/storage/memory-storage.d.ts +4 -3
- package/dist/storage/persistence.d.cts +8 -0
- package/dist/storage/persistence.d.ts +2 -2
- package/dist/storage/stored-context.d.cts +34 -0
- package/dist/storage/stored-context.d.ts +34 -0
- package/dist/stored-context-BOu54M8Y.cjs +2 -0
- package/dist/stored-context-BOu54M8Y.cjs.map +1 -0
- package/dist/stored-context-CSttrAsw.js +51 -0
- package/dist/stored-context-CSttrAsw.js.map +1 -0
- package/dist/storm-BHgI12iS.cjs +2 -0
- package/dist/storm-BHgI12iS.cjs.map +1 -0
- package/dist/storm-DKlpv0FL.js +9 -0
- package/dist/storm-DKlpv0FL.js.map +1 -0
- package/dist/transport/compression.d.cts +7 -0
- package/dist/transport/custom-transport.d.cts +22 -0
- package/dist/transport/custom-transport.d.ts +6 -5
- package/dist/transport/errors.d.cts +31 -0
- package/dist/transport/exit-flush.d.cts +135 -0
- package/dist/transport/exit-flush.d.ts +30 -13
- package/dist/transport/headers.d.cts +8 -0
- package/dist/transport/headers.d.ts +2 -2
- package/dist/transport/http-transport.d.cts +116 -0
- package/dist/transport/http-transport.d.ts +20 -8
- package/dist/transport/memory-transport.d.cts +30 -0
- package/dist/transport/memory-transport.d.ts +2 -2
- package/dist/transport/response-body.d.cts +49 -0
- package/dist/transport/response-body.d.ts +49 -0
- package/dist/transport/retry-engine.d.cts +129 -0
- package/dist/transport/retry-engine.d.ts +27 -9
- package/dist/transport/serializers/ecs.d.cts +3 -0
- package/dist/transport/serializers/ecs.d.ts +1 -1
- package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
- package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
- package/dist/transport/serializers/otlp-traces.d.cts +3 -0
- package/dist/transport/serializers/otlp-traces.d.ts +1 -1
- package/dist/transport/serializers/otlp.d.cts +47 -0
- package/dist/transport/serializers/otlp.d.ts +2 -2
- package/dist/transport/serializers/select.d.cts +38 -0
- package/dist/transport/serializers/select.d.ts +5 -5
- package/dist/transport/status-transport.d.cts +129 -0
- package/dist/transport/status-transport.d.ts +25 -8
- package/dist/transport/worker-client.d.cts +23 -0
- package/dist/transport/worker-client.d.ts +12 -3
- package/dist/transport/worker-entry.d.cts +5 -0
- package/dist/transport/worker-entry.d.ts +1 -1
- package/dist/transport/worker-protocol.d.cts +38 -0
- package/dist/transport/worker-protocol.d.ts +4 -2
- package/dist/transport/worker-server.d.cts +3 -0
- package/dist/transport/worker-server.d.ts +1 -1
- package/dist/transport/worker-transport.d.cts +10 -0
- package/dist/transport/worker-transport.d.ts +5 -4
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/unclean-exit-BYPYYkQ5.cjs +2 -0
- package/dist/unclean-exit-BYPYYkQ5.cjs.map +1 -0
- package/dist/{unclean-exit-Cob_jyTv.js → unclean-exit-BcOB8A2e.js} +23 -30
- package/dist/unclean-exit-BcOB8A2e.js.map +1 -0
- package/dist/{user-timing-DgHubxCI.js → user-timing-4KIJ74Vi.js} +15 -17
- package/dist/user-timing-4KIJ74Vi.js.map +1 -0
- package/dist/user-timing-BsU2wQKE.cjs +2 -0
- package/dist/user-timing-BsU2wQKE.cjs.map +1 -0
- package/dist/utils/console.d.cts +36 -0
- package/dist/utils/console.d.ts +4 -4
- package/dist/utils/deadline.d.cts +14 -0
- package/dist/utils/error-like.d.cts +25 -0
- package/dist/utils/fixed-window.d.cts +25 -0
- package/dist/utils/global-scope.d.cts +20 -0
- package/dist/utils/guards.d.cts +14 -0
- package/dist/utils/guards.d.ts +8 -0
- package/dist/utils/identity.d.cts +114 -0
- package/dist/utils/identity.d.ts +8 -4
- package/dist/utils/library-console.d.cts +11 -0
- package/dist/utils/library-request.d.cts +24 -0
- package/dist/utils/lock.d.cts +24 -0
- package/dist/utils/lock.d.ts +1 -1
- package/dist/utils/openfin.d.cts +48 -0
- package/dist/utils/patch.d.cts +9 -0
- package/dist/utils/platform.d.cts +62 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/sanitize.d.cts +52 -0
- package/dist/utils/sanitize.d.ts +1 -1
- package/dist/utils/sequence.d.cts +10 -0
- package/dist/utils/tracing.d.cts +158 -0
- package/dist/utils/tracing.d.ts +11 -4
- package/dist/utils/unref.d.cts +9 -0
- package/dist/web-socket-Cs1ZbmmN.cjs +2 -0
- package/dist/{web-socket-DthJuSAg.js.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
- package/dist/{web-socket-DthJuSAg.js → web-socket-Zg0hj1LB.js} +23 -28
- package/dist/web-socket-Zg0hj1LB.js.map +1 -0
- package/dist/{web-vitals-CsGCWnUr.js → web-vitals-4pWACwaR.js} +15 -21
- package/dist/web-vitals-4pWACwaR.js.map +1 -0
- package/dist/web-vitals-__X7t4pj.cjs +2 -0
- package/dist/web-vitals-__X7t4pj.cjs.map +1 -0
- package/dist/{worker-protocol-B0_8rWy5.js → worker-protocol-CYpAbrVl.js} +14 -11
- package/dist/worker-protocol-CYpAbrVl.js.map +1 -0
- package/dist/worker-protocol-DFYXIFus.cjs +2 -0
- package/dist/worker-protocol-DFYXIFus.cjs.map +1 -0
- package/dist/worker-server--yGTadTA.cjs +2 -0
- package/dist/worker-server--yGTadTA.cjs.map +1 -0
- package/dist/worker-server-BokySIII.js +94 -0
- package/dist/worker-server-BokySIII.js.map +1 -0
- package/dist/worker-transport-BdEvh_-a.cjs +2 -0
- package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
- package/dist/worker-transport-JK-Fby9J.js +194 -0
- package/dist/worker-transport-JK-Fby9J.js.map +1 -0
- package/llms.txt +400 -0
- package/package.json +65 -49
- package/dist/bus-D_7pd7RN.cjs +0 -2
- package/dist/bus-D_7pd7RN.cjs.map +0 -1
- package/dist/bus-ecxUNTja.js +0 -660
- package/dist/bus-ecxUNTja.js.map +0 -1
- package/dist/console-CLz_PvFn.cjs +0 -2
- package/dist/console-CLz_PvFn.cjs.map +0 -1
- package/dist/console-cwgHKXvM.js +0 -82
- package/dist/console-cwgHKXvM.js.map +0 -1
- package/dist/constants-Bwl_YtQi.js +0 -349
- package/dist/constants-Bwl_YtQi.js.map +0 -1
- package/dist/constants-DakMxVB2.cjs +0 -2
- package/dist/constants-DakMxVB2.cjs.map +0 -1
- package/dist/context-storage-BjzeBSxH.cjs +0 -2
- package/dist/context-storage-BjzeBSxH.cjs.map +0 -1
- package/dist/context-storage-BzkoHzkQ.js +0 -51
- package/dist/context-storage-BzkoHzkQ.js.map +0 -1
- package/dist/debug-bundle-BOdYmCeV.js +0 -32
- package/dist/debug-bundle-BOdYmCeV.js.map +0 -1
- package/dist/debug-bundle-Ex4L_LSP.cjs +0 -2
- package/dist/debug-bundle-Ex4L_LSP.cjs.map +0 -1
- package/dist/emergency-queue-B9WZxanZ.js +0 -67
- package/dist/emergency-queue-B9WZxanZ.js.map +0 -1
- package/dist/emergency-queue-HBpL5r3V.cjs +0 -2
- package/dist/emergency-queue-HBpL5r3V.cjs.map +0 -1
- package/dist/errors-D6bwgJtO.js +0 -92
- package/dist/errors-D6bwgJtO.js.map +0 -1
- package/dist/errors-DCOCRdSi.cjs +0 -3
- package/dist/errors-DCOCRdSi.cjs.map +0 -1
- package/dist/factory-DLFDjdLv.cjs +0 -2
- package/dist/factory-DLFDjdLv.cjs.map +0 -1
- package/dist/factory-e9Qo3K0z.js +0 -276
- package/dist/factory-e9Qo3K0z.js.map +0 -1
- package/dist/guards-Cidk71ME.js +0 -7
- package/dist/guards-Cidk71ME.js.map +0 -1
- package/dist/guards-nJ70syPt.cjs +0 -2
- package/dist/guards-nJ70syPt.cjs.map +0 -1
- package/dist/identity-BlvlgjrU.cjs +0 -2
- package/dist/identity-BlvlgjrU.cjs.map +0 -1
- package/dist/identity-BrQp_5J5.js.map +0 -1
- package/dist/indexeddb-storage-CtLvZH1r.cjs +0 -2
- package/dist/indexeddb-storage-CtLvZH1r.cjs.map +0 -1
- package/dist/indexeddb-storage-DLXQzAGh.js.map +0 -1
- package/dist/interactions-B6z2I4tU.js +0 -119
- package/dist/interactions-B6z2I4tU.js.map +0 -1
- package/dist/interactions-P6pz08Jn.cjs +0 -2
- package/dist/interactions-P6pz08Jn.cjs.map +0 -1
- package/dist/journey-35yCMNFo.js.map +0 -1
- package/dist/journey-DAGh5h9k.cjs +0 -2
- package/dist/journey-DAGh5h9k.cjs.map +0 -1
- package/dist/keys-BHhw_0Wh.cjs +0 -2
- package/dist/keys-BHhw_0Wh.cjs.map +0 -1
- package/dist/keys-BU9j5YqW.js +0 -16
- package/dist/keys-BU9j5YqW.js.map +0 -1
- package/dist/lifecycle-BGGOcN4N.cjs +0 -2
- package/dist/lifecycle-BGGOcN4N.cjs.map +0 -1
- package/dist/lifecycle-CZ6RRXc6.js.map +0 -1
- package/dist/log-record-D7bA1RPb.cjs +0 -2
- package/dist/log-record-D7bA1RPb.cjs.map +0 -1
- package/dist/log-record-DIA6McNr.js.map +0 -1
- package/dist/long-frames-430_85Da.js.map +0 -1
- package/dist/long-frames-Dd8tsi2U.cjs +0 -2
- package/dist/long-frames-Dd8tsi2U.cjs.map +0 -1
- package/dist/models/stats.d.ts +0 -11
- package/dist/network-C7SkLf4v.js.map +0 -1
- package/dist/network-pEX3PAJv.cjs +0 -2
- package/dist/network-pEX3PAJv.cjs.map +0 -1
- package/dist/profiler-BVWIOgnq.js.map +0 -1
- package/dist/profiler-eVCknCzS.cjs +0 -2
- package/dist/profiler-eVCknCzS.cjs.map +0 -1
- package/dist/profiler-frames-CLXlT_xL.js.map +0 -1
- package/dist/profiler-frames-Dg2OebB2.cjs +0 -2
- package/dist/profiler-frames-Dg2OebB2.cjs.map +0 -1
- package/dist/remote-rules-BJGDJGwA.js +0 -98
- package/dist/remote-rules-BJGDJGwA.js.map +0 -1
- package/dist/remote-rules-CJD3ToVk.cjs +0 -2
- package/dist/remote-rules-CJD3ToVk.cjs.map +0 -1
- package/dist/replay-0zAJv9T3.js +0 -338
- package/dist/replay-0zAJv9T3.js.map +0 -1
- package/dist/replay-DomJpXqW.cjs +0 -2
- package/dist/replay-DomJpXqW.cjs.map +0 -1
- package/dist/reports-BsbqmP8h.cjs +0 -2
- package/dist/reports-BsbqmP8h.cjs.map +0 -1
- package/dist/reports-BuXekPOS.js.map +0 -1
- package/dist/resource-timing-CXGHwFRD.js.map +0 -1
- package/dist/resource-timing-DkycFGDa.cjs +0 -2
- package/dist/resource-timing-DkycFGDa.cjs.map +0 -1
- package/dist/sampling-Dd0wllyq.cjs +0 -2
- package/dist/sampling-Dd0wllyq.cjs.map +0 -1
- package/dist/sampling-UUDbi3K0.js +0 -60
- package/dist/sampling-UUDbi3K0.js.map +0 -1
- package/dist/sanitize-CNmsD9r3.js.map +0 -1
- package/dist/sanitize-ChLn97Ch.cjs.map +0 -1
- package/dist/select-CTk-K5mG.cjs +0 -3
- package/dist/select-CTk-K5mG.cjs.map +0 -1
- package/dist/select-DPv_j6wq.js +0 -270
- package/dist/select-DPv_j6wq.js.map +0 -1
- package/dist/sender-15zEsZpr.js +0 -857
- package/dist/sender-15zEsZpr.js.map +0 -1
- package/dist/sender-Bfpv9tad.cjs +0 -2
- package/dist/sender-Bfpv9tad.cjs.map +0 -1
- package/dist/storage-BA9RqRO-.cjs +0 -2
- package/dist/storage-BA9RqRO-.cjs.map +0 -1
- package/dist/storage-DZwed89z.js +0 -16
- package/dist/storage-DZwed89z.js.map +0 -1
- package/dist/storm-BTSNTIWI.js +0 -9
- package/dist/storm-BTSNTIWI.js.map +0 -1
- package/dist/storm-D0_qZOEg.cjs +0 -2
- package/dist/storm-D0_qZOEg.cjs.map +0 -1
- package/dist/unclean-exit-ClGzrc2A.cjs +0 -2
- package/dist/unclean-exit-ClGzrc2A.cjs.map +0 -1
- package/dist/unclean-exit-Cob_jyTv.js.map +0 -1
- package/dist/user-timing-CdYqx3PF.cjs +0 -2
- package/dist/user-timing-CdYqx3PF.cjs.map +0 -1
- package/dist/user-timing-DgHubxCI.js.map +0 -1
- package/dist/utils/timer.d.ts +0 -19
- package/dist/web-socket-BTuvYoJI.cjs +0 -2
- package/dist/web-socket-BTuvYoJI.cjs.map +0 -1
- package/dist/web-vitals-Ch5BpDmo.cjs +0 -2
- package/dist/web-vitals-Ch5BpDmo.cjs.map +0 -1
- package/dist/web-vitals-CsGCWnUr.js.map +0 -1
- package/dist/worker-protocol-B0_8rWy5.js.map +0 -1
- package/dist/worker-protocol-BjzFORfq.cjs +0 -2
- package/dist/worker-protocol-BjzFORfq.cjs.map +0 -1
- package/dist/worker-server-4en-Lt-3.cjs +0 -2
- package/dist/worker-server-4en-Lt-3.cjs.map +0 -1
- package/dist/worker-server-Cne9MX9I.js +0 -83
- package/dist/worker-server-Cne9MX9I.js.map +0 -1
- package/dist/worker-transport-B-GF4Aqn.cjs +0 -2
- package/dist/worker-transport-B-GF4Aqn.cjs.map +0 -1
- package/dist/worker-transport-C3SjJAEC.js +0 -200
- package/dist/worker-transport-C3SjJAEC.js.map +0 -1
package/dist/core/runtime.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
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
20
|
/** True while the security context is changing. */
|
|
22
21
|
private rotating;
|
|
22
|
+
/** Number of the latest rotateSecurityContext() call, so a queued call keeps `rotating` up. */
|
|
23
|
+
private rotationSeq;
|
|
23
24
|
/**
|
|
24
25
|
* True while this runtime has the profiler core attached. Tracking it keeps configure() from
|
|
25
26
|
* restarting the sampling every time, and keeps a runtime with the profiler off from ever
|
|
@@ -40,6 +41,10 @@ export declare class ObservabilityRuntime {
|
|
|
40
41
|
private storagePersistence;
|
|
41
42
|
/** True while a diagnostic record goes out. Diagnostics raised meanwhile produce no record. */
|
|
42
43
|
private recordingDiagnostic;
|
|
44
|
+
/** True while a rotation checks the next context's settings, so their records wait for it. */
|
|
45
|
+
private holdingRecords;
|
|
46
|
+
/** Diagnostics from that check. Their records go out when the new context opens. */
|
|
47
|
+
private heldDiagnostics;
|
|
43
48
|
/** Logger for the records that diagnostics.records produces. */
|
|
44
49
|
private readonly diagnosticLogger;
|
|
45
50
|
/** Records that minLevel or sampling dropped. An error in this context sends them first. */
|
|
@@ -69,6 +74,11 @@ export declare class ObservabilityRuntime {
|
|
|
69
74
|
* versions sharing one runtime would call methods the other version doesn't have.
|
|
70
75
|
*/
|
|
71
76
|
readonly sdkVersion: string;
|
|
77
|
+
/**
|
|
78
|
+
* This runtime's bus protocol tag. A same-origin child frame reads it from the global key
|
|
79
|
+
* before it opens a direct link, because a direct call has no envelope to carry the tag.
|
|
80
|
+
*/
|
|
81
|
+
readonly protocol: string;
|
|
72
82
|
/** Diagnostics reporter for internal faults. */
|
|
73
83
|
readonly diagnostics: Diagnostics;
|
|
74
84
|
/** Active configuration instance. A reconfigure changes it in place. */
|
|
@@ -77,12 +87,14 @@ export declare class ObservabilityRuntime {
|
|
|
77
87
|
readonly platform: PlatformMetadata;
|
|
78
88
|
/** Identity context containing session, tab, and context identifiers. */
|
|
79
89
|
readonly identity: Identity;
|
|
80
|
-
/**
|
|
90
|
+
/** Where the ids and the journey live. Memory until the start, so nothing touches storage. */
|
|
91
|
+
private backing;
|
|
92
|
+
/** Stores for identity and journey keys. They read the backing on every call. */
|
|
81
93
|
private readonly stores;
|
|
82
|
-
/** The identity strategy the
|
|
83
|
-
private
|
|
84
|
-
/** Throttled writer of the session's last-seen timestamp. */
|
|
85
|
-
private
|
|
94
|
+
/** The identity strategy that the start uses. The app's startup call fixes it. */
|
|
95
|
+
private identityBuiltAs;
|
|
96
|
+
/** Throttled writer of the session's last-seen timestamp. The start builds it again. */
|
|
97
|
+
private sessionTouch;
|
|
86
98
|
/** Store for ambient application context attributes. */
|
|
87
99
|
readonly context: ContextStore;
|
|
88
100
|
/** Ring buffer holding contextual user breadcrumbs. */
|
|
@@ -129,8 +141,6 @@ export declare class ObservabilityRuntime {
|
|
|
129
141
|
private busBuilt?;
|
|
130
142
|
/** Promise for the bus load and start. Undefined until first needed. */
|
|
131
143
|
private busLoad?;
|
|
132
|
-
/** The adapter's storage strategy, set when the build starts. */
|
|
133
|
-
private storageBuiltAs?;
|
|
134
144
|
/**
|
|
135
145
|
* Delivery stack. Set in the sender role with an endpoint or a custom transport, once the
|
|
136
146
|
* chunk has loaded.
|
|
@@ -138,8 +148,40 @@ export declare class ObservabilityRuntime {
|
|
|
138
148
|
private sender?;
|
|
139
149
|
/** The delivery stack load. Undefined when nothing loads, so records have no destination. */
|
|
140
150
|
private senderLoad?;
|
|
141
|
-
/** Records that arrive while the delivery stack loads. */
|
|
151
|
+
/** Records that arrive while the delivery stack loads, or while a pause holds them. */
|
|
142
152
|
private readonly pendingRecords;
|
|
153
|
+
/** Records that dropPaused() reported, so a second pagehide doesn't count them again. */
|
|
154
|
+
private readonly pausedLoss;
|
|
155
|
+
/** Stored batches that a carry during a pause left for the next sender to adopt. */
|
|
156
|
+
private carried;
|
|
157
|
+
/** True once resetSession() ran. start() then keeps that session over the stored one. */
|
|
158
|
+
private sessionPicked;
|
|
159
|
+
/**
|
|
160
|
+
* True after a rotation fails. The app asked to leave the context, so the runtime sends no
|
|
161
|
+
* record with its endpoint or headers until a rotation succeeds.
|
|
162
|
+
*/
|
|
163
|
+
private deliveryClosed;
|
|
164
|
+
/**
|
|
165
|
+
* The stopped sender of the context that a failed rotation closed. The next rotation that
|
|
166
|
+
* succeeds retires it with its own rule, so the old records don't stay or move by accident.
|
|
167
|
+
*/
|
|
168
|
+
private parkedSender;
|
|
169
|
+
/** The sender that a rotation retires. Its records wait for the rotation's rule. */
|
|
170
|
+
private retiring;
|
|
171
|
+
/**
|
|
172
|
+
* True after the first configure() call failed. The runtime stays unconfigured and refuses
|
|
173
|
+
* each record, because it can't know what the app needs to redact.
|
|
174
|
+
*/
|
|
175
|
+
private startFailed;
|
|
176
|
+
/**
|
|
177
|
+
* True once the runtime has started: the first configure() call that works, with enabled true.
|
|
178
|
+
* Before that, nothing is patched, stored or sent.
|
|
179
|
+
*/
|
|
180
|
+
private running;
|
|
181
|
+
/** Opens the start gate below. Its promise sets it, and start() calls it. */
|
|
182
|
+
private openGate;
|
|
183
|
+
/** Resolves at the start. A frame or worker that registers before it joins the bus then. */
|
|
184
|
+
private readonly startGate;
|
|
143
185
|
/** Active auto-capture instrumentation modules. */
|
|
144
186
|
private readonly captures;
|
|
145
187
|
/** Number of capture installs. An install replaced by a later one stops after its load. */
|
|
@@ -160,13 +202,20 @@ export declare class ObservabilityRuntime {
|
|
|
160
202
|
private ready;
|
|
161
203
|
/** True if shutdown stopped the runtime. */
|
|
162
204
|
private destroyed;
|
|
205
|
+
/** The first shutdown. A later shutdown() waits for it before it removes the stored data. */
|
|
206
|
+
private stopping?;
|
|
207
|
+
/** When the server last accepted a batch, in epoch milliseconds. A rotation keeps it. */
|
|
208
|
+
private lastSendAt;
|
|
163
209
|
/** When the last storage gap warning was reported, in epoch milliseconds. */
|
|
164
210
|
private lastGapAt;
|
|
165
211
|
/** Record limits for the builder and the console. The app's first configure() sets them. */
|
|
166
212
|
private readonly limits;
|
|
167
213
|
/** Lifetime rules for the journey engine. The app's first configure() sets the age. */
|
|
168
214
|
private readonly journeyOptions;
|
|
169
|
-
/**
|
|
215
|
+
/**
|
|
216
|
+
* False until the app's startup call, the first configure() call that works. That call sets
|
|
217
|
+
* every startup-fixed setting, also after an early log call.
|
|
218
|
+
*/
|
|
170
219
|
private tunablesLocked;
|
|
171
220
|
/**
|
|
172
221
|
* True for a console-only runtime, which sends nothing, joins no bus and installs no capture.
|
|
@@ -197,6 +246,11 @@ export declare class ObservabilityRuntime {
|
|
|
197
246
|
* @param event Diagnostic event.
|
|
198
247
|
*/
|
|
199
248
|
private recordDiagnostic;
|
|
249
|
+
/**
|
|
250
|
+
* Drops the held diagnostic records of a rotation that didn't open its context, and counts
|
|
251
|
+
* each one as the logger counts a call during a rotation.
|
|
252
|
+
*/
|
|
253
|
+
private dropHeldRecords;
|
|
200
254
|
/**
|
|
201
255
|
* Adds a breadcrumb from app code. The data is copied now, so a later change to the app's
|
|
202
256
|
* object doesn't change the trail.
|
|
@@ -252,7 +306,8 @@ export declare class ObservabilityRuntime {
|
|
|
252
306
|
private collectPoints;
|
|
253
307
|
/**
|
|
254
308
|
* Starts a new identity epoch. With isolation on, the profiler also drops its data and open
|
|
255
|
-
* spans, so a span from the old identity can't add to the new one.
|
|
309
|
+
* spans, so a span from the old identity can't add to the new one. The old identity's remote
|
|
310
|
+
* rules and capture switches don't apply to the new one.
|
|
256
311
|
*/
|
|
257
312
|
private advanceIdentity;
|
|
258
313
|
/**
|
|
@@ -294,15 +349,30 @@ export declare class ObservabilityRuntime {
|
|
|
294
349
|
/**
|
|
295
350
|
* Initializes a new runtime instance or updates the existing singleton.
|
|
296
351
|
* @param input Consumer configuration options.
|
|
297
|
-
* @param implicit True for the
|
|
352
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
298
353
|
* @returns Active runtime instance.
|
|
299
354
|
*/
|
|
300
355
|
static configure(input: Partial<ObservabilityConfig>, implicit?: boolean): ObservabilityRuntime;
|
|
356
|
+
/**
|
|
357
|
+
* Fails closed after the app's first configure() call couldn't be read. The library can't
|
|
358
|
+
* tell what the app must redact, so it refuses each record, the held ones too, until a call
|
|
359
|
+
* sets redact itself. The runtime stays unconfigured, so it writes no id to storage.
|
|
360
|
+
* @param error What reading the options threw.
|
|
361
|
+
*/
|
|
362
|
+
private refuse;
|
|
363
|
+
/**
|
|
364
|
+
* Starts a runtime, or updates the one that runs. A getter in the input can throw here.
|
|
365
|
+
* @param input Consumer configuration options.
|
|
366
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
367
|
+
* @returns Active runtime instance.
|
|
368
|
+
*/
|
|
369
|
+
private static startOrUpdate;
|
|
301
370
|
/**
|
|
302
371
|
* Starts a console-only runtime next to another version's runtime. It sends nothing, joins
|
|
303
372
|
* no bus and installs no capture. The other version keeps the page runtime.
|
|
304
373
|
* @param input Consumer configuration options.
|
|
305
374
|
* @param found The pinned runtime's sdkVersion. A runtime older than 0.9.0 has none.
|
|
375
|
+
* @param implicit True for the unconfigured runtime that an early log call makes.
|
|
306
376
|
* @returns The local runtime.
|
|
307
377
|
*/
|
|
308
378
|
private static startDegraded;
|
|
@@ -317,16 +387,16 @@ export declare class ObservabilityRuntime {
|
|
|
317
387
|
*/
|
|
318
388
|
private onServer;
|
|
319
389
|
/**
|
|
320
|
-
* Removes the
|
|
390
|
+
* Removes the routing settings from a console-only runtime's input. On a server, it
|
|
321
391
|
* reports a destination once.
|
|
322
392
|
* @param input Consumer configuration options.
|
|
323
393
|
* @returns The options the runtime accepts.
|
|
324
394
|
*/
|
|
325
395
|
private allowed;
|
|
326
396
|
/**
|
|
327
|
-
* Removes
|
|
397
|
+
* Removes routing and identity changes while isolation is on. The other settings still apply.
|
|
328
398
|
* @param input Consumer configuration options.
|
|
329
|
-
* @returns The options without the refused
|
|
399
|
+
* @returns The options without the refused routing or identity changes.
|
|
330
400
|
*/
|
|
331
401
|
private keepRouting;
|
|
332
402
|
/**
|
|
@@ -341,12 +411,6 @@ export declare class ObservabilityRuntime {
|
|
|
341
411
|
* @param sections Sections that can't change.
|
|
342
412
|
*/
|
|
343
413
|
private keepSections;
|
|
344
|
-
/**
|
|
345
|
-
* Restores the built adapter's storage strategy. Every other key is read live, but the
|
|
346
|
-
* adapter is built only once. A new adapter would strand the batches in the old one, and
|
|
347
|
-
* that loss is worse than a refused change.
|
|
348
|
-
*/
|
|
349
|
-
private keepBuiltStorage;
|
|
350
414
|
/**
|
|
351
415
|
* Refuses a change that leaves the built delivery stack with no destination.
|
|
352
416
|
* Without one, the retry engine removes every stored batch as if it were delivered.
|
|
@@ -359,6 +423,22 @@ export declare class ObservabilityRuntime {
|
|
|
359
423
|
* later change can't move them to another store.
|
|
360
424
|
*/
|
|
361
425
|
private keepBuiltIdentity;
|
|
426
|
+
/**
|
|
427
|
+
* Fixes the startup settings at the first configure() call that works, then starts the
|
|
428
|
+
* runtime once enabled is true. A failed first call leaves the runtime unconfigured.
|
|
429
|
+
*/
|
|
430
|
+
private launch;
|
|
431
|
+
/**
|
|
432
|
+
* Starts the runtime: reads the configured ids, gives the held records the app's hooks and
|
|
433
|
+
* resource, then installs the captures and starts the bus and the sender. Runs once.
|
|
434
|
+
*/
|
|
435
|
+
private start;
|
|
436
|
+
/**
|
|
437
|
+
* Takes the records that log calls held before the app's startup call, and runs the app's
|
|
438
|
+
* hooks on them now.
|
|
439
|
+
* @returns The records the hooks kept, with the configured resource.
|
|
440
|
+
*/
|
|
441
|
+
private rehookHeld;
|
|
362
442
|
/** Initializes asynchronous subsystems and flushes the boot buffer. */
|
|
363
443
|
private init;
|
|
364
444
|
/**
|
|
@@ -409,6 +489,12 @@ export declare class ObservabilityRuntime {
|
|
|
409
489
|
* Never rejects.
|
|
410
490
|
*/
|
|
411
491
|
private buildSender;
|
|
492
|
+
/**
|
|
493
|
+
* Stores an earlier context's batches under this context.
|
|
494
|
+
* @param sender The sender that adopts them.
|
|
495
|
+
* @param stored The earlier context's stored batches.
|
|
496
|
+
*/
|
|
497
|
+
private adoptStored;
|
|
412
498
|
/** Refreshes temporary switches and restores local settings when their TTL ends. */
|
|
413
499
|
private refreshCaptures;
|
|
414
500
|
/**
|
|
@@ -464,8 +550,38 @@ export declare class ObservabilityRuntime {
|
|
|
464
550
|
* @returns Function that removes this registration.
|
|
465
551
|
*/
|
|
466
552
|
registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
|
|
467
|
-
/**
|
|
468
|
-
|
|
553
|
+
/**
|
|
554
|
+
* Stops every subsystem and unpins the runtime. By default it flushes the records first. A
|
|
555
|
+
* discard sends nothing, and a clearStorage scope also removes the stored batches and ids. A
|
|
556
|
+
* later call stops nothing more, but its clearStorage scope still applies.
|
|
557
|
+
* @param options What to do with the records that wait, and which storage to remove.
|
|
558
|
+
*/
|
|
559
|
+
destroy(options?: ShutdownOptions): Promise<void>;
|
|
560
|
+
/**
|
|
561
|
+
* Stops every subsystem once, then unpins the runtime.
|
|
562
|
+
* @param discard True to send nothing and report the records in memory as discarded.
|
|
563
|
+
*/
|
|
564
|
+
private stop;
|
|
565
|
+
/**
|
|
566
|
+
* Reads the shutdown() options. A value it can't use reports config.invalid and discards,
|
|
567
|
+
* because an app that asks to discard or to remove storage doesn't want a send.
|
|
568
|
+
* @param options The app's options.
|
|
569
|
+
* @returns True to discard, and the storage scope to remove.
|
|
570
|
+
*/
|
|
571
|
+
private shutdownRule;
|
|
572
|
+
/** Flushes the sender's records and runs the exit flush. Reports what can't go out. */
|
|
573
|
+
private flushHeld;
|
|
574
|
+
/**
|
|
575
|
+
* Drops the records in memory without a send and reports each one as "discarded". A record
|
|
576
|
+
* in a request that is in flight isn't reported, because the request can still arrive.
|
|
577
|
+
*/
|
|
578
|
+
private discardHeld;
|
|
579
|
+
/**
|
|
580
|
+
* Removes the stored batches, the emergency queue entries and the stored ids. Before the
|
|
581
|
+
* first configure() call that works, no store is known, so it removes nothing.
|
|
582
|
+
* @param scope Whose stored batches to remove.
|
|
583
|
+
*/
|
|
584
|
+
private clearStorage;
|
|
469
585
|
/**
|
|
470
586
|
* Routes a completed log record to the pipeline or forward buffer.
|
|
471
587
|
* @param record Log record to emit, or null when the build dropped it.
|
|
@@ -482,6 +598,17 @@ export declare class ObservabilityRuntime {
|
|
|
482
598
|
* @param record Log record to deliver.
|
|
483
599
|
*/
|
|
484
600
|
private deliver;
|
|
601
|
+
/**
|
|
602
|
+
* Reports the sender's records in memory as lost during a pause. A pause has no exit flush,
|
|
603
|
+
* so a pagehide or a shutdown leaves nothing to send them.
|
|
604
|
+
*/
|
|
605
|
+
private dropPaused;
|
|
606
|
+
/**
|
|
607
|
+
* Leaves out the records that a pause already reported, so onDrop counts each loss once.
|
|
608
|
+
* @param records Lost records.
|
|
609
|
+
* @returns The records with no report yet.
|
|
610
|
+
*/
|
|
611
|
+
private unreported;
|
|
485
612
|
/**
|
|
486
613
|
* Counts a record dropped by a full hold buffer and passes it to the onDrop report.
|
|
487
614
|
* @param record Dropped record.
|
|
@@ -492,7 +619,10 @@ export declare class ObservabilityRuntime {
|
|
|
492
619
|
* @param record Log record to forward.
|
|
493
620
|
*/
|
|
494
621
|
private forward;
|
|
495
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* Hands the forward buffer's records to the bus.
|
|
624
|
+
* @returns How many records went upstream.
|
|
625
|
+
*/
|
|
496
626
|
private sendForwarded;
|
|
497
627
|
/**
|
|
498
628
|
* Validates, samples and queues records from child frames or workers. A forwarded record
|
|
@@ -531,28 +661,38 @@ export declare class ObservabilityRuntime {
|
|
|
531
661
|
*/
|
|
532
662
|
private resetSession;
|
|
533
663
|
/**
|
|
534
|
-
* Changes the delivery context in one operation.
|
|
535
|
-
*
|
|
536
|
-
* @param update New identity,
|
|
664
|
+
* Changes the delivery context in one operation. Rotations run in call order, so a logout
|
|
665
|
+
* that starts during a login still runs, after the login.
|
|
666
|
+
* @param update New identity, routing settings and context attributes.
|
|
537
667
|
* @param options What to do with the old context's records, and the flush deadline.
|
|
538
668
|
* @returns Promise that resolves when the change completes. Invalid settings reject it.
|
|
539
669
|
*/
|
|
540
670
|
rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
|
|
541
671
|
/**
|
|
542
|
-
*
|
|
543
|
-
* @param update New identity,
|
|
544
|
-
* @param
|
|
545
|
-
* @param
|
|
546
|
-
* @returns Promise that resolves when the
|
|
672
|
+
* Runs one rotation once the earlier ones are done. The rotation code loads on the first call.
|
|
673
|
+
* @param update New identity, routing settings and context attributes.
|
|
674
|
+
* @param options What to do with the old context's records, and the flush deadline.
|
|
675
|
+
* @param seq Number of this call.
|
|
676
|
+
* @returns Promise that resolves when the change completes.
|
|
677
|
+
*/
|
|
678
|
+
private runRotation;
|
|
679
|
+
/**
|
|
680
|
+
* Returns the changes the rotation code can make to this runtime's private state.
|
|
681
|
+
* @returns The rotation host.
|
|
682
|
+
*/
|
|
683
|
+
private rotationHost;
|
|
684
|
+
/**
|
|
685
|
+
* Stops delivery after a rotation fails. The app asked to leave this context, so its endpoint
|
|
686
|
+
* and headers send no record until a rotation succeeds. The old records stay stored under
|
|
687
|
+
* the old id, and the next rotation that succeeds applies its rule to them.
|
|
547
688
|
*/
|
|
548
|
-
private
|
|
689
|
+
private closeDelivery;
|
|
549
690
|
/**
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
* @param
|
|
553
|
-
* @returns Promise that resolves once the stored batches are stored again.
|
|
691
|
+
* Stops a sender of a closed context and keeps it, so the next rotation that succeeds can
|
|
692
|
+
* apply its rule to the records of that context.
|
|
693
|
+
* @param sender The sender to stop.
|
|
554
694
|
*/
|
|
555
|
-
private
|
|
695
|
+
private parkSender;
|
|
556
696
|
/**
|
|
557
697
|
* Collects this runtime's state for a support ticket. The app decides where to send it.
|
|
558
698
|
* @param health Health snapshot from the facade, with the logger cache counts.
|
|
@@ -565,26 +705,70 @@ export declare class ObservabilityRuntime {
|
|
|
565
705
|
*/
|
|
566
706
|
health(): Promise<Omit<ObservabilityHealth, "loggerCache">>;
|
|
567
707
|
/**
|
|
568
|
-
*
|
|
569
|
-
* @returns
|
|
708
|
+
* Returns what opening the store needs when no sender runs.
|
|
709
|
+
* @returns The config, the reporter and the kept memory store.
|
|
710
|
+
*/
|
|
711
|
+
private storeAccess;
|
|
712
|
+
/**
|
|
713
|
+
* Counts the stored batches. After a failed rotation, the parked sender's store still holds
|
|
714
|
+
* the closed context's batches, and they count until a rotation retires them.
|
|
715
|
+
* @returns Promise that resolves to the number of stored batches.
|
|
716
|
+
*/
|
|
717
|
+
private storedBatches;
|
|
718
|
+
/**
|
|
719
|
+
* Sends the records in memory and waits until each one has a final state or the time limit
|
|
720
|
+
* passes. A forwarder hands its records to its sender, then asks the sender to flush.
|
|
721
|
+
* @param options How long to wait. A value it can't use reports config.invalid.
|
|
722
|
+
* @returns Promise that resolves to what became of the records in memory at the call. It
|
|
723
|
+
* never rejects.
|
|
724
|
+
*/
|
|
725
|
+
flush(options?: unknown): Promise<FlushResult>;
|
|
726
|
+
/**
|
|
727
|
+
* Runs a flush with a time limit that is already in range.
|
|
728
|
+
* @param timeoutMs How long to wait, in milliseconds.
|
|
729
|
+
* @param collect True to send the open interval of the meter and the profiler first. A flush
|
|
730
|
+
* that a child asks for doesn't, otherwise each request would make this context build points.
|
|
731
|
+
* @returns Promise that resolves to the flush result.
|
|
732
|
+
*/
|
|
733
|
+
private flushFor;
|
|
734
|
+
/**
|
|
735
|
+
* Waits for startup and the delivery stack, then flushes the sender or asks the upstream one.
|
|
736
|
+
* @param ends Epoch time in milliseconds of the deadline.
|
|
737
|
+
* @param expired Resolves at the deadline.
|
|
738
|
+
* @returns The flush result.
|
|
739
|
+
*/
|
|
740
|
+
private flushBefore;
|
|
741
|
+
/**
|
|
742
|
+
* Returns the result for a runtime that sends nothing now: before the start, after a failed
|
|
743
|
+
* first configure(), during a pause and after shutdown().
|
|
744
|
+
* @returns The "inactive" result with the records that wait in memory, or null.
|
|
745
|
+
*/
|
|
746
|
+
private idle;
|
|
747
|
+
/**
|
|
748
|
+
* Counts the records in the hold buffers and the forward buffer.
|
|
749
|
+
* @returns The record count.
|
|
570
750
|
*/
|
|
571
|
-
|
|
751
|
+
private heldRecords;
|
|
572
752
|
/**
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
* @
|
|
576
|
-
* @returns Promise that resolves when removal completes.
|
|
753
|
+
* Counts the records in memory: the hold buffers, the forward buffer, and the buffers, the
|
|
754
|
+
* queue and the requests of the sender and of a sender that a rotation retires.
|
|
755
|
+
* @returns The record count.
|
|
577
756
|
*/
|
|
578
|
-
|
|
757
|
+
private waiting;
|
|
579
758
|
/**
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
759
|
+
* Copies a call's options. A value that isn't an object reports config.invalid with the text,
|
|
760
|
+
* and so does a getter that throws.
|
|
761
|
+
* @param options The app's options. undefined and null read as no options.
|
|
762
|
+
* @param text The text of the report.
|
|
763
|
+
* @returns The copy, or undefined after a report.
|
|
583
764
|
*/
|
|
584
|
-
|
|
765
|
+
private readOptions;
|
|
585
766
|
/**
|
|
586
|
-
*
|
|
587
|
-
*
|
|
767
|
+
* Reads flush()'s time limit. A value it can't use reports config.invalid, and the default
|
|
768
|
+
* applies. null options and a null timeoutMs give the default, as in shutdown() and
|
|
769
|
+
* rotateSecurityContext().
|
|
770
|
+
* @param options The app's options.
|
|
771
|
+
* @returns The time limit in milliseconds.
|
|
588
772
|
*/
|
|
589
|
-
|
|
773
|
+
private flushTimeout;
|
|
590
774
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { ResolvedConfig } from "../models/config.cjs";
|
|
2
|
+
import type { LogLevel, LogRecord } from "../models/log-record.cjs";
|
|
3
|
+
import type { RemoteRules } from "./remote-sampling.cjs";
|
|
4
|
+
/** Value of the longest prefix that matches a namespace. */
|
|
5
|
+
interface PrefixMatch<T> {
|
|
6
|
+
/** The prefix's value, for example a rate or a level. */
|
|
7
|
+
value: T;
|
|
8
|
+
/** Length of the prefix. */
|
|
9
|
+
length: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Finds the longest prefix in a map that matches a namespace.
|
|
13
|
+
* For example, trading.ticks overrides trading.
|
|
14
|
+
* @param namespace Target application namespace.
|
|
15
|
+
* @param values Value for each namespace prefix.
|
|
16
|
+
* @returns The match, or undefined if no prefix matches.
|
|
17
|
+
*/
|
|
18
|
+
export declare function longestPrefix<T>(namespace: string, values: Record<string, T>): PrefixMatch<T> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Finds a namespace's minimum level in the config. The longest matching prefix in
|
|
21
|
+
* `minLevels` wins, and a namespace with no match uses `minLevel`.
|
|
22
|
+
* @param namespace Target application namespace.
|
|
23
|
+
* @param config Active configuration instance.
|
|
24
|
+
* @returns The namespace's minimum level.
|
|
25
|
+
*/
|
|
26
|
+
export declare function levelFor(namespace: string, config: ResolvedConfig): LogLevel;
|
|
27
|
+
/**
|
|
28
|
+
* Decides whether sampling keeps a key at a rate. The same key always gets the same result.
|
|
29
|
+
* @param key Journey ID or trace ID.
|
|
30
|
+
* @param rate Sampling rate, 0..1.
|
|
31
|
+
* @returns True if sampling keeps the key.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sampleKey(key: string, rate: number): boolean;
|
|
34
|
+
/** Fields that sampling reads. The caller knows all of them before it builds a record. */
|
|
35
|
+
export interface SampleInput {
|
|
36
|
+
/** Severity level of the entry. */
|
|
37
|
+
level: string;
|
|
38
|
+
/** Telemetry type classification. */
|
|
39
|
+
type: string;
|
|
40
|
+
/** Originating application namespace. */
|
|
41
|
+
namespace: string;
|
|
42
|
+
/** Active journey ID. Empty when no journey is running. */
|
|
43
|
+
journeyId: string;
|
|
44
|
+
/** Trace ID. Used as the sampling key when no journey is running. */
|
|
45
|
+
traceId: string;
|
|
46
|
+
/** True for a counter or histogram point. Sampling a sum would give a false sum. */
|
|
47
|
+
aggregated?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Decides whether sampling keeps an entry. Reads fields, not a record, so the caller can
|
|
51
|
+
* drop an entry before the attribute walk runs.
|
|
52
|
+
* @param input Fields the sampling decision reads.
|
|
53
|
+
* @param config Active configuration instance.
|
|
54
|
+
* @param remote Current remote rules, or null.
|
|
55
|
+
* @returns True if the runtime keeps and sends the entry.
|
|
56
|
+
*/
|
|
57
|
+
export declare function shouldSampleInput(input: SampleInput, config: ResolvedConfig, remote: RemoteRules | null): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Decides whether sampling keeps a built log record. The runtime uses it for records
|
|
60
|
+
* that a child context sends over the bus.
|
|
61
|
+
* @param record Record to evaluate.
|
|
62
|
+
* @param config Active configuration instance.
|
|
63
|
+
* @param remote Current remote rules, or null.
|
|
64
|
+
* @returns True if the runtime keeps and sends the record.
|
|
65
|
+
*/
|
|
66
|
+
export declare function shouldSample(record: LogRecord, config: ResolvedConfig, remote?: RemoteRules | null): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Puts a fixed-window limit on the records that bypass sampling because of their level.
|
|
69
|
+
*
|
|
70
|
+
* ErrorCapture already limits auto-captured errors. This class covers what is left, for
|
|
71
|
+
* example application code that calls logger.error in a render loop.
|
|
72
|
+
*/
|
|
73
|
+
export declare class ErrorCeiling {
|
|
74
|
+
/** Records at or above the threshold level admitted in the current window. */
|
|
75
|
+
private readonly window;
|
|
76
|
+
/**
|
|
77
|
+
* Checks a record against the limit. Only records at or above `from` are counted.
|
|
78
|
+
* @param record Record about to enter a stream.
|
|
79
|
+
* @param limit Maximum records in one window. 0 allows none, and null means no limit.
|
|
80
|
+
* @param windowMs Rate limit window, in milliseconds.
|
|
81
|
+
* @param from Lowest level that bypasses sampling.
|
|
82
|
+
* @returns False when the window has no allowance left. The caller must drop the record.
|
|
83
|
+
*/
|
|
84
|
+
allow(record: LogRecord, limit?: number | null, windowMs?: number, from?: LogLevel): boolean;
|
|
85
|
+
}
|
|
86
|
+
export {};
|
package/dist/core/sampling.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ResolvedConfig } from "../models/config";
|
|
2
|
-
import type { LogLevel, LogRecord } from "../models/log-record";
|
|
3
|
-
import type { RemoteRules } from "./remote-sampling";
|
|
1
|
+
import type { ResolvedConfig } from "../models/config.js";
|
|
2
|
+
import type { LogLevel, LogRecord } from "../models/log-record.js";
|
|
3
|
+
import type { RemoteRules } from "./remote-sampling.js";
|
|
4
4
|
/** Value of the longest prefix that matches a namespace. */
|
|
5
5
|
interface PrefixMatch<T> {
|
|
6
6
|
/** The prefix's value, for example a rate or a level. */
|
|
@@ -76,11 +76,11 @@ export declare class ErrorCeiling {
|
|
|
76
76
|
/**
|
|
77
77
|
* Checks a record against the limit. Only records at or above `from` are counted.
|
|
78
78
|
* @param record Record about to enter a stream.
|
|
79
|
-
* @param limit Maximum records in one window.
|
|
79
|
+
* @param limit Maximum records in one window. 0 allows none, and null means no limit.
|
|
80
80
|
* @param windowMs Rate limit window, in milliseconds.
|
|
81
81
|
* @param from Lowest level that bypasses sampling.
|
|
82
82
|
* @returns False when the window has no allowance left. The caller must drop the record.
|
|
83
83
|
*/
|
|
84
|
-
allow(record: LogRecord, limit?: number, windowMs?: number, from?: LogLevel): boolean;
|
|
84
|
+
allow(record: LogRecord, limit?: number | null, windowMs?: number, from?: LogLevel): boolean;
|
|
85
85
|
}
|
|
86
86
|
export {};
|