@utk09/ui-observability 0.11.0 → 0.12.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.
Files changed (383) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +273 -102
  3. package/bin/uiobs.mjs +1 -1
  4. package/dist/{batch-CL9uWYY3.js → batch-BjQUwjA6.js} +4 -4
  5. package/dist/batch-BjQUwjA6.js.map +1 -0
  6. package/dist/{batch-C8OcWR2L.cjs → batch-D5LlU4Q9.cjs} +2 -2
  7. package/dist/batch-D5LlU4Q9.cjs.map +1 -0
  8. package/dist/bus/bus.d.ts +48 -47
  9. package/dist/bus/links.d.ts +4 -4
  10. package/dist/bus/validation.d.ts +1 -1
  11. package/dist/bus-D_7pd7RN.cjs +2 -0
  12. package/dist/bus-D_7pd7RN.cjs.map +1 -0
  13. package/dist/{bus-BZ0GldpT.js → bus-ecxUNTja.js} +91 -91
  14. package/dist/bus-ecxUNTja.js.map +1 -0
  15. package/dist/capture/console.d.ts +10 -10
  16. package/dist/capture/errors.d.ts +6 -6
  17. package/dist/capture/interactions.d.ts +14 -14
  18. package/dist/capture/lifecycle.d.ts +3 -3
  19. package/dist/capture/long-frames.d.ts +6 -6
  20. package/dist/capture/network.d.ts +17 -17
  21. package/dist/capture/profiler-frames.d.ts +44 -0
  22. package/dist/capture/replay-buffer.d.ts +46 -0
  23. package/dist/capture/replay-upload.d.ts +74 -0
  24. package/dist/capture/replay.d.ts +114 -0
  25. package/dist/capture/reports.d.ts +2 -2
  26. package/dist/capture/resource-timing.d.ts +1 -1
  27. package/dist/capture/server-timing.d.ts +3 -3
  28. package/dist/capture/storm.d.ts +3 -3
  29. package/dist/capture/types.d.ts +45 -33
  30. package/dist/capture/unclean-exit.d.ts +8 -8
  31. package/dist/capture/user-timing.d.ts +3 -3
  32. package/dist/capture/web-socket.d.ts +11 -11
  33. package/dist/capture/web-vitals.d.ts +20 -7
  34. package/dist/compression-AJJCMBOa.js +11 -0
  35. package/dist/compression-AJJCMBOa.js.map +1 -0
  36. package/dist/compression-lD9abCcO.cjs +2 -0
  37. package/dist/compression-lD9abCcO.cjs.map +1 -0
  38. package/dist/{console-BPZCuSLc.cjs → console-CLz_PvFn.cjs} +2 -2
  39. package/dist/console-CLz_PvFn.cjs.map +1 -0
  40. package/dist/{console-BeCF7n59.js → console-cwgHKXvM.js} +4 -4
  41. package/dist/console-cwgHKXvM.js.map +1 -0
  42. package/dist/constants-Bwl_YtQi.js +349 -0
  43. package/dist/constants-Bwl_YtQi.js.map +1 -0
  44. package/dist/constants-DakMxVB2.cjs +2 -0
  45. package/dist/constants-DakMxVB2.cjs.map +1 -0
  46. package/dist/constants.d.ts +150 -103
  47. package/dist/context-storage-BjzeBSxH.cjs.map +1 -1
  48. package/dist/context-storage-BzkoHzkQ.js.map +1 -1
  49. package/dist/core/breadcrumbs.d.ts +16 -15
  50. package/dist/core/config.d.ts +3 -3
  51. package/dist/core/context.d.ts +7 -7
  52. package/dist/core/debug-buffer.d.ts +10 -10
  53. package/dist/core/debug-bundle.d.ts +3 -3
  54. package/dist/core/deferred.d.ts +2 -2
  55. package/dist/core/diagnostics.d.ts +24 -21
  56. package/dist/core/drops.d.ts +7 -7
  57. package/dist/core/hold-buffer.d.ts +1 -1
  58. package/dist/core/journey.d.ts +22 -23
  59. package/dist/core/logger.d.ts +22 -21
  60. package/dist/core/measure.d.ts +7 -7
  61. package/dist/core/meter.d.ts +25 -21
  62. package/dist/core/pipeline.d.ts +42 -41
  63. package/dist/core/profile-buckets.d.ts +31 -0
  64. package/dist/core/profiler.d.ts +218 -0
  65. package/dist/core/record.d.ts +23 -23
  66. package/dist/core/remote-rules.d.ts +4 -4
  67. package/dist/core/remote-sampling.d.ts +21 -20
  68. package/dist/core/runtime.d.ts +206 -137
  69. package/dist/core/sampling.d.ts +18 -18
  70. package/dist/core/sender.d.ts +22 -20
  71. package/dist/core/spans.d.ts +5 -5
  72. package/dist/{deadline-BOjOxNHj.js → deadline-C4ccAuk5.js} +3 -6
  73. package/dist/deadline-C4ccAuk5.js.map +1 -0
  74. package/dist/deadline-CUGbto-y.cjs +2 -0
  75. package/dist/deadline-CUGbto-y.cjs.map +1 -0
  76. package/dist/{debug-bundle-C7UkHZ-q.js → debug-bundle-BOdYmCeV.js} +10 -3
  77. package/dist/debug-bundle-BOdYmCeV.js.map +1 -0
  78. package/dist/debug-bundle-Ex4L_LSP.cjs +2 -0
  79. package/dist/debug-bundle-Ex4L_LSP.cjs.map +1 -0
  80. package/dist/doctor.cjs +1 -1
  81. package/dist/doctor.cjs.map +1 -1
  82. package/dist/doctor.d.ts +16 -6
  83. package/dist/doctor.js +147 -52
  84. package/dist/doctor.js.map +1 -1
  85. package/dist/{emergency-queue-Zy6lNafo.js → emergency-queue-B9WZxanZ.js} +4 -4
  86. package/dist/emergency-queue-B9WZxanZ.js.map +1 -0
  87. package/dist/{emergency-queue-CNTRui5t.cjs → emergency-queue-HBpL5r3V.cjs} +2 -2
  88. package/dist/emergency-queue-HBpL5r3V.cjs.map +1 -0
  89. package/dist/error-like-B11pB4aL.js.map +1 -1
  90. package/dist/error-like-gGRx2s36.cjs.map +1 -1
  91. package/dist/{errors-Dh7kef0i.js → errors-D6bwgJtO.js} +3 -3
  92. package/dist/errors-D6bwgJtO.js.map +1 -0
  93. package/dist/{errors-tfEr48bS.cjs → errors-DCOCRdSi.cjs} +2 -2
  94. package/dist/errors-DCOCRdSi.cjs.map +1 -0
  95. package/dist/{factory-CJXVYp0R.cjs → factory-DLFDjdLv.cjs} +2 -2
  96. package/dist/factory-DLFDjdLv.cjs.map +1 -0
  97. package/dist/{factory-BonqI3NL.js → factory-e9Qo3K0z.js} +13 -13
  98. package/dist/factory-e9Qo3K0z.js.map +1 -0
  99. package/dist/fixed-window-CvESpFYV.cjs.map +1 -1
  100. package/dist/fixed-window-Dq3MLUUv.js.map +1 -1
  101. package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
  102. package/dist/global-scope-D9I8s-oN.js.map +1 -1
  103. package/dist/guards-Cidk71ME.js.map +1 -1
  104. package/dist/guards-nJ70syPt.cjs.map +1 -1
  105. package/dist/{identity-Cxgj6pZX.cjs → identity-BlvlgjrU.cjs} +2 -2
  106. package/dist/identity-BlvlgjrU.cjs.map +1 -0
  107. package/dist/{identity-DT5VmvXy.js → identity-BrQp_5J5.js} +19 -19
  108. package/dist/identity-BrQp_5J5.js.map +1 -0
  109. package/dist/index.cjs +1 -1
  110. package/dist/index.cjs.map +1 -1
  111. package/dist/index.d.ts +112 -79
  112. package/dist/index.js +783 -635
  113. package/dist/index.js.map +1 -1
  114. package/dist/{indexeddb-storage-CIoW21Xd.cjs → indexeddb-storage-CtLvZH1r.cjs} +2 -2
  115. package/dist/indexeddb-storage-CtLvZH1r.cjs.map +1 -0
  116. package/dist/{indexeddb-storage-BJVtiQKm.js → indexeddb-storage-DLXQzAGh.js} +4 -4
  117. package/dist/indexeddb-storage-DLXQzAGh.js.map +1 -0
  118. package/dist/{interactions-DTgKy_6K.js → interactions-B6z2I4tU.js} +3 -3
  119. package/dist/interactions-B6z2I4tU.js.map +1 -0
  120. package/dist/{interactions-fEN6FbVo.cjs → interactions-P6pz08Jn.cjs} +2 -2
  121. package/dist/interactions-P6pz08Jn.cjs.map +1 -0
  122. package/dist/{journey-CuJrHzEg.js → journey-35yCMNFo.js} +20 -19
  123. package/dist/journey-35yCMNFo.js.map +1 -0
  124. package/dist/journey-DAGh5h9k.cjs +2 -0
  125. package/dist/journey-DAGh5h9k.cjs.map +1 -0
  126. package/dist/keys-BHhw_0Wh.cjs.map +1 -1
  127. package/dist/keys-BU9j5YqW.js.map +1 -1
  128. package/dist/{library-console-D2GY9Or6.cjs → library-console-BFWEuQsl.cjs} +2 -2
  129. package/dist/library-console-BFWEuQsl.cjs.map +1 -0
  130. package/dist/{library-console-C1m6g1BR.js → library-console-Dl_Ly6DQ.js} +2 -2
  131. package/dist/library-console-Dl_Ly6DQ.js.map +1 -0
  132. package/dist/{library-request-1BX_UlaX.cjs → library-request-Da-CHKzT.cjs} +2 -2
  133. package/dist/library-request-Da-CHKzT.cjs.map +1 -0
  134. package/dist/{library-request-BQBT9N9Q.js → library-request-nI6pvI6I.js} +2 -2
  135. package/dist/library-request-nI6pvI6I.js.map +1 -0
  136. package/dist/{lifecycle-2EtUaRpo.cjs → lifecycle-BGGOcN4N.cjs} +2 -2
  137. package/dist/lifecycle-BGGOcN4N.cjs.map +1 -0
  138. package/dist/{lifecycle-BaKx_-32.js → lifecycle-CZ6RRXc6.js} +2 -2
  139. package/dist/lifecycle-CZ6RRXc6.js.map +1 -0
  140. package/dist/{log-record-i9zOTkpQ.cjs → log-record-D7bA1RPb.cjs} +2 -2
  141. package/dist/log-record-D7bA1RPb.cjs.map +1 -0
  142. package/dist/{log-record-CAoGBBf3.js → log-record-DIA6McNr.js} +2 -2
  143. package/dist/log-record-DIA6McNr.js.map +1 -0
  144. package/dist/{long-frames-Czk7IupC.js → long-frames-430_85Da.js} +8 -6
  145. package/dist/long-frames-430_85Da.js.map +1 -0
  146. package/dist/long-frames-Dd8tsi2U.cjs +2 -0
  147. package/dist/long-frames-Dd8tsi2U.cjs.map +1 -0
  148. package/dist/models/batch.d.ts +14 -15
  149. package/dist/models/bus.d.ts +24 -24
  150. package/dist/models/config.d.ts +402 -216
  151. package/dist/models/drop.d.ts +13 -11
  152. package/dist/models/health.d.ts +13 -13
  153. package/dist/models/log-record.d.ts +13 -14
  154. package/dist/models/metric.d.ts +82 -17
  155. package/dist/models/plugin.d.ts +13 -13
  156. package/dist/models/replay.d.ts +60 -0
  157. package/dist/models/serializer.d.ts +2 -3
  158. package/dist/models/stats.d.ts +2 -2
  159. package/dist/models/storage.d.ts +12 -11
  160. package/dist/{network-DBNwApoF.js → network-C7SkLf4v.js} +12 -12
  161. package/dist/network-C7SkLf4v.js.map +1 -0
  162. package/dist/{network-xbbuvG_6.cjs → network-pEX3PAJv.cjs} +2 -2
  163. package/dist/network-pEX3PAJv.cjs.map +1 -0
  164. package/dist/openfin-Bxelt0yg.js.map +1 -1
  165. package/dist/openfin-DtH2f7zX.cjs.map +1 -1
  166. package/dist/otlp-2MCrC3kd.cjs +2 -0
  167. package/dist/otlp-2MCrC3kd.cjs.map +1 -0
  168. package/dist/{otlp-BTJdIa6F.js → otlp-COq033e3.js} +25 -32
  169. package/dist/otlp-COq033e3.js.map +1 -0
  170. package/dist/patch-BX8KrPCT.cjs.map +1 -1
  171. package/dist/patch-UdPz1ea8.js.map +1 -1
  172. package/dist/{platform-C2Ez5kDc.cjs → platform-12uR7kBQ.cjs} +2 -2
  173. package/dist/platform-12uR7kBQ.cjs.map +1 -0
  174. package/dist/{platform-DkcuXwe-.js → platform-CVewe4wQ.js} +7 -7
  175. package/dist/platform-CVewe4wQ.js.map +1 -0
  176. package/dist/profiler-BVWIOgnq.js +310 -0
  177. package/dist/profiler-BVWIOgnq.js.map +1 -0
  178. package/dist/profiler-eVCknCzS.cjs +2 -0
  179. package/dist/profiler-eVCknCzS.cjs.map +1 -0
  180. package/dist/profiler-frames-CLXlT_xL.js +86 -0
  181. package/dist/profiler-frames-CLXlT_xL.js.map +1 -0
  182. package/dist/profiler-frames-Dg2OebB2.cjs +2 -0
  183. package/dist/profiler-frames-Dg2OebB2.cjs.map +1 -0
  184. package/dist/{remote-rules-Cfb4K-Nl.js → remote-rules-BJGDJGwA.js} +27 -27
  185. package/dist/remote-rules-BJGDJGwA.js.map +1 -0
  186. package/dist/{remote-rules-vzvk7aKf.cjs → remote-rules-CJD3ToVk.cjs} +2 -2
  187. package/dist/remote-rules-CJD3ToVk.cjs.map +1 -0
  188. package/dist/replay-0zAJv9T3.js +338 -0
  189. package/dist/replay-0zAJv9T3.js.map +1 -0
  190. package/dist/replay-DomJpXqW.cjs +2 -0
  191. package/dist/replay-DomJpXqW.cjs.map +1 -0
  192. package/dist/{reports-Dk2YhKIh.cjs → reports-BsbqmP8h.cjs} +2 -2
  193. package/dist/reports-BsbqmP8h.cjs.map +1 -0
  194. package/dist/{reports-TA-zInnq.js → reports-BuXekPOS.js} +3 -3
  195. package/dist/reports-BuXekPOS.js.map +1 -0
  196. package/dist/{resource-timing-BLv3EA2A.js → resource-timing-CXGHwFRD.js} +4 -4
  197. package/dist/resource-timing-CXGHwFRD.js.map +1 -0
  198. package/dist/{resource-timing-Cysw1S1f.cjs → resource-timing-DkycFGDa.cjs} +2 -2
  199. package/dist/resource-timing-DkycFGDa.cjs.map +1 -0
  200. package/dist/{sampling-Ckh2yW9k.cjs → sampling-Dd0wllyq.cjs} +2 -2
  201. package/dist/sampling-Dd0wllyq.cjs.map +1 -0
  202. package/dist/{sampling-C4VV-1MS.js → sampling-UUDbi3K0.js} +9 -9
  203. package/dist/sampling-UUDbi3K0.js.map +1 -0
  204. package/dist/{sanitize-6ymPlVvP.js → sanitize-CNmsD9r3.js} +2 -2
  205. package/dist/sanitize-CNmsD9r3.js.map +1 -0
  206. package/dist/{sanitize-BAWzkZt0.cjs → sanitize-ChLn97Ch.cjs} +2 -2
  207. package/dist/sanitize-ChLn97Ch.cjs.map +1 -0
  208. package/dist/{select-ZF4by-lF.cjs → select-CTk-K5mG.cjs} +3 -3
  209. package/dist/select-CTk-K5mG.cjs.map +1 -0
  210. package/dist/{select-xtQaenIi.js → select-DPv_j6wq.js} +61 -61
  211. package/dist/select-DPv_j6wq.js.map +1 -0
  212. package/dist/{sender-CiMHC9YG.js → sender-15zEsZpr.js} +61 -60
  213. package/dist/sender-15zEsZpr.js.map +1 -0
  214. package/dist/sender-Bfpv9tad.cjs +2 -0
  215. package/dist/sender-Bfpv9tad.cjs.map +1 -0
  216. package/dist/storage/context-storage.d.ts +34 -33
  217. package/dist/storage/emergency-queue.d.ts +9 -9
  218. package/dist/storage/eviction.d.ts +12 -12
  219. package/dist/storage/factory.d.ts +8 -7
  220. package/dist/storage/gap.d.ts +6 -6
  221. package/dist/storage/idb-driver.d.ts +31 -32
  222. package/dist/storage/indexeddb-storage.d.ts +26 -27
  223. package/dist/storage/keys.d.ts +7 -7
  224. package/dist/storage/local-storage.d.ts +38 -38
  225. package/dist/storage/memory-storage.d.ts +21 -22
  226. package/dist/storage/persistence.d.ts +1 -1
  227. package/dist/storage-BA9RqRO-.cjs.map +1 -1
  228. package/dist/storage-DZwed89z.js.map +1 -1
  229. package/dist/{storm-VR024_QN.js → storm-BTSNTIWI.js} +2 -2
  230. package/dist/storm-BTSNTIWI.js.map +1 -0
  231. package/dist/{storm-CYi9Swpx.cjs → storm-D0_qZOEg.cjs} +2 -2
  232. package/dist/storm-D0_qZOEg.cjs.map +1 -0
  233. package/dist/transport/compression.d.ts +2 -2
  234. package/dist/transport/errors.d.ts +7 -7
  235. package/dist/transport/exit-flush.d.ts +39 -39
  236. package/dist/transport/headers.d.ts +2 -2
  237. package/dist/transport/http-transport.d.ts +28 -27
  238. package/dist/transport/memory-transport.d.ts +6 -6
  239. package/dist/transport/retry-engine.d.ts +35 -34
  240. package/dist/transport/serializers/ecs.d.ts +1 -1
  241. package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
  242. package/dist/transport/serializers/otlp-traces.d.ts +1 -1
  243. package/dist/transport/serializers/otlp.d.ts +16 -16
  244. package/dist/transport/serializers/select.d.ts +7 -7
  245. package/dist/transport/status-transport.d.ts +20 -20
  246. package/dist/transport/worker-protocol.d.ts +3 -3
  247. package/dist/types-BAerHgCq.js.map +1 -1
  248. package/dist/types-C7WNpnG1.cjs.map +1 -1
  249. package/dist/{unclean-exit-DFUN57wY.cjs → unclean-exit-ClGzrc2A.cjs} +2 -2
  250. package/dist/unclean-exit-ClGzrc2A.cjs.map +1 -0
  251. package/dist/{unclean-exit-CwcUhFOn.js → unclean-exit-Cob_jyTv.js} +2 -2
  252. package/dist/unclean-exit-Cob_jyTv.js.map +1 -0
  253. package/dist/unref-CU9Nyz_9.cjs +2 -0
  254. package/dist/unref-CU9Nyz_9.cjs.map +1 -0
  255. package/dist/unref-DgHPQeWv.js +7 -0
  256. package/dist/unref-DgHPQeWv.js.map +1 -0
  257. package/dist/user-timing-CdYqx3PF.cjs +2 -0
  258. package/dist/user-timing-CdYqx3PF.cjs.map +1 -0
  259. package/dist/{user-timing-_jZIhDKI.js → user-timing-DgHubxCI.js} +5 -3
  260. package/dist/user-timing-DgHubxCI.js.map +1 -0
  261. package/dist/utils/console.d.ts +2 -2
  262. package/dist/utils/deadline.d.ts +4 -4
  263. package/dist/utils/error-like.d.ts +7 -7
  264. package/dist/utils/fixed-window.d.ts +9 -8
  265. package/dist/utils/global-scope.d.ts +8 -8
  266. package/dist/utils/guards.d.ts +2 -2
  267. package/dist/utils/identity.d.ts +17 -17
  268. package/dist/utils/library-console.d.ts +4 -4
  269. package/dist/utils/library-request.d.ts +10 -10
  270. package/dist/utils/lock.d.ts +10 -9
  271. package/dist/utils/openfin.d.ts +5 -5
  272. package/dist/utils/patch.d.ts +6 -6
  273. package/dist/utils/platform.d.ts +13 -11
  274. package/dist/utils/sanitize.d.ts +4 -4
  275. package/dist/utils/timer.d.ts +1 -1
  276. package/dist/utils/tracing.d.ts +38 -38
  277. package/dist/utils/unref.d.ts +3 -3
  278. package/dist/{web-socket-BWUoqBh8.cjs → web-socket-BTuvYoJI.cjs} +2 -2
  279. package/dist/web-socket-BTuvYoJI.cjs.map +1 -0
  280. package/dist/{web-socket-CV7yIMnm.js → web-socket-DthJuSAg.js} +4 -4
  281. package/dist/web-socket-DthJuSAg.js.map +1 -0
  282. package/dist/web-vitals-Ch5BpDmo.cjs +2 -0
  283. package/dist/web-vitals-Ch5BpDmo.cjs.map +1 -0
  284. package/dist/web-vitals-CsGCWnUr.js +77 -0
  285. package/dist/web-vitals-CsGCWnUr.js.map +1 -0
  286. package/dist/{worker-protocol-CrsdSDLn.js → worker-protocol-B0_8rWy5.js} +4 -4
  287. package/dist/worker-protocol-B0_8rWy5.js.map +1 -0
  288. package/dist/{worker-protocol-Bai7GAIA.cjs → worker-protocol-BjzFORfq.cjs} +2 -2
  289. package/dist/worker-protocol-BjzFORfq.cjs.map +1 -0
  290. package/dist/worker-server-4en-Lt-3.cjs +2 -0
  291. package/dist/worker-server-4en-Lt-3.cjs.map +1 -0
  292. package/dist/{worker-server-Dp5HYm4b.js → worker-server-Cne9MX9I.js} +8 -8
  293. package/dist/{worker-server-Dp5HYm4b.js.map → worker-server-Cne9MX9I.js.map} +1 -1
  294. package/dist/worker-transport-B-GF4Aqn.cjs +2 -0
  295. package/dist/worker-transport-B-GF4Aqn.cjs.map +1 -0
  296. package/dist/{worker-transport-D6jtgpqN.js → worker-transport-C3SjJAEC.js} +62 -61
  297. package/dist/worker-transport-C3SjJAEC.js.map +1 -0
  298. package/package.json +8 -2
  299. package/dist/batch-C8OcWR2L.cjs.map +0 -1
  300. package/dist/batch-CL9uWYY3.js.map +0 -1
  301. package/dist/bus-BZ0GldpT.js.map +0 -1
  302. package/dist/bus-VWlmM5xs.cjs +0 -2
  303. package/dist/bus-VWlmM5xs.cjs.map +0 -1
  304. package/dist/console-BPZCuSLc.cjs.map +0 -1
  305. package/dist/console-BeCF7n59.js.map +0 -1
  306. package/dist/constants-DqKJH_MP.cjs +0 -2
  307. package/dist/constants-DqKJH_MP.cjs.map +0 -1
  308. package/dist/constants-zyrqveN4.js +0 -304
  309. package/dist/constants-zyrqveN4.js.map +0 -1
  310. package/dist/deadline-BOjOxNHj.js.map +0 -1
  311. package/dist/deadline-XSnm95pg.cjs +0 -2
  312. package/dist/deadline-XSnm95pg.cjs.map +0 -1
  313. package/dist/debug-bundle-BzJNpbF0.cjs +0 -2
  314. package/dist/debug-bundle-BzJNpbF0.cjs.map +0 -1
  315. package/dist/debug-bundle-C7UkHZ-q.js.map +0 -1
  316. package/dist/emergency-queue-CNTRui5t.cjs.map +0 -1
  317. package/dist/emergency-queue-Zy6lNafo.js.map +0 -1
  318. package/dist/errors-Dh7kef0i.js.map +0 -1
  319. package/dist/errors-tfEr48bS.cjs.map +0 -1
  320. package/dist/factory-BonqI3NL.js.map +0 -1
  321. package/dist/factory-CJXVYp0R.cjs.map +0 -1
  322. package/dist/identity-Cxgj6pZX.cjs.map +0 -1
  323. package/dist/identity-DT5VmvXy.js.map +0 -1
  324. package/dist/indexeddb-storage-BJVtiQKm.js.map +0 -1
  325. package/dist/indexeddb-storage-CIoW21Xd.cjs.map +0 -1
  326. package/dist/interactions-DTgKy_6K.js.map +0 -1
  327. package/dist/interactions-fEN6FbVo.cjs.map +0 -1
  328. package/dist/journey-CuJrHzEg.js.map +0 -1
  329. package/dist/journey-pffMVMfa.cjs +0 -2
  330. package/dist/journey-pffMVMfa.cjs.map +0 -1
  331. package/dist/library-console-C1m6g1BR.js.map +0 -1
  332. package/dist/library-console-D2GY9Or6.cjs.map +0 -1
  333. package/dist/library-request-1BX_UlaX.cjs.map +0 -1
  334. package/dist/library-request-BQBT9N9Q.js.map +0 -1
  335. package/dist/lifecycle-2EtUaRpo.cjs.map +0 -1
  336. package/dist/lifecycle-BaKx_-32.js.map +0 -1
  337. package/dist/log-record-CAoGBBf3.js.map +0 -1
  338. package/dist/log-record-i9zOTkpQ.cjs.map +0 -1
  339. package/dist/long-frames-BVg4i5SC.cjs +0 -2
  340. package/dist/long-frames-BVg4i5SC.cjs.map +0 -1
  341. package/dist/long-frames-Czk7IupC.js.map +0 -1
  342. package/dist/network-DBNwApoF.js.map +0 -1
  343. package/dist/network-xbbuvG_6.cjs.map +0 -1
  344. package/dist/otlp-BDvFrLnc.cjs +0 -2
  345. package/dist/otlp-BDvFrLnc.cjs.map +0 -1
  346. package/dist/otlp-BTJdIa6F.js.map +0 -1
  347. package/dist/platform-C2Ez5kDc.cjs.map +0 -1
  348. package/dist/platform-DkcuXwe-.js.map +0 -1
  349. package/dist/remote-rules-Cfb4K-Nl.js.map +0 -1
  350. package/dist/remote-rules-vzvk7aKf.cjs.map +0 -1
  351. package/dist/reports-Dk2YhKIh.cjs.map +0 -1
  352. package/dist/reports-TA-zInnq.js.map +0 -1
  353. package/dist/resource-timing-BLv3EA2A.js.map +0 -1
  354. package/dist/resource-timing-Cysw1S1f.cjs.map +0 -1
  355. package/dist/sampling-C4VV-1MS.js.map +0 -1
  356. package/dist/sampling-Ckh2yW9k.cjs.map +0 -1
  357. package/dist/sanitize-6ymPlVvP.js.map +0 -1
  358. package/dist/sanitize-BAWzkZt0.cjs.map +0 -1
  359. package/dist/select-ZF4by-lF.cjs.map +0 -1
  360. package/dist/select-xtQaenIi.js.map +0 -1
  361. package/dist/sender-CiMHC9YG.js.map +0 -1
  362. package/dist/sender-D5wBoXA8.cjs +0 -2
  363. package/dist/sender-D5wBoXA8.cjs.map +0 -1
  364. package/dist/storm-CYi9Swpx.cjs.map +0 -1
  365. package/dist/storm-VR024_QN.js.map +0 -1
  366. package/dist/unclean-exit-CwcUhFOn.js.map +0 -1
  367. package/dist/unclean-exit-DFUN57wY.cjs.map +0 -1
  368. package/dist/user-timing-C9kfRq3J.cjs +0 -2
  369. package/dist/user-timing-C9kfRq3J.cjs.map +0 -1
  370. package/dist/user-timing-_jZIhDKI.js.map +0 -1
  371. package/dist/web-socket-BWUoqBh8.cjs.map +0 -1
  372. package/dist/web-socket-CV7yIMnm.js.map +0 -1
  373. package/dist/web-vitals-Bq4WFHQo.js +0 -52
  374. package/dist/web-vitals-Bq4WFHQo.js.map +0 -1
  375. package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
  376. package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
  377. package/dist/worker-protocol-Bai7GAIA.cjs.map +0 -1
  378. package/dist/worker-protocol-CrsdSDLn.js.map +0 -1
  379. package/dist/worker-server-BrIYkfoa.cjs +0 -2
  380. package/dist/worker-server-BrIYkfoa.cjs.map +0 -1
  381. package/dist/worker-transport-Bwej4N2e.cjs +0 -2
  382. package/dist/worker-transport-Bwej4N2e.cjs.map +0 -1
  383. package/dist/worker-transport-D6jtgpqN.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Compresses a string to gzip bytes with CompressionStream. The result is a
3
- * Uint8Array on a non-shared ArrayBuffer. fetch accepts this result as BodyInit.
3
+ * Uint8Array on a non-shared ArrayBuffer, which fetch accepts as BodyInit.
4
4
  * @param text Raw serialized payload to compress.
5
- * @returns Promise that resolves to the gzip bytes, or null without CompressionStream.
5
+ * @returns Promise that resolves to the gzip bytes, or null when there is no CompressionStream.
6
6
  */
7
7
  export declare function gzip(text: string): Promise<Uint8Array<ArrayBuffer> | null>;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * The failure kind sets the retry, backoff or drop behavior. The engine retries transient,
3
- * offline and timeout failures with backoff. A throttled failure waits for the server delay.
4
- * A too_large failure splits the batch. The engine drops a permanent failure. The server
5
- * never accepts that batch.
2
+ * The failure kind decides whether the engine retries, backs off or drops. Transient, offline
3
+ * and timeout failures are retried with backoff. A throttled failure waits for the server's
4
+ * delay, and a too_large failure splits the batch. A permanent failure is dropped, because the
5
+ * server will never accept that batch.
6
6
  */
7
7
  export type TransportFailureKind = "transient" | "throttled" | "too_large" | "permanent" | "timeout" | "offline";
8
- /** This error records a failed transport attempt, its failure kind and its metadata. */
8
+ /** A failed transport attempt, with its failure kind and metadata. */
9
9
  export declare class TransportError extends Error {
10
10
  readonly kind: TransportFailureKind;
11
11
  readonly status?: number | undefined;
@@ -23,8 +23,8 @@ export declare class TransportError extends Error {
23
23
  }
24
24
  /**
25
25
  * Parses an HTTP Retry-After value into a delay in milliseconds. The value
26
- * can be a number of seconds or an HTTP date. The function clamps a negative delay to zero.
27
- * A date in the past gives a negative delay.
26
+ * can be a number of seconds or an HTTP date. A date in the past gives a negative delay,
27
+ * which is clamped to zero.
28
28
  * @param header Raw Retry-After header string or null.
29
29
  * @returns Non-negative delay in milliseconds, or undefined if invalid or missing.
30
30
  */
@@ -2,61 +2,61 @@ import type { Diagnostics } from "../core/diagnostics";
2
2
  import type { LogBatch } from "../models/batch";
3
3
  import type { ResolvedConfig } from "../models/config";
4
4
  import type { LossReporter } from "../models/drop";
5
- /** This type names the lifecycle event or manual action that starts an exit flush. */
5
+ /** The lifecycle event or manual action that starts an exit flush. */
6
6
  export type ExitReason = "hidden" | "pagehide" | "freeze" | "openfin-close" | "shutdown";
7
- /** This interface lists the dependencies of ExitFlush. */
7
+ /** Dependencies of ExitFlush. */
8
8
  export interface ExitFlushDeps {
9
- /** This field holds the active configuration. */
9
+ /** The active configuration. */
10
10
  config: ResolvedConfig;
11
- /** This field holds the diagnostics reporter. */
11
+ /** Diagnostics reporter. */
12
12
  diagnostics: Diagnostics;
13
- /** This callback drains all buffered and unconfirmed records into one batch for each kind. */
13
+ /** Drains all buffered and unconfirmed records into one batch per kind. */
14
14
  drainForExit: () => LogBatch[];
15
15
  /**
16
- * This callback runs a normal flush with headers, gzip and retry. A hidden document uses it.
17
- * It does not touch an in-flight batch.
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
19
  flushAlive: () => void | Promise<void>;
20
20
  /**
21
- * This callback gives the headers that the HTTP transport sent last, or undefined.
22
- * sendBeacon cannot set a header. With headers, the exit flush uses a keepalive fetch.
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
- /** This callback receives the records that the exit flush loses. */
25
+ /** Receives the records that the exit flush loses. */
26
26
  onLoss?: LossReporter;
27
- /** This callback sends the points of the open metric interval into the buffers. */
27
+ /** Pushes the open metric interval's points into the buffers. */
28
28
  beforeExit?: () => void;
29
29
  }
30
30
  /**
31
- * This class flushes pending telemetry on document unload. It uses sendBeacon, a keepalive
32
- * fetch or emergency storage.
31
+ * Flushes pending telemetry on document unload, with sendBeacon, a keepalive fetch or
32
+ * emergency storage.
33
33
  */
34
34
  export declare class ExitFlush {
35
35
  private readonly deps;
36
- /** This flag is true while the library listens for the unload events. */
36
+ /** True while we are listening for the unload events. */
37
37
  private installed;
38
- /** Bytes of the keepalive fetches of the current exit flush. All batches share one budget. */
38
+ /** Bytes used by the current exit flush's keepalive fetches. All batches share one budget. */
39
39
  private keepaliveBytes;
40
- /** This listener flushes on visibilitychange when the document becomes hidden. */
40
+ /** Flushes on visibilitychange when the document becomes hidden. */
41
41
  private readonly onVisibility;
42
- /** This listener flushes on the window pagehide event. */
42
+ /** Flushes on the window's pagehide event. */
43
43
  private readonly onPageHide;
44
- /** This listener flushes on the document freeze event. */
44
+ /** Flushes on the document's freeze event. */
45
45
  private readonly onFreeze;
46
- /** This listener flushes on the OpenFin close-requested event. */
46
+ /** Flushes on the OpenFin close-requested event. */
47
47
  private readonly onOpenFinClose;
48
48
  /**
49
49
  * @param deps Injected configuration, diagnostics, and drain callback.
50
50
  */
51
51
  constructor(deps: ExitFlushDeps);
52
- /** This method attaches the unload listeners to the document, the window and OpenFin. */
52
+ /** Attaches the unload listeners to the document, the window and OpenFin. */
53
53
  install(): void;
54
- /** This method removes all unload listeners and subscriptions. */
54
+ /** Removes all unload listeners and subscriptions. */
55
55
  uninstall(): void;
56
56
  /**
57
- * Drains pending records synchronously. It sends them with a beacon, a
58
- * keepalive fetch or emergency storage. A hidden document gets a normal flush. It never
59
- * awaits and never throws. The caller is an unload listener.
57
+ * Drains pending records synchronously and sends them with a beacon, a keepalive fetch or
58
+ * emergency storage. A hidden document gets a normal flush. Never awaits and never throws,
59
+ * because the caller is an unload listener.
60
60
  * @param reason Reason code of the flush.
61
61
  */
62
62
  flush(reason: ExitReason): void;
@@ -67,24 +67,24 @@ export declare class ExitFlush {
67
67
  * @param url Endpoint of the batch.
68
68
  */
69
69
  private flushBatch;
70
- /** Runs the normal flush of a hidden document. It reports a flush that throws or rejects. */
70
+ /** Runs a hidden document's normal flush, and reports it if it throws or rejects. */
71
71
  private flushAlive;
72
72
  /**
73
- * Gives the pending records to the exit hook of a custom transport. A page that closes cannot
74
- * wait for the async transport. Without a hook, or when the hook refuses the batch, the batch
75
- * goes to the emergency queue. The next page load sends it.
73
+ * Hands the pending records to a custom transport's exit hook, because a closing page can't
74
+ * wait for the async transport. Without a hook, or when the hook refuses the batch, the
75
+ * batch goes to the emergency queue and the next page load sends it.
76
76
  * @param reason Reason code of the flush.
77
- * @param onExit Synchronous exit hook of the custom transport.
77
+ * @param onExit The custom transport's synchronous exit hook.
78
78
  */
79
79
  private flushCustom;
80
80
  /**
81
- * Keeps a batch for the next page load in the emergency queue in localStorage. With storage
82
- * "memory" or "none", the app wants nothing on the device. The batch is then lost.
83
- * @param batch Batch that the exit flush cannot send.
81
+ * Parks a batch in the localStorage emergency queue for the next page load. With storage
82
+ * "memory" or "none" the app wants nothing kept on the device, so the batch is lost.
83
+ * @param batch Batch that the exit flush can't send.
84
84
  */
85
85
  private park;
86
86
  /**
87
- * Serializes the exit batch. It reports a serializer that throws.
87
+ * Serializes the exit batch, and reports a serializer that throws.
88
88
  * @param batch Batch to serialize.
89
89
  * @param reason Reason code of the flush.
90
90
  * @returns The serialized batch, or undefined if the serializer threw.
@@ -99,19 +99,19 @@ export declare class ExitFlush {
99
99
  * Sends the payload as text/plain with navigator.sendBeacon.
100
100
  * @param url Target endpoint URL with query parameters.
101
101
  * @param body Serialized payload string.
102
- * @returns The answer of the browser.
102
+ * @returns The browser's answer.
103
103
  */
104
104
  private beacon;
105
105
  /**
106
- * Sends a fallback POST with fetch and `keepalive: true`. A keepalive request
107
- * continues after the document closes. The browser cancels a plain fetch at page close.
108
- * A failed fetch parks the batch in the emergency queue. The server drops a second copy by
109
- * its batch id.
106
+ * Sends a fallback POST with fetch and `keepalive: true`. A keepalive request continues
107
+ * after the document closes, whereas the browser cancels a plain fetch at page close.
108
+ * A failed fetch parks the batch in the emergency queue, and the server drops a second copy
109
+ * by its batch id.
110
110
  * @param url Target endpoint URL.
111
111
  * @param batch Batch in the payload.
112
112
  * @param body Serialized payload string.
113
113
  * @param reason Reason code of the flush.
114
- * @param headers Builds the request headers. Without custom headers, only a text/plain
114
+ * @param headers Builds the request headers. Without custom headers that is only a text/plain
115
115
  * content type. A header value outside ISO-8859-1 makes the Headers constructor throw.
116
116
  */
117
117
  private keepaliveFetch;
@@ -1,8 +1,8 @@
1
1
  import type { Diagnostics } from "../core/diagnostics";
2
2
  import type { ResolvedConfig } from "../models/config";
3
- /** Reads the last headers only while their source and all destinations stay in force. */
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
- /** Removes rejected credentials before the next call of the headers function. */
7
+ /** Forgets rejected credentials before the headers function is called again. */
8
8
  export declare function resetHeaders(owner: object): void;
@@ -1,44 +1,44 @@
1
1
  import type { LogBatch } from "../models/batch";
2
2
  import { StatusTransport } from "./status-transport";
3
- /** Advice for a 401 or a 403 answer of an HTTP send, on the main thread or in the worker. */
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
- * This class sends serialized log batches over HTTP. It resolves headers, applies gzip
7
- * compression and classifies errors.
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
10
  /**
11
- * Sends one log batch over HTTP. A metrics batch goes to metricsEndpoint. A traces batch goes to
12
- * tracesEndpoint. A batch without an endpoint goes nowhere.
11
+ * Sends one log batch over HTTP. A metrics batch goes to metricsEndpoint and a traces batch
12
+ * to tracesEndpoint. A batch without an endpoint goes nowhere.
13
13
  * @param batch Batch to send.
14
- * @param onKeepalive Runs when a request of the batch starts with keepalive.
14
+ * @param onKeepalive Runs when one of the batch's requests starts with keepalive.
15
15
  * @throws TransportError on transient, throttled, 413, or permanent network failures.
16
16
  */
17
17
  send(batch: LogBatch, onKeepalive?: () => void): Promise<void>;
18
18
  /**
19
- * Gives the headers for the exit flush. A closing document cannot await headers().
20
- * @returns The static headers, the headers that the function in force gave last, or undefined.
19
+ * Returns the headers for the exit flush, because a closing document can't await headers().
20
+ * @returns The static headers, the last result of the current headers function, or undefined.
21
21
  */
22
22
  lastHeaders(): Record<string, string> | undefined;
23
23
  /**
24
- * Serializes, encodes and sends a batch. It throws a classified TransportError
24
+ * Serializes, encodes and sends a batch. Throws a classified TransportError
25
25
  * on failure.
26
26
  * @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 one time. A reconfigure during the send
29
- * cannot change it.
30
- * @param onKeepalive Runs when a request of the batch starts with keepalive.
27
+ * @param kind Kind of the batch. The caller reads it together with the endpoint.
28
+ * @param endpoint Ingest URL. The caller reads it once, so a reconfigure during the send
29
+ * can't change it.
30
+ * @param onKeepalive Runs when one of the batch's requests starts with keepalive.
31
31
  */
32
32
  private post;
33
33
  /**
34
- * Tests if a status rejects the credentials.
34
+ * Checks whether a status rejects the credentials.
35
35
  * @param status HTTP status code.
36
36
  * @returns True for 401 and 403.
37
37
  */
38
38
  private rejectsCredentials;
39
39
  /**
40
- * Resolves the headers, encodes the body and sends one request. One deadline covers the
41
- * three steps. Without it, a headers() that never settles holds a dispatch slot forever.
40
+ * Resolves the headers, encodes the body and sends one request. One deadline covers all
41
+ * three steps, otherwise a headers() that never settles holds a dispatch slot forever.
42
42
  * @param batch Batch to deliver.
43
43
  * @param endpoint Ingest URL.
44
44
  * @param serialized Serialized batch.
@@ -49,10 +49,10 @@ export declare class HttpTransport extends StatusTransport {
49
49
  private attempt;
50
50
  /**
51
51
  * Waits for a step until the deadline.
52
- * @param work Step to wait for. It does not reject. Only the deadline rejects here.
52
+ * @param work Step to wait for. It never rejects, so only the deadline rejects here.
53
53
  * @param deadline Epoch time in milliseconds at which the request times out.
54
54
  * @param endpoint Ingest URL of the request, for the timeout report.
55
- * @returns Promise that resolves to the value of the step.
55
+ * @returns Promise that resolves to the step's value.
56
56
  * @throws TransportError of kind "timeout" at the deadline.
57
57
  */
58
58
  private before;
@@ -63,14 +63,14 @@ export declare class HttpTransport extends StatusTransport {
63
63
  */
64
64
  private timeout;
65
65
  /**
66
- * Compresses the serialized payload when the config sets gzip. The payload size must
67
- * be at or above the threshold.
66
+ * Compresses the serialized payload when the config sets gzip and the payload is at or
67
+ * above the threshold.
68
68
  * @param text Serialized payload string.
69
- * @returns Promise that resolves to original string or compressed byte array.
69
+ * @returns Promise that resolves to the original string or the compressed byte array.
70
70
  */
71
71
  private encodeBody;
72
72
  /**
73
- * Sends the HTTP POST request with a timeout. It maps network errors to
73
+ * Sends the HTTP POST request with a timeout, and maps network errors to
74
74
  * TransportError.
75
75
  * @param endpoint Ingest URL.
76
76
  * @param headers HTTP request headers.
@@ -82,8 +82,9 @@ export declare class HttpTransport extends StatusTransport {
82
82
  */
83
83
  private dispatch;
84
84
  /**
85
- * Tests if a send uses keepalive. A mobile OS can stop a hidden page with no pagehide.
86
- * A keepalive request continues after that. The browser limits the keepalive bodies in flight.
85
+ * Checks whether a send uses keepalive. A mobile OS can stop a hidden page without a
86
+ * pagehide, and a keepalive request continues after that. The browser limits the keepalive
87
+ * bodies in flight.
87
88
  * @param body Request body string or byte array.
88
89
  * @returns True for a hidden document and a body of BEACON_LIMIT_BYTES or less.
89
90
  */
@@ -95,9 +96,9 @@ export declare class HttpTransport extends StatusTransport {
95
96
  */
96
97
  private readMaxBytes;
97
98
  /**
98
- * Resolves the configured static or dynamic request headers. It keeps the headers that
99
- * headers() gave, for the exit flush.
100
- * @returns Promise that resolves to resolved header map.
99
+ * Resolves the configured static or dynamic request headers, and keeps what headers()
100
+ * returned for the exit flush.
101
+ * @returns Promise that resolves to the header map.
101
102
  */
102
103
  private resolveHeaders;
103
104
  }
@@ -1,30 +1,30 @@
1
1
  import type { Transport, TransportRequest } from "../models/config";
2
2
  import type { LogRecord } from "../models/log-record";
3
- /** A transport that keeps each batch in memory, for tests. */
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 each accepted batch, in send order.
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 each request, accepted or refused, in send order.
13
+ * Returns every request, accepted or refused, in send order.
14
14
  * @returns The requests.
15
15
  */
16
16
  batches(): TransportRequest[];
17
- /** Forgets each batch. The answer that respondWith set stays. */
17
+ /** Forgets every batch. The answer set with respondWith stays. */
18
18
  clear(): void;
19
19
  /**
20
- * Sets the answer for each later batch. The default answer is 200.
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 each batch in memory. Use it in tests, with `configure()`.
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;
@@ -5,8 +5,8 @@ import type { LossReporter } from "../models/drop";
5
5
  import { type StorageAdapter } from "../models/storage";
6
6
  import type { BatchTransport } from "./status-transport";
7
7
  /**
8
- * This class sends persisted offline batches again on a timer. It uses backoff, a cross-tab
9
- * drain lock and batch splitting.
8
+ * Resends persisted offline batches on a timer, with backoff, a cross-tab drain lock and
9
+ * batch splitting.
10
10
  */
11
11
  export declare class RetryEngine {
12
12
  private readonly storage;
@@ -15,17 +15,17 @@ export declare class RetryEngine {
15
15
  private readonly config;
16
16
  private readonly batchesPerDrain?;
17
17
  private readonly onLoss;
18
- /** This field holds the active retry timer handle. It is null when no timer runs. */
18
+ /** The active retry timer handle, or null when no timer is running. */
19
19
  private timer;
20
- /** This field counts consecutive failed deliveries. The backoff calculation uses it. */
20
+ /** Consecutive failed deliveries. Feeds the backoff calculation. */
21
21
  private attempt;
22
- /** This flag is true while a storage drain runs. */
22
+ /** True while a storage drain is running. */
23
23
  private draining;
24
- /** This flag is true after stop(). */
24
+ /** True after stop(). */
25
25
  private stopped;
26
- /** Attempt limit of a stored batch. Retention cannot change after the delivery stack loads. */
26
+ /** Attempt limit for a stored batch. Retention can't change after the delivery stack loads. */
27
27
  private readonly maxAttempts;
28
- /** This listener runs on the online event. It resets the attempt count and starts a drain. */
28
+ /** Runs on the online event. Resets the attempt count and starts a drain. */
29
29
  private readonly onOnline;
30
30
  /**
31
31
  * @param storage Storage adapter holding undelivered batches.
@@ -33,75 +33,76 @@ export declare class RetryEngine {
33
33
  * @param diagnostics Diagnostics reporter.
34
34
  * @param config Active configuration instance.
35
35
  * @param batchesPerDrain Maximum batches processed per drain tick.
36
- * @param onLoss Receives the records of each batch that the engine drops.
36
+ * @param onLoss Receives the records of every batch that the engine drops.
37
37
  */
38
38
  constructor(storage: StorageAdapter, transport: BatchTransport, diagnostics: Diagnostics, config: ResolvedConfig, batchesPerDrain?: number | undefined, onLoss?: LossReporter);
39
- /** This method starts the engine. It listens for online events and arms the first timer. */
39
+ /** Starts the engine. Listens for online events and arms the first timer. */
40
40
  start(): void;
41
- /** This method schedules an earlier retry when storage receives a new offline batch. */
41
+ /** Schedules an earlier retry when storage receives a new offline batch. */
42
42
  nudge(): void;
43
43
  /**
44
- * Stores a batch that failed outside the drain loop. It applies the same rules
45
- * as the drain. It does not store a refused batch whole. A whole batch causes another request
46
- * with a payload that the server refused.
44
+ * Stores a batch that failed outside the drain loop, under the same rules as the drain.
45
+ * A refused batch is never stored whole, because that would cause another request with a
46
+ * payload the server already refused.
47
47
  * @param batch Rejected batch, with its attempt already counted.
48
48
  * @param error Failure thrown by the transport.
49
49
  */
50
50
  storeFailed(batch: LogBatch, error: unknown): Promise<void>;
51
- /** This method stops the engine. It removes the listener and clears the pending timer. */
51
+ /** Stops the engine. Removes the listener and clears the pending timer. */
52
52
  stop(): void;
53
53
  /**
54
- * Tries one delivery pass of stored batches before a context change. The caller sets the deadline.
54
+ * Tries one delivery pass over the stored batches before a context change. The caller sets
55
+ * the deadline.
55
56
  * @returns Promise that resolves when this pass stops.
56
57
  */
57
58
  flush(): Promise<void>;
58
59
  /**
59
- * Clears the pending timer. It then schedules a drain after the delay.
60
+ * Clears the pending timer, then schedules a drain after the delay.
60
61
  * @param delayMs Delay duration in milliseconds.
61
62
  */
62
63
  private schedule;
63
64
  /**
64
- * Sets a deadline on a storage call. A call that does not settle keeps
65
- * `draining` true. This window then runs no more drains.
65
+ * Puts a deadline on a storage call. A call that never settles would keep
66
+ * `draining` true, and this window would run no more drains.
66
67
  * @param work Storage promise to bound.
67
- * @returns The value of the promise, or a rejection after the deadline.
68
+ * @returns The promise's value, or a rejection after the deadline.
68
69
  */
69
70
  private bounded;
70
- /** This method clears the pending timer when a timer is active. */
71
+ /** Clears the pending timer if there is one. */
71
72
  private clearTimer;
72
73
  /**
73
- * Calculates the exponential backoff delay from consecutive failures. It applies
74
- * full jitter, not a fixed offset. With a fixed offset, tabs that reconnect together send
74
+ * Calculates the exponential backoff delay from consecutive failures. Uses full jitter
75
+ * instead of a fixed offset, because with a fixed offset tabs that reconnect together send
75
76
  * their requests at the same time.
76
77
  * @returns Backoff duration in milliseconds.
77
78
  */
78
79
  private backoffMs;
79
- /** This method runs a drain under the origin-wide Web Lock. */
80
+ /** Runs a drain under the origin-wide Web Lock. */
80
81
  private drain;
81
82
  /**
82
- * Processes batches while it holds the Web Lock. It schedules the next tick.
83
- * It always resolves. A throw leaves the engine idle with no armed timer.
83
+ * Processes batches while holding the Web Lock, and schedules the next tick.
84
+ * It always resolves, because a throw would leave the engine idle with no armed timer.
84
85
  * @returns Promise that resolves to true on completion.
85
86
  */
86
87
  private drainLocked;
87
88
  /**
88
- * Tries to deliver one batch. It removes the batch on success. On failure, it applies the
89
- * rule for the failure kind.
89
+ * Tries to deliver one batch. Removes it on success, and on failure applies the rule for
90
+ * the failure kind.
90
91
  * @param batch Log batch to deliver.
91
- * @returns "next" to continue with the next batch. "stop" to stop the current drain. A delay
92
- * in milliseconds blocks the kind of the batch until the next drain.
92
+ * @returns "next" to continue with the next batch, "stop" to stop the current drain, or a
93
+ * delay in milliseconds that blocks the batch's kind until the next drain.
93
94
  */
94
95
  private deliver;
95
96
  /**
96
- * Replaces a stored batch with the parts that survive its failure. The parts
97
- * are the split halves, or nothing after a permanent refusal.
97
+ * Replaces a stored batch with whatever survives its failure. That is the split halves,
98
+ * or nothing after a permanent refusal.
98
99
  * @param batch Rejected log batch, already held in storage.
99
100
  * @param error Failure thrown by the transport.
100
101
  */
101
102
  private replaceStored;
102
103
  /**
103
- * Selects the batches to keep after a failure. A 413 response splits the batch
104
- * in two. A permanent refusal keeps nothing. Each other failure keeps the batch whole.
104
+ * Picks the batches to keep after a failure. A 413 response splits the batch in two, a
105
+ * permanent refusal keeps nothing, and any other failure keeps the batch whole.
105
106
  * @param batch Rejected log batch.
106
107
  * @param error Failure thrown by the transport.
107
108
  * @returns Batches to persist. The array is empty when the engine drops the records.
@@ -1,3 +1,3 @@
1
1
  import type { LogSerializer } from "../../models/serializer";
2
- /** This serializer writes log records as Elastic Common Schema (ECS) NDJSON documents. */
2
+ /** Writes log records as Elastic Common Schema (ECS) NDJSON documents. */
3
3
  export declare const ecsSerializer: LogSerializer;
@@ -1,3 +1,3 @@
1
1
  import type { LogSerializer } from "../../models/serializer";
2
- /** This serializer writes metric records as an OTLP/JSON ExportMetricsServiceRequest. */
2
+ /** Writes metric records as an OTLP/JSON ExportMetricsServiceRequest. */
3
3
  export declare const otlpMetricsSerializer: LogSerializer;
@@ -1,3 +1,3 @@
1
1
  import type { LogSerializer } from "../../models/serializer";
2
- /** This serializer writes span records as an OTLP/JSON ExportTraceServiceRequest. */
2
+ /** Writes span records as an OTLP/JSON ExportTraceServiceRequest. */
3
3
  export declare const otlpTracesSerializer: LogSerializer;
@@ -1,19 +1,19 @@
1
1
  import type { LogRecord } from "../../models/log-record";
2
2
  import type { LogSerializer } from "../../models/serializer";
3
- /** This type holds an OTLP AnyValue with typed value wrappers. */
3
+ /** An OTLP AnyValue with typed value wrappers. */
4
4
  type AnyValue = Record<string, unknown>;
5
- /** This interface holds an OTLP KeyValue pair. */
5
+ /** An OTLP KeyValue pair. */
6
6
  export interface KeyValue {
7
- /** This field holds the attribute key. */
7
+ /** The attribute key. */
8
8
  key: string;
9
- /** This field holds the typed AnyValue. */
9
+ /** The typed AnyValue. */
10
10
  value: AnyValue;
11
11
  }
12
- /** This interface holds the records that share resource attributes. */
12
+ /** Records that share the same resource attributes. */
13
13
  export interface ResourceGroup {
14
- /** This field holds the resource attribute map. */
14
+ /** The resource attribute map. */
15
15
  resource: Record<string, unknown>;
16
- /** This field holds the log records of the resource. */
16
+ /** The resource's log records. */
17
17
  records: LogRecord[];
18
18
  }
19
19
  /**
@@ -23,25 +23,25 @@ export interface ResourceGroup {
23
23
  */
24
24
  export declare function toKeyValues(source: Record<string, unknown>): KeyValue[];
25
25
  /**
26
- * Groups records by their resource attributes. It keeps the record order in each group.
26
+ * Groups records by their resource attributes, keeping the record order within each group.
27
27
  * @param records Records to group.
28
- * @returns One group for each resource.
28
+ * @returns One group per resource.
29
29
  */
30
30
  export declare function groupByResource(records: LogRecord[]): ResourceGroup[];
31
- /** This interface holds the records of one instrumentation scope. */
31
+ /** The records of one instrumentation scope. */
32
32
  export interface ScopeGroup {
33
- /** This field holds the scope name. It is the logger namespace. */
33
+ /** The scope name, which is the logger namespace. */
34
34
  name: string;
35
- /** This field holds the records of the scope. */
35
+ /** The scope's records. */
36
36
  records: LogRecord[];
37
37
  }
38
38
  /**
39
- * Groups records by their logger namespace. It keeps the record order in each group.
40
- * A record without a namespace goes to the scope of the library.
39
+ * Groups records by their logger namespace, keeping the record order within each group.
40
+ * A record without a namespace goes to the library's own scope.
41
41
  * @param records Records of one resource.
42
- * @returns One group for each namespace.
42
+ * @returns One group per namespace.
43
43
  */
44
44
  export declare function groupByScope(records: LogRecord[]): ScopeGroup[];
45
- /** This serializer writes log records as OTLP/JSON payloads. */
45
+ /** Writes log records as OTLP/JSON payloads. */
46
46
  export declare const otlpSerializer: LogSerializer;
47
47
  export {};
@@ -9,9 +9,9 @@ import type { LogSerializer, SerializedBatch } from "../../models/serializer";
9
9
  */
10
10
  export declare function serializerFor(choice: SerializerChoice): LogSerializer;
11
11
  /**
12
- * Gives the kind of a batch. Only a batch of metric records goes to metricsEndpoint. A batch of
13
- * span records is always "traces". It must not go to endpoint as log records. A stored record
14
- * can be corrupt. It then is not a metric or a span.
12
+ * Returns the kind of a batch. Only a batch of metric records goes to metricsEndpoint. A batch
13
+ * of span records is always "traces" and must not go to endpoint as log records. A stored
14
+ * record can be corrupt, and then it is neither a metric nor a span.
15
15
  * @param batch Batch to test.
16
16
  * @param config Active configuration.
17
17
  * @returns "metrics" with metricsEndpoint set and only metric records, "traces" for only span
@@ -19,16 +19,16 @@ export declare function serializerFor(choice: SerializerChoice): LogSerializer;
19
19
  */
20
20
  export declare function batchKind(batch: LogBatch, config: ResolvedConfig): BatchKind;
21
21
  /**
22
- * Gives the endpoint of a batch kind.
22
+ * Returns the endpoint for a batch kind.
23
23
  * @param kind Kind of the batch.
24
24
  * @param config Active configuration.
25
25
  * @returns metricsEndpoint for a metrics batch, tracesEndpoint for a traces batch, else
26
- * endpoint. "" means that the batch has no destination.
26
+ * endpoint. "" means the batch has no destination.
27
27
  */
28
28
  export declare function endpointFor(kind: BatchKind, config: ResolvedConfig): string | null;
29
29
  /**
30
- * Serializes a batch. It reports a serializer that throws, and the caller drops the batch.
31
- * A metrics batch gets the OTLP metrics format. A traces batch gets the OTLP traces format.
30
+ * Serializes a batch. Reports a serializer that throws, and the caller then drops the batch.
31
+ * A metrics batch gets the OTLP metrics format, and a traces batch the OTLP traces format.
32
32
  * @param config Active configuration.
33
33
  * @param batch Batch to serialize.
34
34
  * @param diagnostics Diagnostics reporter.