@utk09/ui-observability 0.12.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (523) hide show
  1. package/CHANGELOG.md +280 -10
  2. package/README.md +70 -839
  3. package/dist/{batch-BjQUwjA6.js → batch-D3NHhF9L.js} +4 -4
  4. package/dist/{batch-BjQUwjA6.js.map → batch-D3NHhF9L.js.map} +1 -1
  5. package/dist/{batch-D5LlU4Q9.cjs → batch-DnYRJqhU.cjs} +2 -2
  6. package/dist/{batch-D5LlU4Q9.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
  7. package/dist/bus/bus.d.cts +355 -0
  8. package/dist/bus/bus.d.ts +86 -12
  9. package/dist/bus/links.d.cts +132 -0
  10. package/dist/bus/links.d.ts +18 -3
  11. package/dist/bus/validation.d.cts +16 -0
  12. package/dist/bus/validation.d.ts +10 -1
  13. package/dist/bus-B__467mL.cjs +2 -0
  14. package/dist/bus-B__467mL.cjs.map +1 -0
  15. package/dist/bus-dw7T92sO.js +788 -0
  16. package/dist/bus-dw7T92sO.js.map +1 -0
  17. package/dist/capture/console.d.cts +37 -0
  18. package/dist/capture/console.d.ts +1 -1
  19. package/dist/capture/errors.d.cts +32 -0
  20. package/dist/capture/errors.d.ts +1 -1
  21. package/dist/capture/interactions.d.cts +80 -0
  22. package/dist/capture/interactions.d.ts +36 -4
  23. package/dist/capture/lifecycle.d.cts +20 -0
  24. package/dist/capture/lifecycle.d.ts +1 -1
  25. package/dist/capture/long-frames.d.cts +31 -0
  26. package/dist/capture/long-frames.d.ts +1 -1
  27. package/dist/capture/network.d.cts +57 -0
  28. package/dist/capture/network.d.ts +1 -1
  29. package/dist/capture/observed-windows.d.cts +51 -0
  30. package/dist/capture/observed-windows.d.ts +51 -0
  31. package/dist/capture/profiler-frames.d.cts +44 -0
  32. package/dist/capture/profiler-frames.d.ts +1 -1
  33. package/dist/capture/replay-buffer.d.cts +45 -0
  34. package/dist/capture/replay-buffer.d.ts +9 -10
  35. package/dist/capture/replay-upload.d.cts +79 -0
  36. package/dist/capture/replay-upload.d.ts +7 -2
  37. package/dist/capture/replay.d.cts +114 -0
  38. package/dist/capture/replay.d.ts +1 -1
  39. package/dist/capture/reports.d.cts +17 -0
  40. package/dist/capture/reports.d.ts +1 -1
  41. package/dist/capture/resource-timing.d.cts +14 -0
  42. package/dist/capture/resource-timing.d.ts +1 -1
  43. package/dist/capture/server-timing.d.cts +19 -0
  44. package/dist/capture/storm.d.cts +13 -0
  45. package/dist/capture/storm.d.ts +5 -5
  46. package/dist/capture/types.d.cts +128 -0
  47. package/dist/capture/types.d.ts +10 -9
  48. package/dist/capture/unclean-exit.d.cts +31 -0
  49. package/dist/capture/unclean-exit.d.ts +1 -1
  50. package/dist/capture/user-timing.d.cts +22 -0
  51. package/dist/capture/user-timing.d.ts +2 -2
  52. package/dist/capture/web-socket.d.cts +40 -0
  53. package/dist/capture/web-socket.d.ts +3 -3
  54. package/dist/capture/web-vitals.d.cts +40 -0
  55. package/dist/capture/web-vitals.d.ts +1 -1
  56. package/dist/{compression-lD9abCcO.cjs → compression-C0hUHKR-.cjs} +2 -2
  57. package/dist/{compression-lD9abCcO.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
  58. package/dist/{compression-AJJCMBOa.js → compression-SHPAvS4U.js} +2 -2
  59. package/dist/{compression-AJJCMBOa.js.map → compression-SHPAvS4U.js.map} +1 -1
  60. package/dist/config-CSNcS7OZ.js +558 -0
  61. package/dist/config-CSNcS7OZ.js.map +1 -0
  62. package/dist/config-CybPP5VM.cjs +2 -0
  63. package/dist/config-CybPP5VM.cjs.map +1 -0
  64. package/dist/console-BsM-fSCQ.js +81 -0
  65. package/dist/console-BsM-fSCQ.js.map +1 -0
  66. package/dist/console-Dkxs6IVQ.cjs +2 -0
  67. package/dist/console-Dkxs6IVQ.cjs.map +1 -0
  68. package/dist/constants-BwJDXzj6.js +357 -0
  69. package/dist/constants-BwJDXzj6.js.map +1 -0
  70. package/dist/constants-CtF52hIV.cjs +2 -0
  71. package/dist/constants-CtF52hIV.cjs.map +1 -0
  72. package/dist/constants.d.cts +763 -0
  73. package/dist/constants.d.ts +100 -20
  74. package/dist/core/breadcrumbs.d.cts +54 -0
  75. package/dist/core/breadcrumbs.d.ts +5 -0
  76. package/dist/core/config.d.cts +45 -0
  77. package/dist/core/config.d.ts +30 -2
  78. package/dist/core/context.d.cts +24 -0
  79. package/dist/core/context.d.ts +3 -8
  80. package/dist/core/debug-buffer.d.cts +34 -0
  81. package/dist/core/debug-buffer.d.ts +3 -3
  82. package/dist/core/debug-bundle.d.cts +12 -0
  83. package/dist/core/debug-bundle.d.ts +3 -3
  84. package/dist/core/deferred.d.cts +7 -0
  85. package/dist/core/deferred.d.ts +2 -2
  86. package/dist/core/diagnostics.d.cts +86 -0
  87. package/dist/core/diagnostics.d.ts +1 -1
  88. package/dist/core/drops.d.cts +39 -0
  89. package/dist/core/drops.d.ts +16 -6
  90. package/dist/core/hold-buffer.d.cts +36 -0
  91. package/dist/core/hold-buffer.d.ts +16 -7
  92. package/dist/core/journey.d.cts +148 -0
  93. package/dist/core/journey.d.ts +7 -7
  94. package/dist/core/logger.d.cts +141 -0
  95. package/dist/core/logger.d.ts +23 -30
  96. package/dist/core/measure.d.cts +30 -0
  97. package/dist/core/measure.d.ts +14 -3
  98. package/dist/core/meter.d.cts +78 -0
  99. package/dist/core/meter.d.ts +14 -8
  100. package/dist/core/pipeline.d.cts +227 -0
  101. package/dist/core/pipeline.d.ts +73 -10
  102. package/dist/core/profile-buckets.d.cts +31 -0
  103. package/dist/core/profiler.d.cts +218 -0
  104. package/dist/core/profiler.d.ts +2 -2
  105. package/dist/core/record.d.cts +190 -0
  106. package/dist/core/record.d.ts +44 -12
  107. package/dist/core/remote-rules.d.cts +17 -0
  108. package/dist/core/remote-rules.d.ts +3 -3
  109. package/dist/core/remote-sampling.d.cts +74 -0
  110. package/dist/core/remote-sampling.d.ts +3 -3
  111. package/dist/core/rotation.d.cts +99 -0
  112. package/dist/core/rotation.d.ts +99 -0
  113. package/dist/core/runtime.d.cts +774 -0
  114. package/dist/core/runtime.d.ts +254 -70
  115. package/dist/core/sampling.d.cts +86 -0
  116. package/dist/core/sampling.d.ts +5 -5
  117. package/dist/core/sender.d.cts +161 -0
  118. package/dist/core/sender.d.ts +59 -15
  119. package/dist/core/spans.d.cts +39 -0
  120. package/dist/core/spans.d.ts +1 -1
  121. package/dist/debug-bundle-B2v6Cym-.cjs +2 -0
  122. package/dist/debug-bundle-B2v6Cym-.cjs.map +1 -0
  123. package/dist/debug-bundle-Cs_YWzTa.js +35 -0
  124. package/dist/debug-bundle-Cs_YWzTa.js.map +1 -0
  125. package/dist/defineProperty-X1c4tIPD.cjs +1 -0
  126. package/dist/defineProperty-s2S8BXUc.js +35 -0
  127. package/dist/doctor.cjs +1 -1
  128. package/dist/doctor.cjs.map +1 -1
  129. package/dist/doctor.d.cts +36 -0
  130. package/dist/doctor.d.ts +5 -2
  131. package/dist/doctor.js +119 -87
  132. package/dist/doctor.js.map +1 -1
  133. package/dist/errors-DP2RUm4V.cjs +3 -0
  134. package/dist/errors-DP2RUm4V.cjs.map +1 -0
  135. package/dist/errors-Q3Ng1ciC.js +86 -0
  136. package/dist/errors-Q3Ng1ciC.js.map +1 -0
  137. package/dist/factory-DV17sm2p.js +404 -0
  138. package/dist/factory-DV17sm2p.js.map +1 -0
  139. package/dist/factory-K8O6gpux.cjs +2 -0
  140. package/dist/factory-K8O6gpux.cjs.map +1 -0
  141. package/dist/guards-BlYGRK4l.js +10 -0
  142. package/dist/guards-BlYGRK4l.js.map +1 -0
  143. package/dist/guards-EjG3ahFp.cjs +2 -0
  144. package/dist/guards-EjG3ahFp.cjs.map +1 -0
  145. package/dist/{identity-BrQp_5J5.js → identity-BgtHyY4u.js} +33 -26
  146. package/dist/identity-BgtHyY4u.js.map +1 -0
  147. package/dist/identity-CvuyqZk7.cjs +2 -0
  148. package/dist/identity-CvuyqZk7.cjs.map +1 -0
  149. package/dist/index.cjs +1 -1
  150. package/dist/index.cjs.map +1 -1
  151. package/dist/index.d.cts +301 -0
  152. package/dist/index.d.ts +90 -98
  153. package/dist/index.js +1253 -1555
  154. package/dist/index.js.map +1 -1
  155. package/dist/indexeddb-storage-D4KVcqdD.cjs +2 -0
  156. package/dist/indexeddb-storage-D4KVcqdD.cjs.map +1 -0
  157. package/dist/{indexeddb-storage-DLXQzAGh.js → indexeddb-storage-e-13ZLWm.js} +61 -57
  158. package/dist/indexeddb-storage-e-13ZLWm.js.map +1 -0
  159. package/dist/interactions-Byxf1C82.js +207 -0
  160. package/dist/interactions-Byxf1C82.js.map +1 -0
  161. package/dist/interactions-OK85T-Dk.cjs +2 -0
  162. package/dist/interactions-OK85T-Dk.cjs.map +1 -0
  163. package/dist/{journey-35yCMNFo.js → journey-C93FTYcs.js} +46 -49
  164. package/dist/journey-C93FTYcs.js.map +1 -0
  165. package/dist/journey-nMbob3OB.cjs +2 -0
  166. package/dist/journey-nMbob3OB.cjs.map +1 -0
  167. package/dist/{library-console-BFWEuQsl.cjs → library-console-DJUQzcgM.cjs} +2 -2
  168. package/dist/{library-console-BFWEuQsl.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
  169. package/dist/{library-console-Dl_Ly6DQ.js → library-console-DklSmucS.js} +2 -2
  170. package/dist/{library-console-Dl_Ly6DQ.js.map → library-console-DklSmucS.js.map} +1 -1
  171. package/dist/{library-request-nI6pvI6I.js → library-request-UGEwOHpf.js} +2 -2
  172. package/dist/{library-request-nI6pvI6I.js.map → library-request-UGEwOHpf.js.map} +1 -1
  173. package/dist/{library-request-Da-CHKzT.cjs → library-request-kY9iTpIF.cjs} +2 -2
  174. package/dist/{library-request-Da-CHKzT.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
  175. package/dist/{lifecycle-CZ6RRXc6.js → lifecycle-B2PlIuQu.js} +21 -29
  176. package/dist/lifecycle-B2PlIuQu.js.map +1 -0
  177. package/dist/lifecycle-DaMdH_X7.cjs +2 -0
  178. package/dist/lifecycle-DaMdH_X7.cjs.map +1 -0
  179. package/dist/log-record-Bmx6etMh.cjs +2 -0
  180. package/dist/log-record-Bmx6etMh.cjs.map +1 -0
  181. package/dist/{log-record-DIA6McNr.js → log-record-DSt2P-Sr.js} +8 -7
  182. package/dist/log-record-DSt2P-Sr.js.map +1 -0
  183. package/dist/{long-frames-430_85Da.js → long-frames-Bamjs1WV.js} +18 -22
  184. package/dist/long-frames-Bamjs1WV.js.map +1 -0
  185. package/dist/long-frames-lhtONgGt.cjs +2 -0
  186. package/dist/long-frames-lhtONgGt.cjs.map +1 -0
  187. package/dist/models/batch.d.cts +57 -0
  188. package/dist/models/batch.d.ts +2 -2
  189. package/dist/models/bus.d.cts +163 -0
  190. package/dist/models/bus.d.ts +28 -3
  191. package/dist/models/config.d.cts +1555 -0
  192. package/dist/models/config.d.ts +377 -261
  193. package/dist/models/drop.d.cts +54 -0
  194. package/dist/models/drop.d.ts +16 -3
  195. package/dist/models/health.d.cts +148 -0
  196. package/dist/models/health.d.ts +108 -12
  197. package/dist/models/log-record.d.cts +61 -0
  198. package/dist/models/metric.d.cts +139 -0
  199. package/dist/models/metric.d.ts +13 -2
  200. package/dist/models/plugin.d.cts +47 -0
  201. package/dist/models/plugin.d.ts +3 -3
  202. package/dist/models/replay.d.cts +60 -0
  203. package/dist/models/serializer.d.cts +25 -0
  204. package/dist/models/serializer.d.ts +4 -2
  205. package/dist/models/storage.d.cts +95 -0
  206. package/dist/models/storage.d.ts +7 -5
  207. package/dist/network-BCn8Gn47.cjs +2 -0
  208. package/dist/network-BCn8Gn47.cjs.map +1 -0
  209. package/dist/{network-C7SkLf4v.js → network-Cg1L2w2r.js} +57 -57
  210. package/dist/network-Cg1L2w2r.js.map +1 -0
  211. package/dist/observed-windows-B3gJkdql.cjs +2 -0
  212. package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
  213. package/dist/observed-windows-BrwaJNlj.js +64 -0
  214. package/dist/observed-windows-BrwaJNlj.js.map +1 -0
  215. package/dist/{otlp-2MCrC3kd.cjs → otlp-CrAWkQdO.cjs} +2 -2
  216. package/dist/{otlp-2MCrC3kd.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
  217. package/dist/{otlp-COq033e3.js → otlp-D6dRZyB8.js} +9 -9
  218. package/dist/{otlp-COq033e3.js.map → otlp-D6dRZyB8.js.map} +1 -1
  219. package/dist/{platform-CVewe4wQ.js → platform-8DLhjddo.js} +9 -9
  220. package/dist/{platform-CVewe4wQ.js.map → platform-8DLhjddo.js.map} +1 -1
  221. package/dist/{platform-12uR7kBQ.cjs → platform-BqRc-7RO.cjs} +2 -2
  222. package/dist/{platform-12uR7kBQ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
  223. package/dist/{profiler-BVWIOgnq.js → profiler-BaXSqCfz.js} +78 -96
  224. package/dist/profiler-BaXSqCfz.js.map +1 -0
  225. package/dist/profiler-BvWW2kNM.cjs +2 -0
  226. package/dist/profiler-BvWW2kNM.cjs.map +1 -0
  227. package/dist/{profiler-frames-CLXlT_xL.js → profiler-frames-C4ySHN0X.js} +21 -29
  228. package/dist/profiler-frames-C4ySHN0X.js.map +1 -0
  229. package/dist/profiler-frames-DeaBiB-5.cjs +2 -0
  230. package/dist/profiler-frames-DeaBiB-5.cjs.map +1 -0
  231. package/dist/remote-rules-D7L6D_D2.cjs +2 -0
  232. package/dist/remote-rules-D7L6D_D2.cjs.map +1 -0
  233. package/dist/remote-rules-Dq9xe7Qn.js +95 -0
  234. package/dist/remote-rules-Dq9xe7Qn.js.map +1 -0
  235. package/dist/replay-B0M8kWz_.js +310 -0
  236. package/dist/replay-B0M8kWz_.js.map +1 -0
  237. package/dist/replay-QOFBpAXh.cjs +2 -0
  238. package/dist/replay-QOFBpAXh.cjs.map +1 -0
  239. package/dist/{reports-BuXekPOS.js → reports--8APRLa-.js} +25 -30
  240. package/dist/reports--8APRLa-.js.map +1 -0
  241. package/dist/reports-ojuMKGO7.cjs +2 -0
  242. package/dist/reports-ojuMKGO7.cjs.map +1 -0
  243. package/dist/{resource-timing-CXGHwFRD.js → resource-timing-BzR05rE-.js} +20 -23
  244. package/dist/resource-timing-BzR05rE-.js.map +1 -0
  245. package/dist/resource-timing-pAG3ZhB5.cjs +2 -0
  246. package/dist/resource-timing-pAG3ZhB5.cjs.map +1 -0
  247. package/dist/response-body-BWvwKQ2p.js +331 -0
  248. package/dist/response-body-BWvwKQ2p.js.map +1 -0
  249. package/dist/response-body-CKEJ5itk.cjs +3 -0
  250. package/dist/response-body-CKEJ5itk.cjs.map +1 -0
  251. package/dist/rotation-BylN1B9e.js +93 -0
  252. package/dist/rotation-BylN1B9e.js.map +1 -0
  253. package/dist/rotation-E2eKClIs.cjs +2 -0
  254. package/dist/rotation-E2eKClIs.cjs.map +1 -0
  255. package/dist/sampling-B46LW0cy.cjs +2 -0
  256. package/dist/sampling-B46LW0cy.cjs.map +1 -0
  257. package/dist/sampling-zXA6r-Nw.js +63 -0
  258. package/dist/sampling-zXA6r-Nw.js.map +1 -0
  259. package/dist/{sanitize-CNmsD9r3.js → sanitize-DjnR6RXR.js} +2 -2
  260. package/dist/sanitize-DjnR6RXR.js.map +1 -0
  261. package/dist/{sanitize-ChLn97Ch.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
  262. package/dist/sanitize-Qj6LuZqp.cjs.map +1 -0
  263. package/dist/sender-Bdp-TAS4.js +979 -0
  264. package/dist/sender-Bdp-TAS4.js.map +1 -0
  265. package/dist/sender-DR7ZycZY.cjs +2 -0
  266. package/dist/sender-DR7ZycZY.cjs.map +1 -0
  267. package/dist/storage/context-storage.d.cts +90 -0
  268. package/dist/storage/context-storage.d.ts +5 -5
  269. package/dist/storage/emergency-queue.d.cts +27 -0
  270. package/dist/storage/emergency-queue.d.ts +4 -4
  271. package/dist/storage/eviction.d.cts +40 -0
  272. package/dist/storage/eviction.d.ts +1 -1
  273. package/dist/storage/factory.d.cts +21 -0
  274. package/dist/storage/factory.d.ts +3 -3
  275. package/dist/storage/gap.d.cts +20 -0
  276. package/dist/storage/gap.d.ts +3 -3
  277. package/dist/storage/idb-driver.d.cts +93 -0
  278. package/dist/storage/idb-driver.d.ts +1 -1
  279. package/dist/storage/indexeddb-storage.d.cts +97 -0
  280. package/dist/storage/indexeddb-storage.d.ts +12 -4
  281. package/dist/storage/keys.d.cts +17 -0
  282. package/dist/storage/keys.d.ts +2 -2
  283. package/dist/storage/local-storage.d.cts +139 -0
  284. package/dist/storage/local-storage.d.ts +11 -4
  285. package/dist/storage/memory-storage.d.cts +73 -0
  286. package/dist/storage/memory-storage.d.ts +4 -3
  287. package/dist/storage/persistence.d.cts +8 -0
  288. package/dist/storage/persistence.d.ts +2 -2
  289. package/dist/storage/stored-context.d.cts +34 -0
  290. package/dist/storage/stored-context.d.ts +34 -0
  291. package/dist/stored-context-BOu54M8Y.cjs +2 -0
  292. package/dist/stored-context-BOu54M8Y.cjs.map +1 -0
  293. package/dist/stored-context-CSttrAsw.js +51 -0
  294. package/dist/stored-context-CSttrAsw.js.map +1 -0
  295. package/dist/storm-BHgI12iS.cjs +2 -0
  296. package/dist/storm-BHgI12iS.cjs.map +1 -0
  297. package/dist/storm-DKlpv0FL.js +9 -0
  298. package/dist/storm-DKlpv0FL.js.map +1 -0
  299. package/dist/transport/compression.d.cts +7 -0
  300. package/dist/transport/custom-transport.d.cts +22 -0
  301. package/dist/transport/custom-transport.d.ts +6 -5
  302. package/dist/transport/errors.d.cts +31 -0
  303. package/dist/transport/exit-flush.d.cts +135 -0
  304. package/dist/transport/exit-flush.d.ts +30 -13
  305. package/dist/transport/headers.d.cts +8 -0
  306. package/dist/transport/headers.d.ts +2 -2
  307. package/dist/transport/http-transport.d.cts +116 -0
  308. package/dist/transport/http-transport.d.ts +20 -8
  309. package/dist/transport/memory-transport.d.cts +30 -0
  310. package/dist/transport/memory-transport.d.ts +2 -2
  311. package/dist/transport/response-body.d.cts +49 -0
  312. package/dist/transport/response-body.d.ts +49 -0
  313. package/dist/transport/retry-engine.d.cts +129 -0
  314. package/dist/transport/retry-engine.d.ts +27 -9
  315. package/dist/transport/serializers/ecs.d.cts +3 -0
  316. package/dist/transport/serializers/ecs.d.ts +1 -1
  317. package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
  318. package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
  319. package/dist/transport/serializers/otlp-traces.d.cts +3 -0
  320. package/dist/transport/serializers/otlp-traces.d.ts +1 -1
  321. package/dist/transport/serializers/otlp.d.cts +47 -0
  322. package/dist/transport/serializers/otlp.d.ts +2 -2
  323. package/dist/transport/serializers/select.d.cts +38 -0
  324. package/dist/transport/serializers/select.d.ts +5 -5
  325. package/dist/transport/status-transport.d.cts +129 -0
  326. package/dist/transport/status-transport.d.ts +25 -8
  327. package/dist/transport/worker-client.d.cts +23 -0
  328. package/dist/transport/worker-client.d.ts +12 -3
  329. package/dist/transport/worker-entry.d.cts +5 -0
  330. package/dist/transport/worker-entry.d.ts +1 -1
  331. package/dist/transport/worker-protocol.d.cts +38 -0
  332. package/dist/transport/worker-protocol.d.ts +4 -2
  333. package/dist/transport/worker-server.d.cts +3 -0
  334. package/dist/transport/worker-server.d.ts +1 -1
  335. package/dist/transport/worker-transport.d.cts +10 -0
  336. package/dist/transport/worker-transport.d.ts +5 -4
  337. package/dist/types-BAerHgCq.js.map +1 -1
  338. package/dist/types-C7WNpnG1.cjs.map +1 -1
  339. package/dist/unclean-exit-BYPYYkQ5.cjs +2 -0
  340. package/dist/unclean-exit-BYPYYkQ5.cjs.map +1 -0
  341. package/dist/{unclean-exit-Cob_jyTv.js → unclean-exit-BcOB8A2e.js} +23 -30
  342. package/dist/unclean-exit-BcOB8A2e.js.map +1 -0
  343. package/dist/{user-timing-DgHubxCI.js → user-timing-4KIJ74Vi.js} +15 -17
  344. package/dist/user-timing-4KIJ74Vi.js.map +1 -0
  345. package/dist/user-timing-BsU2wQKE.cjs +2 -0
  346. package/dist/user-timing-BsU2wQKE.cjs.map +1 -0
  347. package/dist/utils/console.d.cts +36 -0
  348. package/dist/utils/console.d.ts +4 -4
  349. package/dist/utils/deadline.d.cts +14 -0
  350. package/dist/utils/error-like.d.cts +25 -0
  351. package/dist/utils/fixed-window.d.cts +25 -0
  352. package/dist/utils/global-scope.d.cts +20 -0
  353. package/dist/utils/guards.d.cts +14 -0
  354. package/dist/utils/guards.d.ts +8 -0
  355. package/dist/utils/identity.d.cts +114 -0
  356. package/dist/utils/identity.d.ts +8 -4
  357. package/dist/utils/library-console.d.cts +11 -0
  358. package/dist/utils/library-request.d.cts +24 -0
  359. package/dist/utils/lock.d.cts +24 -0
  360. package/dist/utils/lock.d.ts +1 -1
  361. package/dist/utils/openfin.d.cts +48 -0
  362. package/dist/utils/patch.d.cts +9 -0
  363. package/dist/utils/platform.d.cts +62 -0
  364. package/dist/utils/platform.d.ts +2 -2
  365. package/dist/utils/sanitize.d.cts +52 -0
  366. package/dist/utils/sanitize.d.ts +1 -1
  367. package/dist/utils/sequence.d.cts +10 -0
  368. package/dist/utils/tracing.d.cts +158 -0
  369. package/dist/utils/tracing.d.ts +11 -4
  370. package/dist/utils/unref.d.cts +9 -0
  371. package/dist/web-socket-Cs1ZbmmN.cjs +2 -0
  372. package/dist/{web-socket-DthJuSAg.js.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
  373. package/dist/{web-socket-DthJuSAg.js → web-socket-Zg0hj1LB.js} +23 -28
  374. package/dist/web-socket-Zg0hj1LB.js.map +1 -0
  375. package/dist/{web-vitals-CsGCWnUr.js → web-vitals-4pWACwaR.js} +15 -21
  376. package/dist/web-vitals-4pWACwaR.js.map +1 -0
  377. package/dist/web-vitals-__X7t4pj.cjs +2 -0
  378. package/dist/web-vitals-__X7t4pj.cjs.map +1 -0
  379. package/dist/{worker-protocol-B0_8rWy5.js → worker-protocol-CYpAbrVl.js} +14 -11
  380. package/dist/worker-protocol-CYpAbrVl.js.map +1 -0
  381. package/dist/worker-protocol-DFYXIFus.cjs +2 -0
  382. package/dist/worker-protocol-DFYXIFus.cjs.map +1 -0
  383. package/dist/worker-server--yGTadTA.cjs +2 -0
  384. package/dist/worker-server--yGTadTA.cjs.map +1 -0
  385. package/dist/worker-server-BokySIII.js +94 -0
  386. package/dist/worker-server-BokySIII.js.map +1 -0
  387. package/dist/worker-transport-BdEvh_-a.cjs +2 -0
  388. package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
  389. package/dist/worker-transport-JK-Fby9J.js +194 -0
  390. package/dist/worker-transport-JK-Fby9J.js.map +1 -0
  391. package/llms.txt +400 -0
  392. package/package.json +65 -49
  393. package/dist/bus-D_7pd7RN.cjs +0 -2
  394. package/dist/bus-D_7pd7RN.cjs.map +0 -1
  395. package/dist/bus-ecxUNTja.js +0 -660
  396. package/dist/bus-ecxUNTja.js.map +0 -1
  397. package/dist/console-CLz_PvFn.cjs +0 -2
  398. package/dist/console-CLz_PvFn.cjs.map +0 -1
  399. package/dist/console-cwgHKXvM.js +0 -82
  400. package/dist/console-cwgHKXvM.js.map +0 -1
  401. package/dist/constants-Bwl_YtQi.js +0 -349
  402. package/dist/constants-Bwl_YtQi.js.map +0 -1
  403. package/dist/constants-DakMxVB2.cjs +0 -2
  404. package/dist/constants-DakMxVB2.cjs.map +0 -1
  405. package/dist/context-storage-BjzeBSxH.cjs +0 -2
  406. package/dist/context-storage-BjzeBSxH.cjs.map +0 -1
  407. package/dist/context-storage-BzkoHzkQ.js +0 -51
  408. package/dist/context-storage-BzkoHzkQ.js.map +0 -1
  409. package/dist/debug-bundle-BOdYmCeV.js +0 -32
  410. package/dist/debug-bundle-BOdYmCeV.js.map +0 -1
  411. package/dist/debug-bundle-Ex4L_LSP.cjs +0 -2
  412. package/dist/debug-bundle-Ex4L_LSP.cjs.map +0 -1
  413. package/dist/emergency-queue-B9WZxanZ.js +0 -67
  414. package/dist/emergency-queue-B9WZxanZ.js.map +0 -1
  415. package/dist/emergency-queue-HBpL5r3V.cjs +0 -2
  416. package/dist/emergency-queue-HBpL5r3V.cjs.map +0 -1
  417. package/dist/errors-D6bwgJtO.js +0 -92
  418. package/dist/errors-D6bwgJtO.js.map +0 -1
  419. package/dist/errors-DCOCRdSi.cjs +0 -3
  420. package/dist/errors-DCOCRdSi.cjs.map +0 -1
  421. package/dist/factory-DLFDjdLv.cjs +0 -2
  422. package/dist/factory-DLFDjdLv.cjs.map +0 -1
  423. package/dist/factory-e9Qo3K0z.js +0 -276
  424. package/dist/factory-e9Qo3K0z.js.map +0 -1
  425. package/dist/guards-Cidk71ME.js +0 -7
  426. package/dist/guards-Cidk71ME.js.map +0 -1
  427. package/dist/guards-nJ70syPt.cjs +0 -2
  428. package/dist/guards-nJ70syPt.cjs.map +0 -1
  429. package/dist/identity-BlvlgjrU.cjs +0 -2
  430. package/dist/identity-BlvlgjrU.cjs.map +0 -1
  431. package/dist/identity-BrQp_5J5.js.map +0 -1
  432. package/dist/indexeddb-storage-CtLvZH1r.cjs +0 -2
  433. package/dist/indexeddb-storage-CtLvZH1r.cjs.map +0 -1
  434. package/dist/indexeddb-storage-DLXQzAGh.js.map +0 -1
  435. package/dist/interactions-B6z2I4tU.js +0 -119
  436. package/dist/interactions-B6z2I4tU.js.map +0 -1
  437. package/dist/interactions-P6pz08Jn.cjs +0 -2
  438. package/dist/interactions-P6pz08Jn.cjs.map +0 -1
  439. package/dist/journey-35yCMNFo.js.map +0 -1
  440. package/dist/journey-DAGh5h9k.cjs +0 -2
  441. package/dist/journey-DAGh5h9k.cjs.map +0 -1
  442. package/dist/keys-BHhw_0Wh.cjs +0 -2
  443. package/dist/keys-BHhw_0Wh.cjs.map +0 -1
  444. package/dist/keys-BU9j5YqW.js +0 -16
  445. package/dist/keys-BU9j5YqW.js.map +0 -1
  446. package/dist/lifecycle-BGGOcN4N.cjs +0 -2
  447. package/dist/lifecycle-BGGOcN4N.cjs.map +0 -1
  448. package/dist/lifecycle-CZ6RRXc6.js.map +0 -1
  449. package/dist/log-record-D7bA1RPb.cjs +0 -2
  450. package/dist/log-record-D7bA1RPb.cjs.map +0 -1
  451. package/dist/log-record-DIA6McNr.js.map +0 -1
  452. package/dist/long-frames-430_85Da.js.map +0 -1
  453. package/dist/long-frames-Dd8tsi2U.cjs +0 -2
  454. package/dist/long-frames-Dd8tsi2U.cjs.map +0 -1
  455. package/dist/models/stats.d.ts +0 -11
  456. package/dist/network-C7SkLf4v.js.map +0 -1
  457. package/dist/network-pEX3PAJv.cjs +0 -2
  458. package/dist/network-pEX3PAJv.cjs.map +0 -1
  459. package/dist/profiler-BVWIOgnq.js.map +0 -1
  460. package/dist/profiler-eVCknCzS.cjs +0 -2
  461. package/dist/profiler-eVCknCzS.cjs.map +0 -1
  462. package/dist/profiler-frames-CLXlT_xL.js.map +0 -1
  463. package/dist/profiler-frames-Dg2OebB2.cjs +0 -2
  464. package/dist/profiler-frames-Dg2OebB2.cjs.map +0 -1
  465. package/dist/remote-rules-BJGDJGwA.js +0 -98
  466. package/dist/remote-rules-BJGDJGwA.js.map +0 -1
  467. package/dist/remote-rules-CJD3ToVk.cjs +0 -2
  468. package/dist/remote-rules-CJD3ToVk.cjs.map +0 -1
  469. package/dist/replay-0zAJv9T3.js +0 -338
  470. package/dist/replay-0zAJv9T3.js.map +0 -1
  471. package/dist/replay-DomJpXqW.cjs +0 -2
  472. package/dist/replay-DomJpXqW.cjs.map +0 -1
  473. package/dist/reports-BsbqmP8h.cjs +0 -2
  474. package/dist/reports-BsbqmP8h.cjs.map +0 -1
  475. package/dist/reports-BuXekPOS.js.map +0 -1
  476. package/dist/resource-timing-CXGHwFRD.js.map +0 -1
  477. package/dist/resource-timing-DkycFGDa.cjs +0 -2
  478. package/dist/resource-timing-DkycFGDa.cjs.map +0 -1
  479. package/dist/sampling-Dd0wllyq.cjs +0 -2
  480. package/dist/sampling-Dd0wllyq.cjs.map +0 -1
  481. package/dist/sampling-UUDbi3K0.js +0 -60
  482. package/dist/sampling-UUDbi3K0.js.map +0 -1
  483. package/dist/sanitize-CNmsD9r3.js.map +0 -1
  484. package/dist/sanitize-ChLn97Ch.cjs.map +0 -1
  485. package/dist/select-CTk-K5mG.cjs +0 -3
  486. package/dist/select-CTk-K5mG.cjs.map +0 -1
  487. package/dist/select-DPv_j6wq.js +0 -270
  488. package/dist/select-DPv_j6wq.js.map +0 -1
  489. package/dist/sender-15zEsZpr.js +0 -857
  490. package/dist/sender-15zEsZpr.js.map +0 -1
  491. package/dist/sender-Bfpv9tad.cjs +0 -2
  492. package/dist/sender-Bfpv9tad.cjs.map +0 -1
  493. package/dist/storage-BA9RqRO-.cjs +0 -2
  494. package/dist/storage-BA9RqRO-.cjs.map +0 -1
  495. package/dist/storage-DZwed89z.js +0 -16
  496. package/dist/storage-DZwed89z.js.map +0 -1
  497. package/dist/storm-BTSNTIWI.js +0 -9
  498. package/dist/storm-BTSNTIWI.js.map +0 -1
  499. package/dist/storm-D0_qZOEg.cjs +0 -2
  500. package/dist/storm-D0_qZOEg.cjs.map +0 -1
  501. package/dist/unclean-exit-ClGzrc2A.cjs +0 -2
  502. package/dist/unclean-exit-ClGzrc2A.cjs.map +0 -1
  503. package/dist/unclean-exit-Cob_jyTv.js.map +0 -1
  504. package/dist/user-timing-CdYqx3PF.cjs +0 -2
  505. package/dist/user-timing-CdYqx3PF.cjs.map +0 -1
  506. package/dist/user-timing-DgHubxCI.js.map +0 -1
  507. package/dist/utils/timer.d.ts +0 -19
  508. package/dist/web-socket-BTuvYoJI.cjs +0 -2
  509. package/dist/web-socket-BTuvYoJI.cjs.map +0 -1
  510. package/dist/web-vitals-Ch5BpDmo.cjs +0 -2
  511. package/dist/web-vitals-Ch5BpDmo.cjs.map +0 -1
  512. package/dist/web-vitals-CsGCWnUr.js.map +0 -1
  513. package/dist/worker-protocol-B0_8rWy5.js.map +0 -1
  514. package/dist/worker-protocol-BjzFORfq.cjs +0 -2
  515. package/dist/worker-protocol-BjzFORfq.cjs.map +0 -1
  516. package/dist/worker-server-4en-Lt-3.cjs +0 -2
  517. package/dist/worker-server-4en-Lt-3.cjs.map +0 -1
  518. package/dist/worker-server-Cne9MX9I.js +0 -83
  519. package/dist/worker-server-Cne9MX9I.js.map +0 -1
  520. package/dist/worker-transport-B-GF4Aqn.cjs +0 -2
  521. package/dist/worker-transport-B-GF4Aqn.cjs.map +0 -1
  522. package/dist/worker-transport-C3SjJAEC.js +0 -200
  523. package/dist/worker-transport-C3SjJAEC.js.map +0 -1
@@ -0,0 +1,1555 @@
1
+ import type { REMOTE_CAPTURE_FLAGS } from "../constants.cjs";
2
+ import type { DiagnosticCode, DiagnosticHandler } from "../core/diagnostics.cjs";
3
+ import type { DropSummary } from "./drop.cjs";
4
+ import type { LogLevel, LogRecord, LogType } from "./log-record.cjs";
5
+ import type { CapturePlugin } from "./plugin.cjs";
6
+ import type { ReplayLoader, ReplayMode, ReplayPluginLoader, ReplaySegment } from "./replay.cjs";
7
+ import type { LogSerializer } from "./serializer.cjs";
8
+ /** Backing store for undelivered records. "auto" picks the best one the host supports. */
9
+ export type StorageStrategy = "auto" | "indexeddb" | "localstorage" | "memory" | "none";
10
+ /**
11
+ * Where the library keeps session, tab and journey ids. "storage" uses browser storage and
12
+ * "memory" writes nothing.
13
+ */
14
+ export type IdentityStrategy = "storage" | "memory";
15
+ /**
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.
19
+ */
20
+ export type BusMode = "auto" | "sender" | "forwarder" | "off";
21
+ /**
22
+ * Structural type for the metric shape of the `web-vitals` package, so the library has no
23
+ * hard dependency on it.
24
+ */
25
+ export interface WebVitalsMetric {
26
+ /** Measurement value, in the metric's own unit. */
27
+ value: number;
28
+ /** Rating: "good", "needs-improvement", or "poor". */
29
+ rating?: string;
30
+ /** Metric instance id, for matching a later update to its first report. */
31
+ id: string;
32
+ }
33
+ /**
34
+ * Callback `web-vitals` invokes with a measurement.
35
+ * @param metric The measurement that `web-vitals` reports.
36
+ */
37
+ export type WebVitalsReporter = (metric: WebVitalsMetric) => void;
38
+ /** The five `web-vitals` entry points this library subscribes to. */
39
+ export interface WebVitalsModule {
40
+ /**
41
+ * Largest Contentful Paint.
42
+ * @param report Callback invoked with the LCP measurement.
43
+ */
44
+ onLCP: (report: WebVitalsReporter) => void;
45
+ /**
46
+ * Cumulative Layout Shift.
47
+ * @param report Callback invoked with the CLS measurement.
48
+ */
49
+ onCLS: (report: WebVitalsReporter) => void;
50
+ /**
51
+ * Interaction to Next Paint.
52
+ * @param report Callback invoked with the INP measurement.
53
+ */
54
+ onINP: (report: WebVitalsReporter) => void;
55
+ /**
56
+ * First Contentful Paint.
57
+ * @param report Callback invoked with the FCP measurement.
58
+ */
59
+ onFCP: (report: WebVitalsReporter) => void;
60
+ /**
61
+ * Time to First Byte.
62
+ * @param report Callback invoked with the TTFB measurement.
63
+ */
64
+ onTTFB: (report: WebVitalsReporter) => void;
65
+ }
66
+ /** W3C context an active OpenTelemetry span reports. */
67
+ export interface OtelSpanContext {
68
+ /** Hexadecimal 32-character W3C trace identifier. */
69
+ traceId: string;
70
+ /** Hexadecimal 16-character W3C span identifier. */
71
+ spanId: string;
72
+ /** Bitfield byte containing W3C trace flags. */
73
+ traceFlags: number;
74
+ }
75
+ /** The span the host has made active. */
76
+ export interface OtelSpan {
77
+ /**
78
+ * Reads this span's W3C context.
79
+ * @returns Trace and span ids with their flags.
80
+ */
81
+ spanContext(): OtelSpanContext;
82
+ }
83
+ /**
84
+ * The three `@opentelemetry/api` entry points that this library uses. The structural
85
+ * types keep the package an optional peer.
86
+ */
87
+ export interface OtelApi {
88
+ /** Span lookup. */
89
+ trace: {
90
+ /**
91
+ * Reads the span the host has made active.
92
+ * @returns Active span, or undefined when there is none.
93
+ */
94
+ getActiveSpan(): OtelSpan | undefined;
95
+ };
96
+ /** Ambient context lookup. */
97
+ context: {
98
+ /**
99
+ * Reads the active context.
100
+ * @returns Context object that only the propagator reads.
101
+ */
102
+ active(): unknown;
103
+ };
104
+ /** Header propagation. */
105
+ propagation: {
106
+ /**
107
+ * Writes the host's trace headers into a carrier.
108
+ * @param context Context to propagate.
109
+ * @param carrier Header map written in place.
110
+ */
111
+ inject(context: unknown, carrier: Record<string, string>): void;
112
+ };
113
+ }
114
+ /**
115
+ * Supplies the `@opentelemetry/api` module without a hard dependency on it.
116
+ * @returns A promise that resolves to the module.
117
+ */
118
+ export type OtelLoader = () => Promise<OtelApi>;
119
+ /** Sampling policy. Controls which records the library keeps. */
120
+ export interface SamplingOptions {
121
+ /**
122
+ * Default fraction of records kept, 0 to 1.
123
+ * @default 1
124
+ */
125
+ defaultRate: number;
126
+ /**
127
+ * Per-namespace rate overrides, keyed by `app.namespace`. The most specific prefix wins. A
128
+ * new map replaces the current one. A rate outside 0 to 1 is left out with a report, so a
129
+ * shorter prefix or `defaultRate` applies.
130
+ * @default {}
131
+ */
132
+ rates: Record<string, number>;
133
+ /**
134
+ * Log types always kept, regardless of the sampling rate.
135
+ * @default ["action"]
136
+ */
137
+ alwaysSampleTypes: LogType[];
138
+ /**
139
+ * Lowest level that the sampling rate never drops. `errorCeiling` limits the log records at
140
+ * this level and higher.
141
+ * @default "ERROR"
142
+ */
143
+ alwaysSampleFrom: LogLevel;
144
+ /**
145
+ * Maximum log records at or above `alwaysSampleFrom` in one `errorCeilingWindowMs` window.
146
+ * Metric points and spans do not count. Set 0 to drop every one, or null for no limit.
147
+ * @default 500
148
+ */
149
+ errorCeiling: number | null;
150
+ /**
151
+ * Length of the `errorCeiling` window, in milliseconds, 1 or more.
152
+ * @default 10000
153
+ */
154
+ errorCeilingWindowMs: number;
155
+ /**
156
+ * Read sampling rules from the `X-UiObs-Sampling` header of every accepted batch. The rules
157
+ * stay in effect for their `ttlMs`. Set this in every context on the page.
158
+ * @default false
159
+ */
160
+ remote: boolean;
161
+ /**
162
+ * Highest rate a remote rule can set, 0 to 1. Applies to `defaultRate` and to every
163
+ * namespace rate.
164
+ * @default 1
165
+ */
166
+ remoteMaxRate: number;
167
+ }
168
+ /** Bus settings. Controls how this context finds, trusts and sends messages to others. */
169
+ export interface BusOptions {
170
+ /**
171
+ * Which child windows are accepted. "registered" requires a window registration, while
172
+ * "trusted-origin" accepts child windows from a trusted origin.
173
+ * @default "registered"
174
+ */
175
+ sourcePolicy: "registered" | "trusted-origin";
176
+ /**
177
+ * Maximum encoded bytes in one message, 1 or more. Set null for no size limit.
178
+ * @default 262144
179
+ */
180
+ maxMessageBytes: number | null;
181
+ /**
182
+ * Maximum records in one message, 1 or more. Set null for no record limit.
183
+ * @default 100
184
+ */
185
+ maxRecordsPerMessage: number | null;
186
+ /**
187
+ * Maximum messages from one source in one second, 1 or more. Set null for no rate limit.
188
+ * @default 100
189
+ */
190
+ maxMessagesPerSecond: number | null;
191
+ /**
192
+ * This context's role. Can't be changed after startup.
193
+ * @default "auto"
194
+ */
195
+ mode: BusMode;
196
+ /**
197
+ * Additional trusted parent origins. With sourcePolicy "trusted-origin", the list also
198
+ * permits child origins. A registered child uses the exact origin from its registration.
199
+ * "null" is never accepted, so a sandboxed frame must set `mode: "sender"`. A new entry
200
+ * doesn't reconnect a parent link that already exists.
201
+ * @default []
202
+ */
203
+ trustedOrigins: string[];
204
+ /**
205
+ * Which OpenFin context this is. Only the platform provider answers a handshake, so with
206
+ * the wrong value every view sends its own records. "auto" treats the window whose name
207
+ * equals its application uuid as the provider. Can't be changed after startup.
208
+ * @default "auto"
209
+ */
210
+ openFinRole: "auto" | "provider" | "client";
211
+ }
212
+ /**
213
+ * Where a journey id applies.
214
+ * - "context": every document, frame or worker keeps its own journey.
215
+ * - "tab": a frame or worker adopts the journey of the context that owns it. A journey never
216
+ * crosses to another tab.
217
+ * - "origin": every context on the origin adopts every journey. The broadcast link also
218
+ * reaches other tabs.
219
+ * - "auto": "origin" in OpenFin and "tab" in a browser.
220
+ */
221
+ export type JourneyScope = "auto" | "context" | "tab" | "origin";
222
+ /** Journey settings. */
223
+ export interface JourneyOptions {
224
+ /**
225
+ * Which contexts adopt a journey that one context starts.
226
+ * @default "auto"
227
+ */
228
+ scope: JourneyScope;
229
+ /**
230
+ * How long a journey can stay open, in milliseconds, before the library ends it. 1 minute
231
+ * to 24 hours. Can't be changed after startup.
232
+ * @default 1800000
233
+ */
234
+ maxAgeMs: number;
235
+ }
236
+ /**
237
+ * Batch sizes, and the flush interval of log and span batches. The log keys also apply to spans.
238
+ * A metric batch waits `metrics.intervalMs`. Can't be changed after startup.
239
+ */
240
+ export interface BatchingOptions {
241
+ /**
242
+ * How long a partial log or span batch waits before it is sent, in milliseconds. 100 to 60000.
243
+ * @default 2000
244
+ */
245
+ logFlushIntervalMs: number;
246
+ /**
247
+ * Maximum records in one log or span batch. 1 to 1000.
248
+ * @default 100
249
+ */
250
+ logBatchSize: number;
251
+ /**
252
+ * Maximum records in one metric batch. 1 to 1000.
253
+ * @default 500
254
+ */
255
+ metricBatchSize: number;
256
+ }
257
+ /**
258
+ * Retention of undelivered batches. Can't be changed after startup. To keep a batch until it is
259
+ * delivered, set `maxAgeMs` and `maxAttempts` to null. `maxBatches` still applies, and a
260
+ * permanent error still drops the batch.
261
+ */
262
+ export interface RetentionOptions {
263
+ /**
264
+ * Maximum stored batches. A new batch evicts the oldest batch that holds no action first.
265
+ * 1 to 5000.
266
+ * @default 500
267
+ */
268
+ maxBatches: number;
269
+ /**
270
+ * Maximum age of a stored batch, in milliseconds. 1 minute to 7 days. Set null for no age
271
+ * limit.
272
+ * @default 86400000
273
+ */
274
+ maxAgeMs: number | null;
275
+ /**
276
+ * Maximum send attempts for a stored batch. 1 to 20. Set null for no attempt limit.
277
+ * @default 5
278
+ */
279
+ maxAttempts: number | null;
280
+ }
281
+ /** Size limits for each record. Can't be changed after startup. */
282
+ export interface LimitsOptions {
283
+ /**
284
+ * Maximum body length, in characters. 256 to 65536.
285
+ * @default 4096
286
+ */
287
+ maxBodyChars: number;
288
+ /**
289
+ * Maximum length of a string attribute, in characters. 256 to 65536.
290
+ * @default 8192
291
+ */
292
+ maxAttributeChars: number;
293
+ /**
294
+ * Maximum keys in one object. 1 to 1024.
295
+ * @default 128
296
+ */
297
+ maxAttributeCount: number;
298
+ /**
299
+ * Maximum length of an error stack, in characters. 256 to 65536.
300
+ * @default 8192
301
+ */
302
+ maxStackChars: number;
303
+ /**
304
+ * Maximum depth of a nested value. 1 to 16.
305
+ * @default 6
306
+ */
307
+ maxDepth: number;
308
+ /**
309
+ * Maximum items in one array, set or map. 1 to 10000.
310
+ * @default 100
311
+ */
312
+ maxArrayLength: number;
313
+ /**
314
+ * Maximum values in one sanitize pass. 100 to 100000.
315
+ * @default 10000
316
+ */
317
+ maxNodes: number;
318
+ /**
319
+ * Maximum attribute bytes in one record. Above that, the library drops the caller's
320
+ * attributes. 1024 to 60000.
321
+ * @default 32768
322
+ */
323
+ maxRecordBytes: number;
324
+ }
325
+ /** Console method that the console capture can wrap. */
326
+ export type CapturedConsoleMethod = "error" | "warn" | "info" | "log";
327
+ /** Console capture settings. An object turns the capture on, and true uses the defaults below. */
328
+ export interface ConsoleCaptureOptions {
329
+ /**
330
+ * Console methods to wrap. `error` produces an ERROR record and `warn` a WARN record, while
331
+ * `info` and `log` only add a breadcrumb. An empty list wraps nothing.
332
+ * @default ["error", "warn"]
333
+ */
334
+ levels?: CapturedConsoleMethod[];
335
+ }
336
+ /** Long frame settings. An object turns the capture on, and true uses the defaults below. */
337
+ export interface LongFramesOptions {
338
+ /**
339
+ * Minimum frame duration to report, in milliseconds, 0 or more.
340
+ * @default 100
341
+ */
342
+ thresholdMs?: number;
343
+ }
344
+ /** User timing settings. An object turns the capture on, and true uses the defaults below. */
345
+ export interface UserTimingOptions {
346
+ /**
347
+ * Names of the marks and measures to record, as strings and RegExp patterns. A string matches
348
+ * any part of the name. An empty list records every name.
349
+ * @default []
350
+ */
351
+ include?: (string | RegExp)[];
352
+ }
353
+ /** Web vitals settings. An object turns the capture on, and true uses the defaults below. */
354
+ export interface WebVitalsOptions {
355
+ /**
356
+ * Supplies the `web-vitals` module without a hard dependency on the package, for example
357
+ * `() => import("web-vitals")`. Without it, the library reports `config.invalid` and records
358
+ * only the navigation timing. Set null to remove it.
359
+ * @returns A promise that resolves to the `web-vitals` module.
360
+ */
361
+ loader?: (() => Promise<WebVitalsModule>) | null;
362
+ }
363
+ /** Resource timing settings. Passing an object turns the capture on. */
364
+ export interface ResourceTimingOptions {
365
+ /**
366
+ * Minimum duration for a ui.resource.slow event, in milliseconds. Set 0 for no slow events.
367
+ * @default 1000
368
+ */
369
+ slowMs?: number;
370
+ }
371
+ /** Capture switch that a remote rule can change. */
372
+ export type RemoteCaptureFlag = (typeof REMOTE_CAPTURE_FLAGS)[number];
373
+ /** Click settings. An object turns the capture on, and true uses the defaults below. */
374
+ export interface InteractionOptions {
375
+ /**
376
+ * Record the clicked element's textContent.
377
+ * @default false
378
+ */
379
+ text?: boolean;
380
+ /**
381
+ * Record a DOM selector. Its attributes can identify a user or an account.
382
+ * @default false
383
+ */
384
+ selector?: boolean;
385
+ /**
386
+ * CSS selector for regions to exclude. Set null to include all regions. Session replay always
387
+ * blocks `[data-observability-ignore]`, whatever this value is.
388
+ * @default "[data-observability-ignore]"
389
+ */
390
+ ignoreSelector?: string | null;
391
+ /**
392
+ * Maximum click text length, in characters.
393
+ * @default 50
394
+ */
395
+ maxTextChars?: number;
396
+ /**
397
+ * Attribute that names the click action, for example "data-testid". The closest element
398
+ * that has it supplies the breadcrumb message. Use letters, digits, hyphens and underscores.
399
+ * @default "data-observability-action"
400
+ */
401
+ actionAttribute?: string;
402
+ /**
403
+ * Record one `ui.rage_click` event for every burst of `rageClickCount` clicks on one element
404
+ * within `rageClickWindowMs`. The event carries the action name and the click count.
405
+ * @default false
406
+ */
407
+ rageClicks?: boolean;
408
+ /**
409
+ * Number of clicks that count as a rage click. 2 to 20.
410
+ * @default 3
411
+ */
412
+ rageClickCount?: number;
413
+ /**
414
+ * Time window that the clicks of a rage click must fall in, in milliseconds. 100 to 10000.
415
+ * @default 1000
416
+ */
417
+ rageClickWindowMs?: number;
418
+ /**
419
+ * Record a `ui.dead_click` event when a click on a control causes no DOM change, no
420
+ * navigation and no scroll within `deadClickMs`. The event carries only the action name. A
421
+ * click on a `target="_blank"` or `download` link produces no event.
422
+ * @default false
423
+ */
424
+ deadClicks?: boolean;
425
+ /**
426
+ * How long to wait for a visible response to a click, in milliseconds. 100 to 10000.
427
+ * @default 1000
428
+ */
429
+ deadClickMs?: number;
430
+ /**
431
+ * CSS selector for regions that change on their own, for example a live price cell. A DOM
432
+ * change or a scroll inside a matching element isn't a response, so it doesn't stop a dead
433
+ * click. Mark the element that changes, not a panel that also holds the controls. Set "" to
434
+ * turn the live-region filter off. Whatever this value is, a write that keeps the same value
435
+ * isn't a response, and neither is a batch that sets `name` or `type` and then puts the old
436
+ * value back. For any other attribute, each write with a new value is a response, because a
437
+ * class or style change can restart an animation.
438
+ * @default "[data-observability-live]"
439
+ */
440
+ deadClickIgnoreSelector?: string;
441
+ }
442
+ /** Cache settings. A logger the app still holds keeps working after it leaves the cache. */
443
+ export interface LoggerCacheOptions {
444
+ /**
445
+ * Maximum cached loggers. The least recently used logger is removed first. Set 0 for no
446
+ * cache. Set null for no cache limit.
447
+ * @default 256
448
+ */
449
+ maxEntries: number | null;
450
+ }
451
+ /** Identity of one delivery context. Do not put secrets or personal data in the id. */
452
+ export interface SecurityContextOptions {
453
+ /** Stable id for delivery after a page reload. With an empty id, the runtime creates one. */
454
+ id: string;
455
+ /**
456
+ * Keep stored batches in separate contexts. When true, change the routing settings through
457
+ * rotateSecurityContext() instead of configure().
458
+ * @default true
459
+ */
460
+ isolation: boolean;
461
+ }
462
+ /**
463
+ * Routing settings: where records go and how a request authenticates. The runtime replaces
464
+ * them together when the security context changes.
465
+ */
466
+ export type RoutingOptions = Pick<ObservabilityConfig, "endpoint" | "metricsEndpoint" | "tracesEndpoint" | "headers" | "credentials" | "transport" | "transportOnExit" | "transportWorker">;
467
+ /** New security context. Any routing field that is left out or undefined resets to its default. */
468
+ export interface SecurityContextUpdate {
469
+ /** New delivery context id. If omitted, the runtime creates one. */
470
+ id?: string;
471
+ /**
472
+ * New routing settings. Any field that is left out or undefined resets to its default, unlike
473
+ * configure(), because a rotation must not carry an old token into the new context. A key that
474
+ * isn't a routing setting reports `config.invalid` and the rotation ignores it, so the other
475
+ * settings stay.
476
+ */
477
+ routing: RoutingOptions;
478
+ /**
479
+ * New ambient attributes. If omitted, the runtime removes the old ones. A null or undefined
480
+ * value sets no key, as in setContext().
481
+ */
482
+ context?: Record<string, unknown>;
483
+ }
484
+ /** Policy for old records. */
485
+ export interface SecurityContextRotationOptions {
486
+ /**
487
+ * What to do with old records. "discard" removes them, and "flush" tries to deliver them
488
+ * before it removes them. "retain" keeps them in the old context, and "carry" moves them to
489
+ * the new context.
490
+ * @default "discard"
491
+ */
492
+ pending?: "discard" | "flush" | "retain" | "carry";
493
+ /**
494
+ * How long to wait for the old records to flush, in milliseconds. 0 to 600000. A value
495
+ * outside the range rejects the rotation.
496
+ * @default 5000
497
+ */
498
+ timeoutMs?: number;
499
+ }
500
+ /** Whose stored records `shutdown()` removes. */
501
+ export type StorageScope = "context" | "namespace";
502
+ /**
503
+ * What `shutdown()` does with the records that wait, and which storage it removes. A value that
504
+ * isn't an object reports `config.invalid` and discards.
505
+ */
506
+ export interface ShutdownOptions {
507
+ /**
508
+ * What to do with the records in memory. "flush" sends them, then runs the exit flush.
509
+ * "discard" sends nothing and reports each one to `onDrop` with the reason "discarded". A
510
+ * request in flight can still reach the server. Any other value reports `config.invalid` and
511
+ * discards.
512
+ * @default "flush"
513
+ */
514
+ pending?: "flush" | "discard";
515
+ /**
516
+ * Also removes the stored batches, the emergency queue entries, and the stored session id,
517
+ * tab id and journey. "context" removes the batches of the active security context and the
518
+ * ones a carry left, and "namespace" removes every batch in `storage.namespace`. It always
519
+ * discards, and with `pending: "flush"` it reports `config.invalid`. null removes nothing, as
520
+ * when unset. Any other value reports `config.invalid`, discards and removes the "context"
521
+ * scope. Before the first `configure()` call that works, no store is known, and it removes
522
+ * nothing. After an earlier `shutdown()`, it still removes the stopped runtime's stored data.
523
+ * Unset by default, which removes nothing.
524
+ */
525
+ clearStorage?: StorageScope | null;
526
+ }
527
+ /**
528
+ * How long `flush()` waits. Options that aren't an object report `config.invalid` and use the
529
+ * default. null or undefined options use the default with no report.
530
+ */
531
+ export interface FlushOptions {
532
+ /**
533
+ * How long to wait, in milliseconds. 0 to 600000. The wait also covers startup and the load
534
+ * of the delivery stack. A value that isn't a number in the range reports `config.invalid`
535
+ * and uses the default. null uses the default with no report.
536
+ * @default 5000
537
+ */
538
+ timeoutMs?: number;
539
+ }
540
+ /**
541
+ * What the library instruments automatically. By default, only `errors` and `rejections`
542
+ * are on. A capture that takes an options object also takes true for its defaults.
543
+ */
544
+ export interface CaptureOptions {
545
+ /**
546
+ * Rewrites a URL before the capture records it. Applies to page, HTTP, resource and
547
+ * WebSocket URLs.
548
+ * Set null to remove it.
549
+ * @param url Original URL, before the default URL changes.
550
+ * @returns URL to record. Null, an invalid result or an exception produces an empty URL.
551
+ */
552
+ urlTransform?: ((url: string) => string | null) | null;
553
+ /**
554
+ * Log uncaught errors from `window.onerror`.
555
+ * @default true
556
+ */
557
+ errors: boolean;
558
+ /**
559
+ * Log unhandled promise rejections.
560
+ * @default true
561
+ */
562
+ rejections: boolean;
563
+ /**
564
+ * Log failed image, script, and stylesheet loads.
565
+ * @default false
566
+ */
567
+ resourceErrors: boolean;
568
+ /**
569
+ * Wrap `fetch` to log requests. The library never logs requests to the ingest endpoint.
570
+ * @default false
571
+ */
572
+ fetch: boolean;
573
+ /**
574
+ * Wrap `XMLHttpRequest` to log requests.
575
+ * @default false
576
+ */
577
+ xhr: boolean;
578
+ /**
579
+ * Record the `http.client.request.duration` histogram for every request the `fetch` or
580
+ * `xhr` capture sees. The histogram is in seconds.
581
+ * @default true
582
+ */
583
+ httpMetrics: boolean;
584
+ /**
585
+ * Log clicks and other interactions as breadcrumbs.
586
+ * @default false
587
+ */
588
+ interactions: boolean | InteractionOptions;
589
+ /**
590
+ * Log route changes, including single-page-application navigation.
591
+ * @default false
592
+ */
593
+ navigation: boolean;
594
+ /**
595
+ * Report web vitals as metrics, and the navigation timing. LCP, CLS and INP need a loader.
596
+ * @default false
597
+ */
598
+ webVitals: boolean | WebVitalsOptions;
599
+ /**
600
+ * Report long animation frames as the `ui.long_frame.duration` histogram. A long frame
601
+ * freezes the page. Browsers without `long-animation-frame` report `longtask` entries.
602
+ * @default false
603
+ */
604
+ longFrames: boolean | LongFramesOptions;
605
+ /**
606
+ * Record the app's console calls. `true` wraps `error` and `warn`, and `levels` picks the
607
+ * methods.
608
+ * @default false
609
+ */
610
+ console: boolean | ConsoleCaptureOptions;
611
+ /**
612
+ * Keep the query string and fragment on every URL the library records. When off, they are
613
+ * removed from page URLs, request targets and failed resource URLs.
614
+ * @default false
615
+ */
616
+ fullUrls: boolean;
617
+ /**
618
+ * URLs the library doesn't log. The ingest endpoint is always included.
619
+ * @default []
620
+ */
621
+ ignoreUrls: (string | RegExp)[];
622
+ /**
623
+ * Targets that receive a `traceparent` header. A string is an origin and matches only
624
+ * requests to that origin. A RegExp tests the full URL. Start every RegExp with `^`, because
625
+ * a pattern that matches all URLs breaks CORS on third-party endpoints. Needs `fetch` or `xhr`.
626
+ * @default []
627
+ */
628
+ propagateTraceHeaderTo: (string | RegExp)[];
629
+ /**
630
+ * Record every WebSocket's open, close and error events, and count its messages in the
631
+ * `ui.websocket.messages` counter. Message content is never recorded.
632
+ * @default false
633
+ */
634
+ webSocket: boolean;
635
+ /**
636
+ * Report a page in this tab that ended without a clean close, for example after a crash.
637
+ * The tab's next page logs WARN `ui.unclean_exit`. The capture writes one sessionStorage
638
+ * key. A popup with an opener reports nothing, and `identity: "memory"` turns this off.
639
+ * @default false
640
+ */
641
+ uncleanExit: boolean;
642
+ /**
643
+ * Record every `performance.measure()` the app makes in the `ui.user_timing.duration`
644
+ * histogram, in milliseconds, with `user_timing.name`. Every `performance.mark()` adds a
645
+ * breadcrumb. Names follow `fullUrls`.
646
+ * @default false
647
+ */
648
+ userTiming: boolean | UserTimingOptions;
649
+ /**
650
+ * Capture switches that remote sampling rules can change for their TTL. Privacy controls stay local.
651
+ * Needs `sampling.remote`.
652
+ * @default []
653
+ */
654
+ remoteToggles: RemoteCaptureFlag[];
655
+ /**
656
+ * Add the response's Server-Timing entries to fetch and XHR records, and link a traceparent
657
+ * entry to the client span.
658
+ * @default false
659
+ */
660
+ serverTiming: boolean;
661
+ /**
662
+ * Record deprecation, intervention and CSP reports as WARN ui.report. Report URLs have no query or fragment.
663
+ * @default false
664
+ */
665
+ reports: boolean;
666
+ /**
667
+ * Record resource durations in the histogram ui.resource.duration, by initiator type and host.
668
+ * @default false
669
+ */
670
+ resourceTiming: boolean | ResourceTimingOptions;
671
+ /**
672
+ * Record visible, hidden, frozen, resumed and restored states with the time in the previous state.
673
+ * @default false
674
+ */
675
+ lifecycle: boolean;
676
+ /**
677
+ * Capture modules supplied by the app. A new list replaces the current one.
678
+ * @default []
679
+ */
680
+ plugins: CapturePlugin[];
681
+ }
682
+ /**
683
+ * Serializer option after resolution. A name stays a name, and the transport picks the
684
+ * implementation.
685
+ */
686
+ export type SerializerChoice = "otlp" | "ecs" | LogSerializer;
687
+ /** Part of the console prefix that a style applies to: the namespace or one level. */
688
+ export type ConsoleStyleKey = "namespace" | LogLevel;
689
+ /**
690
+ * CSS for each part of the console prefix, for example `"color:#0a7;font-weight:bold"`.
691
+ * A browser applies it with `%c`. Node prints the text without the style.
692
+ */
693
+ export type ConsoleStyles = Partial<Record<ConsoleStyleKey, string>>;
694
+ /** Object form of the consoleOutput option. */
695
+ export interface ConsoleOutputOptions {
696
+ /**
697
+ * Lowest level the console prints. If you leave it unset, the current level stays, and a
698
+ * console that is off stays off.
699
+ */
700
+ level?: LogLevel;
701
+ /** CSS for the namespace and for each level. Any key you leave unset keeps its style. */
702
+ styles?: ConsoleStyles;
703
+ }
704
+ /** Console settings after resolution. */
705
+ export interface ResolvedConsole {
706
+ /** Lowest level that the console prints, or null when the console is off. */
707
+ level: LogLevel | null;
708
+ /** CSS for the namespace and for each level. */
709
+ styles: Required<ConsoleStyles>;
710
+ }
711
+ /**
712
+ * Kind of batch. A batch of metric records is "metrics" when `metricsEndpoint` is set, and its
713
+ * body is then an OTLP `ExportMetricsServiceRequest`. A batch of span records is "traces",
714
+ * with an OTLP `ExportTraceServiceRequest` as its body.
715
+ */
716
+ export type BatchKind = "logs" | "metrics" | "traces";
717
+ /** One batch that the library hands to a custom transport. */
718
+ export interface TransportRequest {
719
+ /**
720
+ * Abort signal for this delivery context. It aborts on `shutdown()` and on a rotation. A
721
+ * custom transport must check it to cancel its work.
722
+ */
723
+ signal?: AbortSignal;
724
+ /** Delivery context of this batch. */
725
+ routingContextId?: string;
726
+ /**
727
+ * Kind of batch. Send a "metrics" body to your metrics endpoint and a "traces" body to your
728
+ * traces endpoint.
729
+ */
730
+ kind: BatchKind;
731
+ /** Serialized batch from the configured serializer. The library does not compress it. */
732
+ body: string;
733
+ /** Content type of `body`, from the serializer. */
734
+ contentType: string;
735
+ /** Batch id. Send it to the server for deduplication, for example as `X-UiObs-Batch-Id`. */
736
+ batchId: string;
737
+ /** Number of earlier send attempts, 0 for the first send. */
738
+ attempt: number;
739
+ /** Built records after `redact`. Don't change them, because the retry engine can resend them. */
740
+ records: readonly LogRecord[];
741
+ }
742
+ /** A custom transport's answer. The status code means what it does in the ingest contract. */
743
+ export interface TransportResponse {
744
+ /**
745
+ * HTTP-like status code. 2xx accepts the batch. 413 splits it. 429 and 503 throttle.
746
+ * 408 and 5xx retry. Any other code drops the batch.
747
+ */
748
+ status: number;
749
+ /** Delay before the next send, for 429 and 503, in milliseconds. */
750
+ retryAfterMs?: number;
751
+ /** Largest payload that the server accepts, for 413, in bytes. */
752
+ maxBytes?: number;
753
+ /**
754
+ * Sampling rules for a 2xx answer, as the header text or as a parsed object. Only read when
755
+ * `sampling.remote` is on.
756
+ */
757
+ sampling?: unknown;
758
+ /** `Date` header of a 2xx answer. The library computes `uiobs.clock_offset_ms` from it. */
759
+ date?: string;
760
+ }
761
+ /**
762
+ * Sends one batch through one of the app's own channels, such as an API client, a WebSocket
763
+ * or IPC. A rejected promise counts as a network error, so the library sends the batch again.
764
+ * @param request Batch to send.
765
+ * @returns Promise that resolves to the server's answer.
766
+ */
767
+ export type Transport = (request: TransportRequest) => Promise<TransportResponse>;
768
+ /**
769
+ * Sends one batch while the page closes. It must not wait for a promise.
770
+ * @param request Batch to send.
771
+ * @returns True if the channel accepted the batch. False puts the batch in the emergency queue.
772
+ */
773
+ export type ExitTransport = (request: TransportRequest) => boolean;
774
+ /** Request timing, retry timing and delivery capacity. Durations are in milliseconds. */
775
+ export interface DeliveryOptions {
776
+ /**
777
+ * Maximum wait for one request. Must be at least 1.
778
+ * @default 15000
779
+ */
780
+ requestTimeoutMs: number;
781
+ /**
782
+ * Maximum live requests in flight at once. Must be at least 1. The retry drain sends one
783
+ * stored batch at a time on top of this limit.
784
+ * @default 2
785
+ */
786
+ maxConcurrentRequests: number;
787
+ /**
788
+ * First retry delay. Set 0 for an immediate retry.
789
+ * @default 2000
790
+ */
791
+ retryBaseDelayMs: number;
792
+ /**
793
+ * Maximum retry delay. Must be at least retryBaseDelayMs.
794
+ * @default 60000
795
+ */
796
+ retryMaxDelayMs: number;
797
+ /**
798
+ * Fetch priority of every batch request. With "low", the app's own requests go first. The
799
+ * exit flush and a keepalive send from a hidden page use the browser default.
800
+ * @default "low"
801
+ */
802
+ priority: "low" | "auto" | "high";
803
+ }
804
+ /** Record and byte limits for the live delivery buffers, and the cap of a hold buffer. */
805
+ export interface BufferingOptions {
806
+ /**
807
+ * Maximum records in the buffers and requests, 1 or more. Set null for no record limit.
808
+ * @default 10000
809
+ */
810
+ maxPendingRecords: number | null;
811
+ /**
812
+ * Maximum encoded JSON bytes in the buffers and requests, 1 or more. Set null for no byte
813
+ * limit.
814
+ * @default 16777216
815
+ */
816
+ maxPendingBytes: number | null;
817
+ /**
818
+ * Maximum records other than actions in one hold buffer. A hold buffer keeps the records
819
+ * that arrive before startup ends, or while the sender loads. A full one keeps its first
820
+ * 100 records and drops the oldest record after them. A lower value removes no held record.
821
+ * 200 to 10000.
822
+ * @default 500
823
+ */
824
+ maxHeldRecords: number;
825
+ /**
826
+ * What to do when a new record does not fit: remove old records, drop the new record, or
827
+ * try storage.
828
+ * @default "drop-oldest"
829
+ */
830
+ overflow: "drop-oldest" | "drop-newest" | "persist";
831
+ }
832
+ /** The metric interval, and the metric capacity in one interval. */
833
+ export interface MetricsOptions {
834
+ /**
835
+ * How often counters, histograms and profiler probes send their points, in milliseconds. A
836
+ * partial metric batch also waits this long before it is sent. 1000 to 600000.
837
+ * @default 10000
838
+ */
839
+ intervalMs: number;
840
+ /**
841
+ * Maximum histogram boundaries. With 0, only a histogram without boundaries is valid. Set
842
+ * null for no limit.
843
+ * @default 50
844
+ */
845
+ maxHistogramBoundaries: number | null;
846
+ /**
847
+ * Maximum attribute sets per instrument. Extra sets go into the overflow set, so 0 puts every
848
+ * value there. Set null for no limit.
849
+ * @default 100
850
+ */
851
+ maxSeries: number | null;
852
+ /**
853
+ * Maximum instrument names. Extra names are dropped, so 0 drops every metric value. Set null
854
+ * for no limit.
855
+ * @default 1000
856
+ */
857
+ maxInstruments: number | null;
858
+ }
859
+ /** Session and trace timing. The runtime sets these values at startup. */
860
+ export interface CorrelationOptions {
861
+ /**
862
+ * How long a stored session can stay idle, in milliseconds, 1 or more. Set null for no idle
863
+ * expiration.
864
+ * @default 1800000
865
+ */
866
+ sessionIdleMs: number | null;
867
+ /**
868
+ * Maximum age of an ambient trace, in milliseconds, 1 or more. The age counts from the trace's
869
+ * start, and the next record after it gets a new trace. Set null for no age limit.
870
+ * @default 300000
871
+ */
872
+ traceMaxAgeMs: number | null;
873
+ }
874
+ /** Rules for diagnostic reports and the console fallback. */
875
+ export interface DiagnosticsOptions {
876
+ /**
877
+ * Minimum wait between reports of one code, in milliseconds. Set 0 to report every event.
878
+ * @default 1000
879
+ */
880
+ throttleMs: number;
881
+ /**
882
+ * Print a fixed warning if onDiagnostic throws. The exception itself is not printed.
883
+ * @default false
884
+ */
885
+ consoleFallback: boolean;
886
+ /**
887
+ * Also send every reported diagnostic as a record in the `uiobs.diagnostics` namespace. A
888
+ * list of codes sends only those codes. The `throttleMs` interval applies. A diagnostic from
889
+ * the first `configure()` produces no record. In a record, the `url` and `endpoint` detail
890
+ * fields have no query and no fragment, while `onDiagnostic` gets the full values.
891
+ * @default false
892
+ */
893
+ records: boolean | DiagnosticCode[];
894
+ }
895
+ /** Storage of undelivered batches. Can't be changed after startup. */
896
+ export interface StorageOptions {
897
+ /**
898
+ * Backing store for undelivered batches. "auto" picks the best one the host supports.
899
+ * @default "auto"
900
+ */
901
+ backend: StorageStrategy;
902
+ /**
903
+ * Namespace for batch storage and emergency queues. An empty value uses the previous storage keys.
904
+ * @default ""
905
+ */
906
+ namespace: string;
907
+ /**
908
+ * Ask the browser to keep the stored batches under storage pressure. Firefox can show a
909
+ * permission prompt. `getHealth()` reports the answer. It takes effect at startup.
910
+ * @default false
911
+ */
912
+ requestPersistent: boolean;
913
+ }
914
+ /** Resource and page fields that the SDK records. */
915
+ export interface MetadataOptions {
916
+ /**
917
+ * Record the page URL. When false, page.url is empty.
918
+ * @default true
919
+ */
920
+ pageUrl: boolean;
921
+ /**
922
+ * Include browser.user_agent in resource attributes.
923
+ * @default true
924
+ */
925
+ userAgent: boolean;
926
+ /**
927
+ * Include the OpenFin application uuid and window name in resource attributes.
928
+ * @default true
929
+ */
930
+ openfin: boolean;
931
+ /**
932
+ * Add `uiobs.clock_offset_ms` to every log and span record. The value comes from the `Date`
933
+ * header of the last accepted answer, so the server must expose that header.
934
+ * @default true
935
+ */
936
+ clockOffset: boolean;
937
+ }
938
+ /** Capture capacity, duplicate checks and rate limits. */
939
+ export interface CaptureLimitsOptions {
940
+ /**
941
+ * Maximum breadcrumbs to keep. Set 0 to keep none.
942
+ * @default 50
943
+ */
944
+ breadcrumbs: number;
945
+ /**
946
+ * How long repeated errors are suppressed, in milliseconds. Set 0 to report every error.
947
+ * @default 5000
948
+ */
949
+ errorDedupeMs: number;
950
+ /**
951
+ * Maximum captured errors in one window. Set 0 to capture none, or null for no limit.
952
+ * @default 20
953
+ */
954
+ errorsPerWindow: number | null;
955
+ /**
956
+ * Maximum captured console records in one window. Set 0 to capture none, or null for no
957
+ * limit.
958
+ * @default 20
959
+ */
960
+ consolePerWindow: number | null;
961
+ /**
962
+ * Maximum long frames in one window. Set 0 to capture none, or null for no limit.
963
+ * @default 20
964
+ */
965
+ longFramesPerWindow: number | null;
966
+ /**
967
+ * Maximum WebSocket events in one window. Set 0 to capture none, or null for no limit.
968
+ * @default 20
969
+ */
970
+ webSocketPerWindow: number | null;
971
+ /** Maximum reports in one window. Set 0 to capture none, or null for no limit. @default 20 */
972
+ reportsPerWindow: number | null;
973
+ /**
974
+ * Maximum resource entries in one window. Set 0 to capture none, or null for no limit.
975
+ * @default 100
976
+ */
977
+ resourcesPerWindow: number | null;
978
+ /**
979
+ * Maximum lifecycle events in one window. Set 0 to capture none, or null for no limit.
980
+ * @default 20
981
+ */
982
+ lifecyclePerWindow: number | null;
983
+ /**
984
+ * Window of the capture rate limits above, in milliseconds, 1 or more. To turn the rate
985
+ * limits off, set the limits of each window to null.
986
+ * @default 10000
987
+ */
988
+ windowMs: number;
989
+ }
990
+ /** Records that minLevel or sampling drops, kept for the next error. */
991
+ export interface DebugBufferOptions {
992
+ /**
993
+ * Keep the records that minLevel or sampling drops. An ERROR or FATAL record from this
994
+ * context sends them first, with `uiobs.debug_buffer: true`. A later change to `redact` or
995
+ * `processors` empties the buffer.
996
+ * @default false
997
+ */
998
+ enabled: boolean;
999
+ /**
1000
+ * Maximum kept records. The oldest record is dropped first. 1 to 10000.
1001
+ * @default 200
1002
+ */
1003
+ maxRecords: number;
1004
+ /**
1005
+ * Maximum age of a kept record when the library reads it, in milliseconds, 1 or more. Set
1006
+ * null for no age limit.
1007
+ * @default 60000
1008
+ */
1009
+ maxAgeMs: number | null;
1010
+ }
1011
+ /** Duration probes. Each probe is reported as a histogram summary record. */
1012
+ export interface ProfilerOptions {
1013
+ /**
1014
+ * Record probe durations. When false, probes do nothing and don't even read the clock.
1015
+ * @default false
1016
+ */
1017
+ enabled: boolean;
1018
+ /**
1019
+ * Maximum number of probes, 1 to 1024. Can't be changed after startup.
1020
+ * @default 64
1021
+ */
1022
+ maxProbes: number;
1023
+ /**
1024
+ * Attribute the phases of each long animation frame to every probe that had a span of 1 ms
1025
+ * or more in it. The phases are script, render callbacks, style and layout, and forced
1026
+ * layout. Needs `enabled` and a browser that supports long animation frames.
1027
+ * @default false
1028
+ */
1029
+ framePhases: boolean;
1030
+ /**
1031
+ * Measure the time between frames with the `frame.interval` probe. Needs `enabled`. Runs one
1032
+ * frame callback per frame while the page is visible.
1033
+ * @default false
1034
+ */
1035
+ framePacing: boolean;
1036
+ }
1037
+ /**
1038
+ * Session replay. The app's recorder records the DOM, and the library keeps the recent events
1039
+ * in memory and sends them in segments after an error.
1040
+ */
1041
+ export interface ReplayOptions {
1042
+ /**
1043
+ * Record the DOM. Needs `loader`, plus either `endpoint` or `onSegment`.
1044
+ * @default false
1045
+ */
1046
+ enabled: boolean;
1047
+ /**
1048
+ * `"onError"` uploads the buffer after an ERROR or FATAL record.
1049
+ * @default "onError"
1050
+ */
1051
+ mode: ReplayMode;
1052
+ /**
1053
+ * URL that each segment is POSTed to. This is separate from the log endpoint. Set null to
1054
+ * turn it off. An empty or blank string also turns it off, and reports `config.invalid`.
1055
+ * @default null
1056
+ */
1057
+ endpoint: string | null;
1058
+ /**
1059
+ * When true, nothing is recorded until `startReplay()` is called.
1060
+ * @default false
1061
+ */
1062
+ requireConsent: boolean;
1063
+ /**
1064
+ * How much time before an error the buffer keeps, in milliseconds. At any moment the buffer
1065
+ * holds between 1x and 1.5x this much. 5000 to 600000.
1066
+ * @default 60000
1067
+ */
1068
+ bufferMs: number;
1069
+ /**
1070
+ * Maximum buffer size, measured as the JSON length of its events. When it is exceeded, the
1071
+ * buffer drops its oldest part. 100000 to 200000000.
1072
+ * @default 10000000
1073
+ */
1074
+ maxBufferBytes: number;
1075
+ /**
1076
+ * How long the library keeps sending events after an error, in milliseconds. Another error
1077
+ * inside that time doesn't extend it. 0 to 600000.
1078
+ * @default 5000
1079
+ */
1080
+ afterErrorMs: number;
1081
+ /**
1082
+ * Maximum uploads in one `uploadWindowMs` window. Set 0 to upload nothing, or null for no
1083
+ * limit.
1084
+ * @default 3
1085
+ */
1086
+ uploadsPerWindow: number | null;
1087
+ /**
1088
+ * Length of the `uploadsPerWindow` window, in milliseconds, 1 or more.
1089
+ * @default 10000
1090
+ */
1091
+ uploadWindowMs: number;
1092
+ /**
1093
+ * Maximum events in one segment. 1 to 10000.
1094
+ * @default 200
1095
+ */
1096
+ maxSegmentEvents: number;
1097
+ /**
1098
+ * Maximum segment size, measured as the JSON length of its events. A single event larger
1099
+ * than this gets a segment to itself. 10000 to 10000000.
1100
+ * @default 512000
1101
+ */
1102
+ maxSegmentBytes: number;
1103
+ /**
1104
+ * How long a partial segment waits before it is sent, in milliseconds. 100 to 60000.
1105
+ * @default 2000
1106
+ */
1107
+ flushIntervalMs: number;
1108
+ /**
1109
+ * Maximum total size of the segments waiting to be sent. When it is exceeded, the library
1110
+ * drops the oldest segment. 100000 to 200000000.
1111
+ * @default 20000000
1112
+ */
1113
+ maxQueueBytes: number;
1114
+ /**
1115
+ * Maximum send attempts per segment. 1 to 10.
1116
+ * @default 3
1117
+ */
1118
+ maxAttempts: number;
1119
+ /**
1120
+ * Mask all element text. Only text inside an element with `data-observability-unmask` is left alone.
1121
+ * The recorder does not mask attribute values, URLs, CSS text or comments.
1122
+ * @default true
1123
+ */
1124
+ maskText: boolean;
1125
+ /**
1126
+ * Mask the value of every `input`, `textarea` and `select`, including hidden and file
1127
+ * inputs. Password inputs are always masked. The recorder does not mask the `value` of
1128
+ * checkboxes, radio buttons, buttons or `<option>` elements.
1129
+ * @default true
1130
+ */
1131
+ maskInputs: boolean;
1132
+ /**
1133
+ * Record canvas elements.
1134
+ * @default false
1135
+ */
1136
+ recordCanvas: boolean;
1137
+ /**
1138
+ * CSS selectors for elements whose text is always masked.
1139
+ * @default []
1140
+ */
1141
+ maskSelectors: string[];
1142
+ /**
1143
+ * CSS selectors for elements the recorder should skip entirely. The recorder also always
1144
+ * skips `[data-observability-ignore]`, the regions click capture ignores.
1145
+ * @default []
1146
+ */
1147
+ blockSelectors: string[];
1148
+ /**
1149
+ * Loads the recorder, e.g. `() => import("@rrweb/record")`.
1150
+ * @default null
1151
+ */
1152
+ loader: ReplayLoader | null;
1153
+ /**
1154
+ * Receives each segment instead of the POST to `endpoint`.
1155
+ * @default null
1156
+ */
1157
+ onSegment: ((segment: ReplaySegment) => void | Promise<void>) | null;
1158
+ /**
1159
+ * Request headers for `endpoint`, or a function that returns them. The log endpoint's
1160
+ * `headers` are never sent to the replay endpoint.
1161
+ * @default null
1162
+ */
1163
+ headers: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>) | null;
1164
+ /**
1165
+ * Loaders for the recorder's record plugins.
1166
+ * @default []
1167
+ */
1168
+ plugins: ReplayPluginLoader[];
1169
+ /**
1170
+ * Extra options for the `record` function, such as `sampling` and `slimDOMOptions`. The
1171
+ * library sets the mask, block, canvas, plugin and event options itself and ignores them here.
1172
+ * @default {}
1173
+ */
1174
+ recordOptions: Record<string, unknown>;
1175
+ }
1176
+ /** Options passed to `configure()`. */
1177
+ export interface ObservabilityConfig {
1178
+ /** Capture capacity and rate limits. */
1179
+ captureLimits?: Partial<CaptureLimitsOptions>;
1180
+ /** Resource and page fields to record. */
1181
+ metadata?: Partial<MetadataOptions>;
1182
+ /** Diagnostic report and console fallback settings. */
1183
+ diagnostics?: Partial<DiagnosticsOptions>;
1184
+ /** Session and trace timing. */
1185
+ correlation?: Partial<CorrelationOptions>;
1186
+ /** The metric interval and the metric capacity in one interval. */
1187
+ metrics?: Partial<MetricsOptions>;
1188
+ /** Live buffer capacity and the overflow rule. */
1189
+ buffering?: Partial<BufferingOptions>;
1190
+ /** Request timing and delivery capacity. */
1191
+ delivery?: Partial<DeliveryOptions>;
1192
+ /** Records that minLevel or sampling drops, kept for the next error. */
1193
+ debugBuffer?: Partial<DebugBufferOptions>;
1194
+ /** Duration probes. Each probe is reported as a histogram summary record. */
1195
+ profiler?: Partial<ProfilerOptions>;
1196
+ /** Session replay. Off by default. */
1197
+ replay?: Partial<ReplayOptions>;
1198
+ /**
1199
+ * Refuse changes through configure(). Call setConfigurationLocked(false) to permit changes again.
1200
+ * @default false
1201
+ */
1202
+ lockConfiguration?: boolean;
1203
+ /** Logger cache capacity. The app can change it until configuration is locked. */
1204
+ loggerCache?: Partial<LoggerCacheOptions>;
1205
+ /** Delivery identity and isolation rule. Use rotateSecurityContext() to change the identity. */
1206
+ securityContext?: Partial<SecurityContextOptions>;
1207
+ /**
1208
+ * Ingest endpoint URL. Set `null` for console-only mode, where the library sends nothing
1209
+ * and writes records to the console only if you set `consoleOutput`. If the key is missing or
1210
+ * `""`, the library reports `config.invalid`. A relative URL resolves against the page and
1211
+ * works, but it still reports `config.invalid` with the origin it sends to, so you can check
1212
+ * where the records go. A URL with a user name or a password is refused.
1213
+ */
1214
+ endpoint?: string | null;
1215
+ /**
1216
+ * OTLP metrics endpoint URL, for example `"https://ingest.example/v1/metrics"`. When set,
1217
+ * the library sends every batch of metric records there as an OTLP
1218
+ * `ExportMetricsServiceRequest`. Without it, metric records are log records on `endpoint`.
1219
+ * Works with any `serializer`, because these batches always go out as OTLP. Set null to turn it
1220
+ * off. A blank string also turns it off, and reports `config.invalid`.
1221
+ * @default null
1222
+ */
1223
+ metricsEndpoint?: string | null;
1224
+ /**
1225
+ * OTLP traces endpoint URL, for example `"https://ingest.example/v1/traces"`. When set, the
1226
+ * library records one root span for every trace it creates and one CLIENT span for every
1227
+ * request that gets `traceparent`, and sends them there as an OTLP
1228
+ * `ExportTraceServiceRequest`. Without it, the library sends no spans. Works with any
1229
+ * `serializer`, because span batches always go out as OTLP. Set null to turn it off. A blank
1230
+ * string also turns it off, and reports `config.invalid`.
1231
+ * @default null
1232
+ */
1233
+ tracesEndpoint?: string | null;
1234
+ /**
1235
+ * Reported as `service.name`.
1236
+ * @default ""
1237
+ */
1238
+ serviceName?: string;
1239
+ /**
1240
+ * Reported as `service.version`.
1241
+ * @default ""
1242
+ */
1243
+ serviceVersion?: string;
1244
+ /**
1245
+ * Reported as `deployment.environment`.
1246
+ * @default ""
1247
+ */
1248
+ environment?: string;
1249
+ /**
1250
+ * Master switch. False pauses the library, also in the first `configure()` call. Log calls
1251
+ * then do nothing. The pause first sends the open interval of the counters, histograms and
1252
+ * probes, and they then record nothing. The library removes its captures, the replay recorder
1253
+ * and its network patches, so it adds no trace header. The sender sends nothing, and the pause
1254
+ * stores no new record. Storage still changes in four cases: a request in flight at the pause
1255
+ * fails and stores its batch, a sender load that ends during the pause moves the emergency
1256
+ * queue into storage, a `retain` rotation stores the waiting records, and a `discard` or
1257
+ * `flush` rotation removes the old context's stored batches.
1258
+ * Records collected before the pause stay in memory or in storage, and they go out after
1259
+ * `enabled: true`. The bus of a running runtime stays connected. A record from a child
1260
+ * context is lost with the `onDrop` reason "disabled", also in a paused forwarder. A first
1261
+ * `configure()` call with `enabled: false` writes nothing to storage and starts no bus.
1262
+ * @default true
1263
+ */
1264
+ enabled?: boolean;
1265
+ /**
1266
+ * Copy payloads at the call, or keep references to them until idle time. The debug buffer
1267
+ * always builds at the call.
1268
+ * @default "copy"
1269
+ */
1270
+ payloadMode?: "copy" | "defer";
1271
+ /**
1272
+ * Minimum level that the library logs.
1273
+ * @default "INFO"
1274
+ */
1275
+ minLevel?: LogLevel;
1276
+ /**
1277
+ * Minimum level for each namespace prefix. The longest matching prefix wins. For example,
1278
+ * `{ "trading.ticks": "DEBUG" }` logs the DEBUG records of `trading.ticks` and its child
1279
+ * namespaces. A namespace with no match uses `minLevel`. A new map replaces the current one.
1280
+ * @default {}
1281
+ */
1282
+ minLevels?: Record<string, LogLevel>;
1283
+ /**
1284
+ * "gzip" compresses any payload larger than the compression threshold. Use "none" for an
1285
+ * ingest endpoint that rejects gzip.
1286
+ * @default "gzip"
1287
+ */
1288
+ compression?: "gzip" | "none";
1289
+ /**
1290
+ * Payload format of the log batches, either a name or a custom implementation. Batches for
1291
+ * `metricsEndpoint` and `tracesEndpoint` always go out as OTLP. The library drops a batch
1292
+ * that the server refuses with a 400, so a custom serializer must keep every record within
1293
+ * the server's limits, or one bad record loses the whole batch.
1294
+ * @default "otlp"
1295
+ */
1296
+ serializer?: SerializerChoice;
1297
+ /**
1298
+ * Passed to `fetch`. Set "include" for an ingest endpoint that authenticates with cookies.
1299
+ * @default "omit"
1300
+ */
1301
+ credentials?: RequestCredentials;
1302
+ /**
1303
+ * Extra request headers, or a function returning them. undefined keeps the current headers.
1304
+ * With isolation off, null removes them. With isolation on, the default, use
1305
+ * rotateSecurityContext() at logout, because configure() refuses a routing change. The
1306
+ * library has no default headers.
1307
+ */
1308
+ headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>) | null;
1309
+ /**
1310
+ * Backing store, namespace and persistence request for undelivered batches. Can't be changed
1311
+ * after startup.
1312
+ * @see {@link StorageOptions}
1313
+ */
1314
+ storage?: Partial<StorageOptions>;
1315
+ /**
1316
+ * Where the library keeps session, tab and journey ids. "memory" writes no key to
1317
+ * localStorage or sessionStorage, so every page load starts a new session. Can't be changed
1318
+ * after startup.
1319
+ * @default "storage"
1320
+ */
1321
+ identity?: IdentityStrategy;
1322
+ /**
1323
+ * Sampling policy.
1324
+ * @see {@link SamplingOptions}
1325
+ */
1326
+ sampling?: Partial<SamplingOptions>;
1327
+ /**
1328
+ * Bus discovery, trust, and messaging settings.
1329
+ * @see {@link BusOptions}
1330
+ */
1331
+ bus?: Partial<BusOptions>;
1332
+ /**
1333
+ * Journey settings.
1334
+ * @see {@link JourneyOptions}
1335
+ */
1336
+ journey?: Partial<JourneyOptions>;
1337
+ /**
1338
+ * Batch size and flush interval for each record stream.
1339
+ * @see {@link BatchingOptions}
1340
+ */
1341
+ batching?: Partial<BatchingOptions>;
1342
+ /**
1343
+ * Retention of undelivered batches.
1344
+ * @see {@link RetentionOptions}
1345
+ */
1346
+ retention?: Partial<RetentionOptions>;
1347
+ /**
1348
+ * Size limits for each record.
1349
+ * @see {@link LimitsOptions}
1350
+ */
1351
+ limits?: Partial<LimitsOptions>;
1352
+ /**
1353
+ * Automatic instrumentation.
1354
+ * @see {@link CaptureOptions}
1355
+ */
1356
+ capture?: Partial<CaptureOptions>;
1357
+ /**
1358
+ * Prints records to the browser console. The line format is `[namespace][LEVEL] message`.
1359
+ * `false` turns it off, and `true` prints records at DEBUG and above. A level prints records
1360
+ * at that level and above. An object sets the level and the styles.
1361
+ * @default false
1362
+ */
1363
+ consoleOutput?: boolean | LogLevel | ConsoleOutputOptions;
1364
+ /**
1365
+ * Sends batches through one of the app's own channels instead of HTTP. With `transport`,
1366
+ * `endpoint` is optional. The library does not compress the body for a custom transport.
1367
+ * Set null to remove it.
1368
+ * @see {@link Transport}
1369
+ */
1370
+ transport?: Transport | null;
1371
+ /**
1372
+ * Sends the last batch while the page closes, for a custom transport. Without it, the
1373
+ * library puts that batch in the emergency queue and the next page load sends it. Needs
1374
+ * `transport`. Set null to remove it.
1375
+ * @see {@link ExitTransport}
1376
+ */
1377
+ transportOnExit?: ExitTransport | null;
1378
+ /**
1379
+ * Creates a dedicated worker for encoding, compression and HTTP sends. The worker calls serveTransportWorker().
1380
+ * Headers functions, retries, storage and exit sends stay on the main thread. With `transport`
1381
+ * set, the library doesn't start the worker. Set null to remove it.
1382
+ */
1383
+ transportWorker?: (() => Worker) | null;
1384
+ /**
1385
+ * Loads the `@opentelemetry/api` module. Example: `() => import("@opentelemetry/api")`.
1386
+ * OTel stays off unless you set it. Set null to remove it.
1387
+ * @see {@link OtelLoader}
1388
+ */
1389
+ otelLoader?: OtelLoader | null;
1390
+ /**
1391
+ * Returns attributes for every record the library builds. Its values override `setContext()`
1392
+ * values, and the logger scope and the call payload override its values. It is called for
1393
+ * every built record, including records used only for the console or breadcrumbs. Keep it
1394
+ * fast and synchronous. If it throws or returns a non-object, it adds nothing to the record.
1395
+ * Set null to remove it.
1396
+ * @returns The attributes, or undefined for none.
1397
+ */
1398
+ contextProvider?: (() => Record<string, unknown> | undefined) | null;
1399
+ /**
1400
+ * Change or drop a record. Processors run in list order, before `redact`, and follow the
1401
+ * same contract as `redact`. If one throws or returns something that isn't a record, the
1402
+ * library drops the record. A list with an entry that isn't a function keeps the current list,
1403
+ * and with no current list the library drops every record until a later call sets a list of
1404
+ * functions or [].
1405
+ */
1406
+ processors?: ((record: LogRecord) => LogRecord | null)[];
1407
+ /**
1408
+ * Changes or drops a record before the SDK prints or sends it. If the hook throws or returns
1409
+ * something that isn't a record, the library drops the record. An omitted key or undefined
1410
+ * keeps the current hook. Set null to remove it. A value that isn't a function keeps the
1411
+ * current hook, and with no current hook the library drops every record until a later call
1412
+ * sets a function or null.
1413
+ * @param record Record to process. It may be destined only for the console or breadcrumbs.
1414
+ * @returns The record to send, or `null` to drop it.
1415
+ */
1416
+ redact?: ((record: LogRecord) => LogRecord | null) | null;
1417
+ /**
1418
+ * Reports this library's own faults. Set null to remove it.
1419
+ * @see {@link DiagnosticHandler}
1420
+ */
1421
+ onDiagnostic?: DiagnosticHandler | null;
1422
+ /**
1423
+ * Receives a summary when the library loses records it has already built. Sampling,
1424
+ * `minLevel`, `processors` and `redact` do not cause a loss. Losses with the same reason in
1425
+ * the same task are merged. Do not log through the library in the hook, because a record
1426
+ * from the hook can evict a stored batch. A batch that storage evicts during its send can
1427
+ * still reach the server. Set null to remove it.
1428
+ * @param summary The loss's reason, record count, batch ids, journey ids and action names.
1429
+ * @see {@link DropSummary}
1430
+ */
1431
+ onDrop?: ((summary: DropSummary) => void) | null;
1432
+ }
1433
+ /** Fully resolved configuration that the runtime holds. */
1434
+ export interface ResolvedConfig {
1435
+ /** Capture capacity and rate limits. */
1436
+ captureLimits: CaptureLimitsOptions;
1437
+ /** Resource and page fields to record. */
1438
+ metadata: MetadataOptions;
1439
+ /** Diagnostic report and console fallback settings. */
1440
+ diagnostics: DiagnosticsOptions;
1441
+ /** Session and trace timing. */
1442
+ correlation: CorrelationOptions;
1443
+ /** The metric interval and the metric capacity in one interval. */
1444
+ metrics: MetricsOptions;
1445
+ /** Live buffer capacity and the overflow rule. */
1446
+ buffering: BufferingOptions;
1447
+ /** Request timing and delivery capacity. */
1448
+ delivery: DeliveryOptions;
1449
+ /** Records that minLevel or sampling drops, kept for the next error. */
1450
+ debugBuffer: DebugBufferOptions;
1451
+ /** Duration probes. Each probe is reported as a histogram summary record. */
1452
+ profiler: ProfilerOptions;
1453
+ /** Session replay settings. */
1454
+ replay: ReplayOptions;
1455
+ /** True if configure() must refuse changes to the active settings. */
1456
+ lockConfiguration: boolean;
1457
+ /** Logger cache capacity. */
1458
+ loggerCache: LoggerCacheOptions;
1459
+ /** Active delivery context id and isolation rule. */
1460
+ securityContext: SecurityContextOptions;
1461
+ /** Ingest endpoint URL, or null in console-only mode. */
1462
+ endpoint: string | null;
1463
+ /** OTLP metrics endpoint URL, or null to send metric records as log records. */
1464
+ metricsEndpoint: string | null;
1465
+ /** OTLP traces endpoint URL, or null when the library sends no span. */
1466
+ tracesEndpoint: string | null;
1467
+ /** Reported as `service.name`. */
1468
+ serviceName: string;
1469
+ /** Reported as `service.version`. */
1470
+ serviceVersion: string;
1471
+ /** Reported as `deployment.environment`. */
1472
+ environment: string;
1473
+ /** Master switch. When false, every log call does nothing. */
1474
+ enabled: boolean;
1475
+ /** When logger calls read their payloads. */
1476
+ payloadMode: "copy" | "defer";
1477
+ /** Minimum level that the library logs. */
1478
+ minLevel: LogLevel;
1479
+ /** Minimum level for each namespace prefix. */
1480
+ minLevels: Record<string, LogLevel>;
1481
+ /** Hooks that change or drop a record before `redact`. */
1482
+ processors: NonNullable<ObservabilityConfig["processors"]>;
1483
+ /** "gzip" compresses any payload larger than the compression threshold. */
1484
+ compression: "gzip" | "none";
1485
+ /** Passed to `fetch`. */
1486
+ credentials: RequestCredentials;
1487
+ /** Backing store, namespace and persistence request for undelivered batches. */
1488
+ storage: StorageOptions;
1489
+ /** Where session, tab and journey ids are kept. */
1490
+ identity: IdentityStrategy;
1491
+ /**
1492
+ * Sampling policy.
1493
+ * @see {@link SamplingOptions}
1494
+ */
1495
+ sampling: SamplingOptions;
1496
+ /**
1497
+ * Bus discovery, trust, and messaging settings.
1498
+ * @see {@link BusOptions}
1499
+ */
1500
+ bus: BusOptions;
1501
+ /**
1502
+ * Journey settings.
1503
+ * @see {@link JourneyOptions}
1504
+ */
1505
+ journey: JourneyOptions;
1506
+ /**
1507
+ * Batch size and flush interval for each record stream.
1508
+ * @see {@link BatchingOptions}
1509
+ */
1510
+ batching: BatchingOptions;
1511
+ /**
1512
+ * Retention of undelivered batches.
1513
+ * @see {@link RetentionOptions}
1514
+ */
1515
+ retention: RetentionOptions;
1516
+ /**
1517
+ * Size limits for each record.
1518
+ * @see {@link LimitsOptions}
1519
+ */
1520
+ limits: LimitsOptions;
1521
+ /**
1522
+ * Automatic instrumentation.
1523
+ * @see {@link CaptureOptions}
1524
+ */
1525
+ capture: CaptureOptions;
1526
+ /** Console output level and styles. */
1527
+ consoleOutput: ResolvedConsole;
1528
+ /** Payload format name, or a custom implementation. */
1529
+ serializer: SerializerChoice;
1530
+ /** Extra request headers, or a function returning them. */
1531
+ headers?: NonNullable<ObservabilityConfig["headers"]>;
1532
+ /** Sends batches through one of the app's own channels instead of HTTP. */
1533
+ transport?: Transport;
1534
+ /** Sends the last batch while the page closes, for a custom transport. */
1535
+ transportOnExit?: ExitTransport;
1536
+ /** Creates the dedicated HTTP transport worker. */
1537
+ transportWorker?: NonNullable<ObservabilityConfig["transportWorker"]>;
1538
+ /** Supplies the `@opentelemetry/api` module in place of importing it. */
1539
+ otelLoader?: OtelLoader;
1540
+ /** Returns attributes for every record the library builds. */
1541
+ contextProvider?: NonNullable<ObservabilityConfig["contextProvider"]>;
1542
+ /**
1543
+ * Changes or drops a record before the SDK prints or sends it.
1544
+ * @param record Record to process. It may be destined only for the console or breadcrumbs.
1545
+ * @returns The record to send, or `null` to drop it.
1546
+ */
1547
+ redact?: NonNullable<ObservabilityConfig["redact"]>;
1548
+ /**
1549
+ * Reports this library's own faults.
1550
+ * @see {@link DiagnosticHandler}
1551
+ */
1552
+ onDiagnostic?: DiagnosticHandler;
1553
+ /** Receives a summary when the library loses records it has already built. */
1554
+ onDrop?: NonNullable<ObservabilityConfig["onDrop"]>;
1555
+ }