@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
@@ -3,20 +3,24 @@ import type { DiagnosticCode, DiagnosticHandler } from "../core/diagnostics";
3
3
  import type { DropSummary } from "./drop";
4
4
  import type { LogLevel, LogRecord } from "./log-record";
5
5
  import type { CapturePlugin } from "./plugin";
6
+ import type { ReplayLoader, ReplayMode, ReplayPluginLoader, ReplaySegment } from "./replay";
6
7
  import type { LogSerializer } from "./serializer";
7
8
  /** Backing store for undelivered records. "auto" picks the best one the host supports. */
8
9
  export type StorageStrategy = "auto" | "indexeddb" | "localstorage" | "memory" | "none";
9
- /** Selects where the library keeps session, tab and journey ids. "storage" uses browser storage. "memory" writes nothing. */
10
+ /**
11
+ * Where the library keeps session, tab and journey ids. "storage" uses browser storage and
12
+ * "memory" writes nothing.
13
+ */
10
14
  export type IdentityStrategy = "storage" | "memory";
11
15
  /**
12
- * What this context does with its records. `sender` delivers its own records.
13
- * `forwarder` gives them to another context. `auto` selects a role at startup.
14
- * `off` turns off the bus. The context then delivers its own records.
16
+ * What this context does with its records. `sender` delivers its own records, `forwarder`
17
+ * hands them to another context, and `auto` picks a role at startup. `off` turns the bus off,
18
+ * so the context delivers its own records.
15
19
  */
16
20
  export type BusMode = "auto" | "sender" | "forwarder" | "off";
17
21
  /**
18
- * Structural type for the metric shape of the `web-vitals` package. With this type,
19
- * the library has no hard dependency on the package.
22
+ * Structural type for the metric shape of the `web-vitals` package, so the library has no
23
+ * hard dependency on it.
20
24
  */
21
25
  export interface WebVitalsMetric {
22
26
  /** Measurement value, in the metric's own unit. */
@@ -112,7 +116,7 @@ export interface OtelApi {
112
116
  * @returns A promise that resolves to the module.
113
117
  */
114
118
  export type OtelLoader = () => Promise<OtelApi>;
115
- /** Sampling policy. It controls which records the library keeps. */
119
+ /** Sampling policy. Controls which records the library keeps. */
116
120
  export interface SamplingOptions {
117
121
  /**
118
122
  * Default fraction of records kept, 0 to 1.
@@ -120,7 +124,7 @@ export interface SamplingOptions {
120
124
  */
121
125
  defaultRate: number;
122
126
  /**
123
- * Rate override for each namespace, keyed by `app.namespace`. The most specific prefix applies.
127
+ * Per-namespace rate overrides, keyed by `app.namespace`. The most specific prefix wins.
124
128
  * @default {}
125
129
  */
126
130
  rates: Record<string, number>;
@@ -136,28 +140,29 @@ export interface SamplingOptions {
136
140
  */
137
141
  alwaysSampleFrom: LogLevel;
138
142
  /**
139
- * Read sampling rules from the `X-UiObs-Sampling` header of each accepted batch.
140
- * The rules stay in force for their `ttlMs`. Set it in each context of the page.
143
+ * Read sampling rules from the `X-UiObs-Sampling` header of every accepted batch. The rules
144
+ * stay in effect for their `ttlMs`. Set this in every context on the page.
141
145
  * @default false
142
146
  */
143
147
  remote: boolean;
144
148
  /**
145
- * Highest rate that a remote rule can set, 0 to 1. It applies to `defaultRate` and each namespace rate.
149
+ * Highest rate a remote rule can set, 0 to 1. Applies to `defaultRate` and to every
150
+ * namespace rate.
146
151
  * @default 1
147
152
  */
148
153
  remoteMaxRate: number;
149
154
  }
150
- /** Bus settings. They control how this context finds, trusts, and sends messages to others. */
155
+ /** Bus settings. Controls how this context finds, trusts and sends messages to others. */
151
156
  export interface BusOptions {
152
157
  /**
153
- * Rule for accepting child windows. "registered" requires a window registration.
158
+ * Which child windows are accepted. "registered" requires a window registration, while
154
159
  * "trusted-origin" accepts child windows from a trusted origin.
155
160
  * @default "registered"
156
161
  */
157
162
  sourcePolicy: "registered" | "trusted-origin";
158
163
  /**
159
- * Message checks. "strict" checks each record and control message.
160
- * "envelope" checks the protocol tag only.
164
+ * Message checks. "strict" checks every record and control message, while "envelope" checks
165
+ * only the protocol tag.
161
166
  * @default "strict"
162
167
  */
163
168
  validation: "strict" | "envelope";
@@ -188,26 +193,26 @@ export interface BusOptions {
188
193
  mode: BusMode;
189
194
  /**
190
195
  * Additional trusted parent origins. With sourcePolicy "trusted-origin", the list also
191
- * permits child origins. A registered child uses the exact origin in its registration.
192
- * The library does not accept "null". A sandboxed frame must set `mode: "sender"`.
196
+ * permits child origins. A registered child uses the exact origin from its registration.
197
+ * "null" is never accepted, so a sandboxed frame must set `mode: "sender"`.
193
198
  * @default []
194
199
  */
195
200
  trustedOrigins: string[];
196
201
  /**
197
- * Which OpenFin context this is. Only the platform provider answers a handshake.
198
- * With an incorrect value, each view sends its own records. "auto" treats the
199
- * window whose name equals its application uuid as the provider.
202
+ * Which OpenFin context this is. Only the platform provider answers a handshake, so with
203
+ * the wrong value every view sends its own records. "auto" treats the window whose name
204
+ * equals its application uuid as the provider.
200
205
  * @default "auto"
201
206
  */
202
207
  openFinRole: "auto" | "provider" | "client";
203
208
  }
204
209
  /**
205
210
  * Where a journey id applies.
206
- * - "context": each document, frame or worker keeps its own journey.
207
- * - "tab": a frame or a worker adopts the journey of the context that owns it. A journey
208
- * does not go to another tab.
209
- * - "origin": each context of the origin adopts each journey. The broadcast link also reaches
210
- * other tabs.
211
+ * - "context": every document, frame or worker keeps its own journey.
212
+ * - "tab": a frame or worker adopts the journey of the context that owns it. A journey never
213
+ * crosses to another tab.
214
+ * - "origin": every context on the origin adopts every journey. The broadcast link also
215
+ * reaches other tabs.
211
216
  * - "auto": "origin" in OpenFin and "tab" in a browser.
212
217
  */
213
218
  export type JourneyScope = "auto" | "context" | "tab" | "origin";
@@ -219,43 +224,43 @@ export interface JourneyOptions {
219
224
  */
220
225
  scope: JourneyScope;
221
226
  /**
222
- * Maximum open time of a journey, in milliseconds. Then the library ends it. The range is
223
- * 1 minute to 24 hours. You cannot change this value after startup.
227
+ * How long a journey can stay open, in milliseconds, before the library ends it. 1 minute
228
+ * to 24 hours. Can't be changed after startup.
224
229
  * @default 1800000
225
230
  */
226
231
  maxAgeMs: number;
227
232
  }
228
- /** Batch size and flush interval of each record stream. You cannot change them after startup. */
233
+ /** Batch size and flush interval for each record stream. Can't be changed after startup. */
229
234
  export interface BatchingOptions {
230
235
  /**
231
- * Maximum wait of a partial log batch, in milliseconds. The range is 100 to 60000.
236
+ * How long a partial log batch waits before it is sent, in milliseconds. 100 to 60000.
232
237
  * @default 2000
233
238
  */
234
239
  logFlushIntervalMs: number;
235
240
  /**
236
- * Maximum records in one log batch. The range is 1 to 1000.
241
+ * Maximum records in one log batch. 1 to 1000.
237
242
  * @default 100
238
243
  */
239
244
  logBatchSize: number;
240
245
  /**
241
- * Maximum wait of a partial metric batch, in milliseconds. The range is 100 to 60000.
246
+ * How long a partial metric batch waits before it is sent, in milliseconds. 100 to 60000.
242
247
  * @default 10000
243
248
  */
244
249
  metricFlushIntervalMs: number;
245
250
  /**
246
- * Maximum records in one metric batch. The range is 1 to 1000.
251
+ * Maximum records in one metric batch. 1 to 1000.
247
252
  * @default 500
248
253
  */
249
254
  metricBatchSize: number;
250
255
  }
251
256
  /**
252
257
  * How long the library keeps an undelivered batch.
253
- * - "limited": the batch stays until `maxAgeMs` or `maxAttempts`.
254
- * - "until-delivered": the batch has no age limit and no attempt limit. `maxBatches` still
255
- * applies. A permanent error still drops the batch.
258
+ * - "limited": the batch stays until it reaches `maxAgeMs` or `maxAttempts`.
259
+ * - "until-delivered": no age limit and no attempt limit. `maxBatches` still applies, and a
260
+ * permanent error still drops the batch.
256
261
  */
257
262
  export type RetentionMode = "limited" | "until-delivered";
258
- /** Retention of undelivered batches. You cannot change it after startup. */
263
+ /** Retention of undelivered batches. Can't be changed after startup. */
259
264
  export interface RetentionOptions {
260
265
  /**
261
266
  * Retention rule.
@@ -263,79 +268,82 @@ export interface RetentionOptions {
263
268
  */
264
269
  mode: RetentionMode;
265
270
  /**
266
- * Maximum stored batches. A new batch evicts the oldest batch without an action first. The
267
- * range is 1 to 5000.
271
+ * Maximum stored batches. A new batch evicts the oldest batch that holds no action first.
272
+ * 1 to 5000.
268
273
  * @default 500
269
274
  */
270
275
  maxBatches: number;
271
276
  /**
272
- * Maximum age of a stored batch, in milliseconds. The range is 1 minute to 7 days.
277
+ * Maximum age of a stored batch, in milliseconds. 1 minute to 7 days.
273
278
  * @default 86400000
274
279
  */
275
280
  maxAgeMs: number;
276
281
  /**
277
- * Maximum send attempts of a stored batch. The range is 1 to 20.
282
+ * Maximum send attempts for a stored batch. 1 to 20.
278
283
  * @default 5
279
284
  */
280
285
  maxAttempts: number;
281
286
  }
282
- /** Size limits for each record. You cannot change them after startup. */
287
+ /** Size limits for each record. Can't be changed after startup. */
283
288
  export interface LimitOptions {
284
289
  /**
285
- * Maximum body length, in characters. The range is 256 to 65536.
290
+ * Maximum body length, in characters. 256 to 65536.
286
291
  * @default 4096
287
292
  */
288
293
  maxBodyChars: number;
289
294
  /**
290
- * Maximum length of a string attribute, in characters. The range is 256 to 65536.
295
+ * Maximum length of a string attribute, in characters. 256 to 65536.
291
296
  * @default 8192
292
297
  */
293
298
  maxAttributeChars: number;
294
299
  /**
295
- * Maximum keys in one object. The range is 1 to 1024.
300
+ * Maximum keys in one object. 1 to 1024.
296
301
  * @default 128
297
302
  */
298
303
  maxAttributeCount: number;
299
304
  /**
300
- * Maximum length of an error stack, in characters. The range is 256 to 65536.
305
+ * Maximum length of an error stack, in characters. 256 to 65536.
301
306
  * @default 8192
302
307
  */
303
308
  maxStackChars: number;
304
309
  /**
305
- * Maximum depth of a nested value. The range is 1 to 16.
310
+ * Maximum depth of a nested value. 1 to 16.
306
311
  * @default 6
307
312
  */
308
313
  maxDepth: number;
309
314
  /**
310
- * Maximum items in one array, set or map. The range is 1 to 10000.
315
+ * Maximum items in one array, set or map. 1 to 10000.
311
316
  * @default 100
312
317
  */
313
318
  maxArrayLength: number;
314
319
  /**
315
- * Maximum values in one sanitize pass. The range is 100 to 100000.
320
+ * Maximum values in one sanitize pass. 100 to 100000.
316
321
  * @default 10000
317
322
  */
318
323
  maxNodes: number;
319
324
  /**
320
- * Maximum attribute bytes of one record. Above it, the library drops the caller attributes.
321
- * The range is 1024 to 60000.
325
+ * Maximum attribute bytes in one record. Above that, the library drops the caller's
326
+ * attributes. 1024 to 60000.
322
327
  * @default 32768
323
328
  */
324
329
  maxRecordBytes: number;
325
330
  }
326
331
  /** Console method that the console capture can wrap. */
327
332
  export type CapturedConsoleMethod = "error" | "warn" | "info" | "log";
328
- /** Resource timing settings. An object turns on capture. */
333
+ /** Resource timing settings. Passing an object turns the capture on. */
329
334
  export interface ResourceTimingOptions {
330
- /** Minimum duration of a ui.resource.slow event, in milliseconds. Set 0 for no slow events. @default 1000 */
335
+ /**
336
+ * Minimum duration for a ui.resource.slow event, in milliseconds. Set 0 for no slow events.
337
+ * @default 1000
338
+ */
331
339
  slowMs?: number;
332
340
  }
333
341
  /** Capture switch that a remote rule can change. */
334
342
  export type RemoteCaptureFlag = (typeof REMOTE_CAPTURE_FLAGS)[number];
335
- /** Click settings. An object turns on capture. With true, capture uses the defaults below. */
343
+ /** Click settings. An object turns the capture on, and true uses the defaults below. */
336
344
  export interface InteractionOptions {
337
345
  /**
338
- * Record the textContent of the clicked element.
346
+ * Record the clicked element's textContent.
339
347
  * @default false
340
348
  */
341
349
  text?: boolean;
@@ -355,55 +363,55 @@ export interface InteractionOptions {
355
363
  */
356
364
  maxTextChars?: number;
357
365
  /**
358
- * Attribute that names the click action, for example "data-testid". The closest element with
359
- * the attribute gives the breadcrumb message. Use letters, digits, hyphens and underscores.
366
+ * Attribute that names the click action, for example "data-testid". The closest element
367
+ * that has it supplies the breadcrumb message. Use letters, digits, hyphens and underscores.
360
368
  * @default "data-observability-action"
361
369
  */
362
370
  actionAttribute?: string;
363
371
  /**
364
- * Record one event `ui.rage_click` for each burst of `rageClickCount` clicks on one element
365
- * in `rageClickWindowMs`. The event has the action name and the click count.
372
+ * Record one `ui.rage_click` event for every burst of `rageClickCount` clicks on one element
373
+ * within `rageClickWindowMs`. The event carries the action name and the click count.
366
374
  * @default false
367
375
  */
368
376
  rageClicks?: boolean;
369
377
  /**
370
- * Clicks that make a rage click. The range is 2 to 20.
378
+ * Number of clicks that count as a rage click. 2 to 20.
371
379
  * @default 3
372
380
  */
373
381
  rageClickCount?: number;
374
382
  /**
375
- * Time in which the clicks of a rage click occur, in milliseconds. The range is 100 to 10000.
383
+ * Time window that the clicks of a rage click must fall in, in milliseconds. 100 to 10000.
376
384
  * @default 1000
377
385
  */
378
386
  rageClickWindowMs?: number;
379
387
  /**
380
- * Record the event `ui.dead_click` when a click on a control gives no DOM change, no navigation
381
- * and no scroll in `deadClickMs`. The event has the action name only. A click on a
382
- * `target="_blank"` or `download` link gives no event.
388
+ * Record a `ui.dead_click` event when a click on a control causes no DOM change, no
389
+ * navigation and no scroll within `deadClickMs`. The event carries only the action name. A
390
+ * click on a `target="_blank"` or `download` link produces no event.
383
391
  * @default false
384
392
  */
385
393
  deadClicks?: boolean;
386
394
  /**
387
- * Wait for a visible response to a click, in milliseconds. The range is 100 to 10000.
395
+ * How long to wait for a visible response to a click, in milliseconds. 100 to 10000.
388
396
  * @default 1000
389
397
  */
390
398
  deadClickMs?: number;
391
399
  }
392
- /** Cache settings. A logger that the app holds stays valid after removal from the cache. */
400
+ /** Cache settings. A logger the app still holds keeps working after it leaves the cache. */
393
401
  export interface LoggerCacheOptions {
394
402
  /**
395
- * Maximum cached loggers. The cache removes the least recently used logger first.
396
- * Set 0 for no cache. Set null for no cache limit.
403
+ * Maximum cached loggers. The least recently used logger is removed first. Set 0 for no
404
+ * cache. Set null for no cache limit.
397
405
  * @default 256
398
406
  */
399
407
  maxEntries: number | null;
400
408
  }
401
409
  /** Identity of one delivery context. Do not put secrets or personal data in the id. */
402
410
  export interface SecurityContextOptions {
403
- /** Stable id for delivery after a page reload. An empty id gives this runtime a new id. */
411
+ /** Stable id for delivery after a page reload. With an empty id, the runtime creates one. */
404
412
  id: string;
405
413
  /**
406
- * Keep stored batches in separate contexts. With true, change delivery settings through
414
+ * Keep stored batches in separate contexts. When true, change delivery settings through
407
415
  * rotateSecurityContext() instead of configure().
408
416
  * @default true
409
417
  */
@@ -411,25 +419,26 @@ export interface SecurityContextOptions {
411
419
  }
412
420
  /** Delivery settings that the runtime replaces together when the security context changes. */
413
421
  export type DeliveryOptions = Pick<ObservabilityConfig, "endpoint" | "metricsEndpoint" | "tracesEndpoint" | "headers" | "credentials" | "transport" | "transportOnExit" | "transportWorker">;
414
- /** New security context. A delivery field that is not supplied resets to its default. */
422
+ /** New security context. Any delivery field that is left out resets to its default. */
415
423
  export interface SecurityContextUpdate {
416
- /** New delivery context id. If not supplied, the runtime makes a new id. */
424
+ /** New delivery context id. If omitted, the runtime creates one. */
417
425
  id?: string;
418
- /** New delivery settings. A field that is not supplied resets to its default. */
426
+ /** New delivery settings. Any field that is left out resets to its default. */
419
427
  delivery: DeliveryOptions;
420
- /** New ambient attributes. If not supplied, the runtime removes the old attributes. */
428
+ /** New ambient attributes. If omitted, the runtime removes the old ones. */
421
429
  context?: Record<string, unknown>;
422
430
  }
423
431
  /** Policy for old records. */
424
432
  export interface SecurityContextRotationOptions {
425
433
  /**
426
- * Rule for old records. "discard" removes them. "flush" tries delivery, then removes them.
427
- * "retain" keeps them in the old context. "carry" gives them to the new context.
434
+ * What to do with old records. "discard" removes them, and "flush" tries to deliver them
435
+ * before it removes them. "retain" keeps them in the old context, and "carry" moves them to
436
+ * the new context.
428
437
  * @default "discard"
429
438
  */
430
439
  pending?: "discard" | "flush" | "retain" | "carry";
431
440
  /**
432
- * Maximum wait for a flush of old records, in milliseconds.
441
+ * How long to wait for the old records to flush, in milliseconds.
433
442
  * @default 5000
434
443
  */
435
444
  timeoutMs?: number;
@@ -440,9 +449,10 @@ export interface SecurityContextRotationOptions {
440
449
  */
441
450
  export interface CaptureOptions {
442
451
  /**
443
- * Changes a URL before capture records it. Applies to page, HTTP, resource and WebSocket URLs.
452
+ * Rewrites a URL before the capture records it. Applies to page, HTTP, resource and
453
+ * WebSocket URLs.
444
454
  * @param url Original URL, before the default URL changes.
445
- * @returns URL to record. Null, an invalid result or an exception gives an empty URL.
455
+ * @returns URL to record. Null, an invalid result or an exception produces an empty URL.
446
456
  */
447
457
  urlTransform?: (url: string) => string | null;
448
458
  /**
@@ -471,8 +481,8 @@ export interface CaptureOptions {
471
481
  */
472
482
  xhr: boolean;
473
483
  /**
474
- * Record the `http.client.request.duration` histogram of each request that `fetch` or `xhr`
475
- * capture sees. The histogram is in seconds.
484
+ * Record the `http.client.request.duration` histogram for every request the `fetch` or
485
+ * `xhr` capture sees. The histogram is in seconds.
476
486
  * @default true
477
487
  */
478
488
  httpMetrics: boolean;
@@ -487,12 +497,12 @@ export interface CaptureOptions {
487
497
  */
488
498
  navigation: boolean;
489
499
  /**
490
- * Report web vitals as metrics. This option requires `webVitalsLoader`.
500
+ * Report web vitals as metrics. Needs `webVitalsLoader`.
491
501
  * @default false
492
502
  */
493
503
  webVitals: boolean;
494
504
  /**
495
- * Report long animation frames as the histogram `ui.long_frame.duration`. A long frame
505
+ * Report long animation frames as the `ui.long_frame.duration` histogram. A long frame
496
506
  * freezes the page. Browsers without `long-animation-frame` report `longtask` entries.
497
507
  * @default false
498
508
  */
@@ -501,55 +511,55 @@ export interface CaptureOptions {
501
511
  * Minimum frame duration that `longFrames` reports, in milliseconds.
502
512
  * @default 100
503
513
  */
504
- longFrameThresholdMs: number;
514
+ longFrameMs: number;
505
515
  /**
506
- * Record the app's console calls. `true` wraps `error` and `warn`. A list selects the methods.
507
- * `error` gives an ERROR record and `warn` gives a WARN record.
508
- * `info` and `log` give a breadcrumb only.
516
+ * Record the app's console calls. `true` wraps `error` and `warn`, and a list picks the
517
+ * methods. `error` produces an ERROR record and `warn` a WARN record, while `info` and `log`
518
+ * only add a breadcrumb.
509
519
  * @default false
510
520
  */
511
521
  console: boolean | CapturedConsoleMethod[];
512
522
  /**
513
- * Keep the query string and fragment on every URL the library records.
514
- * When off, the library removes them from page URLs, request targets and failed resource URLs.
523
+ * Keep the query string and fragment on every URL the library records. When off, they are
524
+ * removed from page URLs, request targets and failed resource URLs.
515
525
  * @default false
516
526
  */
517
527
  fullUrls: boolean;
518
528
  /**
519
- * URLs that the library does not log. The library always adds the ingest endpoint.
529
+ * URLs the library doesn't log. The ingest endpoint is always included.
520
530
  * @default []
521
531
  */
522
532
  ignoreUrls: (string | RegExp)[];
523
533
  /**
524
- * Targets that receive a `traceparent` header. A string is an origin and matches a request
525
- * to that origin only. A RegExp tests the full URL. Start each RegExp with `^`. A pattern that
526
- * matches all URLs breaks CORS on third-party endpoints.
534
+ * Targets that receive a `traceparent` header. A string is an origin and matches only
535
+ * requests to that origin. A RegExp tests the full URL. Start every RegExp with `^`, because
536
+ * a pattern that matches all URLs breaks CORS on third-party endpoints.
527
537
  * @default []
528
538
  */
529
539
  propagateTraceHeaderTo: (string | RegExp)[];
530
540
  /**
531
- * Record the open, close and error events of each WebSocket, and count its messages in the
532
- * counter `ui.websocket.messages`. The library never records the content of a message.
541
+ * Record every WebSocket's open, close and error events, and count its messages in the
542
+ * `ui.websocket.messages` counter. Message content is never recorded.
533
543
  * @default false
534
544
  */
535
545
  webSocket: boolean;
536
546
  /**
537
- * Report a page of this tab that stopped without a clean close, for example after a crash.
538
- * The next page of the tab logs WARN `ui.unclean_exit`. It writes one sessionStorage key.
539
- * A popup with an opener reports nothing. `identity: "memory"` turns this capture off.
547
+ * Report a page in this tab that ended without a clean close, for example after a crash.
548
+ * The tab's next page logs WARN `ui.unclean_exit`. The capture writes one sessionStorage
549
+ * key. A popup with an opener reports nothing, and `identity: "memory"` turns this off.
540
550
  * @default false
541
551
  */
542
552
  uncleanExit: boolean;
543
553
  /**
544
- * Record each `performance.measure()` of the app in the histogram `ui.user_timing.duration`,
545
- * in milliseconds, with `user_timing.name`. Each `performance.mark()` adds a breadcrumb.
546
- * Names follow `fullUrls`.
554
+ * Record every `performance.measure()` the app makes in the `ui.user_timing.duration`
555
+ * histogram, in milliseconds, with `user_timing.name`. Every `performance.mark()` adds a
556
+ * breadcrumb. Names follow `fullUrls`.
547
557
  * @default false
548
558
  */
549
559
  userTiming: boolean;
550
560
  /**
551
561
  * Names of the marks and measures that userTiming records, as strings and RegExp patterns.
552
- * A string matches a part of the name. An empty list records each name.
562
+ * A string matches any part of the name. An empty list records every name.
553
563
  * @default []
554
564
  */
555
565
  userTimingInclude: (string | RegExp)[];
@@ -559,7 +569,8 @@ export interface CaptureOptions {
559
569
  */
560
570
  remoteToggles: RemoteCaptureFlag[];
561
571
  /**
562
- * Add response Server-Timing entries to fetch and XHR records. Link a traceparent entry to the client span.
572
+ * Add the response's Server-Timing entries to fetch and XHR records, and link a traceparent
573
+ * entry to the client span.
563
574
  * @default false
564
575
  */
565
576
  serverTiming: boolean;
@@ -579,7 +590,7 @@ export interface CaptureOptions {
579
590
  */
580
591
  lifecycle: boolean;
581
592
  /**
582
- * Capture modules from the app. A new list replaces the list in force.
593
+ * Capture modules supplied by the app. A new list replaces the current one.
583
594
  * @default []
584
595
  */
585
596
  plugins: CapturePlugin[];
@@ -589,7 +600,10 @@ export interface CaptureOptions {
589
600
  */
590
601
  webVitalsLoader?: () => Promise<WebVitalsModule>;
591
602
  }
592
- /** Serializer option after resolution. A name stays a name. The transport selects the implementation. */
603
+ /**
604
+ * Serializer option after resolution. A name stays a name, and the transport picks the
605
+ * implementation.
606
+ */
593
607
  export type SerializerChoice = "otlp" | "ecs" | LogSerializer;
594
608
  /** Part of the console prefix that a style applies to: the namespace or one level. */
595
609
  export type ConsoleStyleKey = "namespace" | LogLevel;
@@ -601,11 +615,11 @@ export type ConsoleStyles = Partial<Record<ConsoleStyleKey, string>>;
601
615
  /** Object form of the console option. */
602
616
  export interface ConsoleOptions {
603
617
  /**
604
- * Lowest level that the console prints. If you do not set it, the level in force stays.
605
- * If no level is in force, the console prints from DEBUG up.
618
+ * Lowest level the console prints. If you leave it unset, the current level stays. If there
619
+ * is no current level, the console prints from DEBUG up.
606
620
  */
607
621
  level?: LogLevel;
608
- /** CSS for the namespace and for each level. A key that you do not set keeps its style. */
622
+ /** CSS for the namespace and for each level. Any key you leave unset keeps its style. */
609
623
  styles?: ConsoleStyles;
610
624
  }
611
625
  /**
@@ -621,21 +635,24 @@ export interface ResolvedConsole {
621
635
  styles: Required<ConsoleStyles>;
622
636
  }
623
637
  /**
624
- * Kind of a batch. A batch of metric records is "metrics" when `metricsEndpoint` is set. Its body
625
- * is then an OTLP `ExportMetricsServiceRequest`. A batch of span records is "traces". Its body is
626
- * an OTLP `ExportTraceServiceRequest`.
638
+ * Kind of batch. A batch of metric records is "metrics" when `metricsEndpoint` is set, and its
639
+ * body is then an OTLP `ExportMetricsServiceRequest`. A batch of span records is "traces",
640
+ * with an OTLP `ExportTraceServiceRequest` as its body.
627
641
  */
628
642
  export type BatchKind = "logs" | "metrics" | "traces";
629
- /** One batch that the library gives to a custom transport. */
643
+ /** One batch that the library hands to a custom transport. */
630
644
  export interface TransportRequest {
631
645
  /**
632
- * Abort signal for this delivery context. It aborts at `shutdown()` and at a rotation. A custom
633
- * transport must check it to cancel its work.
646
+ * Abort signal for this delivery context. It aborts on `shutdown()` and on a rotation. A
647
+ * custom transport must check it to cancel its work.
634
648
  */
635
649
  signal?: AbortSignal;
636
650
  /** Delivery context of this batch. */
637
651
  routingContextId?: string;
638
- /** Kind of the batch. Send a "metrics" body to your metrics endpoint, and a "traces" body to your traces endpoint. */
652
+ /**
653
+ * Kind of batch. Send a "metrics" body to your metrics endpoint and a "traces" body to your
654
+ * traces endpoint.
655
+ */
639
656
  kind: BatchKind;
640
657
  /** Serialized batch from the configured serializer. The library does not compress it. */
641
658
  body: string;
@@ -643,16 +660,16 @@ export interface TransportRequest {
643
660
  contentType: string;
644
661
  /** Batch id. Send it to the server for deduplication, for example as `X-UiObs-Batch-Id`. */
645
662
  batchId: string;
646
- /** Number of earlier send attempts. It is 0 for the first send. */
663
+ /** Number of earlier send attempts, 0 for the first send. */
647
664
  attempt: number;
648
- /** Built records after `redact`. Do not change them. The retry engine can send them again. */
665
+ /** Built records after `redact`. Don't change them, because the retry engine can resend them. */
649
666
  records: readonly LogRecord[];
650
667
  }
651
- /** Answer of a custom transport. The status code has the meaning of the ingest contract. */
668
+ /** A custom transport's answer. The status code means what it does in the ingest contract. */
652
669
  export interface TransportResponse {
653
670
  /**
654
671
  * HTTP-like status code. 2xx accepts the batch. 413 splits it. 429 and 503 throttle.
655
- * 408 and 5xx retry. Each other code drops the batch.
672
+ * 408 and 5xx retry. Any other code drops the batch.
656
673
  */
657
674
  status: number;
658
675
  /** Delay before the next send, for 429 and 503, in milliseconds. */
@@ -660,18 +677,18 @@ export interface TransportResponse {
660
677
  /** Largest payload that the server accepts, for 413, in bytes. */
661
678
  maxBytes?: number;
662
679
  /**
663
- * Sampling rules for a 2xx answer, as the header text or as a parsed object.
664
- * The library reads it only with `sampling.remote`.
680
+ * Sampling rules for a 2xx answer, as the header text or as a parsed object. Only read when
681
+ * `sampling.remote` is on.
665
682
  */
666
683
  sampling?: unknown;
667
684
  /** `Date` header of a 2xx answer. The library computes `uiobs.clock_offset_ms` from it. */
668
685
  date?: string;
669
686
  }
670
687
  /**
671
- * Sends one batch through a channel of the app, such as an API client, a WebSocket or IPC.
672
- * A rejected promise counts as a network error. The library then sends the batch again.
688
+ * Sends one batch through one of the app's own channels, such as an API client, a WebSocket
689
+ * or IPC. A rejected promise counts as a network error, so the library sends the batch again.
673
690
  * @param request Batch to send.
674
- * @returns Promise that resolves to the answer of the server.
691
+ * @returns Promise that resolves to the server's answer.
675
692
  */
676
693
  export type Transport = (request: TransportRequest) => Promise<TransportResponse>;
677
694
  /**
@@ -683,12 +700,12 @@ export type ExitTransport = (request: TransportRequest) => boolean;
683
700
  /** Request timing, retry timing and delivery capacity. Durations are in milliseconds. */
684
701
  export interface DeliveryPolicy {
685
702
  /**
686
- * Maximum wait for one request. The value must be at least 1.
703
+ * Maximum wait for one request. Must be at least 1.
687
704
  * @default 15000
688
705
  */
689
706
  requestTimeoutMs: number;
690
707
  /**
691
- * Maximum requests that have not completed. The value must be at least 1.
708
+ * Maximum requests in flight at once. Must be at least 1.
692
709
  * @default 2
693
710
  */
694
711
  maxConcurrentRequests: number;
@@ -698,7 +715,7 @@ export interface DeliveryPolicy {
698
715
  */
699
716
  retryBaseDelayMs: number;
700
717
  /**
701
- * Maximum retry delay. It must be at least retryBaseDelayMs.
718
+ * Maximum retry delay. Must be at least retryBaseDelayMs.
702
719
  * @default 60000
703
720
  */
704
721
  retryMaxDelayMs: number;
@@ -708,13 +725,13 @@ export interface DeliveryPolicy {
708
725
  */
709
726
  retryIdleDelayMs: number;
710
727
  /**
711
- * Maximum batches in one delivery pass. The value must be at least 1.
728
+ * Maximum batches in one delivery pass. Must be at least 1.
712
729
  * @default 20
713
730
  */
714
731
  batchesPerDrain: number;
715
732
  /**
716
- * Fetch priority of each batch request. With "low", the requests of the app go first.
717
- * The exit flush and a keepalive send from a hidden page use the browser default.
733
+ * Fetch priority of every batch request. With "low", the app's own requests go first. The
734
+ * exit flush and a keepalive send from a hidden page use the browser default.
718
735
  * @default "low"
719
736
  */
720
737
  priority: "low" | "auto" | "high";
@@ -732,7 +749,8 @@ export interface BufferingPolicy {
732
749
  */
733
750
  maxPendingBytes: number;
734
751
  /**
735
- * Rule when a new record does not fit. Remove old records, drop the new record, or try storage.
752
+ * What to do when a new record does not fit: remove old records, drop the new record, or
753
+ * try storage.
736
754
  * @default "drop-oldest"
737
755
  */
738
756
  overflow: "drop-oldest" | "drop-newest" | "persist";
@@ -745,12 +763,13 @@ export interface MetricsPolicy {
745
763
  */
746
764
  maxHistogramBoundaries: number;
747
765
  /**
748
- * Maximum attribute sets per instrument. Extra sets use the overflow set. Set 0 for no limit.
766
+ * Maximum attribute sets per instrument. Extra sets go into the overflow set. Set 0 for no
767
+ * limit.
749
768
  * @default 100
750
769
  */
751
770
  maxSeries: number;
752
771
  /**
753
- * Maximum instrument names. Drop extra names. Set 0 for no limit.
772
+ * Maximum instrument names. Extra names are dropped. Set 0 for no limit.
754
773
  * @default 1000
755
774
  */
756
775
  maxInstruments: number;
@@ -758,17 +777,17 @@ export interface MetricsPolicy {
758
777
  /** Session and trace timing. The runtime sets these values at startup. */
759
778
  export interface CorrelationPolicy {
760
779
  /**
761
- * Maximum idle time of a stored session, in milliseconds. Set 0 for no idle expiration.
780
+ * How long a stored session can stay idle, in milliseconds. Set 0 for no idle expiration.
762
781
  * @default 1800000
763
782
  */
764
783
  sessionIdleMs: number;
765
784
  /**
766
- * Minimum wait between session activity writes, in milliseconds. Set 0 to write each time.
785
+ * Minimum wait between session activity writes, in milliseconds. Set 0 to write every time.
767
786
  * @default 60000
768
787
  */
769
788
  sessionTouchMs: number;
770
789
  /**
771
- * Maximum idle time of an ambient trace, in milliseconds. Set 0 for no idle expiration.
790
+ * How long an ambient trace can stay idle, in milliseconds. Set 0 for no idle expiration.
772
791
  * @default 300000
773
792
  */
774
793
  traceMaxAgeMs: number;
@@ -776,20 +795,20 @@ export interface CorrelationPolicy {
776
795
  /** Rules for diagnostic reports and the console fallback. */
777
796
  export interface DiagnosticsPolicy {
778
797
  /**
779
- * Minimum wait between reports of one code, in milliseconds. Set 0 to report each event.
798
+ * Minimum wait between reports of one code, in milliseconds. Set 0 to report every event.
780
799
  * @default 1000
781
800
  */
782
801
  throttleMs: number;
783
802
  /**
784
- * Print a fixed warning if onDiagnostic throws. Do not print the exception.
803
+ * Print a fixed warning if onDiagnostic throws. The exception itself is not printed.
785
804
  * @default false
786
805
  */
787
806
  consoleFallback: boolean;
788
807
  /**
789
- * Also send each reported diagnostic as a record in the namespace `uiobs.diagnostics`.
790
- * A list of codes sends only those codes. The interval of `throttleMs` applies. A diagnostic
791
- * of the first `configure()` gives no record. In a record, the `url` and `endpoint` detail
792
- * fields have no query and no fragment. `onDiagnostic` gets the full values.
808
+ * Also send every reported diagnostic as a record in the `uiobs.diagnostics` namespace. A
809
+ * list of codes sends only those codes. The `throttleMs` interval applies. A diagnostic from
810
+ * the first `configure()` produces no record. In a record, the `url` and `endpoint` detail
811
+ * fields have no query and no fragment, while `onDiagnostic` gets the full values.
793
812
  * @default false
794
813
  */
795
814
  records: boolean | DiagnosticCode[];
@@ -811,7 +830,7 @@ export interface PersistencePolicy {
811
830
  /** Resource and page fields that the SDK records. */
812
831
  export interface MetadataPolicy {
813
832
  /**
814
- * Record the page URL. With false, page.url is empty.
833
+ * Record the page URL. When false, page.url is empty.
815
834
  * @default true
816
835
  */
817
836
  pageUrl: boolean;
@@ -826,8 +845,8 @@ export interface MetadataPolicy {
826
845
  */
827
846
  openfin: boolean;
828
847
  /**
829
- * Add `uiobs.clock_offset_ms` to each log and span record. The value comes from the `Date`
830
- * header of the last accepted answer. The server must expose that header.
848
+ * Add `uiobs.clock_offset_ms` to every log and span record. The value comes from the `Date`
849
+ * header of the last accepted answer, so the server must expose that header.
831
850
  * @default true
832
851
  */
833
852
  clockOffset: boolean;
@@ -840,7 +859,7 @@ export interface CapturePolicy {
840
859
  */
841
860
  breadcrumbs: number;
842
861
  /**
843
- * Time to suppress repeated errors, in milliseconds. Set 0 to report each error.
862
+ * How long repeated errors are suppressed, in milliseconds. Set 0 to report every error.
844
863
  * @default 5000
845
864
  */
846
865
  errorDedupeMs: number;
@@ -876,14 +895,13 @@ export interface CapturePolicy {
876
895
  /** Maximum lifecycle events in one window. Set 0 for no limit. @default 20 */
877
896
  lifecyclePerWindow: number;
878
897
  /**
879
- * Rate limit window, in milliseconds. Set 0 to reset the window for each event.
898
+ * Rate limit window, in milliseconds. Set 0 to reset the window for every event.
880
899
  * @default 10000
881
900
  */
882
901
  windowMs: number;
883
902
  /**
884
903
  * Maximum log records at or above `sampling.alwaysSampleFrom` in one window. Metric points
885
- * and spans do not count.
886
- * Set 0 for no limit.
904
+ * and spans do not count. Set 0 for no limit.
887
905
  * @default 500
888
906
  */
889
907
  errorCeiling: number;
@@ -891,14 +909,14 @@ export interface CapturePolicy {
891
909
  /** Records that minLevel or sampling drops, kept for the next error. */
892
910
  export interface DebugBufferPolicy {
893
911
  /**
894
- * Keep the records that minLevel or sampling drops. An ERROR or FATAL record of this context
895
- * sends them first, with `uiobs.debug_buffer: true`. A later change of `redact` or `processors`
896
- * empties the buffer.
912
+ * Keep the records that minLevel or sampling drops. An ERROR or FATAL record from this
913
+ * context sends them first, with `uiobs.debug_buffer: true`. A later change to `redact` or
914
+ * `processors` empties the buffer.
897
915
  * @default false
898
916
  */
899
917
  enabled: boolean;
900
918
  /**
901
- * Maximum kept records. The oldest record leaves first. The range is 1 to 10000.
919
+ * Maximum kept records. The oldest record is dropped first. 1 to 10000.
902
920
  * @default 200
903
921
  */
904
922
  maxRecords: number;
@@ -908,6 +926,168 @@ export interface DebugBufferPolicy {
908
926
  */
909
927
  maxAgeMs: number;
910
928
  }
929
+ /** Duration probes. Each probe is reported as a histogram summary record. */
930
+ export interface ProfilerPolicy {
931
+ /**
932
+ * Record probe durations. When false, probes do nothing and don't even read the clock.
933
+ * @default false
934
+ */
935
+ enabled: boolean;
936
+ /**
937
+ * How often the profiler sends its summary records, in milliseconds. 1000 to 600000.
938
+ * @default 10000
939
+ */
940
+ flushIntervalMs: number;
941
+ /**
942
+ * Maximum number of probes, 1 to 1024. Can't be changed after startup.
943
+ * @default 64
944
+ */
945
+ maxProbes: number;
946
+ /**
947
+ * Attribute the phases of each long animation frame to every probe that had a span of 1 ms
948
+ * or more in it. The phases are script, render callbacks, style and layout, and forced
949
+ * layout. Needs `enabled` and a browser that supports long animation frames.
950
+ * @default false
951
+ */
952
+ framePhases: boolean;
953
+ /**
954
+ * Measure the time between frames with the `frame.interval` probe. Needs `enabled`. Runs one
955
+ * frame callback per frame while the page is visible.
956
+ * @default false
957
+ */
958
+ framePacing: boolean;
959
+ }
960
+ /**
961
+ * Session replay. The app's recorder records the DOM, and the library keeps the recent events
962
+ * in memory and sends them in segments after an error.
963
+ */
964
+ export interface ReplayPolicy {
965
+ /**
966
+ * Record the DOM. Needs `loader`, plus either `endpoint` or `onSegment`.
967
+ * @default false
968
+ */
969
+ enabled: boolean;
970
+ /**
971
+ * `"onError"` uploads the buffer after an ERROR or FATAL record.
972
+ * @default "onError"
973
+ */
974
+ mode: ReplayMode;
975
+ /**
976
+ * URL that each segment is POSTed to. This is separate from the log endpoint.
977
+ * @default ""
978
+ */
979
+ endpoint: string;
980
+ /**
981
+ * When true, nothing is recorded until `startReplay()` is called.
982
+ * @default false
983
+ */
984
+ requireConsent: boolean;
985
+ /**
986
+ * How much time before an error the buffer keeps, in milliseconds. At any moment the buffer
987
+ * holds between 1x and 1.5x this much. 5000 to 600000.
988
+ * @default 60000
989
+ */
990
+ bufferMs: number;
991
+ /**
992
+ * Maximum buffer size, measured as the JSON length of its events. When it is exceeded, the
993
+ * buffer drops its oldest part. 100000 to 200000000.
994
+ * @default 10000000
995
+ */
996
+ maxBufferBytes: number;
997
+ /**
998
+ * How long the library keeps sending events after an error, in milliseconds. Another error
999
+ * inside that time doesn't extend it. 0 to 600000.
1000
+ * @default 5000
1001
+ */
1002
+ afterErrorMs: number;
1003
+ /**
1004
+ * Maximum uploads per `capturePolicy.windowMs` window. 0 means no limit.
1005
+ * @default 3
1006
+ */
1007
+ uploadsPerWindow: number;
1008
+ /**
1009
+ * Maximum events per segment. 1 to 10000.
1010
+ * @default 200
1011
+ */
1012
+ batchSize: number;
1013
+ /**
1014
+ * Maximum segment size, measured as the JSON length of its events. A single event larger
1015
+ * than this gets a segment to itself. 10000 to 10000000.
1016
+ * @default 512000
1017
+ */
1018
+ batchBytes: number;
1019
+ /**
1020
+ * How long a partial segment waits before it is sent, in milliseconds. 100 to 60000.
1021
+ * @default 2000
1022
+ */
1023
+ flushIntervalMs: number;
1024
+ /**
1025
+ * Maximum total size of the segments waiting to be sent. When it is exceeded, the library
1026
+ * drops the oldest segment. 100000 to 200000000.
1027
+ * @default 20000000
1028
+ */
1029
+ maxQueueBytes: number;
1030
+ /**
1031
+ * Maximum send attempts per segment. 1 to 10.
1032
+ * @default 3
1033
+ */
1034
+ maxAttempts: number;
1035
+ /**
1036
+ * Mask all element text. Only text inside an element with `data-observability-unmask` is left alone.
1037
+ * The recorder does not mask attribute values, URLs, CSS text or comments.
1038
+ * @default true
1039
+ */
1040
+ maskText: boolean;
1041
+ /**
1042
+ * Mask the value of every `input`, `textarea` and `select`, including hidden and file
1043
+ * inputs. Password inputs are always masked. The recorder does not mask the `value` of
1044
+ * checkboxes, radio buttons, buttons or `<option>` elements.
1045
+ * @default true
1046
+ */
1047
+ maskInputs: boolean;
1048
+ /**
1049
+ * Record canvas elements.
1050
+ * @default false
1051
+ */
1052
+ recordCanvas: boolean;
1053
+ /**
1054
+ * CSS selectors for elements whose text is always masked.
1055
+ * @default []
1056
+ */
1057
+ maskSelectors: string[];
1058
+ /**
1059
+ * CSS selectors for elements the recorder should skip entirely.
1060
+ * @default []
1061
+ */
1062
+ blockSelectors: string[];
1063
+ /**
1064
+ * Loads the recorder, e.g. `() => import("@rrweb/record")`.
1065
+ * @default null
1066
+ */
1067
+ loader: ReplayLoader | null;
1068
+ /**
1069
+ * Receives each segment instead of the POST to `endpoint`.
1070
+ * @default null
1071
+ */
1072
+ onSegment: ((segment: ReplaySegment) => void | Promise<void>) | null;
1073
+ /**
1074
+ * Request headers for `endpoint`, or a function that returns them. The log endpoint's
1075
+ * `headers` are never sent to the replay endpoint.
1076
+ * @default null
1077
+ */
1078
+ headers: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>) | null;
1079
+ /**
1080
+ * Loaders for the recorder's record plugins.
1081
+ * @default []
1082
+ */
1083
+ plugins: ReplayPluginLoader[];
1084
+ /**
1085
+ * Extra options for the `record` function, such as `sampling` and `slimDOMOptions`. The
1086
+ * library sets the mask, block, canvas, plugin and event options itself and ignores them here.
1087
+ * @default {}
1088
+ */
1089
+ recordOptions: Record<string, unknown>;
1090
+ }
911
1091
  /** Options passed to `configure()`. */
912
1092
  export interface ObservabilityConfig {
913
1093
  /** Capture capacity and rate limits. */
@@ -928,6 +1108,10 @@ export interface ObservabilityConfig {
928
1108
  delivery?: Partial<DeliveryPolicy>;
929
1109
  /** Records that minLevel or sampling drops, kept for the next error. */
930
1110
  debugBuffer?: Partial<DebugBufferPolicy>;
1111
+ /** Duration probes. Each probe is reported as a histogram summary record. */
1112
+ profiler?: Partial<ProfilerPolicy>;
1113
+ /** Session replay. Off by default. */
1114
+ replay?: Partial<ReplayPolicy>;
931
1115
  /**
932
1116
  * Refuse changes through configure(). Call setConfigurationLocked(false) to permit changes again.
933
1117
  * @default false
@@ -938,51 +1122,51 @@ export interface ObservabilityConfig {
938
1122
  /** Delivery identity and isolation rule. Use rotateSecurityContext() to change the identity. */
939
1123
  securityContext?: Partial<SecurityContextOptions>;
940
1124
  /**
941
- * Ingest endpoint URL. Set `null` for console-only mode.
942
- * In console-only mode, the library sends nothing. It writes records to the console
943
- * if you set `console`.
944
- * If the key is missing or `""`, the library reports `config.invalid`.
1125
+ * Ingest endpoint URL. Set `null` for console-only mode, where the library sends nothing
1126
+ * and writes records to the console only if you set `console`. If the key is missing or
1127
+ * `""`, the library reports `config.invalid`.
945
1128
  */
946
1129
  endpoint?: string | null;
947
1130
  /**
948
- * OTLP metrics endpoint URL, for example `"https://ingest.example/v1/metrics"`. With this key,
949
- * the library sends each batch of metric records there as an OTLP `ExportMetricsServiceRequest`.
950
- * Without it, metric records are log records on `endpoint`. The key needs `serializer: "otlp"`.
951
- * Set `""` to turn it off.
1131
+ * OTLP metrics endpoint URL, for example `"https://ingest.example/v1/metrics"`. When set,
1132
+ * the library sends every batch of metric records there as an OTLP
1133
+ * `ExportMetricsServiceRequest`. Without it, metric records are log records on `endpoint`.
1134
+ * Needs `serializer: "otlp"`. Set `""` to turn it off.
952
1135
  * @default ""
953
1136
  */
954
1137
  metricsEndpoint?: string;
955
1138
  /**
956
- * OTLP traces endpoint URL, for example `"https://ingest.example/v1/traces"`. With this key, the
957
- * library records one root span for each trace of the library, and one CLIENT span for each
958
- * request that gets `traceparent`. It sends them there as an OTLP `ExportTraceServiceRequest`.
959
- * Without it, the library sends no span. The key needs `serializer: "otlp"`. Set `""` to turn
960
- * it off.
1139
+ * OTLP traces endpoint URL, for example `"https://ingest.example/v1/traces"`. When set, the
1140
+ * library records one root span for every trace it creates and one CLIENT span for every
1141
+ * request that gets `traceparent`, and sends them there as an OTLP
1142
+ * `ExportTraceServiceRequest`. Without it, the library sends no spans. Needs
1143
+ * `serializer: "otlp"`. Set `""` to turn it off.
961
1144
  * @default ""
962
1145
  */
963
1146
  tracesEndpoint?: string;
964
1147
  /**
965
- * The library reports this value as `service.name`.
1148
+ * Reported as `service.name`.
966
1149
  * @default ""
967
1150
  */
968
1151
  serviceName?: string;
969
1152
  /**
970
- * The library reports this value as `service.version`.
1153
+ * Reported as `service.version`.
971
1154
  * @default ""
972
1155
  */
973
1156
  serviceVersion?: string;
974
1157
  /**
975
- * The library reports this value as `deployment.environment`.
1158
+ * Reported as `deployment.environment`.
976
1159
  * @default ""
977
1160
  */
978
1161
  environment?: string;
979
1162
  /**
980
- * Master switch. With false, each log call does nothing.
1163
+ * Master switch. When false, every log call does nothing.
981
1164
  * @default true
982
1165
  */
983
1166
  enabled?: boolean;
984
1167
  /**
985
- * Copy payloads at the call, or keep their references until idle time. The debug buffer always builds at the call.
1168
+ * Copy payloads at the call, or keep references to them until idle time. The debug buffer
1169
+ * always builds at the call.
986
1170
  * @default "copy"
987
1171
  */
988
1172
  payloadMode?: "copy" | "defer";
@@ -993,25 +1177,24 @@ export interface ObservabilityConfig {
993
1177
  minLevel?: LogLevel;
994
1178
  /**
995
1179
  * Minimum level for each namespace prefix. The longest matching prefix wins. For example,
996
- * `{ "trading.ticks": "DEBUG" }` logs the DEBUG records of `trading.ticks` and of its child
997
- * namespaces. A namespace with no match uses `minLevel`. A new map replaces the map in force.
1180
+ * `{ "trading.ticks": "DEBUG" }` logs the DEBUG records of `trading.ticks` and its child
1181
+ * namespaces. A namespace with no match uses `minLevel`. A new map replaces the current one.
998
1182
  * @default {}
999
1183
  */
1000
1184
  minLevels?: Record<string, LogLevel>;
1001
1185
  /**
1002
- * Set "gzip" to compress a payload that is larger than the compression threshold.
1003
- * Set "none" for an ingest endpoint that rejects gzip.
1186
+ * "gzip" compresses any payload larger than the compression threshold. Use "none" for an
1187
+ * ingest endpoint that rejects gzip.
1004
1188
  * @default "gzip"
1005
1189
  */
1006
1190
  compression?: "gzip" | "none";
1007
1191
  /**
1008
- * Payload format. Give a name or a custom implementation.
1192
+ * Payload format, either a name or a custom implementation.
1009
1193
  * @default "otlp"
1010
1194
  */
1011
1195
  serializer?: SerializerChoice;
1012
1196
  /**
1013
- * The library passes this value to `fetch`. Set "include" for an ingest endpoint that
1014
- * authenticates with cookies.
1197
+ * Passed to `fetch`. Set "include" for an ingest endpoint that authenticates with cookies.
1015
1198
  * @default "omit"
1016
1199
  */
1017
1200
  credentials?: RequestCredentials;
@@ -1023,10 +1206,9 @@ export interface ObservabilityConfig {
1023
1206
  */
1024
1207
  storage?: StorageStrategy;
1025
1208
  /**
1026
- * Selects where the library keeps session, tab and journey ids.
1027
- * Set "memory" to write no key to localStorage or sessionStorage.
1028
- * With "memory", each page load starts a new session.
1029
- * You cannot change this value after startup.
1209
+ * Where the library keeps session, tab and journey ids. "memory" writes no key to
1210
+ * localStorage or sessionStorage, so every page load starts a new session. Can't be changed
1211
+ * after startup.
1030
1212
  * @default "storage"
1031
1213
  */
1032
1214
  identity?: IdentityStrategy;
@@ -1046,7 +1228,7 @@ export interface ObservabilityConfig {
1046
1228
  */
1047
1229
  journey?: Partial<JourneyOptions>;
1048
1230
  /**
1049
- * Batch size and flush interval of each record stream.
1231
+ * Batch size and flush interval for each record stream.
1050
1232
  * @see {@link BatchingOptions}
1051
1233
  */
1052
1234
  batching?: Partial<BatchingOptions>;
@@ -1071,14 +1253,14 @@ export interface ObservabilityConfig {
1071
1253
  */
1072
1254
  console?: ConsoleOption;
1073
1255
  /**
1074
- * Sends batches through a channel of the app in place of HTTP. With `transport`, `endpoint`
1075
- * is optional. The library does not compress the body for a custom transport.
1256
+ * Sends batches through one of the app's own channels instead of HTTP. With `transport`,
1257
+ * `endpoint` is optional. The library does not compress the body for a custom transport.
1076
1258
  * @see {@link Transport}
1077
1259
  */
1078
1260
  transport?: Transport;
1079
1261
  /**
1080
1262
  * Sends the last batch while the page closes, for a custom transport. Without it, the
1081
- * library puts that batch in the emergency queue. The next page load sends it.
1263
+ * library puts that batch in the emergency queue and the next page load sends it.
1082
1264
  * @see {@link ExitTransport}
1083
1265
  */
1084
1266
  transportOnExit?: ExitTransport;
@@ -1089,29 +1271,28 @@ export interface ObservabilityConfig {
1089
1271
  transportWorker?: () => Worker;
1090
1272
  /**
1091
1273
  * Loads the `@opentelemetry/api` module. Example: `() => import("@opentelemetry/api")`.
1092
- * If you do not set it, OTel is off.
1274
+ * OTel stays off unless you set it.
1093
1275
  * @see {@link OtelLoader}
1094
1276
  */
1095
1277
  otelLoader?: OtelLoader;
1096
1278
  /**
1097
- * Gives attributes for each record that the library builds. Its values override `setContext()`
1098
- * values. The logger scope and the call payload override its values. The library calls it for
1099
- * each built record. This includes records used only for the console or breadcrumbs.
1100
- * Keep it fast and synchronous. If it throws or returns a value that is not an object,
1101
- * it adds nothing to the record.
1279
+ * Returns attributes for every record the library builds. Its values override `setContext()`
1280
+ * values, and the logger scope and the call payload override its values. It is called for
1281
+ * every built record, including records used only for the console or breadcrumbs. Keep it
1282
+ * fast and synchronous. If it throws or returns a non-object, it adds nothing to the record.
1102
1283
  * @returns The attributes, or undefined for none.
1103
1284
  */
1104
1285
  contextProvider?: () => Record<string, unknown> | undefined;
1105
1286
  /**
1106
- * Changes or drops a record. The processors run in list order, before `redact`. A processor has
1107
- * the contract of `redact`. If it throws or returns a value that is not a record, the library
1108
- * drops the record.
1287
+ * Change or drop a record. Processors run in list order, before `redact`, and follow the
1288
+ * same contract as `redact`. If one throws or returns something that isn't a record, the
1289
+ * library drops the record.
1109
1290
  */
1110
1291
  processors?: ((record: LogRecord) => LogRecord | null)[];
1111
1292
  /**
1112
- * Changes or drops a record before the SDK prints or sends it. If the hook throws or returns a
1113
- * value that is not a record, the library drops the record.
1114
- * @param record Record to process. It can be used only for the console or breadcrumbs.
1293
+ * Changes or drops a record before the SDK prints or sends it. If the hook throws or returns
1294
+ * something that isn't a record, the library drops the record.
1295
+ * @param record Record to process. It may be destined only for the console or breadcrumbs.
1115
1296
  * @returns The record to send, or `null` to drop it.
1116
1297
  */
1117
1298
  redact?: (record: LogRecord) => LogRecord | null;
@@ -1121,11 +1302,12 @@ export interface ObservabilityConfig {
1121
1302
  */
1122
1303
  onDiagnostic?: DiagnosticHandler;
1123
1304
  /**
1124
- * Receives a summary when the library loses records that it built. Sampling, `minLevel`,
1125
- * `processors` and `redact` do not cause a loss. The library joins the losses of one reason in one task.
1126
- * Do not log through the library in the hook. A record from the hook can evict a stored batch.
1127
- * A batch that storage evicts during its send can still reach the server.
1128
- * @param summary Reason, record count, batch ids, journey ids and action names of the loss.
1305
+ * Receives a summary when the library loses records it has already built. Sampling,
1306
+ * `minLevel`, `processors` and `redact` do not cause a loss. Losses with the same reason in
1307
+ * the same task are merged. Do not log through the library in the hook, because a record
1308
+ * from the hook can evict a stored batch. A batch that storage evicts during its send can
1309
+ * still reach the server.
1310
+ * @param summary The loss's reason, record count, batch ids, journey ids and action names.
1129
1311
  * @see {@link DropSummary}
1130
1312
  */
1131
1313
  onDrop?: (summary: DropSummary) => void;
@@ -1150,9 +1332,13 @@ export interface ResolvedConfig {
1150
1332
  delivery: DeliveryPolicy;
1151
1333
  /** Records that minLevel or sampling drops, kept for the next error. */
1152
1334
  debugBuffer: DebugBufferPolicy;
1335
+ /** Duration probes. Each probe is reported as a histogram summary record. */
1336
+ profiler: ProfilerPolicy;
1337
+ /** Session replay settings. */
1338
+ replay: ReplayPolicy;
1153
1339
  /** True if configure() must refuse changes to the active settings. */
1154
1340
  lockConfiguration: boolean;
1155
- /** Capacity of the logger cache. */
1341
+ /** Logger cache capacity. */
1156
1342
  loggerCache: LoggerCacheOptions;
1157
1343
  /** Active delivery context id and isolation rule. */
1158
1344
  securityContext: SecurityContextOptions;
@@ -1162,15 +1348,15 @@ export interface ResolvedConfig {
1162
1348
  metricsEndpoint: string;
1163
1349
  /** OTLP traces endpoint URL, or "" when the library sends no span. */
1164
1350
  tracesEndpoint: string;
1165
- /** The library reports this value as `service.name`. */
1351
+ /** Reported as `service.name`. */
1166
1352
  serviceName: string;
1167
- /** The library reports this value as `service.version`. */
1353
+ /** Reported as `service.version`. */
1168
1354
  serviceVersion: string;
1169
- /** The library reports this value as `deployment.environment`. */
1355
+ /** Reported as `deployment.environment`. */
1170
1356
  environment: string;
1171
- /** Master switch. With false, each log call does nothing. */
1357
+ /** Master switch. When false, every log call does nothing. */
1172
1358
  enabled: boolean;
1173
- /** Time at which logger calls read their payloads. */
1359
+ /** When logger calls read their payloads. */
1174
1360
  payloadMode: "copy" | "defer";
1175
1361
  /** Minimum level that the library logs. */
1176
1362
  minLevel: LogLevel;
@@ -1178,13 +1364,13 @@ export interface ResolvedConfig {
1178
1364
  minLevels: Record<string, LogLevel>;
1179
1365
  /** Hooks that change or drop a record before `redact`. */
1180
1366
  processors: NonNullable<ObservabilityConfig["processors"]>;
1181
- /** "gzip" compresses a payload that is larger than the compression threshold. */
1367
+ /** "gzip" compresses any payload larger than the compression threshold. */
1182
1368
  compression: "gzip" | "none";
1183
- /** The library passes this value to `fetch`. */
1369
+ /** Passed to `fetch`. */
1184
1370
  credentials: RequestCredentials;
1185
1371
  /** Backing store for undelivered records. */
1186
1372
  storage: StorageStrategy;
1187
- /** Store for session, tab and journey ids. */
1373
+ /** Where session, tab and journey ids are kept. */
1188
1374
  identity: IdentityStrategy;
1189
1375
  /**
1190
1376
  * Sampling policy.
@@ -1202,7 +1388,7 @@ export interface ResolvedConfig {
1202
1388
  */
1203
1389
  journey: JourneyOptions;
1204
1390
  /**
1205
- * Batch size and flush interval of each record stream.
1391
+ * Batch size and flush interval for each record stream.
1206
1392
  * @see {@link BatchingOptions}
1207
1393
  */
1208
1394
  batching: BatchingOptions;
@@ -1227,7 +1413,7 @@ export interface ResolvedConfig {
1227
1413
  serializer: SerializerChoice;
1228
1414
  /** Extra request headers, or a function returning them. */
1229
1415
  headers?: ObservabilityConfig["headers"];
1230
- /** Sends batches through a channel of the app in place of HTTP. */
1416
+ /** Sends batches through one of the app's own channels instead of HTTP. */
1231
1417
  transport?: Transport;
1232
1418
  /** Sends the last batch while the page closes, for a custom transport. */
1233
1419
  transportOnExit?: ExitTransport;
@@ -1235,11 +1421,11 @@ export interface ResolvedConfig {
1235
1421
  transportWorker?: ObservabilityConfig["transportWorker"];
1236
1422
  /** Supplies the `@opentelemetry/api` module in place of importing it. */
1237
1423
  otelLoader?: OtelLoader;
1238
- /** Gives attributes for each record that the library builds. */
1424
+ /** Returns attributes for every record the library builds. */
1239
1425
  contextProvider?: ObservabilityConfig["contextProvider"];
1240
1426
  /**
1241
1427
  * Changes or drops a record before the SDK prints or sends it.
1242
- * @param record Record to process. It can be used only for the console or breadcrumbs.
1428
+ * @param record Record to process. It may be destined only for the console or breadcrumbs.
1243
1429
  * @returns The record to send, or `null` to drop it.
1244
1430
  */
1245
1431
  redact?: ObservabilityConfig["redact"];
@@ -1248,6 +1434,6 @@ export interface ResolvedConfig {
1248
1434
  * @see {@link DiagnosticHandler}
1249
1435
  */
1250
1436
  onDiagnostic?: DiagnosticHandler;
1251
- /** Receives a summary when the library loses records that it built. */
1437
+ /** Receives a summary when the library loses records it has already built. */
1252
1438
  onDrop?: ObservabilityConfig["onDrop"];
1253
1439
  }