@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
|
@@ -1,62 +1,70 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { LogBatch } from "../models/batch";
|
|
3
|
-
import type { ResolvedConfig } from "../models/config";
|
|
4
|
-
import type { LossReporter } from "../models/drop";
|
|
5
|
-
/**
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { LogBatch } from "../models/batch.js";
|
|
3
|
+
import type { ResolvedConfig } from "../models/config.js";
|
|
4
|
+
import type { LossReporter } from "../models/drop.js";
|
|
5
|
+
/** The lifecycle event or manual action that starts an exit flush. */
|
|
6
6
|
export type ExitReason = "hidden" | "pagehide" | "freeze" | "openfin-close" | "shutdown";
|
|
7
|
-
/**
|
|
7
|
+
/** Dependencies of ExitFlush. */
|
|
8
8
|
export interface ExitFlushDeps {
|
|
9
|
-
/**
|
|
9
|
+
/** The active configuration. */
|
|
10
10
|
config: ResolvedConfig;
|
|
11
|
-
/**
|
|
11
|
+
/** Diagnostics reporter. */
|
|
12
12
|
diagnostics: Diagnostics;
|
|
13
|
-
/**
|
|
13
|
+
/** Drains all buffered and unconfirmed records into one batch per kind. */
|
|
14
14
|
drainForExit: () => LogBatch[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* It
|
|
16
|
+
* Runs a normal flush with headers, gzip and retry. Used for a hidden document.
|
|
17
|
+
* It doesn't touch an in-flight batch.
|
|
18
18
|
*/
|
|
19
|
-
flushAlive: () =>
|
|
19
|
+
flushAlive: () => unknown;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* Returns the headers that the HTTP transport sent last, or undefined. sendBeacon can't set
|
|
22
|
+
* a header, so when there are headers the exit flush uses a keepalive fetch.
|
|
23
23
|
*/
|
|
24
24
|
exitHeaders: () => Record<string, string> | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Returns the bytes of the HTTP transport's keepalive requests that haven't settled, or
|
|
27
|
+
* undefined without an HTTP transport. A hidden page's sends use the exit sends' budget.
|
|
28
|
+
*/
|
|
29
|
+
keepaliveInFlight: () => number | undefined;
|
|
30
|
+
/** Receives the records that the exit flush loses. */
|
|
26
31
|
onLoss?: LossReporter;
|
|
27
|
-
/**
|
|
32
|
+
/** Pushes the open metric interval's points into the buffers. */
|
|
28
33
|
beforeExit?: () => void;
|
|
29
34
|
}
|
|
30
35
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
36
|
+
* Flushes pending telemetry on document unload, with sendBeacon, a keepalive fetch or
|
|
37
|
+
* emergency storage.
|
|
33
38
|
*/
|
|
34
39
|
export declare class ExitFlush {
|
|
35
40
|
private readonly deps;
|
|
36
|
-
/**
|
|
41
|
+
/** True while we are listening for the unload events. */
|
|
37
42
|
private installed;
|
|
38
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Bytes in flight against the browser's one budget for beacons and keepalive fetches. It
|
|
45
|
+
* starts at the transport's keepalive sends, and each batch of the current exit flush adds to it.
|
|
46
|
+
*/
|
|
39
47
|
private keepaliveBytes;
|
|
40
|
-
/**
|
|
48
|
+
/** Flushes on visibilitychange when the document becomes hidden. */
|
|
41
49
|
private readonly onVisibility;
|
|
42
|
-
/**
|
|
50
|
+
/** Flushes on the window's pagehide event. */
|
|
43
51
|
private readonly onPageHide;
|
|
44
|
-
/**
|
|
52
|
+
/** Flushes on the document's freeze event. */
|
|
45
53
|
private readonly onFreeze;
|
|
46
|
-
/**
|
|
54
|
+
/** Flushes on the OpenFin close-requested event. */
|
|
47
55
|
private readonly onOpenFinClose;
|
|
48
56
|
/**
|
|
49
57
|
* @param deps Injected configuration, diagnostics, and drain callback.
|
|
50
58
|
*/
|
|
51
59
|
constructor(deps: ExitFlushDeps);
|
|
52
|
-
/**
|
|
60
|
+
/** Attaches the unload listeners to the document, the window and OpenFin. */
|
|
53
61
|
install(): void;
|
|
54
|
-
/**
|
|
62
|
+
/** Removes all unload listeners and subscriptions. */
|
|
55
63
|
uninstall(): void;
|
|
56
64
|
/**
|
|
57
|
-
* Drains pending records synchronously
|
|
58
|
-
*
|
|
59
|
-
*
|
|
65
|
+
* Drains pending records synchronously and sends them with a beacon, a keepalive fetch or
|
|
66
|
+
* emergency storage. A hidden document gets a normal flush. Never awaits and never throws,
|
|
67
|
+
* because the caller is an unload listener.
|
|
60
68
|
* @param reason Reason code of the flush.
|
|
61
69
|
*/
|
|
62
70
|
flush(reason: ExitReason): void;
|
|
@@ -67,24 +75,31 @@ export declare class ExitFlush {
|
|
|
67
75
|
* @param url Endpoint of the batch.
|
|
68
76
|
*/
|
|
69
77
|
private flushBatch;
|
|
70
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Checks whether the endpoint is on the page's origin, where a request needs no CORS preflight.
|
|
80
|
+
* @param url Endpoint of the batch.
|
|
81
|
+
* @returns False for another origin, for an opaque origin, and when the origin global and
|
|
82
|
+
* location disagree or the host has no location.
|
|
83
|
+
*/
|
|
84
|
+
private isSameOrigin;
|
|
85
|
+
/** Runs a hidden document's normal flush, and reports it if it throws or rejects. */
|
|
71
86
|
private flushAlive;
|
|
72
87
|
/**
|
|
73
|
-
*
|
|
74
|
-
* wait for the async transport. Without a hook, or when the hook refuses the batch, the
|
|
75
|
-
* goes to the emergency queue
|
|
88
|
+
* Hands the pending records to a custom transport's exit hook, because a closing page can't
|
|
89
|
+
* wait for the async transport. Without a hook, or when the hook refuses the batch, the
|
|
90
|
+
* batch goes to the emergency queue and the next page load sends it.
|
|
76
91
|
* @param reason Reason code of the flush.
|
|
77
|
-
* @param onExit
|
|
92
|
+
* @param onExit The custom transport's synchronous exit hook.
|
|
78
93
|
*/
|
|
79
94
|
private flushCustom;
|
|
80
95
|
/**
|
|
81
|
-
*
|
|
82
|
-
* "memory" or "none"
|
|
83
|
-
* @param batch Batch that the exit flush
|
|
96
|
+
* Parks a batch in the localStorage emergency queue for the next page load. With the storage
|
|
97
|
+
* backend "memory" or "none" the app wants nothing kept on the device, so the batch is lost.
|
|
98
|
+
* @param batch Batch that the exit flush can't send.
|
|
84
99
|
*/
|
|
85
100
|
private park;
|
|
86
101
|
/**
|
|
87
|
-
* Serializes the exit batch
|
|
102
|
+
* Serializes the exit batch, and reports a serializer that throws.
|
|
88
103
|
* @param batch Batch to serialize.
|
|
89
104
|
* @param reason Reason code of the flush.
|
|
90
105
|
* @returns The serialized batch, or undefined if the serializer threw.
|
|
@@ -99,20 +114,22 @@ export declare class ExitFlush {
|
|
|
99
114
|
* Sends the payload as text/plain with navigator.sendBeacon.
|
|
100
115
|
* @param url Target endpoint URL with query parameters.
|
|
101
116
|
* @param body Serialized payload string.
|
|
102
|
-
* @returns The answer
|
|
117
|
+
* @returns The browser's answer.
|
|
103
118
|
*/
|
|
104
119
|
private beacon;
|
|
105
120
|
/**
|
|
106
|
-
* Sends
|
|
107
|
-
*
|
|
108
|
-
* A
|
|
109
|
-
* its batch id.
|
|
121
|
+
* Sends the exit POST with fetch and `keepalive: true`. A keepalive request continues
|
|
122
|
+
* after the document closes, whereas the browser cancels a plain fetch at page close.
|
|
123
|
+
* A fetch that fails while the document is alive parks the batch in the emergency queue, and
|
|
124
|
+
* the server drops a second copy by its batch id. A rejection after the close parks nothing.
|
|
110
125
|
* @param url Target endpoint URL.
|
|
111
126
|
* @param batch Batch in the payload.
|
|
112
127
|
* @param body Serialized payload string.
|
|
128
|
+
* @param bytes Size of the body, which flushBatch has measured already.
|
|
113
129
|
* @param reason Reason code of the flush.
|
|
114
|
-
* @param headers Builds the request headers.
|
|
115
|
-
* content type. A header value outside ISO-8859-1 makes the Headers constructor
|
|
130
|
+
* @param headers Builds the request headers. To another origin without `headers` that is only
|
|
131
|
+
* a text/plain content type. A header value outside ISO-8859-1 makes the Headers constructor
|
|
132
|
+
* throw.
|
|
116
133
|
*/
|
|
117
134
|
private keepaliveFetch;
|
|
118
135
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { ResolvedConfig } from "../models/config.cjs";
|
|
3
|
+
/** Returns the last headers, but only while their source and all destinations are unchanged. */
|
|
4
|
+
export declare function lastHeaders(owner: object, config: ResolvedConfig): Record<string, string> | undefined;
|
|
5
|
+
/** Resolves a headers function on the main thread and keeps its result for the exit flush. */
|
|
6
|
+
export declare function resolveHeaders(owner: object, config: ResolvedConfig, diagnostics: Diagnostics): Promise<Record<string, string>>;
|
|
7
|
+
/** Forgets rejected credentials before the headers function is called again. */
|
|
8
|
+
export declare function resetHeaders(owner: object): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { ResolvedConfig } from "../models/config";
|
|
3
|
-
/**
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { ResolvedConfig } from "../models/config.js";
|
|
3
|
+
/** Returns the last headers, but only while their source and all destinations are unchanged. */
|
|
4
4
|
export declare function lastHeaders(owner: object, config: ResolvedConfig): Record<string, string> | undefined;
|
|
5
5
|
/** Resolves a headers function on the main thread and keeps its result for the exit flush. */
|
|
6
6
|
export declare function resolveHeaders(owner: object, config: ResolvedConfig, diagnostics: Diagnostics): Promise<Record<string, string>>;
|
|
7
|
-
/**
|
|
7
|
+
/** Forgets rejected credentials before the headers function is called again. */
|
|
8
8
|
export declare function resetHeaders(owner: object): void;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { LogBatch } from "../models/batch.cjs";
|
|
2
|
+
import { StatusTransport } from "./status-transport.cjs";
|
|
3
|
+
/** Advice for an HTTP send answered with a 401 or a 403, on the main thread or in the worker. */
|
|
4
|
+
export declare const CREDENTIAL_ADVICE: string;
|
|
5
|
+
/**
|
|
6
|
+
* Sends serialized log batches over HTTP. Resolves headers, applies gzip compression and
|
|
7
|
+
* classifies errors.
|
|
8
|
+
*/
|
|
9
|
+
export declare class HttpTransport extends StatusTransport {
|
|
10
|
+
/** Body bytes of this transport's keepalive requests that haven't settled yet. */
|
|
11
|
+
private keepaliveBytes;
|
|
12
|
+
/**
|
|
13
|
+
* Sends one log batch over HTTP. A metrics batch goes to metricsEndpoint and a traces batch
|
|
14
|
+
* to tracesEndpoint. A batch without an endpoint goes nowhere.
|
|
15
|
+
* @param batch Batch to send.
|
|
16
|
+
* @param onKeepalive Runs when one of the batch's requests starts with keepalive.
|
|
17
|
+
* @returns Promise that resolves to the records lost in a send that ends without an error.
|
|
18
|
+
* @throws TransportError on transient, throttled, 413, or permanent network failures.
|
|
19
|
+
*/
|
|
20
|
+
send(batch: LogBatch, onKeepalive?: () => void): Promise<number>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the headers for the exit flush, because a closing document can't await headers().
|
|
23
|
+
* @returns The static headers, the last result of the current headers function, or undefined.
|
|
24
|
+
*/
|
|
25
|
+
lastHeaders(): Record<string, string> | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the body bytes of the keepalive requests that haven't settled. The browser has one
|
|
28
|
+
* budget for them and the exit sends, so the exit flush starts its count from this number.
|
|
29
|
+
* @returns Bytes in flight, or 0.
|
|
30
|
+
*/
|
|
31
|
+
keepaliveInFlight(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Serializes, encodes and sends a batch. Throws a classified TransportError
|
|
34
|
+
* on failure.
|
|
35
|
+
* @param batch Batch to deliver.
|
|
36
|
+
* @param kind Kind of the batch. The caller reads it together with the endpoint.
|
|
37
|
+
* @param endpoint Ingest URL. The caller reads it once, so a reconfigure during the send
|
|
38
|
+
* can't change it.
|
|
39
|
+
* @param onKeepalive Runs when one of the batch's requests starts with keepalive.
|
|
40
|
+
* @returns The records lost in an accepted batch, or all of them when serializing fails.
|
|
41
|
+
*/
|
|
42
|
+
private post;
|
|
43
|
+
/**
|
|
44
|
+
* Checks whether a status rejects the credentials.
|
|
45
|
+
* @param status HTTP status code.
|
|
46
|
+
* @returns True for 401 and 403.
|
|
47
|
+
*/
|
|
48
|
+
private rejectsCredentials;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves the headers, encodes the body and sends one request. One deadline covers all
|
|
51
|
+
* three steps, otherwise a headers() that never settles holds a dispatch slot forever.
|
|
52
|
+
* @param batch Batch to deliver.
|
|
53
|
+
* @param endpoint Ingest URL.
|
|
54
|
+
* @param serialized Serialized batch.
|
|
55
|
+
* @param otlp True when the batch is in an OTLP format, so a 2xx can carry a partialSuccess.
|
|
56
|
+
* @param onKeepalive Runs when the request starts with keepalive.
|
|
57
|
+
* @returns Promise that resolves to the response and the body text its status needs.
|
|
58
|
+
* @throws TransportError on timeout or network failure.
|
|
59
|
+
*/
|
|
60
|
+
private attempt;
|
|
61
|
+
/**
|
|
62
|
+
* Waits for a step until the deadline.
|
|
63
|
+
* @param work Step to wait for. It never rejects, so only the deadline rejects here.
|
|
64
|
+
* @param deadline Epoch time in milliseconds at which the request times out.
|
|
65
|
+
* @param endpoint Ingest URL of the request, for the timeout report.
|
|
66
|
+
* @returns Promise that resolves to the step's value.
|
|
67
|
+
* @throws TransportError of kind "timeout" at the deadline.
|
|
68
|
+
*/
|
|
69
|
+
private before;
|
|
70
|
+
/**
|
|
71
|
+
* Reports a timeout and builds its error.
|
|
72
|
+
* @param endpoint Ingest URL of the request.
|
|
73
|
+
* @returns TransportError of kind "timeout".
|
|
74
|
+
*/
|
|
75
|
+
private timeout;
|
|
76
|
+
/**
|
|
77
|
+
* Compresses the serialized payload when the config sets gzip and the payload is at or
|
|
78
|
+
* above the threshold.
|
|
79
|
+
* @param text Serialized payload string.
|
|
80
|
+
* @returns Promise that resolves to the original string or the compressed byte array.
|
|
81
|
+
*/
|
|
82
|
+
private encodeBody;
|
|
83
|
+
/**
|
|
84
|
+
* Sends the HTTP POST request with a timeout, and maps network errors to
|
|
85
|
+
* TransportError.
|
|
86
|
+
* @param endpoint Ingest URL.
|
|
87
|
+
* @param headers HTTP request headers.
|
|
88
|
+
* @param body Request body string or byte array.
|
|
89
|
+
* @param deadline Epoch time in milliseconds at which the request times out.
|
|
90
|
+
* @param keepalive True if the request continues after unload.
|
|
91
|
+
* @param otlp True when the batch is in an OTLP format, so a 2xx can carry a partialSuccess.
|
|
92
|
+
* @returns Promise that resolves to the response and the body text its status needs.
|
|
93
|
+
* @throws TransportError on network failure, timeout, or offline status.
|
|
94
|
+
*/
|
|
95
|
+
private dispatch;
|
|
96
|
+
/**
|
|
97
|
+
* Checks whether a send uses keepalive. A mobile OS can stop a hidden page without a
|
|
98
|
+
* pagehide, and a keepalive request continues after that. The browser limits the keepalive
|
|
99
|
+
* bodies in flight.
|
|
100
|
+
* @param bytes Size of the request body.
|
|
101
|
+
* @returns True for a hidden document and a body of BEACON_LIMIT_BYTES or less.
|
|
102
|
+
*/
|
|
103
|
+
private keepalive;
|
|
104
|
+
/**
|
|
105
|
+
* Reads the optional maxBytes limit from a 413 response body.
|
|
106
|
+
* @param body The 413 body text.
|
|
107
|
+
* @returns The limit in bytes, or undefined.
|
|
108
|
+
*/
|
|
109
|
+
private readMaxBytes;
|
|
110
|
+
/**
|
|
111
|
+
* Resolves the configured static or dynamic request headers, and keeps what headers()
|
|
112
|
+
* returned for the exit flush.
|
|
113
|
+
* @returns Promise that resolves to the header map.
|
|
114
|
+
*/
|
|
115
|
+
private resolveHeaders;
|
|
116
|
+
}
|
|
@@ -1,58 +1,69 @@
|
|
|
1
|
-
import type { LogBatch } from "../models/batch";
|
|
2
|
-
import { StatusTransport } from "./status-transport";
|
|
3
|
-
/** Advice for a 401 or a 403
|
|
1
|
+
import type { LogBatch } from "../models/batch.js";
|
|
2
|
+
import { StatusTransport } from "./status-transport.js";
|
|
3
|
+
/** Advice for an HTTP send answered with a 401 or a 403, on the main thread or in the worker. */
|
|
4
4
|
export declare const CREDENTIAL_ADVICE: string;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Sends serialized log batches over HTTP. Resolves headers, applies gzip compression and
|
|
7
|
+
* classifies errors.
|
|
8
8
|
*/
|
|
9
9
|
export declare class HttpTransport extends StatusTransport {
|
|
10
|
+
/** Body bytes of this transport's keepalive requests that haven't settled yet. */
|
|
11
|
+
private keepaliveBytes;
|
|
10
12
|
/**
|
|
11
|
-
* Sends one log batch over HTTP. A metrics batch goes to metricsEndpoint
|
|
12
|
-
* tracesEndpoint. A batch without an endpoint goes nowhere.
|
|
13
|
+
* Sends one log batch over HTTP. A metrics batch goes to metricsEndpoint and a traces batch
|
|
14
|
+
* to tracesEndpoint. A batch without an endpoint goes nowhere.
|
|
13
15
|
* @param batch Batch to send.
|
|
14
|
-
* @param onKeepalive Runs when
|
|
16
|
+
* @param onKeepalive Runs when one of the batch's requests starts with keepalive.
|
|
17
|
+
* @returns Promise that resolves to the records lost in a send that ends without an error.
|
|
15
18
|
* @throws TransportError on transient, throttled, 413, or permanent network failures.
|
|
16
19
|
*/
|
|
17
|
-
send(batch: LogBatch, onKeepalive?: () => void): Promise<
|
|
20
|
+
send(batch: LogBatch, onKeepalive?: () => void): Promise<number>;
|
|
18
21
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @returns The static headers, the
|
|
22
|
+
* Returns the headers for the exit flush, because a closing document can't await headers().
|
|
23
|
+
* @returns The static headers, the last result of the current headers function, or undefined.
|
|
21
24
|
*/
|
|
22
25
|
lastHeaders(): Record<string, string> | undefined;
|
|
23
26
|
/**
|
|
24
|
-
*
|
|
27
|
+
* Returns the body bytes of the keepalive requests that haven't settled. The browser has one
|
|
28
|
+
* budget for them and the exit sends, so the exit flush starts its count from this number.
|
|
29
|
+
* @returns Bytes in flight, or 0.
|
|
30
|
+
*/
|
|
31
|
+
keepaliveInFlight(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Serializes, encodes and sends a batch. Throws a classified TransportError
|
|
25
34
|
* on failure.
|
|
26
35
|
* @param batch Batch to deliver.
|
|
27
|
-
* @param kind Kind of the batch. The caller reads it with the endpoint.
|
|
28
|
-
* @param endpoint Ingest URL. The caller reads it
|
|
29
|
-
*
|
|
30
|
-
* @param onKeepalive Runs when
|
|
36
|
+
* @param kind Kind of the batch. The caller reads it together with the endpoint.
|
|
37
|
+
* @param endpoint Ingest URL. The caller reads it once, so a reconfigure during the send
|
|
38
|
+
* can't change it.
|
|
39
|
+
* @param onKeepalive Runs when one of the batch's requests starts with keepalive.
|
|
40
|
+
* @returns The records lost in an accepted batch, or all of them when serializing fails.
|
|
31
41
|
*/
|
|
32
42
|
private post;
|
|
33
43
|
/**
|
|
34
|
-
*
|
|
44
|
+
* Checks whether a status rejects the credentials.
|
|
35
45
|
* @param status HTTP status code.
|
|
36
46
|
* @returns True for 401 and 403.
|
|
37
47
|
*/
|
|
38
48
|
private rejectsCredentials;
|
|
39
49
|
/**
|
|
40
|
-
* Resolves the headers, encodes the body and sends one request. One deadline covers
|
|
41
|
-
* three steps
|
|
50
|
+
* Resolves the headers, encodes the body and sends one request. One deadline covers all
|
|
51
|
+
* three steps, otherwise a headers() that never settles holds a dispatch slot forever.
|
|
42
52
|
* @param batch Batch to deliver.
|
|
43
53
|
* @param endpoint Ingest URL.
|
|
44
54
|
* @param serialized Serialized batch.
|
|
55
|
+
* @param otlp True when the batch is in an OTLP format, so a 2xx can carry a partialSuccess.
|
|
45
56
|
* @param onKeepalive Runs when the request starts with keepalive.
|
|
46
|
-
* @returns Promise that resolves to the
|
|
57
|
+
* @returns Promise that resolves to the response and the body text its status needs.
|
|
47
58
|
* @throws TransportError on timeout or network failure.
|
|
48
59
|
*/
|
|
49
60
|
private attempt;
|
|
50
61
|
/**
|
|
51
62
|
* Waits for a step until the deadline.
|
|
52
|
-
* @param work Step to wait for. It
|
|
63
|
+
* @param work Step to wait for. It never rejects, so only the deadline rejects here.
|
|
53
64
|
* @param deadline Epoch time in milliseconds at which the request times out.
|
|
54
65
|
* @param endpoint Ingest URL of the request, for the timeout report.
|
|
55
|
-
* @returns Promise that resolves to the value
|
|
66
|
+
* @returns Promise that resolves to the step's value.
|
|
56
67
|
* @throws TransportError of kind "timeout" at the deadline.
|
|
57
68
|
*/
|
|
58
69
|
private before;
|
|
@@ -63,41 +74,43 @@ export declare class HttpTransport extends StatusTransport {
|
|
|
63
74
|
*/
|
|
64
75
|
private timeout;
|
|
65
76
|
/**
|
|
66
|
-
* Compresses the serialized payload when the config sets gzip
|
|
67
|
-
*
|
|
77
|
+
* Compresses the serialized payload when the config sets gzip and the payload is at or
|
|
78
|
+
* above the threshold.
|
|
68
79
|
* @param text Serialized payload string.
|
|
69
|
-
* @returns Promise that resolves to original string or compressed byte array.
|
|
80
|
+
* @returns Promise that resolves to the original string or the compressed byte array.
|
|
70
81
|
*/
|
|
71
82
|
private encodeBody;
|
|
72
83
|
/**
|
|
73
|
-
* Sends the HTTP POST request with a timeout
|
|
84
|
+
* Sends the HTTP POST request with a timeout, and maps network errors to
|
|
74
85
|
* TransportError.
|
|
75
86
|
* @param endpoint Ingest URL.
|
|
76
87
|
* @param headers HTTP request headers.
|
|
77
88
|
* @param body Request body string or byte array.
|
|
78
89
|
* @param deadline Epoch time in milliseconds at which the request times out.
|
|
79
90
|
* @param keepalive True if the request continues after unload.
|
|
80
|
-
* @
|
|
91
|
+
* @param otlp True when the batch is in an OTLP format, so a 2xx can carry a partialSuccess.
|
|
92
|
+
* @returns Promise that resolves to the response and the body text its status needs.
|
|
81
93
|
* @throws TransportError on network failure, timeout, or offline status.
|
|
82
94
|
*/
|
|
83
95
|
private dispatch;
|
|
84
96
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
97
|
+
* Checks whether a send uses keepalive. A mobile OS can stop a hidden page without a
|
|
98
|
+
* pagehide, and a keepalive request continues after that. The browser limits the keepalive
|
|
99
|
+
* bodies in flight.
|
|
100
|
+
* @param bytes Size of the request body.
|
|
88
101
|
* @returns True for a hidden document and a body of BEACON_LIMIT_BYTES or less.
|
|
89
102
|
*/
|
|
90
103
|
private keepalive;
|
|
91
104
|
/**
|
|
92
105
|
* Reads the optional maxBytes limit from a 413 response body.
|
|
93
|
-
* @param
|
|
94
|
-
* @returns
|
|
106
|
+
* @param body The 413 body text.
|
|
107
|
+
* @returns The limit in bytes, or undefined.
|
|
95
108
|
*/
|
|
96
109
|
private readMaxBytes;
|
|
97
110
|
/**
|
|
98
|
-
* Resolves the configured static or dynamic request headers
|
|
99
|
-
*
|
|
100
|
-
* @returns Promise that resolves to
|
|
111
|
+
* Resolves the configured static or dynamic request headers, and keeps what headers()
|
|
112
|
+
* returned for the exit flush.
|
|
113
|
+
* @returns Promise that resolves to the header map.
|
|
101
114
|
*/
|
|
102
115
|
private resolveHeaders;
|
|
103
116
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Transport, TransportRequest } from "../models/config.cjs";
|
|
2
|
+
import type { LogRecord } from "../models/log-record.cjs";
|
|
3
|
+
/** A transport for tests that keeps every batch in memory. */
|
|
4
|
+
export interface MemoryTransport {
|
|
5
|
+
/** Pass this function as `transport` to `configure()`. */
|
|
6
|
+
transport: Transport;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the records of every accepted batch, in send order.
|
|
9
|
+
* @returns The accepted records.
|
|
10
|
+
*/
|
|
11
|
+
records(): LogRecord[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns every request, accepted or refused, in send order.
|
|
14
|
+
* @returns The requests.
|
|
15
|
+
*/
|
|
16
|
+
batches(): TransportRequest[];
|
|
17
|
+
/** Forgets every batch. The answer set with respondWith stays. */
|
|
18
|
+
clear(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Sets the answer for all later batches. The default answer is 200.
|
|
21
|
+
* @param status Status code to answer with, for example 413, 429 or 500.
|
|
22
|
+
* @param retryAfterMs Delay to answer with, for 429 and 503.
|
|
23
|
+
*/
|
|
24
|
+
respondWith(status: number, retryAfterMs?: number): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates a transport that keeps every batch in memory. Use it in tests, with `configure()`.
|
|
28
|
+
* @returns The memory transport.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createMemoryTransport(): MemoryTransport;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import type { Transport, TransportRequest } from "../models/config";
|
|
2
|
-
import type { LogRecord } from "../models/log-record";
|
|
3
|
-
/** A transport that keeps
|
|
1
|
+
import type { Transport, TransportRequest } from "../models/config.js";
|
|
2
|
+
import type { LogRecord } from "../models/log-record.js";
|
|
3
|
+
/** A transport for tests that keeps every batch in memory. */
|
|
4
4
|
export interface MemoryTransport {
|
|
5
5
|
/** Pass this function as `transport` to `configure()`. */
|
|
6
6
|
transport: Transport;
|
|
7
7
|
/**
|
|
8
|
-
* Returns the records of
|
|
8
|
+
* Returns the records of every accepted batch, in send order.
|
|
9
9
|
* @returns The accepted records.
|
|
10
10
|
*/
|
|
11
11
|
records(): LogRecord[];
|
|
12
12
|
/**
|
|
13
|
-
* Returns
|
|
13
|
+
* Returns every request, accepted or refused, in send order.
|
|
14
14
|
* @returns The requests.
|
|
15
15
|
*/
|
|
16
16
|
batches(): TransportRequest[];
|
|
17
|
-
/** Forgets
|
|
17
|
+
/** Forgets every batch. The answer set with respondWith stays. */
|
|
18
18
|
clear(): void;
|
|
19
19
|
/**
|
|
20
|
-
* Sets the answer for
|
|
20
|
+
* Sets the answer for all later batches. The default answer is 200.
|
|
21
21
|
* @param status Status code to answer with, for example 413, 429 or 500.
|
|
22
22
|
* @param retryAfterMs Delay to answer with, for 429 and 503.
|
|
23
23
|
*/
|
|
24
24
|
respondWith(status: number, retryAfterMs?: number): void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Creates a transport that keeps
|
|
27
|
+
* Creates a transport that keeps every batch in memory. Use it in tests, with `configure()`.
|
|
28
28
|
* @returns The memory transport.
|
|
29
29
|
*/
|
|
30
30
|
export declare function createMemoryTransport(): MemoryTransport;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { BatchKind, SerializerChoice } from "../models/config.cjs";
|
|
3
|
+
/** What an OTLP server rejected or warned about in a batch it accepted. */
|
|
4
|
+
export interface PartialSuccess {
|
|
5
|
+
/** Number of records the server rejected. 0 means a warning only. */
|
|
6
|
+
rejected: number;
|
|
7
|
+
/** The server's errorMessage, cut to SERVER_MESSAGE_MAX_CHARS. Empty when it sent none. */
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether a batch goes out in an OTLP format. Metrics and traces always do.
|
|
12
|
+
* @param kind Kind of the batch.
|
|
13
|
+
* @param serializer The log serializer option.
|
|
14
|
+
* @returns True for an OTLP batch.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isOtlpBatch(kind: BatchKind, serializer: SerializerChoice): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether the library reads a response's body. A 413 can carry a size hint, and an OTLP
|
|
19
|
+
* answer in JSON can carry a partialSuccess.
|
|
20
|
+
* @param response Response whose headers have arrived.
|
|
21
|
+
* @param otlp True when the batch went out in an OTLP format.
|
|
22
|
+
* @returns True when the body has something the library uses.
|
|
23
|
+
*/
|
|
24
|
+
export declare function needsBody(response: Response, otlp: boolean): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Reads a body that only adds detail to the status. A body that fails or runs out of time gives
|
|
27
|
+
* undefined, because the server has answered and a retry would send an accepted batch again.
|
|
28
|
+
* @param response Response whose headers have arrived.
|
|
29
|
+
* @param signal The request's abort signal. An abort ends the read.
|
|
30
|
+
* @param diagnostics Reports a read that fails.
|
|
31
|
+
* @returns The text, or undefined when the read fails or the body is larger than the limit.
|
|
32
|
+
*/
|
|
33
|
+
export declare function readOptionalBody(response: Response, signal: AbortSignal, diagnostics: Diagnostics): Promise<string | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Reads the optional size hint of a 413 body, for example {"maxBytes":65536}.
|
|
36
|
+
* @param text The body text.
|
|
37
|
+
* @returns The hint when it's a positive safe integer, otherwise undefined.
|
|
38
|
+
* @throws SyntaxError when the text isn't JSON.
|
|
39
|
+
*/
|
|
40
|
+
export declare function maxBytesOf(text: string): number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Reads the partialSuccess of an OTLP export answer, for example
|
|
43
|
+
* {"partialSuccess":{"rejectedLogRecords":"2","errorMessage":"..."}}.
|
|
44
|
+
* @param text The answer's body text.
|
|
45
|
+
* @param kind Kind of the batch, which names the count's field.
|
|
46
|
+
* @returns What the server rejected or warned about, or undefined for a full success.
|
|
47
|
+
* @throws SyntaxError when the text isn't JSON.
|
|
48
|
+
*/
|
|
49
|
+
export declare function partialSuccessOf(text: string, kind: BatchKind): PartialSuccess | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { BatchKind, SerializerChoice } from "../models/config.js";
|
|
3
|
+
/** What an OTLP server rejected or warned about in a batch it accepted. */
|
|
4
|
+
export interface PartialSuccess {
|
|
5
|
+
/** Number of records the server rejected. 0 means a warning only. */
|
|
6
|
+
rejected: number;
|
|
7
|
+
/** The server's errorMessage, cut to SERVER_MESSAGE_MAX_CHARS. Empty when it sent none. */
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Checks whether a batch goes out in an OTLP format. Metrics and traces always do.
|
|
12
|
+
* @param kind Kind of the batch.
|
|
13
|
+
* @param serializer The log serializer option.
|
|
14
|
+
* @returns True for an OTLP batch.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isOtlpBatch(kind: BatchKind, serializer: SerializerChoice): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether the library reads a response's body. A 413 can carry a size hint, and an OTLP
|
|
19
|
+
* answer in JSON can carry a partialSuccess.
|
|
20
|
+
* @param response Response whose headers have arrived.
|
|
21
|
+
* @param otlp True when the batch went out in an OTLP format.
|
|
22
|
+
* @returns True when the body has something the library uses.
|
|
23
|
+
*/
|
|
24
|
+
export declare function needsBody(response: Response, otlp: boolean): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Reads a body that only adds detail to the status. A body that fails or runs out of time gives
|
|
27
|
+
* undefined, because the server has answered and a retry would send an accepted batch again.
|
|
28
|
+
* @param response Response whose headers have arrived.
|
|
29
|
+
* @param signal The request's abort signal. An abort ends the read.
|
|
30
|
+
* @param diagnostics Reports a read that fails.
|
|
31
|
+
* @returns The text, or undefined when the read fails or the body is larger than the limit.
|
|
32
|
+
*/
|
|
33
|
+
export declare function readOptionalBody(response: Response, signal: AbortSignal, diagnostics: Diagnostics): Promise<string | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Reads the optional size hint of a 413 body, for example {"maxBytes":65536}.
|
|
36
|
+
* @param text The body text.
|
|
37
|
+
* @returns The hint when it's a positive safe integer, otherwise undefined.
|
|
38
|
+
* @throws SyntaxError when the text isn't JSON.
|
|
39
|
+
*/
|
|
40
|
+
export declare function maxBytesOf(text: string): number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Reads the partialSuccess of an OTLP export answer, for example
|
|
43
|
+
* {"partialSuccess":{"rejectedLogRecords":"2","errorMessage":"..."}}.
|
|
44
|
+
* @param text The answer's body text.
|
|
45
|
+
* @param kind Kind of the batch, which names the count's field.
|
|
46
|
+
* @returns What the server rejected or warned about, or undefined for a full success.
|
|
47
|
+
* @throws SyntaxError when the text isn't JSON.
|
|
48
|
+
*/
|
|
49
|
+
export declare function partialSuccessOf(text: string, kind: BatchKind): PartialSuccess | undefined;
|