@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,301 @@
1
+ import type { WorkerLike } from "./bus/links.cjs";
2
+ import type { Journey } from "./core/journey.cjs";
3
+ import { type OneLogger as Logger, type OneLoggerOptions } from "./core/logger.cjs";
4
+ import type { ObservabilityConfig } from "./models/config.cjs";
5
+ export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay.cjs";
6
+ import type { FlushOptions, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "./models/config.cjs";
7
+ import type { DebugBundle, FlushResult, ObservabilityHealth } from "./models/health.cjs";
8
+ import type { FrameOptions, SourceOptions } from "./models/bus.cjs";
9
+ export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus.cjs";
10
+ import type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Profiler } from "./models/metric.cjs";
11
+ export { serveTransportWorker } from "./transport/worker-entry.cjs";
12
+ export { observeWindow } from "./capture/observed-windows.cjs";
13
+ export { createMemoryTransport, type MemoryTransport } from "./transport/memory-transport.cjs";
14
+ export type { Journey, Logger, ObservabilityConfig, OneLoggerOptions };
15
+ export type { BatchingOptions, BufferingOptions, BusOptions, CaptureLimitsOptions, CaptureOptions, ConsoleCaptureOptions, ConsoleOutputOptions, ConsoleStyles, CorrelationOptions, DebugBufferOptions, DeliveryOptions, DiagnosticsOptions, FlushOptions, InteractionOptions, JourneyOptions, LimitsOptions, LoggerCacheOptions, LongFramesOptions, MetadataOptions, MetricsOptions, ProfilerOptions, RemoteCaptureFlag, ReplayOptions, ResourceTimingOptions, RetentionOptions, RoutingOptions, SamplingOptions, SecurityContextOptions, SecurityContextRotationOptions, SecurityContextUpdate, ShutdownOptions, StorageOptions, StorageScope, UserTimingOptions, WebVitalsOptions, ExitTransport, Transport, TransportRequest, TransportResponse, } from "./models/config.cjs";
16
+ export type { DebugBundle, DeliveryHealth, FlushResult, FlushStatus, ObservabilityHealth, } from "./models/health.cjs";
17
+ export type { WorkerLike } from "./bus/links.cjs";
18
+ export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics.cjs";
19
+ export type { DropSummary, LossReason } from "./models/drop.cjs";
20
+ export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record.cjs";
21
+ export type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Probe, ProbeOptions, Profiler, } from "./models/metric.cjs";
22
+ export type { CapturePlugin, PluginContext } from "./models/plugin.cjs";
23
+ export type { LogSerializer, SerializedBatch } from "./models/serializer.cjs";
24
+ export type { StorageAdapter } from "./models/storage.cjs";
25
+ /**
26
+ * Initializes or reconfigures the observability runtime. The first call that works starts the
27
+ * runtime. Before it, the library patches, stores and sends nothing, and the records logged
28
+ * before it go out with its hooks and identity. With `enabled: false`, the start waits for the
29
+ * first `enabled: true`.
30
+ * With `payloadMode: "defer"`, logger records are built in idle time. With the debug buffer on,
31
+ * they are still built at the call.
32
+ * @param config Consumer configuration options.
33
+ */
34
+ export declare function configure(config: Partial<ObservabilityConfig>): void;
35
+ /**
36
+ * Locks or unlocks the configuration. The lock isn't access control against other code on
37
+ * this origin. Call it after configure(), because a lock before the first configure() refuses
38
+ * that call too, and the runtime then never starts.
39
+ * @param locked True to refuse changes through configure().
40
+ */
41
+ export declare function setConfigurationLocked(locked: boolean): void;
42
+ /**
43
+ * Stops delivery for the old context and starts it for the new one. A call during another
44
+ * rotation runs after it.
45
+ * @param update New identity, routing settings and context attributes.
46
+ * @param options What to do with old records, and the flush deadline.
47
+ * @returns Promise that resolves once the change is complete. It rejects before the first
48
+ * configure() call that works, while a failed first call still refuses records, and after
49
+ * shutdown().
50
+ */
51
+ export declare function rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
52
+ /**
53
+ * Reads this SDK copy's runtime state, policies and delivery state. The `delivery` block holds
54
+ * the record and batch counts, the send and failure times, the throttle end and the losses. It
55
+ * doesn't wait for startup or for the delivery stack to load.
56
+ * @returns Promise that resolves to the current state.
57
+ */
58
+ export declare function getHealth(): Promise<ObservabilityHealth>;
59
+ /**
60
+ * Collects the library's state for a support ticket. The bundle holds the health, the
61
+ * diagnostic counters, the resource, the breadcrumbs, the debug buffer and a config summary.
62
+ * The summary has no headers and no URL query, and a plugin or custom serializer shows up by
63
+ * name only. The breadcrumbs go through the privacy hooks. A debug buffer record keeps its
64
+ * context attributes. Where the bundle gets sent is up to the app.
65
+ * @returns Promise that resolves to a JSON-safe bundle.
66
+ */
67
+ export declare function collectDebugBundle(): Promise<DebugBundle>;
68
+ /**
69
+ * Returns the cached logger for a namespace, or a new scoped logger.
70
+ * @param namespace Application subsystem or module namespace.
71
+ * @param options Context attributes for this logger only.
72
+ * @returns Logger for the namespace. You get a new logger if you pass options or the cache
73
+ * is disabled.
74
+ */
75
+ export declare function getLogger(namespace: string, options?: OneLoggerOptions): Logger;
76
+ /**
77
+ * Logs a trace-level debug record.
78
+ * @param message Detail message.
79
+ * @param payload Optional context attributes.
80
+ */
81
+ export declare function trace(message: string, payload?: Record<string, unknown>): void;
82
+ /**
83
+ * Logs a debug-level record.
84
+ * @param message Detail message.
85
+ * @param payload Optional context attributes.
86
+ */
87
+ export declare function debug(message: string, payload?: Record<string, unknown>): void;
88
+ /**
89
+ * Logs an informational record.
90
+ * @param message Informational message.
91
+ * @param payload Optional context attributes.
92
+ */
93
+ export declare function info(message: string, payload?: Record<string, unknown>): void;
94
+ /**
95
+ * Logs a warning record.
96
+ * @param message Warning message.
97
+ * @param payload Optional context attributes.
98
+ */
99
+ export declare function warn(message: string, payload?: Record<string, unknown>): void;
100
+ /**
101
+ * Logs an error record, with the error that caused it and the breadcrumbs.
102
+ * @param message Error summary.
103
+ * @param err The caught error or reason.
104
+ * @param payload Optional context attributes.
105
+ */
106
+ export declare function error(message: string, err?: unknown, payload?: Record<string, unknown>): void;
107
+ /**
108
+ * Logs a fatal record, with the error that caused it and the breadcrumbs.
109
+ * @param message Fatal error summary.
110
+ * @param err The caught error or reason.
111
+ * @param payload Optional context attributes.
112
+ */
113
+ export declare function fatal(message: string, err?: unknown, payload?: Record<string, unknown>): void;
114
+ /**
115
+ * Logs a single user action.
116
+ * @param name Action identifier.
117
+ * @param payload Optional action attributes.
118
+ */
119
+ export declare function logAction(name: string, payload?: Record<string, unknown>): void;
120
+ /**
121
+ * Logs an application lifecycle or domain event.
122
+ * @param name Event identifier.
123
+ * @param payload Optional event attributes.
124
+ */
125
+ export declare function logEvent(name: string, payload?: Record<string, unknown>): void;
126
+ /**
127
+ * Returns a counter. Values are summed in memory, and every interval the library sends one
128
+ * point per attribute set. A handle stays valid across configure() and shutdown().
129
+ * @param name Metric name.
130
+ * @param options Unit of the values.
131
+ * @returns The counter.
132
+ */
133
+ export declare function counter(name: string, options?: InstrumentOptions): Counter;
134
+ /**
135
+ * Returns a gauge. It keeps the last value for each attribute set in memory, and every interval
136
+ * the library sends that value as one point. With `metricsEndpoint`, the point is an OTLP gauge.
137
+ * A handle stays valid across configure() and shutdown().
138
+ * @param name Metric name.
139
+ * @param options Unit of the values.
140
+ * @returns The gauge.
141
+ */
142
+ export declare function gauge(name: string, options?: InstrumentOptions): Gauge;
143
+ /**
144
+ * Returns a histogram. Values are counted into buckets in memory, and every interval the
145
+ * library sends one point per attribute set. A handle stays valid across configure() and
146
+ * shutdown().
147
+ * @param name Metric name.
148
+ * @param options Unit of the values and the bucket boundaries.
149
+ * @returns The histogram.
150
+ */
151
+ export declare function histogram(name: string, options?: HistogramOptions): Histogram;
152
+ /**
153
+ * Times an operation with named phases. Every phase and the total go into duration histograms.
154
+ * With `tracesEndpoint` set, the operation is also a span with one child span per phase.
155
+ * @param name Operation name. Every name creates one series.
156
+ * @param attributes Attribute set for every histogram point. Keep it small.
157
+ * @returns The operation's handle.
158
+ */
159
+ export declare function startMeasure(name: string, attributes?: MetricAttributes): Measure;
160
+ /**
161
+ * Times a function call with a measure, as `startMeasure()` does. If the result has a `then`
162
+ * function, the measure ends when it settles. A throw or a rejection ends it with the outcome
163
+ * "error", and the error goes to the caller unchanged.
164
+ * @param name Operation name. Every name creates one series.
165
+ * @param fn The function to call.
166
+ * @param attributes Attribute set for every histogram point. Keep it small.
167
+ * @returns Whatever `fn` returned, or the result of its `then` call.
168
+ */
169
+ export declare function measure<T>(name: string, fn: () => T, attributes?: MetricAttributes): T;
170
+ /**
171
+ * Starts the session replay recorder. With `replay.requireConsent` set, nothing is recorded
172
+ * until you call this, so call it once the user agrees. Does nothing while `replay.enabled`
173
+ * is false.
174
+ */
175
+ export declare function startReplay(): void;
176
+ /**
177
+ * Stops the session replay recorder and drops any replay events that haven't been sent. With
178
+ * `replay.requireConsent` set, the recorder stays off until the next `startReplay()`.
179
+ */
180
+ export declare function stopReplay(): void;
181
+ /**
182
+ * Times spans of app code with probes. A probe is a named handle with `begin()`, `end()`,
183
+ * `endAfterPaint()` and `record()`, and `time()` times a single function call. Once per
184
+ * interval the library sends one `ui.profile.duration` histogram for every probe that has data.
185
+ *
186
+ * The profiler is off by default. Set `profiler.enabled` to true to turn it on. While it is
187
+ * off, probes don't read the clock. After `shutdown()` a probe does nothing until a later
188
+ * `configure()` turns the profiler back on. Probes stay valid across `configure()` and
189
+ * `shutdown()`, and you can create them before `configure()`. No call ever throws.
190
+ * @example
191
+ * const render = profiler.probe("grid.render");
192
+ * const token = render.begin();
193
+ * drawGrid();
194
+ * render.end(token);
195
+ */
196
+ export declare const profiler: Profiler;
197
+ /**
198
+ * Adds a breadcrumb to the trail. The next error record carries the trail.
199
+ * @param message Description of the event.
200
+ * @param data Optional metadata. It is copied right away.
201
+ */
202
+ export declare function addBreadcrumb(message: string, data?: Record<string, unknown>): void;
203
+ /**
204
+ * Merges attributes into the ambient context. Every later record includes them. A null value
205
+ * removes its key, and an undefined value keeps the current value. A value that isn't an object
206
+ * reports `config.invalid` and changes nothing.
207
+ * @param values Attributes to merge.
208
+ */
209
+ export declare function setContext(values: Record<string, unknown>): void;
210
+ /**
211
+ * Removes an attribute from the ambient context.
212
+ * @param key Attribute key to delete.
213
+ */
214
+ export declare function removeContext(key: string): void;
215
+ /**
216
+ * Starts a new journey correlation context.
217
+ * @param name Journey workflow identifier.
218
+ * @param options `parent` links the active journey as the parent. `id` sets the journey id, a
219
+ * string of 1 to 64 letters, digits, "_", ".", ":" or "-". Without it, the library generates one.
220
+ * @returns The started Journey.
221
+ */
222
+ export declare function startJourney(name: string, options?: {
223
+ parent?: boolean;
224
+ id?: string;
225
+ }): Journey;
226
+ /** Ends the active journey correlation context. */
227
+ export declare function endJourney(): void;
228
+ /**
229
+ * Returns the active journey, or null if none is in progress.
230
+ * @returns The active Journey, or null.
231
+ */
232
+ export declare function currentJourney(): Journey | null;
233
+ /**
234
+ * Serializes the active journey's metadata into a URL token that another context can adopt.
235
+ * @returns The token, or null if no journey is active or the token is above the size limit.
236
+ */
237
+ export declare function getJourneyToken(): string | null;
238
+ /**
239
+ * Adopts a serialized journey token in this application realm.
240
+ * @param token Serialized journey token.
241
+ * @returns True if the token is valid and the runtime adopted it.
242
+ */
243
+ export declare function adoptJourney(token: string): boolean;
244
+ /**
245
+ * Connects a Web Worker or MessagePort to the document bus, so its records get routed.
246
+ * @param worker The Worker or MessagePort to connect.
247
+ * @param options The worker's permissions. Defaults to "records".
248
+ * @returns Function that removes this registration.
249
+ */
250
+ export declare function registerWorker(worker: WorkerLike, options?: SourceOptions): () => void;
251
+ /**
252
+ * Registers one frame or window at an exact origin.
253
+ * @param frame Child frame or window to register.
254
+ * @param options Expected origin and source permissions.
255
+ * @returns Function that removes this registration.
256
+ */
257
+ export declare function registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
258
+ /** Starts a new distributed trace. Later records and requests carry the new trace id. */
259
+ export declare function newTrace(): void;
260
+ /**
261
+ * Returns the W3C traceparent headers to put on an outgoing HTTP request.
262
+ * @returns Map of trace header names to values.
263
+ */
264
+ export declare function getTraceHeaders(): Record<string, string>;
265
+ /**
266
+ * Builds any deferred calls and the open metric interval, sends the records in memory, and
267
+ * waits until each one has a final state or the time limit passes. The snapshot is the records
268
+ * in memory at the call. A record logged later isn't in it. Before startup ends, the call waits
269
+ * for startup and the delivery stack first, and the snapshot then also holds the records logged
270
+ * during that wait. A forwarder hands its records to its sender and asks the sender to flush.
271
+ * At the limit the call returns, and the work goes on in the background. The stored batches
272
+ * from earlier failures and the replay segments are outside the snapshot. Before the first
273
+ * `configure()` call that works, during a pause and after `shutdown()`, it sends nothing and
274
+ * returns the status "inactive" at once.
275
+ * @param options How long to wait. `timeoutMs` is 0 to 600000 ms, and the default is 5000.
276
+ * @returns Promise that resolves to the counts of the snapshot's records. It never rejects.
277
+ */
278
+ export declare function flush(options?: FlushOptions): Promise<FlushResult>;
279
+ /**
280
+ * Starts a new correlation in this tab. Ends the active journey and starts a new trace. Other
281
+ * tabs pick up the new id at their next startup. For a logout or a tenant change, use
282
+ * rotateSecurityContext().
283
+ */
284
+ export declare function newSession(): void;
285
+ /**
286
+ * Returns a snapshot of the cumulative diagnostic event counts.
287
+ * @returns Map of diagnostic codes to how often each one occurred.
288
+ */
289
+ export declare function getDiagnosticCounters(): Record<string, number>;
290
+ /**
291
+ * Stops every runtime subsystem. By default it flushes the records first, then runs the exit
292
+ * flush, and a request still open after that is cancelled with its stored batch kept. With
293
+ * `pending: "discard"` it sends nothing and reports each record in memory to `onDrop` with the
294
+ * reason "discarded". `clearStorage` also removes the stored batches and the stored ids, for a
295
+ * logout on a shared device. A call before any log call or `configure()` does nothing. A call
296
+ * after `shutdown()` stops nothing more, but its `clearStorage` still removes the stored data,
297
+ * once the first call ends. The next `configure()` starts a new runtime.
298
+ * @param options What to do with the records that wait, and which storage to remove.
299
+ * @returns Promise that resolves once shutdown is complete.
300
+ */
301
+ export declare function shutdown(options?: ShutdownOptions): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1,39 +1,32 @@
1
- import type { WorkerLike } from "./bus/links";
2
- import type { Journey } from "./core/journey";
3
- import { OneLogger, type OneLoggerOptions } from "./core/logger";
4
- import type { ObservabilityConfig } from "./models/config";
5
- export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay";
6
- import type { SecurityContextUpdate, SecurityContextRotationOptions } from "./models/config";
7
- import type { DebugBundle, ObservabilityHealth } from "./models/health";
8
- import type { FrameOptions, SourceOptions } from "./models/bus";
9
- export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus";
10
- import type { MetricType } from "./models/log-record";
11
- import type { DeliveryStats } from "./models/stats";
12
- import type { Counter, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Profiler } from "./models/metric";
13
- export { OneLogger };
14
- export { serveTransportWorker } from "./transport/worker-entry";
15
- export { createMemoryTransport, type MemoryTransport } from "./transport/memory-transport";
16
- export type { Journey, ObservabilityConfig, OneLoggerOptions };
17
- export type { DeliveryPolicy, BufferingPolicy, MetricsPolicy, CorrelationPolicy, DiagnosticsPolicy, PersistencePolicy, MetadataPolicy, CapturePolicy, DebugBufferPolicy, ProfilerPolicy, ReplayPolicy, BusOptions, CaptureOptions, InteractionOptions, ResourceTimingOptions, RemoteCaptureFlag, LoggerCacheOptions, SecurityContextOptions, SecurityContextUpdate, SecurityContextRotationOptions, DeliveryOptions, ConsoleOptions, ConsoleStyles, ExitTransport, Transport, TransportRequest, TransportResponse, } from "./models/config";
18
- export type { DebugBundle, ObservabilityHealth } from "./models/health";
19
- export type { WorkerLike } from "./bus/links";
20
- export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics";
21
- export type { DropSummary, LossReason } from "./models/drop";
22
- export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record";
23
- export type { Counter, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Probe, ProbeOptions, Profiler, } from "./models/metric";
24
- export type { CapturePlugin, PluginContext } from "./models/plugin";
25
- export type { LogSerializer, SerializedBatch } from "./models/serializer";
26
- export type { DeliveryStats } from "./models/stats";
27
- export type { StorageAdapter } from "./models/storage";
28
- /**
29
- * Removes stored logs. Records and requests that are still pending can write to storage again
30
- * afterwards.
31
- * @param scope Whose stored records to remove: the context's or the namespace's.
32
- * @returns Promise that resolves once the logs are removed.
33
- */
34
- export declare function clearPersistedLogs(scope?: "context" | "namespace"): Promise<void>;
35
- /**
36
- * Initializes or reconfigures the observability runtime.
1
+ import type { WorkerLike } from "./bus/links.js";
2
+ import type { Journey } from "./core/journey.js";
3
+ import { type OneLogger as Logger, type OneLoggerOptions } from "./core/logger.js";
4
+ import type { ObservabilityConfig } from "./models/config.js";
5
+ export type { ReplayLoader, ReplayPluginLoader, ReplayPluginTools, ReplaySegment, } from "./models/replay.js";
6
+ import type { FlushOptions, SecurityContextUpdate, SecurityContextRotationOptions, ShutdownOptions } from "./models/config.js";
7
+ import type { DebugBundle, FlushResult, ObservabilityHealth } from "./models/health.js";
8
+ import type { FrameOptions, SourceOptions } from "./models/bus.js";
9
+ export type { FrameOptions, SourceOptions, BusPermission } from "./models/bus.js";
10
+ import type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Profiler } from "./models/metric.js";
11
+ export { serveTransportWorker } from "./transport/worker-entry.js";
12
+ export { observeWindow } from "./capture/observed-windows.js";
13
+ export { createMemoryTransport, type MemoryTransport } from "./transport/memory-transport.js";
14
+ export type { Journey, Logger, ObservabilityConfig, OneLoggerOptions };
15
+ export type { BatchingOptions, BufferingOptions, BusOptions, CaptureLimitsOptions, CaptureOptions, ConsoleCaptureOptions, ConsoleOutputOptions, ConsoleStyles, CorrelationOptions, DebugBufferOptions, DeliveryOptions, DiagnosticsOptions, FlushOptions, InteractionOptions, JourneyOptions, LimitsOptions, LoggerCacheOptions, LongFramesOptions, MetadataOptions, MetricsOptions, ProfilerOptions, RemoteCaptureFlag, ReplayOptions, ResourceTimingOptions, RetentionOptions, RoutingOptions, SamplingOptions, SecurityContextOptions, SecurityContextRotationOptions, SecurityContextUpdate, ShutdownOptions, StorageOptions, StorageScope, UserTimingOptions, WebVitalsOptions, ExitTransport, Transport, TransportRequest, TransportResponse, } from "./models/config.js";
16
+ export type { DebugBundle, DeliveryHealth, FlushResult, FlushStatus, ObservabilityHealth, } from "./models/health.js";
17
+ export type { WorkerLike } from "./bus/links.js";
18
+ export type { DiagnosticCode, DiagnosticEvent } from "./core/diagnostics.js";
19
+ export type { DropSummary, LossReason } from "./models/drop.js";
20
+ export type { LogLevel, LogRecord, LogType, MetricType } from "./models/log-record.js";
21
+ export type { Counter, Gauge, Histogram, HistogramOptions, InstrumentOptions, Measure, MetricAttributes, Probe, ProbeOptions, Profiler, } from "./models/metric.js";
22
+ export type { CapturePlugin, PluginContext } from "./models/plugin.js";
23
+ export type { LogSerializer, SerializedBatch } from "./models/serializer.js";
24
+ export type { StorageAdapter } from "./models/storage.js";
25
+ /**
26
+ * Initializes or reconfigures the observability runtime. The first call that works starts the
27
+ * runtime. Before it, the library patches, stores and sends nothing, and the records logged
28
+ * before it go out with its hooks and identity. With `enabled: false`, the start waits for the
29
+ * first `enabled: true`.
37
30
  * With `payloadMode: "defer"`, logger records are built in idle time. With the debug buffer on,
38
31
  * they are still built at the call.
39
32
  * @param config Consumer configuration options.
@@ -41,19 +34,25 @@ export declare function clearPersistedLogs(scope?: "context" | "namespace"): Pro
41
34
  export declare function configure(config: Partial<ObservabilityConfig>): void;
42
35
  /**
43
36
  * Locks or unlocks the configuration. The lock isn't access control against other code on
44
- * this origin.
37
+ * this origin. Call it after configure(), because a lock before the first configure() refuses
38
+ * that call too, and the runtime then never starts.
45
39
  * @param locked True to refuse changes through configure().
46
40
  */
47
41
  export declare function setConfigurationLocked(locked: boolean): void;
48
42
  /**
49
- * Stops delivery for the old context and starts it for the new one.
50
- * @param update New identity, delivery settings and context attributes.
43
+ * Stops delivery for the old context and starts it for the new one. A call during another
44
+ * rotation runs after it.
45
+ * @param update New identity, routing settings and context attributes.
51
46
  * @param options What to do with old records, and the flush deadline.
52
- * @returns Promise that resolves once the change is complete.
47
+ * @returns Promise that resolves once the change is complete. It rejects before the first
48
+ * configure() call that works, while a failed first call still refuses records, and after
49
+ * shutdown().
53
50
  */
54
51
  export declare function rotateSecurityContext(update: SecurityContextUpdate, options?: SecurityContextRotationOptions): Promise<void>;
55
52
  /**
56
- * Reads this SDK copy's runtime state, delivery counts and policies.
53
+ * Reads this SDK copy's runtime state, policies and delivery state. The `delivery` block holds
54
+ * the record and batch counts, the send and failure times, the throttle end and the losses. It
55
+ * doesn't wait for startup or for the delivery stack to load.
57
56
  * @returns Promise that resolves to the current state.
58
57
  */
59
58
  export declare function getHealth(): Promise<ObservabilityHealth>;
@@ -73,7 +72,7 @@ export declare function collectDebugBundle(): Promise<DebugBundle>;
73
72
  * @returns Logger for the namespace. You get a new logger if you pass options or the cache
74
73
  * is disabled.
75
74
  */
76
- export declare function getLogger(namespace: string, options?: OneLoggerOptions): OneLogger;
75
+ export declare function getLogger(namespace: string, options?: OneLoggerOptions): Logger;
77
76
  /**
78
77
  * Logs a trace-level debug record.
79
78
  * @param message Detail message.
@@ -124,15 +123,6 @@ export declare function logAction(name: string, payload?: Record<string, unknown
124
123
  * @param payload Optional event attributes.
125
124
  */
126
125
  export declare function logEvent(name: string, payload?: Record<string, unknown>): void;
127
- /**
128
- * Logs a numeric metric measurement.
129
- * @param name Metric identifier.
130
- * @param value Measured value.
131
- * @param unit Unit of measurement.
132
- * @param type Metric type.
133
- * @param attributes Optional metric attributes.
134
- */
135
- export declare function logMetric(name: string, value: number, unit?: string, type?: MetricType, attributes?: Record<string, unknown>): void;
136
126
  /**
137
127
  * Returns a counter. Values are summed in memory, and every interval the library sends one
138
128
  * point per attribute set. A handle stays valid across configure() and shutdown().
@@ -141,6 +131,15 @@ export declare function logMetric(name: string, value: number, unit?: string, ty
141
131
  * @returns The counter.
142
132
  */
143
133
  export declare function counter(name: string, options?: InstrumentOptions): Counter;
134
+ /**
135
+ * Returns a gauge. It keeps the last value for each attribute set in memory, and every interval
136
+ * the library sends that value as one point. With `metricsEndpoint`, the point is an OTLP gauge.
137
+ * A handle stays valid across configure() and shutdown().
138
+ * @param name Metric name.
139
+ * @param options Unit of the values.
140
+ * @returns The gauge.
141
+ */
142
+ export declare function gauge(name: string, options?: InstrumentOptions): Gauge;
144
143
  /**
145
144
  * Returns a histogram. Values are counted into buckets in memory, and every interval the
146
145
  * library sends one point per attribute set. A handle stays valid across configure() and
@@ -158,6 +157,16 @@ export declare function histogram(name: string, options?: HistogramOptions): His
158
157
  * @returns The operation's handle.
159
158
  */
160
159
  export declare function startMeasure(name: string, attributes?: MetricAttributes): Measure;
160
+ /**
161
+ * Times a function call with a measure, as `startMeasure()` does. If the result has a `then`
162
+ * function, the measure ends when it settles. A throw or a rejection ends it with the outcome
163
+ * "error", and the error goes to the caller unchanged.
164
+ * @param name Operation name. Every name creates one series.
165
+ * @param fn The function to call.
166
+ * @param attributes Attribute set for every histogram point. Keep it small.
167
+ * @returns Whatever `fn` returned, or the result of its `then` call.
168
+ */
169
+ export declare function measure<T>(name: string, fn: () => T, attributes?: MetricAttributes): T;
161
170
  /**
162
171
  * Starts the session replay recorder. With `replay.requireConsent` set, nothing is recorded
163
172
  * until you call this, so call it once the user agrees. Does nothing while `replay.enabled`
@@ -185,22 +194,6 @@ export declare function stopReplay(): void;
185
194
  * render.end(token);
186
195
  */
187
196
  export declare const profiler: Profiler;
188
- /**
189
- * Times a synchronous function and logs a duration metric.
190
- * @param label Metric name prefix.
191
- * @param fn Synchronous function to time.
192
- * @param attributes Optional context attributes.
193
- * @returns Whatever the timed function returns.
194
- */
195
- export declare function timeSync<T>(label: string, fn: () => T, attributes?: Record<string, unknown>): T;
196
- /**
197
- * Times an asynchronous function and logs a duration metric.
198
- * @param label Metric name prefix.
199
- * @param fn Asynchronous function to time.
200
- * @param attributes Optional context attributes.
201
- * @returns Promise that resolves to the timed function's result.
202
- */
203
- export declare function timeAsync<T>(label: string, fn: () => Promise<T>, attributes?: Record<string, unknown>): Promise<T>;
204
197
  /**
205
198
  * Adds a breadcrumb to the trail. The next error record carries the trail.
206
199
  * @param message Description of the event.
@@ -208,16 +201,12 @@ export declare function timeAsync<T>(label: string, fn: () => Promise<T>, attrib
208
201
  */
209
202
  export declare function addBreadcrumb(message: string, data?: Record<string, unknown>): void;
210
203
  /**
211
- * Sets a key-value pair on the ambient context. Every later record includes it.
212
- * @param key Attribute key.
213
- * @param value Attribute value.
214
- */
215
- export declare function setContext(key: string, value: unknown): void;
216
- /**
217
- * Merges several key-value pairs into the ambient context.
218
- * @param values Key-value map of attributes to add.
204
+ * Merges attributes into the ambient context. Every later record includes them. A null value
205
+ * removes its key, and an undefined value keeps the current value. A value that isn't an object
206
+ * reports `config.invalid` and changes nothing.
207
+ * @param values Attributes to merge.
219
208
  */
220
- export declare function setContextMap(values: Record<string, unknown>): void;
209
+ export declare function setContext(values: Record<string, unknown>): void;
221
210
  /**
222
211
  * Removes an attribute from the ambient context.
223
212
  * @param key Attribute key to delete.
@@ -243,9 +232,9 @@ export declare function endJourney(): void;
243
232
  export declare function currentJourney(): Journey | null;
244
233
  /**
245
234
  * Serializes the active journey's metadata into a URL token that another context can adopt.
246
- * @returns The token, or undefined if no journey is active.
235
+ * @returns The token, or null if no journey is active or the token is above the size limit.
247
236
  */
248
- export declare function getJourneyToken(): string | undefined;
237
+ export declare function getJourneyToken(): string | null;
249
238
  /**
250
239
  * Adopts a serialized journey token in this application realm.
251
240
  * @param token Serialized journey token.
@@ -266,30 +255,27 @@ export declare function registerWorker(worker: WorkerLike, options?: SourceOptio
266
255
  * @returns Function that removes this registration.
267
256
  */
268
257
  export declare function registerFrame(frame: HTMLIFrameElement | Window, options: FrameOptions): () => void;
269
- /** Rotates the trace context to begin a new distributed trace. */
270
- export declare function startTrace(): void;
258
+ /** Starts a new distributed trace. Later records and requests carry the new trace id. */
259
+ export declare function newTrace(): void;
271
260
  /**
272
261
  * Returns the W3C traceparent headers to put on an outgoing HTTP request.
273
262
  * @returns Map of trace header names to values.
274
263
  */
275
264
  export declare function getTraceHeaders(): Record<string, string>;
276
265
  /**
277
- * Builds any deferred calls and flushes the pending batches of every pipeline stream.
278
- * @returns Promise that resolves once the pipeline has processed the queued batches.
279
- */
280
- export declare function flush(): Promise<void>;
281
- /**
282
- * Counts the batches waiting in storage for delivery.
283
- * @returns Promise that resolves to the number of stored batches. A forwarder doesn't store
284
- * batches, so it reports 0.
285
- */
286
- export declare function getQueueDepth(): Promise<number>;
287
- /**
288
- * Reads this context's delivery state.
289
- * @returns Promise that resolves to the records waiting, the records in requests, the batches
290
- * in storage and the time of the last accepted send. A forwarder reports only its own buffers.
266
+ * Builds any deferred calls and the open metric interval, sends the records in memory, and
267
+ * waits until each one has a final state or the time limit passes. The snapshot is the records
268
+ * in memory at the call. A record logged later isn't in it. Before startup ends, the call waits
269
+ * for startup and the delivery stack first, and the snapshot then also holds the records logged
270
+ * during that wait. A forwarder hands its records to its sender and asks the sender to flush.
271
+ * At the limit the call returns, and the work goes on in the background. The stored batches
272
+ * from earlier failures and the replay segments are outside the snapshot. Before the first
273
+ * `configure()` call that works, during a pause and after `shutdown()`, it sends nothing and
274
+ * returns the status "inactive" at once.
275
+ * @param options How long to wait. `timeoutMs` is 0 to 600000 ms, and the default is 5000.
276
+ * @returns Promise that resolves to the counts of the snapshot's records. It never rejects.
291
277
  */
292
- export declare function getStats(): Promise<DeliveryStats>;
278
+ export declare function flush(options?: FlushOptions): Promise<FlushResult>;
293
279
  /**
294
280
  * Starts a new correlation in this tab. Ends the active journey and starts a new trace. Other
295
281
  * tabs pick up the new id at their next startup. For a logout or a tenant change, use
@@ -302,8 +288,14 @@ export declare function newSession(): void;
302
288
  */
303
289
  export declare function getDiagnosticCounters(): Record<string, number>;
304
290
  /**
305
- * Flushes pending records and stops every runtime subsystem. A request still open after the
306
- * final flush is cancelled, and its stored batch stays in storage.
291
+ * Stops every runtime subsystem. By default it flushes the records first, then runs the exit
292
+ * flush, and a request still open after that is cancelled with its stored batch kept. With
293
+ * `pending: "discard"` it sends nothing and reports each record in memory to `onDrop` with the
294
+ * reason "discarded". `clearStorage` also removes the stored batches and the stored ids, for a
295
+ * logout on a shared device. A call before any log call or `configure()` does nothing. A call
296
+ * after `shutdown()` stops nothing more, but its `clearStorage` still removes the stored data,
297
+ * once the first call ends. The next `configure()` starts a new runtime.
298
+ * @param options What to do with the records that wait, and which storage to remove.
307
299
  * @returns Promise that resolves once shutdown is complete.
308
300
  */
309
- export declare function shutdown(): Promise<void>;
301
+ export declare function shutdown(options?: ShutdownOptions): Promise<void>;