@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,81 @@
1
+ import { r as e } from "./error-like-B11pB4aL.js";
2
+ import { n as t } from "./guards-BlYGRK4l.js";
3
+ import { n, t as r } from "./library-console-DklSmucS.js";
4
+ import { t as i } from "./patch-UdPz1ea8.js";
5
+ import { i as a } from "./sanitize-DjnR6RXR.js";
6
+ import { t as o } from "./storm-DKlpv0FL.js";
7
+ import { t as s } from "./defineProperty-s2S8BXUc.js";
8
+ // src/capture/console.ts
9
+ var c = [
10
+ "error",
11
+ "warn",
12
+ "info",
13
+ "log"
14
+ ], l = ["error", "warn"];
15
+ function u(e, t) {
16
+ return (...n) => {
17
+ Reflect.apply(e, console, n), r() || t.record?.(n);
18
+ };
19
+ }
20
+ var d = class {
21
+ constructor(e) {
22
+ s(this, "ctx", void 0), s(this, "name", "console"), s(this, "wrapped", /* @__PURE__ */ new Map()), s(this, "installed", !1), s(this, "window", {
23
+ start: 0,
24
+ count: 0
25
+ }), this.ctx = e;
26
+ }
27
+ install() {
28
+ if (!(this.installed || typeof console > "u")) {
29
+ this.installed = !0;
30
+ for (let e of this.readMethods()) this.wrap(e);
31
+ }
32
+ }
33
+ uninstall() {
34
+ if (this.installed) {
35
+ this.installed = !1;
36
+ for (let [e, { target: t, restore: n }] of this.wrapped) t.record = null, n() || this.ctx.diagnostics.report("capture.install_failed", `Another script wrapped console.${e} after the library. The library leaves that wrapper in place.`);
37
+ this.wrapped.clear();
38
+ }
39
+ }
40
+ readMethods() {
41
+ let { console: e } = this.ctx.config.capture;
42
+ if (e === !0) return l;
43
+ let n = t(e) ? e.levels : void 0;
44
+ return Array.isArray(n) && n.every((e) => c.includes(e)) ? [...new Set(n)] : (this.ctx.diagnostics.report("config.invalid", "capture.console must be true or an object with a list of \"error\", \"warn\", \"info\" and \"log\" in levels. The console capture is off."), []);
45
+ }
46
+ wrap(e) {
47
+ let t = { record: (t) => {
48
+ n(() => {
49
+ this.ctx.diagnostics.guard("capture.record_failed", `The library could not record a console.${e} call.`, () => {
50
+ this.record(e, t);
51
+ });
52
+ });
53
+ } }, r = i(console, e, (e) => u(e, t));
54
+ this.wrapped.set(e, {
55
+ target: t,
56
+ restore: r
57
+ });
58
+ }
59
+ record(t, n) {
60
+ let r = n.findIndex((t) => e(t)), i = n.findIndex((e) => typeof e == "string"), s = n[r], c = n[i] ?? s?.message ?? `console.${t}`;
61
+ if (t === "info" || t === "log") {
62
+ this.ctx.breadcrumbs.push({
63
+ t: Date.now(),
64
+ category: "console",
65
+ message: a(c, 200),
66
+ data: { "console.method": t }
67
+ });
68
+ return;
69
+ }
70
+ let { diagnostics: l, logger: u } = this.ctx;
71
+ if (!o(this.window, this.ctx.config.captureLimits.consolePerWindow, l, "console records", this.ctx.config.captureLimits.windowMs)) return;
72
+ let d = t === "error" ? [i, r] : [i], f = n.filter((e, t) => !d.includes(t)), p = { "console.method": t };
73
+ f.length > 0 && (p["console.args"] = f), t === "warn" ? u.warn(c, p) : u.error(c, s, {
74
+ ...p,
75
+ "error.captured_by": "console.error"
76
+ });
77
+ }
78
+ };
79
+ export { d as ConsoleCapture };
80
+
81
+ //# sourceMappingURL=console-BsM-fSCQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-BsM-fSCQ.js","names":["isErrorLike","isObject","isLibraryConsole","patch","truncate","allowInWindow","_defineProperty","METHODS","DEFAULT_METHODS","makeWrapper","args","original","target","ConsoleCapture","ctx","method","restore","setting","levels","errorAt","arg","textAt","error","message","diagnostics","used","rest","index","attrs","logger"],"sources":["../src/capture/console.ts"],"sourcesContent":["// src/capture/console.ts\n//\n// Records the app's own console calls, because third-party code often reports a fault only there.\n\nimport { CONSOLE_BREADCRUMB_MAX_CHARS } from \"../constants\";\nimport type { CapturedConsoleMethod } from \"../models/config\";\nimport { type ErrorLike, isErrorLike } from \"../utils/error-like\";\nimport { isObject } from \"../utils/guards\";\nimport { isLibraryConsole, runAsLibraryConsole } from \"../utils/library-console\";\nimport { patch } from \"../utils/patch\";\nimport { truncate } from \"../utils/sanitize\";\nimport { allowInWindow, type StormWindow } from \"./storm\";\nimport type { Capture, CaptureContext } from \"./types\";\n\n/** The console methods this capture can wrap. */\nconst METHODS: readonly CapturedConsoleMethod[] = [\"error\", \"warn\", \"info\", \"log\"];\n\n/** Methods that `capture.console: true` wraps. */\nconst DEFAULT_METHODS: readonly CapturedConsoleMethod[] = [\"error\", \"warn\"];\n\n/** Signature of a console method. */\ntype ConsoleFn = (...args: unknown[]) => void;\n\n/** A wrapper's record function. Uninstall sets it to null. */\ninterface Target {\n /** Records one call, or null after uninstall. */\n record: ((args: unknown[]) => void) | null;\n}\n\n/** A wrapper's target, plus the function that undoes its patch. */\ninterface Wrapped {\n /** The wrapper's target. */\n target: Target;\n /** Puts the original back if the method still holds the wrapper. Returns true if it did. */\n restore: () => boolean;\n}\n\n/**\n * Builds a wrapper that calls the original first, then the target.\n * The wrapper doesn't close over the capture, so one that stays in place keeps no runtime alive.\n * @param original The method that was in place before the wrap.\n * @param target The wrapper's target.\n * @returns The wrapper.\n */\nfunction makeWrapper(original: ConsoleFn, target: Target): ConsoleFn {\n return (...args) => {\n // Call the original first, so devtools shows the same text even when the record fails.\n Reflect.apply(original, console, args);\n\n // Skip the lines the library itself prints.\n if (isLibraryConsole()) {\n return;\n }\n\n target.record?.(args);\n };\n}\n\n/** Wraps the selected console methods and records every call as a record or a breadcrumb. */\nexport class ConsoleCapture implements Capture {\n /** Capture module identifier. */\n readonly name = \"console\";\n\n /** Active wrappers. A wrapper that isn't in this map only calls the original. */\n private readonly wrapped = new Map<CapturedConsoleMethod, Wrapped>();\n\n /** Guards against wrapping a method twice. */\n private installed = false;\n\n /** This capture's own rate limit, so console noise can't eat the error capture's allowance. */\n private readonly window: StormWindow = { start: 0, count: 0 };\n\n /**\n * @param ctx Capture context: configuration, diagnostics, logger and breadcrumbs.\n */\n constructor(private readonly ctx: CaptureContext) {}\n\n /** Wraps every selected method. */\n install(): void {\n // Some worker realms don't define console, so guard against a missing one.\n if (this.installed || typeof console === \"undefined\") {\n return;\n }\n this.installed = true;\n\n for (const method of this.readMethods()) {\n this.wrap(method);\n }\n }\n\n /** Restores every method that still holds this capture's wrapper. */\n uninstall(): void {\n if (!this.installed) {\n return;\n }\n this.installed = false;\n\n for (const [method, { target, restore }] of this.wrapped) {\n target.record = null;\n\n if (restore()) {\n continue;\n }\n\n // Restoring here would remove the other script's wrapper, so leave it. Our wrapper now\n // only calls the original.\n this.ctx.diagnostics.report(\n \"capture.install_failed\",\n `Another script wrapped console.${method} after the library. The library leaves that wrapper in place.`,\n );\n }\n\n this.wrapped.clear();\n }\n\n /**\n * Reads the methods from the configuration and reports any value it can't use.\n * @returns Methods to wrap, with no duplicates.\n */\n private readMethods(): readonly CapturedConsoleMethod[] {\n const { console: setting } = this.ctx.config.capture;\n\n if (setting === true) {\n return DEFAULT_METHODS;\n }\n\n const levels: unknown = isObject(setting) ? setting.levels : undefined;\n\n if (\n Array.isArray(levels) &&\n levels.every((method: unknown) => METHODS.includes(method as CapturedConsoleMethod))\n ) {\n return [...new Set(levels as CapturedConsoleMethod[])];\n }\n\n this.ctx.diagnostics.report(\n \"config.invalid\",\n 'capture.console must be true or an object with a list of \"error\", \"warn\", \"info\" and \"log\" in levels. The console capture is off.',\n );\n return [];\n }\n\n /**\n * Replaces one console method with a wrapper that calls the original first.\n * @param method Console method to wrap.\n */\n private wrap(method: CapturedConsoleMethod): void {\n const target: Target = {\n record: (args) => {\n // The scope keeps a console call inside the record path from being captured again.\n runAsLibraryConsole(() => {\n this.ctx.diagnostics.guard(\n \"capture.record_failed\",\n `The library could not record a console.${method} call.`,\n () => {\n this.record(method, args);\n },\n );\n });\n },\n };\n\n // patch keeps the unbound method, so uninstall restores the same function, not a bound copy.\n const restore = patch(console, method, (original) => makeWrapper(original, target));\n this.wrapped.set(method, { target, restore });\n }\n\n /**\n * Records one console call.\n * @param method The console method that was called.\n * @param args The call's arguments.\n */\n private record(method: CapturedConsoleMethod, args: unknown[]): void {\n // Duck typing also finds an error from another realm, which fails `instanceof Error`.\n const errorAt = args.findIndex((arg) => isErrorLike(arg));\n const textAt = args.findIndex((arg) => typeof arg === \"string\");\n const error = args[errorAt] as ErrorLike | undefined;\n const message = (args[textAt] as string | undefined) ?? error?.message ?? `console.${method}`;\n\n if (method === \"info\" || method === \"log\") {\n this.ctx.breadcrumbs.push({\n t: Date.now(),\n category: \"console\",\n message: truncate(message, CONSOLE_BREADCRUMB_MAX_CHARS),\n data: { \"console.method\": method },\n });\n return;\n }\n\n const { diagnostics, logger } = this.ctx;\n\n if (\n !allowInWindow(\n this.window,\n this.ctx.config.captureLimits.consolePerWindow,\n diagnostics,\n \"console records\",\n this.ctx.config.captureLimits.windowMs,\n )\n ) {\n return;\n }\n\n // The record builder sanitizes the arguments. A warn record keeps its Error among them.\n const used = method === \"error\" ? [textAt, errorAt] : [textAt];\n const rest = args.filter((_, index) => !used.includes(index));\n const attrs: Record<string, unknown> = { \"console.method\": method };\n\n if (rest.length > 0) {\n attrs[\"console.args\"] = rest;\n }\n\n if (method === \"warn\") {\n logger.warn(message, attrs);\n return;\n }\n\n logger.error(message, error, { ...attrs, \"error.captured_by\": \"console.error\" });\n }\n}\n"],"mappings":";;;;;;;;AAeA,IAAMO,IAA4C;CAAC;CAAS;CAAQ;CAAQ;AAAK,GAG3EC,IAAoD,CAAC,SAAS,MAAM;AA0B1E,SAASC,EAAY,GAAqB,GAA2B;CACnE,QAAQ,GAAGC,MAAS;EAKlB,AAHA,QAAQ,MAAMC,GAAU,SAASD,CAAI,GAGjCR,EAAiB,KAIrBU,EAAO,SAASF,CAAI;CACtB;AACF;AAGA,IAAaG,IAAb,MAA+C;CAgB7C,Y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IAAS,MAAaN,EAAYE,GAAUC,CAAM,CAAC;EAClF,KAAK,QAAQ,IAAIG,GAAQ;GAAE;GAAQ;EAAQ,CAAC;CAC9C;CAOA,OAAe,GAA+B,GAAuB;EAEnE,IAAMI,IAAUT,EAAK,WAAW,MAAQV,EAAYoB,CAAG,CAAC,GAClDC,IAASX,EAAK,WAAW,MAAQ,OAAOU,KAAQ,QAAQ,GACxDE,IAAQZ,EAAKS,IACbI,IAAWb,EAAKW,MAAkCC,GAAO,WAAW,WAAWP;EAErF,IAAIA,MAAW,UAAUA,MAAW,OAAO;GACzC,KAAK,IAAI,YAAY,KAAK;IACxB,GAAG,KAAK,IAAI;IACZ,UAAU;IACV,SAASX,EAASmB,GAAA,GAAqC;IACvD,MAAM,EAAE,kBAAkBR,EAAO;GACnC,CAAC;GACD;EACF;EAEA,IAAM,EAAE,gBAAa,cAAW,KAAK;EAErC,IACE,CAACV,EACC,KAAK,QACL,KAAK,IAAI,OAAO,cAAc,kBAC9BmB,GACA,mBACA,KAAK,IAAI,OAAO,cAAc,QAChC,GAEA;EAIF,IAAMC,IAAOV,MAAW,UAAU,CAACM,GAAQF,CAAO,IAAI,CAACE,CAAM,GACvDK,IAAOhB,EAAK,QAAQ,GAAG,MAAU,CAACe,EAAK,SAASE,CAAK,CAAC,GACtDC,IAAiC,EAAE,kBAAkBb,EAAO;EAMlE,AAJIW,EAAK,SAAS,MAChB,EAAM,kBAAkBA,IAGtBX,MAAW,SACbc,EAAO,KAAKN,GAASK,CAAK,IAI5BC,EAAO,MAAMN,GAASD,GAAO;GAAE,GAAGM;GAAO,qBAAqB;EAAgB,CAAC;CACjF;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./error-like-gGRx2s36.cjs"),t=require("./guards-EjG3ahFp.cjs"),n=require("./library-console-DJUQzcgM.cjs"),r=require("./patch-BX8KrPCT.cjs"),i=require("./sanitize-Qj6LuZqp.cjs"),a=require("./storm-BHgI12iS.cjs"),o=require("./defineProperty-X1c4tIPD.cjs");var s=[`error`,`warn`,`info`,`log`],c=[`error`,`warn`];function l(e,t){return(...r)=>{Reflect.apply(e,console,r),n.t()||t.record?.(r)}}var u=class{constructor(e){o.t(this,`ctx`,void 0),o.t(this,`name`,`console`),o.t(this,`wrapped`,new Map),o.t(this,`installed`,!1),o.t(this,`window`,{start:0,count:0}),this.ctx=e}install(){if(!(this.installed||typeof console>`u`)){this.installed=!0;for(let e of this.readMethods())this.wrap(e)}}uninstall(){if(this.installed){this.installed=!1;for(let[e,{target:t,restore:n}]of this.wrapped)t.record=null,n()||this.ctx.diagnostics.report(`capture.install_failed`,`Another script wrapped console.${e} after the library. The library leaves that wrapper in place.`);this.wrapped.clear()}}readMethods(){let{console:e}=this.ctx.config.capture;if(e===!0)return c;let n=t.n(e)?e.levels:void 0;return Array.isArray(n)&&n.every(e=>s.includes(e))?[...new Set(n)]:(this.ctx.diagnostics.report(`config.invalid`,`capture.console must be true or an object with a list of "error", "warn", "info" and "log" in levels. The console capture is off.`),[])}wrap(e){let t={record:t=>{n.n(()=>{this.ctx.diagnostics.guard(`capture.record_failed`,`The library could not record a console.${e} call.`,()=>{this.record(e,t)})})}},i=r.t(console,e,e=>l(e,t));this.wrapped.set(e,{target:t,restore:i})}record(t,n){let r=n.findIndex(t=>e.r(t)),o=n.findIndex(e=>typeof e==`string`),s=n[r],c=n[o]??s?.message??`console.${t}`;if(t===`info`||t===`log`){this.ctx.breadcrumbs.push({t:Date.now(),category:`console`,message:i.i(c,200),data:{"console.method":t}});return}let{diagnostics:l,logger:u}=this.ctx;if(!a.t(this.window,this.ctx.config.captureLimits.consolePerWindow,l,`console records`,this.ctx.config.captureLimits.windowMs))return;let d=t===`error`?[o,r]:[o],f=n.filter((e,t)=>!d.includes(t)),p={"console.method":t};f.length>0&&(p[`console.args`]=f),t===`warn`?u.warn(c,p):u.error(c,s,{...p,"error.captured_by":`console.error`})}};exports.ConsoleCapture=u;
2
+ //# sourceMappingURL=console-Dkxs6IVQ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-Dkxs6IVQ.cjs","names":["isLibraryConsole","isObject","patch","isErrorLike","truncate","allowInWindow","require_error_like","require_guards","require_library_console","require_patch","require_sanitize","require_storm","require_defineProperty","METHODS","DEFAULT_METHODS","makeWrapper","args","original","target","ConsoleCapture","ctx","method","restore","setting","levels","errorAt","arg","textAt","error","message","diagnostics","used","rest","index","attrs","logger"],"sources":["../src/capture/console.ts"],"sourcesContent":["// src/capture/console.ts\n//\n// Records the app's own console calls, because third-party code often reports a fault only there.\n\nimport { CONSOLE_BREADCRUMB_MAX_CHARS } from \"../constants\";\nimport type { CapturedConsoleMethod } from \"../models/config\";\nimport { type ErrorLike, isErrorLike } from \"../utils/error-like\";\nimport { isObject } from \"../utils/guards\";\nimport { isLibraryConsole, runAsLibraryConsole } from \"../utils/library-console\";\nimport { patch } from \"../utils/patch\";\nimport { truncate } from \"../utils/sanitize\";\nimport { allowInWindow, type StormWindow } from \"./storm\";\nimport type { Capture, CaptureContext } from \"./types\";\n\n/** The console methods this capture can wrap. */\nconst METHODS: readonly CapturedConsoleMethod[] = [\"error\", \"warn\", \"info\", \"log\"];\n\n/** Methods that `capture.console: true` wraps. */\nconst DEFAULT_METHODS: readonly CapturedConsoleMethod[] = [\"error\", \"warn\"];\n\n/** Signature of a console method. */\ntype ConsoleFn = (...args: unknown[]) => void;\n\n/** A wrapper's record function. Uninstall sets it to null. */\ninterface Target {\n /** Records one call, or null after uninstall. */\n record: ((args: unknown[]) => void) | null;\n}\n\n/** A wrapper's target, plus the function that undoes its patch. */\ninterface Wrapped {\n /** The wrapper's target. */\n target: Target;\n /** Puts the original back if the method still holds the wrapper. Returns true if it did. */\n restore: () => boolean;\n}\n\n/**\n * Builds a wrapper that calls the original first, then the target.\n * The wrapper doesn't close over the capture, so one that stays in place keeps no runtime alive.\n * @param original The method that was in place before the wrap.\n * @param target The wrapper's target.\n * @returns The wrapper.\n */\nfunction makeWrapper(original: ConsoleFn, target: Target): ConsoleFn {\n return (...args) => {\n // Call the original first, so devtools shows the same text even when the record fails.\n Reflect.apply(original, console, args);\n\n // Skip the lines the library itself prints.\n if (isLibraryConsole()) {\n return;\n }\n\n target.record?.(args);\n };\n}\n\n/** Wraps the selected console methods and records every call as a record or a breadcrumb. */\nexport class ConsoleCapture implements Capture {\n /** Capture module identifier. */\n readonly name = \"console\";\n\n /** Active wrappers. A wrapper that isn't in this map only calls the original. */\n private readonly wrapped = new Map<CapturedConsoleMethod, Wrapped>();\n\n /** Guards against wrapping a method twice. */\n private installed = false;\n\n /** This capture's own rate limit, so console noise can't eat the error capture's allowance. */\n private readonly window: StormWindow = { start: 0, count: 0 };\n\n /**\n * @param ctx Capture context: configuration, diagnostics, logger and breadcrumbs.\n */\n constructor(private readonly ctx: CaptureContext) {}\n\n /** Wraps every selected method. */\n install(): void {\n // Some worker realms don't define console, so guard against a missing one.\n if (this.installed || typeof console === \"undefined\") {\n return;\n }\n this.installed = true;\n\n for (const method of this.readMethods()) {\n this.wrap(method);\n }\n }\n\n /** Restores every method that still holds this capture's wrapper. */\n uninstall(): void {\n if (!this.installed) {\n return;\n }\n this.installed = false;\n\n for (const [method, { target, restore }] of this.wrapped) {\n target.record = null;\n\n if (restore()) {\n continue;\n }\n\n // Restoring here would remove the other script's wrapper, so leave it. Our wrapper now\n // only calls the original.\n this.ctx.diagnostics.report(\n \"capture.install_failed\",\n `Another script wrapped console.${method} after the library. The library leaves that wrapper in place.`,\n );\n }\n\n this.wrapped.clear();\n }\n\n /**\n * Reads the methods from the configuration and reports any value it can't use.\n * @returns Methods to wrap, with no duplicates.\n */\n private readMethods(): readonly CapturedConsoleMethod[] {\n const { console: setting } = this.ctx.config.capture;\n\n if (setting === true) {\n return DEFAULT_METHODS;\n }\n\n const levels: unknown = isObject(setting) ? setting.levels : undefined;\n\n if (\n Array.isArray(levels) &&\n levels.every((method: unknown) => METHODS.includes(method as CapturedConsoleMethod))\n ) {\n return [...new Set(levels as CapturedConsoleMethod[])];\n }\n\n this.ctx.diagnostics.report(\n \"config.invalid\",\n 'capture.console must be true or an object with a list of \"error\", \"warn\", \"info\" and \"log\" in levels. The console capture is off.',\n );\n return [];\n }\n\n /**\n * Replaces one console method with a wrapper that calls the original first.\n * @param method Console method to wrap.\n */\n private wrap(method: CapturedConsoleMethod): void {\n const target: Target = {\n record: (args) => {\n // The scope keeps a console call inside the record path from being captured again.\n runAsLibraryConsole(() => {\n this.ctx.diagnostics.guard(\n \"capture.record_failed\",\n `The library could not record a console.${method} call.`,\n () => {\n this.record(method, args);\n },\n );\n });\n },\n };\n\n // patch keeps the unbound method, so uninstall restores the same function, not a bound copy.\n const restore = patch(console, method, (original) => makeWrapper(original, target));\n this.wrapped.set(method, { target, restore });\n }\n\n /**\n * Records one console call.\n * @param method The console method that was called.\n * @param args The call's arguments.\n */\n private record(method: CapturedConsoleMethod, args: unknown[]): void {\n // Duck typing also finds an error from another realm, which fails `instanceof Error`.\n const errorAt = args.findIndex((arg) => isErrorLike(arg));\n const textAt = args.findIndex((arg) => typeof arg === \"string\");\n const error = args[errorAt] as ErrorLike | undefined;\n const message = (args[textAt] as string | undefined) ?? error?.message ?? `console.${method}`;\n\n if (method === \"info\" || method === \"log\") {\n this.ctx.breadcrumbs.push({\n t: Date.now(),\n category: \"console\",\n message: truncate(message, CONSOLE_BREADCRUMB_MAX_CHARS),\n data: { \"console.method\": method },\n });\n return;\n }\n\n const { diagnostics, logger } = this.ctx;\n\n if (\n !allowInWindow(\n this.window,\n this.ctx.config.captureLimits.consolePerWindow,\n diagnostics,\n \"console records\",\n this.ctx.config.captureLimits.windowMs,\n )\n ) {\n return;\n }\n\n // The record builder sanitizes the arguments. A warn record keeps its Error among them.\n const used = method === \"error\" ? [textAt, errorAt] : [textAt];\n const rest = args.filter((_, index) => !used.includes(index));\n const attrs: Record<string, unknown> = { \"console.method\": method };\n\n if (rest.length > 0) {\n attrs[\"console.args\"] = rest;\n }\n\n if (method === \"warn\") {\n logger.warn(message, attrs);\n return;\n }\n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iBAAkBb,CAAO,EAE9DW,EAAK,OAAS,IAChB,EAAM,gBAAkBA,GAGtBX,IAAW,OACbc,EAAO,KAAKN,EAASK,CAAK,EAI5BC,EAAO,MAAMN,EAASD,EAAO,CAAE,GAAGM,EAAO,oBAAqB,eAAgB,CAAC,CACjF,CACF,E"}
@@ -0,0 +1,357 @@
1
+ // src/constants.ts
2
+ var ee = "[ui-observability]", te = 1e3, ne = "ui-observability.session", e = "ui-observability.tab", t = "ui-observability.alive", re = 3e4, n = 18e5, ie = 6e4, ae = /OpenFin/i, oe = /\bwv\b/, se = /\b(iPhone|iPad|iPod)\b/, ce = /\bMacintosh\b/, le = /\bMobile\b/, ue = "AppleWebKit", de = "Safari/", r = 55296, i = 56319, a = 2048, o = {
3
+ TRACE: 1,
4
+ DEBUG: 5,
5
+ INFO: 9,
6
+ WARN: 13,
7
+ ERROR: 17,
8
+ FATAL: 21
9
+ }, s = o, c = "log.type", l = "log.seq", u = "app.namespace", d = "page.url", f = "url.full", p = "journey.id", m = "journey.name", h = "journey.parent_id", g = "uiobs.sanitize_failed", _ = "error.data", v = "breadcrumbs", y = "uiobs.attributes_dropped", b = "uiobs.attributes_bytes", x = "uiobs.clock_offset_ms", S = "uiobs.debug_buffer", C = "service.name", w = "service.version", T = "deployment.environment", E = "telemetry.sdk.name", D = "telemetry.sdk.version", O = "telemetry.sdk.language", k = "host.platform", A = "session.id", j = "tab.id", M = "context.id", N = "browser.user_agent", P = "openfin.uuid", F = "openfin.name", I = "@utk09/ui-observability", L = "1.1.0", R = "webjs", z = "otlp", B = { WARN: "warning" }, V = "8.10.0", H = "application/json", fe = "application/x-ndjson", pe = 1000000n, me = /^\d+$/, he = "Content-Type", ge = "Content-Encoding", _e = "Retry-After", ve = "X-UiObs-Batch-Id", ye = "X-UiObs-Attempt", be = "X-UiObs-Sampling", xe = "Date", Se = "gzip", Ce = 1e3, we = 6e4, Te = 16384, Ee = "text/plain;charset=UTF-8", De = "uiobs_batch_id", Oe = "uiobs_exit", ke = "ui-observability.batch.", Ae = "ui-observability.emergency.", je = "ui-observability.probe", Me = "QuotaExceededError", Ne = "batches", Pe = "createdAt", Fe = "indexeddb", Ie = "localstorage", Le = "memory", Re = "none", ze = "ui-observability.drain", Be = "ui-observability.emergency", Ve = "ui-observability.journey", He = /* @__PURE__ */ RegExp("^[\\w.:-]{1,64}$"), Ue = 3e5, We = 2e3, Ge = "uiObsJourney", Ke = /\+/g, qe = /\//g, Je = /=+$/, Ye = /-/g, Xe = /_/g, U = 3e5, Ze = "traceparent", Qe = 2166136261, $e = 16777619, et = 4294967295, tt = [
10
+ "action",
11
+ "metric",
12
+ "span"
13
+ ], W = "metric", nt = "action", rt = "span", it = "ui-observability/2", at = {
14
+ hello: "ui-observability.message.hello",
15
+ welcome: "ui-observability.message.welcome",
16
+ records: "ui-observability.message.records",
17
+ securityContext: "ui-observability.message.security-context",
18
+ journey: "ui-observability.message.journey",
19
+ journeyRequest: "ui-observability.message.journey-request",
20
+ sampling: "ui-observability.message.sampling",
21
+ samplingRequest: "ui-observability.message.sampling-request",
22
+ tab: "ui-observability.message.tab",
23
+ flushRequest: "ui-observability.message.flush-request",
24
+ flushResult: "ui-observability.message.flush-result"
25
+ }, ot = "ui-observability.runtime", st = "ui-observability.stopped", ct = "ui-observability.observed-windows", lt = "ui-observability.request-scope", ut = "ui-observability.console-scope", dt = "ui-observability.transport-calls", G = 1e4, ft = "data-observability-action", pt = "[data-observability-ignore]", mt = "[data-observability-live]", ht = ["name", "type"], gt = 1e3, _t = 1e3, vt = "a, button, summary, input[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"], [role=\"button\"], [role=\"link\"], [role=\"menuitem\"], [role=\"tab\"]", K = {
26
+ namespace: "color:#888",
27
+ TRACE: "color:#888;font-weight:bold",
28
+ DEBUG: "color:#888;font-weight:bold",
29
+ INFO: "color:#1e6fd9;font-weight:bold",
30
+ WARN: "color:#c77700;font-weight:bold",
31
+ ERROR: "color:#d32f2f;font-weight:bold",
32
+ FATAL: "color:#d32f2f;font-weight:bold"
33
+ }, yt = 6e4, bt = "uiobs.capture", xt = "uiobs.storage", St = "uiobs.diagnostics", Ct = "count", wt = "uiobs.metrics", Tt = "otel.metric.overflow", Et = [
34
+ 0,
35
+ 5,
36
+ 10,
37
+ 25,
38
+ 50,
39
+ 75,
40
+ 100,
41
+ 250,
42
+ 500,
43
+ 750,
44
+ 1e3,
45
+ 2500,
46
+ 5e3,
47
+ 7500,
48
+ 1e4
49
+ ], q = {
50
+ start: "metric.start_time_unix_nano",
51
+ attributeKeys: "metric.attribute_keys",
52
+ count: "metric.count",
53
+ sum: "metric.sum",
54
+ min: "metric.min",
55
+ max: "metric.max",
56
+ bounds: "metric.bounds",
57
+ buckets: "metric.bucket_counts"
58
+ }, Dt = [
59
+ "metric.name",
60
+ "metric.value",
61
+ "metric.unit",
62
+ "metric.type",
63
+ ...Object.values(q)
64
+ ], Ot = 67108863, kt = "ui.profile.duration", At = {
65
+ probe: "profile.probe",
66
+ sampleEvery: "profile.sample_every",
67
+ p50: "profile.p50",
68
+ p90: "profile.p90",
69
+ p99: "profile.p99",
70
+ overhead: "profile.overhead_ns",
71
+ selfP99: "profile.self_p99",
72
+ framePhase: "profile.frame_phase"
73
+ }, jt = "ui.profile.frame.duration", Mt = "frame.interval", Nt = "The library could not read the options of an instrument. The library uses the defaults.", Pt = "replay.id", Ft = "data-observability-unmask", It = 1024, Lt = "ui-observability.profiler", Rt = 1e5, zt = "uiobs.traces", Bt = {
74
+ kind: "span.kind",
75
+ parentId: "span.parent_id",
76
+ start: "span.start_time_unix_nano",
77
+ end: "span.end_time_unix_nano",
78
+ status: "span.status",
79
+ linkTraceId: "span.link.trace_id",
80
+ linkSpanId: "span.link.span_id"
81
+ }, J = "ui-observability.transport/1", Y = {
82
+ connect: "connect",
83
+ ready: "ready",
84
+ send: "send",
85
+ result: "result",
86
+ cancel: "cancel"
87
+ }, Vt = {
88
+ p: J,
89
+ v: L,
90
+ t: Y.ready,
91
+ ok: !1
92
+ }, Ht = 1e3, Ut = 1e3, Wt = 1e3, Gt = 1e3, Kt = "Server-Timing", qt = 4096, Jt = [
93
+ "errors",
94
+ "rejections",
95
+ "resourceErrors",
96
+ "fetch",
97
+ "xhr",
98
+ "httpMetrics",
99
+ "navigation",
100
+ "webVitals",
101
+ "longFrames",
102
+ "interactions",
103
+ "console",
104
+ "webSocket",
105
+ "uncleanExit",
106
+ "userTiming",
107
+ "serverTiming",
108
+ "reports",
109
+ "resourceTiming",
110
+ "lifecycle"
111
+ ], Yt = "unknown-service", Xt = 4096, Zt = 36e5, Qt = 3e4, $t = [
112
+ "contextProvider",
113
+ "redact",
114
+ "onDiagnostic",
115
+ "onDrop",
116
+ "headers",
117
+ "serializer",
118
+ "otelLoader",
119
+ "transport",
120
+ "transportOnExit",
121
+ "transportWorker"
122
+ ], en = [
123
+ "captureLimits",
124
+ "metadata",
125
+ "storage",
126
+ "diagnostics",
127
+ "correlation",
128
+ "metrics",
129
+ "buffering",
130
+ "delivery",
131
+ "loggerCache",
132
+ "securityContext",
133
+ "sampling",
134
+ "bus",
135
+ "journey",
136
+ "batching",
137
+ "retention",
138
+ "limits",
139
+ "capture",
140
+ "debugBuffer",
141
+ "profiler",
142
+ "replay"
143
+ ], tn = {
144
+ captureLimits: [],
145
+ metadata: [],
146
+ storage: [],
147
+ diagnostics: [],
148
+ correlation: [],
149
+ metrics: [],
150
+ buffering: [],
151
+ delivery: [],
152
+ loggerCache: [],
153
+ securityContext: [],
154
+ sampling: [],
155
+ bus: [],
156
+ journey: [],
157
+ batching: [],
158
+ retention: [],
159
+ limits: [],
160
+ capture: ["urlTransform"],
161
+ debugBuffer: [],
162
+ profiler: [],
163
+ replay: []
164
+ }, nn = "DEBUG", rn = 2e3, an = 1e4, X = 15e3, on = 1024, sn = "UiObservability", cn = {
165
+ maxBatches: 500,
166
+ maxAgeMs: 864e5,
167
+ maxAttempts: 5
168
+ }, ln = 1e4, un = 5e3, dn = 6e5, fn = 2e3, pn = 6e4, mn = 3e4, Z = 18e5, hn = "__uiobs_journey", gn = "ui_observability_control", _n = 1500, vn = 1e3, yn = .9, bn = 2e3, xn = 5e3, Q = {
169
+ maxBodyChars: 4096,
170
+ maxAttributeChars: 8192,
171
+ maxAttributeCount: 128,
172
+ maxStackChars: 8192,
173
+ maxDepth: 6,
174
+ maxArrayLength: 100,
175
+ maxNodes: 1e4,
176
+ maxRecordBytes: 32768
177
+ }, $ = {
178
+ endpoint: null,
179
+ metricsEndpoint: null,
180
+ tracesEndpoint: null,
181
+ headers: void 0,
182
+ credentials: "omit",
183
+ transport: void 0,
184
+ transportOnExit: void 0,
185
+ transportWorker: void 0
186
+ }, Sn = Object.keys($), Cn = {
187
+ captureLimits: {
188
+ breadcrumbs: 50,
189
+ errorDedupeMs: xn,
190
+ errorsPerWindow: 20,
191
+ consolePerWindow: 20,
192
+ longFramesPerWindow: 20,
193
+ webSocketPerWindow: 20,
194
+ reportsPerWindow: 20,
195
+ resourcesPerWindow: 100,
196
+ lifecyclePerWindow: 20,
197
+ windowMs: G
198
+ },
199
+ metadata: {
200
+ pageUrl: !0,
201
+ userAgent: !0,
202
+ openfin: !0,
203
+ clockOffset: !0
204
+ },
205
+ debugBuffer: {
206
+ enabled: !1,
207
+ maxRecords: 200,
208
+ maxAgeMs: 6e4
209
+ },
210
+ profiler: {
211
+ enabled: !1,
212
+ maxProbes: 64,
213
+ framePhases: !1,
214
+ framePacing: !1
215
+ },
216
+ replay: {
217
+ enabled: !1,
218
+ mode: "onError",
219
+ endpoint: null,
220
+ requireConsent: !1,
221
+ bufferMs: 6e4,
222
+ maxBufferBytes: 1e7,
223
+ afterErrorMs: 5e3,
224
+ uploadsPerWindow: 3,
225
+ uploadWindowMs: G,
226
+ maxSegmentEvents: 200,
227
+ maxSegmentBytes: 512e3,
228
+ flushIntervalMs: 2e3,
229
+ maxQueueBytes: 2e7,
230
+ maxAttempts: 3,
231
+ maskText: !0,
232
+ maskInputs: !0,
233
+ recordCanvas: !1,
234
+ maskSelectors: [],
235
+ blockSelectors: [],
236
+ loader: null,
237
+ onSegment: null,
238
+ headers: null,
239
+ plugins: [],
240
+ recordOptions: {}
241
+ },
242
+ storage: {
243
+ backend: "auto",
244
+ namespace: "",
245
+ requestPersistent: !1
246
+ },
247
+ diagnostics: {
248
+ throttleMs: 1e3,
249
+ consoleFallback: !1,
250
+ records: !1
251
+ },
252
+ correlation: {
253
+ sessionIdleMs: n,
254
+ traceMaxAgeMs: U
255
+ },
256
+ metrics: {
257
+ intervalMs: an,
258
+ maxSeries: 100,
259
+ maxInstruments: 1e3,
260
+ maxHistogramBoundaries: 50
261
+ },
262
+ buffering: {
263
+ maxPendingRecords: 1e4,
264
+ maxPendingBytes: 16777216,
265
+ maxHeldRecords: 500,
266
+ overflow: "drop-oldest"
267
+ },
268
+ delivery: {
269
+ requestTimeoutMs: X,
270
+ maxConcurrentRequests: 2,
271
+ retryBaseDelayMs: fn,
272
+ retryMaxDelayMs: pn,
273
+ priority: "low"
274
+ },
275
+ lockConfiguration: !1,
276
+ loggerCache: { maxEntries: 256 },
277
+ securityContext: {
278
+ id: "",
279
+ isolation: !0
280
+ },
281
+ endpoint: "",
282
+ metricsEndpoint: null,
283
+ tracesEndpoint: null,
284
+ serviceName: "",
285
+ serviceVersion: "",
286
+ environment: "",
287
+ enabled: !0,
288
+ payloadMode: "copy",
289
+ minLevel: "INFO",
290
+ minLevels: {},
291
+ processors: [],
292
+ compression: "gzip",
293
+ credentials: "omit",
294
+ identity: "storage",
295
+ sampling: {
296
+ defaultRate: 1,
297
+ rates: {},
298
+ alwaysSampleTypes: ["action"],
299
+ alwaysSampleFrom: "ERROR",
300
+ errorCeiling: 500,
301
+ errorCeilingWindowMs: G,
302
+ remote: !1,
303
+ remoteMaxRate: 1
304
+ },
305
+ bus: {
306
+ mode: "auto",
307
+ trustedOrigins: [],
308
+ openFinRole: "auto",
309
+ sourcePolicy: "registered",
310
+ maxMessageBytes: 262144,
311
+ maxRecordsPerMessage: 100,
312
+ maxMessagesPerSecond: 100
313
+ },
314
+ journey: {
315
+ scope: "auto",
316
+ maxAgeMs: Z
317
+ },
318
+ batching: {
319
+ logFlushIntervalMs: rn,
320
+ logBatchSize: 100,
321
+ metricBatchSize: 500
322
+ },
323
+ retention: { ...cn },
324
+ limits: { ...Q },
325
+ capture: {
326
+ errors: !0,
327
+ rejections: !0,
328
+ resourceErrors: !1,
329
+ fetch: !1,
330
+ xhr: !1,
331
+ httpMetrics: !0,
332
+ interactions: !1,
333
+ navigation: !1,
334
+ webVitals: !1,
335
+ longFrames: !1,
336
+ console: !1,
337
+ fullUrls: !1,
338
+ ignoreUrls: [],
339
+ propagateTraceHeaderTo: [],
340
+ webSocket: !1,
341
+ uncleanExit: !1,
342
+ userTiming: !1,
343
+ remoteToggles: [],
344
+ serverTiming: !1,
345
+ reports: !1,
346
+ resourceTiming: !1,
347
+ lifecycle: !1,
348
+ plugins: []
349
+ },
350
+ consoleOutput: {
351
+ level: null,
352
+ styles: K
353
+ }
354
+ };
355
+ export { V as $, je as $n, It as $t, _n as A, D as An, s as At, fe as B, qt as Bn, q as Bt, Je as C, C as Cn, se as Ct, we as D, j as Dn, Ve as Dt, ke as E, Gt as En, Z as Et, on as F, ot as Fn, W as Ft, Cn as G, Bt as Gn, pe as Gt, vt as H, ne as Hn, Ce as Ht, en as I, st as In, rt as It, Wt as J, xt as Jn, Ge as Jt, Ct as K, sn as Kn, ht as Kt, nn as L, de as Ln, ce as Lt, it as M, mn as Mn, ee as Mt, at as N, Sn as Nn, lt as Nt, gn as O, O as On, hn as Ot, bt as P, $ as Pn, nt as Pt, B as Q, Re as Qn, Lt as Qt, K as R, z as Rn, Et as Rt, Xe as S, P as Sn, Nt as St, qe as T, A as Tn, He as Tt, mt as U, ie as Un, le as Ut, Ee as V, n as Vn, wt as Vt, _t as W, o as Wn, me as Wt, te as X, Ie as Xn, ae as Xt, St as Y, Fe as Yn, We as Yt, ze as Z, Le as Zn, Rt as Zt, Tt as _, N as _n, Ht as _r, i as _t, u as a, De as an, U as ar, dn as at, f as b, k as bn, Pe as bt, v as c, gt as cn, J as cr, $e as ct, _ as d, Xt as dn, et as dr, ve as dt, jt as en, e as er, Be as et, p as f, Zt as fn, $t as fr, ge as ft, c as g, X as gn, ue as gr, be as gt, l as h, Ft as hn, a as hr, _e as ht, oe as i, kt as in, Ze as ir, yn as it, bn as j, Te as jn, ut as jt, vn as k, E as kn, tt as kt, x as l, Q as ln, Vt as lr, yt as lt, h as m, Pt as mn, Yt as mr, xe as mt, t as n, At as nn, I as nr, Se as nt, b as o, Oe as on, zt as or, un as ot, m as p, Qt as pn, tn as pr, he as pt, Ut as q, ln as qn, ct as qt, re as r, Ot as rn, L as rr, G as rt, y as s, Me as sn, dt as sr, Qe as st, ft as t, Mt as tn, R as tr, Ae as tt, S as u, Jt as un, Y as ur, ye as ut, d as v, M as vn, r as vt, Ke as w, w as wn, Ue as wt, Ye as x, F as xn, Ne as xt, g as y, T as yn, pt as yt, H as z, Kt as zn, Dt as zt };
356
+
357
+ //# sourceMappingURL=constants-BwJDXzj6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-BwJDXzj6.js","names":["LIBRARY_LOG_PREFIX","DIAGNOSTIC_THROTTLE_MS","SESSION_ID_KEY","TAB_ID_KEY","ALIVE_KEY","ALIVE_UPDATE_MS","SESSION_IDLE_MS","SESSION_TOUCH_MS","OPENFIN_UA_PATTERN","ANDROID_WEBVIEW_UA_PATTERN","IOS_DEVICE_UA_PATTERN","MACINTOSH_UA_PATTERN","MOBILE_UA_PATTERN","WEBKIT_UA_TOKEN","SAFARI_UA_TOKEN","HIGH_SURROGATE_MIN","HIGH_SURROGATE_MAX","UTF8_TWO_BYTE_CEILING","SEVERITY_NUMBER","LEVEL_ORDER","ATTR_LOG_TYPE","ATTR_LOG_SEQ","ATTR_APP_NAMESPACE","ATTR_PAGE_URL","ATTR_URL_FULL","ATTR_JOURNEY_ID","ATTR_JOURNEY_NAME","ATTR_JOURNEY_PARENT_ID","ATTR_SANITIZE_FAILED","ATTR_ERROR_DATA","ATTR_BREADCRUMBS","ATTR_ATTRIBUTES_DROPPED","ATTR_ATTRIBUTES_BYTES","ATTR_CLOCK_OFFSET_MS","ATTR_DEBUG_BUFFER","RESOURCE_SERVICE_NAME","RESOURCE_SERVICE_VERSION","RESOURCE_DEPLOYMENT_ENVIRONMENT","RESOURCE_TELEMETRY_SDK_NAME","RESOURCE_TELEMETRY_SDK_VERSION","RESOURCE_TELEMETRY_SDK_LANGUAGE","RESOURCE_HOST_PLATFORM","RESOURCE_SESSION_ID","RESOURCE_TAB_ID","RESOURCE_CONTEXT_ID","RESOURCE_BROWSER_USER_AGENT","RESOURCE_OPENFIN_UUID","RESOURCE_OPENFIN_NAME","TELEMETRY_SDK_NAME","TELEMETRY_SDK_VERSION","TELEMETRY_SDK_LANGUAGE","SERIALIZER_NAME_OTLP","ECS_LEVEL_NAMES","ECS_VERSION","CONTENT_TYPE_JSON","CONTENT_TYPE_NDJSON","NANOS_PER_MILLI","NANOS_PATTERN","HEADER_CONTENT_TYPE","HEADER_CONTENT_ENCODING","HEADER_RETRY_AFTER","HEADER_BATCH_ID","HEADER_ATTEMPT","HEADER_SAMPLING","HEADER_DATE","ENCODING_GZIP","MILLIS_PER_SECOND","BEACON_LIMIT_BYTES","RESPONSE_BODY_LIMIT_BYTES","CONTENT_TYPE_TEXT_PLAIN","QUERY_PARAM_BATCH_ID","QUERY_PARAM_EXIT_REASON","BATCH_STORAGE_KEY_PREFIX","EMERGENCY_STORAGE_KEY_PREFIX","STORAGE_PROBE_KEY","QUOTA_EXCEEDED_ERROR","INDEXEDDB_STORE_NAME","INDEXEDDB_CREATED_AT_INDEX","STORAGE_NAME_INDEXEDDB","STORAGE_NAME_LOCAL","STORAGE_NAME_MEMORY","STORAGE_NAME_NONE","DRAIN_LOCK_NAME","EMERGENCY_LOCK_NAME","JOURNEY_STORAGE_KEY","JOURNEY_ID_PATTERN","JOURNEY_CLOCK_SKEW_MS","OPENFIN_OPTIONS_TIMEOUT_MS","OPENFIN_JOURNEY_CUSTOM_DATA_KEY","BASE64_PLUS_PATTERN","BASE64_SLASH_PATTERN","BASE64_PADDING_PATTERN","BASE64URL_DASH_PATTERN","BASE64URL_UNDERSCORE_PATTERN","TRACE_MAX_AGE_MS","TRACEPARENT_HEADER","FNV_OFFSET_BASIS","FNV_PRIME","UINT32_MAX","LEVEL_BYPASS_TYPES","LOG_TYPE_METRIC","LOG_TYPE_ACTION","LOG_TYPE_SPAN","BUS_PROTOCOL","BUS_TYPE","RUNTIME_GLOBAL_KEY","RUNTIME_STOPPED_KEY","OBSERVED_WINDOWS_KEY","LIBRARY_REQUEST_KEY","LIBRARY_CONSOLE_KEY","TRANSPORT_CALL_KEY","ERROR_STORM_WINDOW_MS","ACTION_ATTRIBUTE_DEFAULT","IGNORE_SELECTOR","DEAD_CLICK_IGNORE_SELECTOR","NET_CHANGE_ATTRIBUTES","RAGE_CLICK_WINDOW_MS","DEAD_CLICK_MS","DEAD_CLICK_CONTROLS","CONSOLE_DEFAULT_STYLES","GAP_REPORT_THROTTLE_MS","CAPTURE_NAMESPACE","STORAGE_NAMESPACE","DIAGNOSTICS_NAMESPACE","DEFAULT_METRIC_UNIT","METRIC_NAMESPACE","ATTR_METRIC_OVERFLOW","METRIC_DEFAULT_BOUNDARIES","METRIC_KEYS","METRIC_FIELD_KEYS","PROFILE_MAX_US","PROFILE_METRIC_NAME","PROFILE_KEYS","PROFILE_FRAME_METRIC_NAME","PROFILE_FRAME_PROBE","INSTRUMENT_OPTIONS_FAULT","REPLAY_ID_KEY","REPLAY_UNMASK_ATTRIBUTE","PROFILER_PROBE_LIMIT","PROFILER_GLOBAL_KEY","PROFILER_CALIBRATION_PAIRS","TRACE_NAMESPACE","SPAN_KEYS","TRANSPORT_WORKER_PROTOCOL","TRANSPORT_WORKER_TYPE","TRANSPORT_WORKER_REFUSAL","WORKER_REPLY_GRACE_MS","DEFER_IDLE_TIMEOUT_MS","DEFER_QUEUE_LIMIT","RESOURCE_SLOW_MS","SERVER_TIMING_HEADER","SERVER_TIMING_MAX_CHARS","REMOTE_CAPTURE_FLAGS","UNKNOWN_SERVICE_NAME","REMOTE_SAMPLING_MAX_CHARS","REMOTE_SAMPLING_MAX_TTL_MS","REMOTE_SAMPLING_POLL_MS","UNDEFAULTED_CONFIG_KEYS","CONFIG_SECTIONS","UNDEFAULTED_SECTION_KEYS","CONSOLE_DEFAULT_LEVEL","LOG_FLUSH_INTERVAL_MS","METRIC_INTERVAL_MS","REQUEST_TIMEOUT_MS","COMPRESSION_THRESHOLD_BYTES","STORAGE_DB_NAME","STORAGE_LIMITS","STORAGE_DEADLINE_MS","FLUSH_TIMEOUT_MS","FLUSH_TIMEOUT_MAX_MS","RETRY_BASE_DELAY_MS","RETRY_MAX_DELAY_MS","RETRY_IDLE_DELAY_MS","JOURNEY_MAX_AGE_MS","JOURNEY_URL_PARAM","BUS_CHANNEL_NAME","BUS_HANDSHAKE_TIMEOUT_MS","BUS_FLUSH_GAP_MS","FLUSH_REQUEST_SHARE","BUS_MAX_BOOT_BUFFER_ACTIONS","ERROR_DEDUPE_MS","RECORD_LIMITS","ROUTING_RESET","ROUTING_KEYS","DEFAULT_CONFIG"],"sources":["../src/constants.ts"],"sourcesContent":["// src/constants.ts\n//\n// Every limit, threshold, timing window, storage key, pattern and default the\n// library uses.\n\nimport type { ConsoleStyles, ResolvedConfig } from \"./models/config\";\nimport type { LogLevel, LogType } from \"./models/log-record\";\nimport type { StorageLimits } from \"./models/storage\";\n\n// ----------------------------------\n// Library-wide\n// ----------------------------------\n\n/** Prefix on console messages this library writes. */\nexport const LIBRARY_LOG_PREFIX = \"[ui-observability]\";\n\n// ----------------------------------\n// Diagnostics\n// ----------------------------------\n\n/**\n * Throttle window per diagnostic code, in milliseconds. Limits how often an error\n * loop can call the handler.\n */\nexport const DIAGNOSTIC_THROTTLE_MS = 1000;\n\n// ----------------------------------\n// Identity\n// ----------------------------------\n\n/** `localStorage` key for the session id and its last-seen time. */\nexport const SESSION_ID_KEY = \"ui-observability.session\";\n\n/** `sessionStorage` key for the tab id. */\nexport const TAB_ID_KEY = \"ui-observability.tab\";\n\n/** sessionStorage key for a live page's marker. A clean close removes it. */\nexport const ALIVE_KEY = \"ui-observability.alive\";\n\n/** How often the alive marker is updated, in milliseconds. */\nexport const ALIVE_UPDATE_MS = 30_000;\n\n/** Session idle timeout, in milliseconds. */\nexport const SESSION_IDLE_MS = 30 * 60 * 1000;\n\n/** Min gap between session last-seen writes, in milliseconds. */\nexport const SESSION_TOUCH_MS = 60_000;\n\n/** Random id length, in bytes, used when `crypto.randomUUID` is unavailable. */\nexport const ID_BYTE_LENGTH = 16;\n\n/** Distinct values in one byte (256). */\nexport const BYTE_VALUE_COUNT = 256;\n\n// ----------------------------------\n// Platform detection\n// ----------------------------------\n\n/** Matches OpenFin's user agent. */\nexport const OPENFIN_UA_PATTERN = /OpenFin/i;\n\n/** Matches Android's webview token (`wv`). */\nexport const ANDROID_WEBVIEW_UA_PATTERN = /\\bwv\\b/;\n\n/** Matches iOS hardware: iPhone, iPad, iPod. */\nexport const IOS_DEVICE_UA_PATTERN = /\\b(iPhone|iPad|iPod)\\b/;\n\n/** Matches desktop macOS in a user agent. */\nexport const MACINTOSH_UA_PATTERN = /\\bMacintosh\\b/;\n\n/** Matches the mobile token. */\nexport const MOBILE_UA_PATTERN = /\\bMobile\\b/;\n\n/** WebKit engine token, present in every WebKit browser including webviews. */\nexport const WEBKIT_UA_TOKEN = \"AppleWebKit\";\n\n/** Safari token sent by real iOS browsers, not in-app webviews. */\nexport const SAFARI_UA_TOKEN = \"Safari/\";\n\n// ----------------------------------\n// Sanitizing and size estimation\n// ----------------------------------\n\n/** First UTF-16 high surrogate code unit. */\nexport const HIGH_SURROGATE_MIN = 0xd800;\n\n/** Last UTF-16 high surrogate code unit. */\nexport const HIGH_SURROGATE_MAX = 0xdbff;\n\n/** Code units below this encode as one UTF-8 byte. */\nexport const UTF8_ONE_BYTE_CEILING = 0x80;\n\n/** Code units below this, and at or above the one-byte ceiling, encode as two UTF-8 bytes. */\nexport const UTF8_TWO_BYTE_CEILING = 0x800;\n\n/** Class names kept in a `describeNode` selector. */\nexport const MAX_NODE_CLASS_NAMES = 3;\n\n/** Byte cost of a null or undefined value. */\nexport const BYTES_PER_NULL = 4;\n\n/** Byte cost of a number (flat estimate). */\nexport const BYTES_PER_NUMBER = 8;\n\n/** Byte cost of a boolean. */\nexport const BYTES_PER_BOOLEAN = 5;\n\n/** Byte cost of an object or array's wrapping braces or brackets. */\nexport const BYTES_PER_CONTAINER = 2;\n\n/** Byte cost of a string's wrapping quotes. */\nexport const BYTES_PER_QUOTED_STRING = 2;\n\n/** Byte cost of one key's punctuation: quotes, colon, comma. */\nexport const BYTES_PER_KEY_OVERHEAD = 4;\n\n// ----------------------------------\n// Record model\n// ----------------------------------\n\n/**\n * Maps each log level to its OpenTelemetry severity number.\n * @see {@link LEVEL_ORDER}\n */\nexport const SEVERITY_NUMBER: Record<LogLevel, number> = {\n TRACE: 1,\n DEBUG: 5,\n INFO: 9,\n WARN: 13,\n ERROR: 17,\n FATAL: 21,\n};\n\n/**\n * Alias for `SEVERITY_NUMBER`, used by the level filter.\n * @see {@link SEVERITY_NUMBER}\n */\nexport const LEVEL_ORDER: Record<LogLevel, number> = SEVERITY_NUMBER;\n\n// ----------------------------------\n// Attribute and resource keys\n// ----------------------------------\n//\n// The attribute and resource key names records carry in the payload. They follow the\n// OpenTelemetry conventions, and the `uiobs.` prefix marks this library's own fields.\n\n/** Record kind attribute key. */\nexport const ATTR_LOG_TYPE = \"log.type\";\n\n/** A record's sequence number within its context. Starts at 1. */\nexport const ATTR_LOG_SEQ = \"log.seq\";\n\n/** Logger namespace attribute key. */\nexport const ATTR_APP_NAMESPACE = \"app.namespace\";\n\n/** The document URL at the time the record was built. */\nexport const ATTR_PAGE_URL = \"page.url\";\n\n/**\n * HTTP request URL attribute key, set by network capture. Don't reuse `ATTR_PAGE_URL` for it,\n * because the page URL overwrites the request target under that key.\n * @see {@link ATTR_PAGE_URL}\n */\nexport const ATTR_URL_FULL = \"url.full\";\n\n/** Journey id attribute key. */\nexport const ATTR_JOURNEY_ID = \"journey.id\";\n\n/** Journey name attribute key. */\nexport const ATTR_JOURNEY_NAME = \"journey.name\";\n\n/** Parent journey id, present only on a child journey. */\nexport const ATTR_JOURNEY_PARENT_ID = \"journey.parent_id\";\n\n/** Marks a record whose attributes failed to sanitize. */\nexport const ATTR_SANITIZE_FAILED = \"uiobs.sanitize_failed\";\n\n/** An Error reason's own fields, or the whole reason when it isn't an Error. */\nexport const ATTR_ERROR_DATA = \"error.data\";\n\n/** An error record's breadcrumb history. */\nexport const ATTR_BREADCRUMBS = \"breadcrumbs\";\n\n/**\n * Marks a record whose attributes were dropped for exceeding the byte budget.\n * @see {@link ATTR_ATTRIBUTES_BYTES}\n */\nexport const ATTR_ATTRIBUTES_DROPPED = \"uiobs.attributes_dropped\";\n\n/**\n * Byte size of the dropped attributes.\n * @see {@link ATTR_ATTRIBUTES_DROPPED}\n */\nexport const ATTR_ATTRIBUTES_BYTES = \"uiobs.attributes_bytes\";\n\n/** Server time minus client time, in milliseconds, from an accepted answer's Date header. */\nexport const ATTR_CLOCK_OFFSET_MS = \"uiobs.clock_offset_ms\";\n\n/** Marks a record the debug buffer held until an error. */\nexport const ATTR_DEBUG_BUFFER = \"uiobs.debug_buffer\";\n\n/** Half the HTTP Date header's resolution. Centers the clock offset's error. */\nexport const DATE_HEADER_HALF_STEP_MS = 500;\n\n/** Application name resource key. */\nexport const RESOURCE_SERVICE_NAME = \"service.name\";\n\n/** Application build version resource key. */\nexport const RESOURCE_SERVICE_VERSION = \"service.version\";\n\n/** Deployment environment resource key. */\nexport const RESOURCE_DEPLOYMENT_ENVIRONMENT = \"deployment.environment\";\n\n/**\n * Producer library name resource key.\n * @see {@link TELEMETRY_SDK_NAME}\n */\nexport const RESOURCE_TELEMETRY_SDK_NAME = \"telemetry.sdk.name\";\n\n/**\n * Producer library version resource key.\n * @see {@link TELEMETRY_SDK_VERSION}\n */\nexport const RESOURCE_TELEMETRY_SDK_VERSION = \"telemetry.sdk.version\";\n\n/**\n * Producer SDK language resource key.\n * @see {@link TELEMETRY_SDK_LANGUAGE}\n */\nexport const RESOURCE_TELEMETRY_SDK_LANGUAGE = \"telemetry.sdk.language\";\n\n/** Host platform resource key: browser, webview, or OpenFin. */\nexport const RESOURCE_HOST_PLATFORM = \"host.platform\";\n\n/** Session id resource key. */\nexport const RESOURCE_SESSION_ID = \"session.id\";\n\n/** Tab id resource key. */\nexport const RESOURCE_TAB_ID = \"tab.id\";\n\n/** Context (realm) id resource key. */\nexport const RESOURCE_CONTEXT_ID = \"context.id\";\n\n/** Raw user agent resource key. */\nexport const RESOURCE_BROWSER_USER_AGENT = \"browser.user_agent\";\n\n/** OpenFin application uuid resource key. */\nexport const RESOURCE_OPENFIN_UUID = \"openfin.uuid\";\n\n/** OpenFin window or view name resource key. */\nexport const RESOURCE_OPENFIN_NAME = \"openfin.name\";\n\n/**\n * Value of `telemetry.sdk.name`.\n * @see {@link RESOURCE_TELEMETRY_SDK_NAME}\n */\nexport const TELEMETRY_SDK_NAME = \"@utk09/ui-observability\";\n\n/**\n * Value of `telemetry.sdk.version`. The build writes the package.json version here.\n * @see {@link RESOURCE_TELEMETRY_SDK_VERSION}\n */\nexport const TELEMETRY_SDK_VERSION = __UIOBS_VERSION__;\n\n/**\n * Value of `telemetry.sdk.language`.\n * @see {@link RESOURCE_TELEMETRY_SDK_LANGUAGE}\n */\nexport const TELEMETRY_SDK_LANGUAGE = \"webjs\";\n\n// ----------------------------------\n// Serializers\n// ----------------------------------\n\n/** OTLP/JSON serializer name. */\nexport const SERIALIZER_NAME_OTLP = \"otlp\";\n\n/** ECS serializer name. */\nexport const SERIALIZER_NAME_ECS = \"ecs\";\n\n/**\n * ECS `log.level` names that differ from the lowercase severity text. ECS spells\n * the warning level out in full, and every other level matches in lowercase.\n * @see {@link SERIALIZER_NAME_ECS}\n */\nexport const ECS_LEVEL_NAMES: Partial<Record<LogLevel, string>> = { WARN: \"warning\" };\n\n/** The ECS version of the documents, the same one the Elastic ECS logging libraries write. */\nexport const ECS_VERSION = \"8.10.0\";\n\n/** Content type for an OTLP/JSON body. */\nexport const CONTENT_TYPE_JSON = \"application/json\";\n\n/** Content type for newline-delimited JSON. */\nexport const CONTENT_TYPE_NDJSON = \"application/x-ndjson\";\n\n/** Nanoseconds per millisecond. */\nexport const NANOS_PER_MILLI = 1000000n;\n\n/**\n * Matches a nanosecond epoch in decimal digits, for example \"1755543600123000000\".\n * @see {@link NANOS_PER_MILLI}\n */\nexport const NANOS_PATTERN = /^\\d+$/;\n\n// ----------------------------------\n// HTTP transport\n// ----------------------------------\n\n/** Content-Type header name. */\nexport const HEADER_CONTENT_TYPE = \"Content-Type\";\n\n/** Content-Encoding header name. */\nexport const HEADER_CONTENT_ENCODING = \"Content-Encoding\";\n\n/** Retry-After header name. */\nexport const HEADER_RETRY_AFTER = \"Retry-After\";\n\n/**\n * Batch deduplication key header name.\n * @see {@link QUERY_PARAM_BATCH_ID}\n */\nexport const HEADER_BATCH_ID = \"X-UiObs-Batch-Id\";\n\n/** Delivery attempt number header name. */\nexport const HEADER_ATTEMPT = \"X-UiObs-Attempt\";\n\n/** Response header that carries sampling rules from the ingest server. */\nexport const HEADER_SAMPLING = \"X-UiObs-Sampling\";\n\n/** Response header that gives the server time. The server must expose it to CORS. */\nexport const HEADER_DATE = \"Date\";\n\n/** Gzip encoding name. */\nexport const ENCODING_GZIP = \"gzip\";\n\n/** Lowest valid HTTP status code. */\nexport const HTTP_STATUS_MIN = 100;\n\n/** Highest valid HTTP status code. */\nexport const HTTP_STATUS_MAX = 599;\n\n/** Lowest HTTP status code that accepts a batch. */\nexport const HTTP_SUCCESS_MIN = 200;\n\n/** Lowest HTTP status code above the success range. */\nexport const HTTP_SUCCESS_END = 300;\n\n/** 401, credentials missing or rejected. */\nexport const HTTP_UNAUTHORIZED = 401;\n\n/** 403, valid credentials but access denied. */\nexport const HTTP_FORBIDDEN = 403;\n\n/** 408, the server closed the connection after a timeout. The transport can retry. */\nexport const HTTP_REQUEST_TIMEOUT = 408;\n\n/** 413, payload too large. The transport must split the batch. */\nexport const HTTP_PAYLOAD_TOO_LARGE = 413;\n\n/** 415, unsupported media type. A stock OpenTelemetry Collector gives it to a text/plain batch. */\nexport const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;\n\n/** 429, backpressure. */\nexport const HTTP_TOO_MANY_REQUESTS = 429;\n\n/** 500, floor for server-side errors. */\nexport const HTTP_SERVER_ERROR_MIN = 500;\n\n/** 503, temporary unavailability. */\nexport const HTTP_SERVICE_UNAVAILABLE = 503;\n\n/** Milliseconds per second. */\nexport const MILLIS_PER_SECOND = 1000;\n\n// ----------------------------------\n// Exit flush\n// ----------------------------------\n\n/** Max exit payload size, in bytes (`sendBeacon`/`fetch(keepalive)` shared budget). */\nexport const BEACON_LIMIT_BYTES = 60_000;\n\n/** Largest ingest response body the library reads, in bytes. It skips a larger body. */\nexport const RESPONSE_BODY_LIMIT_BYTES = 16_384;\n\n/** Longest server message that a diagnostic repeats. The server controls this text. */\nexport const SERVER_MESSAGE_MAX_CHARS = 256;\n\n/** Content type for an exit payload. CORS-safelisted, so it doesn't trigger a preflight. */\nexport const CONTENT_TYPE_TEXT_PLAIN = \"text/plain;charset=UTF-8\";\n\n/**\n * Batch id query param name, for the exit path.\n * @see {@link HEADER_BATCH_ID}\n */\nexport const QUERY_PARAM_BATCH_ID = \"uiobs_batch_id\";\n\n/** Exit reason query param name, for logs only. */\nexport const QUERY_PARAM_EXIT_REASON = \"uiobs_exit\";\n\n// ----------------------------------\n// Storage\n// ----------------------------------\n\n/** localStorage key prefix for a stored batch. */\nexport const BATCH_STORAGE_KEY_PREFIX = \"ui-observability.batch.\";\n\n/** Zero-padded digit width for the creation time in a batch key. */\nexport const BATCH_KEY_TIME_WIDTH = 14;\n\n/** localStorage key prefix for a batch stored by the exit flush. */\nexport const EMERGENCY_STORAGE_KEY_PREFIX = \"ui-observability.emergency.\";\n\n/** Maximum number of exit batches in the emergency queue. */\nexport const EMERGENCY_MAX_ENTRIES = 20;\n\n/** Key we write to check whether localStorage accepts writes. */\nexport const STORAGE_PROBE_KEY = \"ui-observability.probe\";\n\n/** Fraction of the store to evict on a quota error (1 in N). */\nexport const QUOTA_EVICTION_DIVISOR = 4;\n\n/** DOMException name for a full store. */\nexport const QUOTA_EXCEEDED_ERROR = \"QuotaExceededError\";\n\n/**\n * Native IndexedDB version. Version 11 replaced Dexie, and version 12 adds the context index.\n * Dexie opened this database at ten times its declared version, so a version below 11 makes\n * open() fail with VersionError on an existing installation, and then nothing can read its\n * batches.\n */\nexport const INDEXEDDB_SCHEMA_VERSION = 12;\n\n/** IndexedDB object store that holds the batches. The name dates from Dexie, since removed. */\nexport const INDEXEDDB_STORE_NAME = \"batches\";\n\n/** Index on the batch store that orders reads by creation time. */\nexport const INDEXEDDB_CREATED_AT_INDEX = \"createdAt\";\n\n/** IndexedDB adapter/strategy name. */\nexport const STORAGE_NAME_INDEXEDDB = \"indexeddb\";\n\n/** localStorage adapter/strategy name. */\nexport const STORAGE_NAME_LOCAL = \"localstorage\";\n\n/** In-memory adapter/strategy name. */\nexport const STORAGE_NAME_MEMORY = \"memory\";\n\n/** Name of the storage adapter that keeps nothing. */\nexport const STORAGE_NAME_NONE = \"none\";\n\n// ----------------------------------\n// Retry\n// ----------------------------------\n\n/**\n * Origin-wide lock name a drain runs under.\n * @see {@link EMERGENCY_LOCK_NAME}\n */\nexport const DRAIN_LOCK_NAME = \"ui-observability.drain\";\n\n/**\n * Lock name startup recovery runs under.\n * @see {@link DRAIN_LOCK_NAME}\n */\nexport const EMERGENCY_LOCK_NAME = \"ui-observability.emergency\";\n\n/** Batches sent per drain tick. */\nexport const BATCHES_PER_DRAIN = 20;\n\n// ----------------------------------\n// Journey\n// ----------------------------------\n\n/** `sessionStorage` key for the current journey. */\nexport const JOURNEY_STORAGE_KEY = \"ui-observability.journey\";\n\n/**\n * Max journey name length in a token, in characters.\n * @see {@link JOURNEY_TOKEN_MAX_CHARS}\n */\nexport const JOURNEY_TOKEN_NAME_MAX_CHARS = 64;\n\n/**\n * Max length of a journey id from startJourney(), in characters. A journey with an id this long\n * and a full-length name still gets a token below the token limit.\n * @see {@link JOURNEY_TOKEN_MAX_CHARS}\n */\nexport const JOURNEY_ID_MAX_CHARS = 64;\n\n/**\n * Accepted journey id from startJourney(): letters, digits, \"_\", \".\", \":\" and \"-\". Every\n * character is one byte in UTF-8. A multibyte id would push the token over its limit.\n */\nexport const JOURNEY_ID_PATTERN = new RegExp(`^[\\\\w.:-]{1,${String(JOURNEY_ID_MAX_CHARS)}}$`);\n\n/**\n * How far ahead of this clock a journey token's start time can be, in milliseconds. Two machines\n * can disagree on the time, but a token further ahead than this would never expire.\n */\nexport const JOURNEY_CLOCK_SKEW_MS = 5 * 60 * 1000;\n\n/**\n * Max whole-token length, in characters. This only rejects an oversized token. It doesn't\n * validate the token's content.\n * @see {@link JOURNEY_TOKEN_NAME_MAX_CHARS}\n */\nexport const JOURNEY_TOKEN_MAX_CHARS = 256;\n\n/**\n * How long to wait for `fin.me.getOptions()`, in milliseconds. After that, the\n * runtime carries on without a seeded journey.\n * @see {@link OPENFIN_JOURNEY_CUSTOM_DATA_KEY}\n */\nexport const OPENFIN_OPTIONS_TIMEOUT_MS = 2000;\n\n/** Key under an OpenFin window's `customData` carrying a seeded journey token. */\nexport const OPENFIN_JOURNEY_CUSTOM_DATA_KEY = \"uiObsJourney\";\n\n/** Matches `+` in standard base64 (`-` in URL-safe). */\nexport const BASE64_PLUS_PATTERN = /\\+/g;\n\n/** Matches `/` in standard base64 (`_` in URL-safe). */\nexport const BASE64_SLASH_PATTERN = /\\//g;\n\n/** Matches trailing `=` padding. */\nexport const BASE64_PADDING_PATTERN = /=+$/;\n\n/** Matches `-` in URL-safe base64 (`+` in standard). */\nexport const BASE64URL_DASH_PATTERN = /-/g;\n\n/** Matches `_` in URL-safe base64 (`/` in standard). */\nexport const BASE64URL_UNDERSCORE_PATTERN = /_/g;\n\n/** Base64 characters per 3-byte group. */\nexport const BASE64_GROUP_CHARS = 4;\n\n// ----------------------------------\n// Tracing\n// ----------------------------------\n\n/** W3C trace id width, in bytes. */\nexport const TRACE_ID_BYTES = 16;\n\n/** W3C span id width, in bytes. */\nexport const SPAN_ID_BYTES = 8;\n\n/** Max ambient trace lifetime with no activity, in milliseconds. */\nexport const TRACE_MAX_AGE_MS = 5 * 60 * 1000;\n\n/** trace-flags value with the sampled bit set. */\nexport const TRACE_FLAGS_SAMPLED = 1;\n\n/** Mask for the one-byte trace-flags field. */\nexport const TRACE_FLAGS_MASK = 0xff;\n\n/**\n * W3C trace context header name\n * @see {@link TRACEPARENT_VERSION}\n */\nexport const TRACEPARENT_HEADER = \"traceparent\";\n\n/** traceparent header version prefix. */\nexport const TRACEPARENT_VERSION = \"00\";\n\n// ----------------------------------\n// Breadcrumbs\n// ----------------------------------\n\n/** Smallest valid breadcrumb buffer capacity. */\nexport const BREADCRUMB_MIN_CAPACITY = 1;\n\n// ----------------------------------\n// Sampling\n// ----------------------------------\n//\n// FNV-1a hash constants. The sampler uses them to turn a sampling key into a\n// stable 0-1 fraction.\n\n/** FNV-1a 32-bit offset basis. */\nexport const FNV_OFFSET_BASIS = 0x811c9dc5;\n\n/** FNV-1a 32-bit prime. */\nexport const FNV_PRIME = 0x01000193;\n\n/** Largest 32-bit unsigned value. */\nexport const UINT32_MAX = 0xffffffff;\n\n/**\n * Types that minLevel never drops. An action is an audit fact, and a metric or a span is a\n * measurement. The remote rate cap for records below minLevel doesn't apply to them either.\n */\nexport const LEVEL_BYPASS_TYPES: readonly LogType[] = [\"action\", \"metric\", \"span\"];\n\n// ----------------------------------\n// Pipeline\n// ----------------------------------\n\n/** Record kind routed to the metric stream. */\nexport const LOG_TYPE_METRIC: LogType = \"metric\";\n\n/** Record kind of an audit fact. Storage and the hold buffers drop it last. */\nexport const LOG_TYPE_ACTION: LogType = \"action\";\n\n/** Record kind routed to the trace stream. */\nexport const LOG_TYPE_SPAN: LogType = \"span\";\n\n// ----------------------------------\n// Bus\n// ----------------------------------\n\n/** Protocol identifier for bus envelopes. The bus drops an envelope with a different version. */\nexport const BUS_PROTOCOL = \"ui-observability/2\";\n\n/**\n * Type tag for every bus message. Every frame must use the same values. The prefix makes a\n * message easy to spot in a postMessage log, but it is still the BUS_PROTOCOL envelope tag that\n * separates the bus from other traffic.\n */\nexport const BUS_TYPE = {\n hello: \"ui-observability.message.hello\",\n welcome: \"ui-observability.message.welcome\",\n records: \"ui-observability.message.records\",\n securityContext: \"ui-observability.message.security-context\",\n journey: \"ui-observability.message.journey\",\n journeyRequest: \"ui-observability.message.journey-request\",\n sampling: \"ui-observability.message.sampling\",\n samplingRequest: \"ui-observability.message.sampling-request\",\n tab: \"ui-observability.message.tab\",\n flushRequest: \"ui-observability.message.flush-request\",\n flushResult: \"ui-observability.message.flush-result\",\n} as const;\n\n/** Global window property key used to locate a same-origin runtime instance. */\nexport const RUNTIME_GLOBAL_KEY = \"ui-observability.runtime\";\n\n/** Global key for the runtime shutdown() stopped. Calls go to it until the next configure(). */\nexport const RUNTIME_STOPPED_KEY = \"ui-observability.stopped\";\n\n/**\n * Global key prefix for the observed window list. The key adds the version, so two copies of one\n * version share the list, as they share the runtime, and another version keeps its own.\n */\nexport const OBSERVED_WINDOWS_KEY = \"ui-observability.observed-windows\";\n\n/** Global symbol key for the library request scope count, shared by every copy on the page. */\nexport const LIBRARY_REQUEST_KEY = \"ui-observability.request-scope\";\n\n/** Global symbol key for the library console scope count, shared by every copy on the page. */\nexport const LIBRARY_CONSOLE_KEY = \"ui-observability.console-scope\";\n\n/** Global symbol key for the number of custom transport calls still waiting for an answer. */\nexport const TRANSPORT_CALL_KEY = \"ui-observability.transport-calls\";\n\n// ----------------------------------\n// Capture\n// ----------------------------------\n\n/** Maximum error records captured per throttling window before suppression. */\nexport const ERROR_STORM_MAX_PER_WINDOW = 20;\n\n/**\n * Default length of the capture rate limit window, and of the replay upload and error ceiling\n * windows, in milliseconds.\n */\nexport const ERROR_STORM_WINDOW_MS = 10_000;\n\n/**\n * Max ERROR and FATAL records the pipeline admits per storm window. This is a safety limit for\n * a render loop, not a way to shape normal traffic. ERROR and FATAL records skip sampling, so a\n * direct logger.error call has no other limit.\n */\nexport const ERROR_CEILING_MAX_PER_WINDOW = 500;\n\n/** Default minimum duration for a long frame to be recorded, in milliseconds. */\nexport const LONG_FRAME_THRESHOLD_MS = 100;\n\n/** Maximum long frames recorded per storm window, so a frozen tab can't flood the pipeline. */\nexport const LONG_FRAME_MAX_PER_WINDOW = 20;\n\n/** Max WebSocket events recorded per storm window, so a reconnect loop can't flood the pipeline. */\nexport const WEBSOCKET_MAX_PER_WINDOW = 20;\n\n/** Maximum character length of a console breadcrumb message. */\nexport const CONSOLE_BREADCRUMB_MAX_CHARS = 200;\n\n/** Maximum distinct error signatures tracked for deduplication before LRU eviction. */\nexport const MAX_TRACKED_ERROR_SIGNATURES = 200;\n\n/** Maximum characters of a clicked element's text kept in a breadcrumb. */\nexport const CLICK_TEXT_MAX_CHARS = 50;\n\n/** Attribute that names a click action, unless the app configures a different one. */\nexport const ACTION_ATTRIBUTE_DEFAULT = \"data-observability-action\";\n\n/**\n * Selector for the regions the app keeps out of the records. Click capture skips them by\n * default, and session replay always blocks them, so a hidden region can't leak through either.\n */\nexport const IGNORE_SELECTOR = \"[data-observability-ignore]\";\n\n/**\n * Selector for the regions that change on their own, such as a live price grid. A change or a\n * scroll inside one isn't the page answering a click, so it doesn't stop a dead click.\n */\nexport const DEAD_CLICK_IGNORE_SELECTOR = \"[data-observability-live]\";\n\n/** Attributes that React rewrites in one batch with no net change, so only that change counts. */\nexport const NET_CHANGE_ATTRIBUTES: readonly string[] = [\"name\", \"type\"];\n\n/** How many clicks on one element make a rage click, by default. */\nexport const RAGE_CLICK_COUNT = 3;\n\n/** The time window a rage click's clicks must fall within, in milliseconds, by default. */\nexport const RAGE_CLICK_WINDOW_MS = 1000;\n\n/** How long to wait for a visible response before a click counts as dead, in milliseconds. */\nexport const DEAD_CLICK_MS = 1000;\n\n/** Controls that should respond visibly to a click. Only these get a dead click check. */\nexport const DEAD_CLICK_CONTROLS =\n 'a, button, summary, input[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"], [role=\"button\"], [role=\"link\"], [role=\"menuitem\"], [role=\"tab\"]';\n\n/** Maximum characters of an aria-label kept in a generated selector. */\nexport const ARIA_LABEL_MAX_CHARS = 40;\n\n/** Maximum class names per element in a generated CSS selector. */\nexport const SELECTOR_MAX_CLASSES = 2;\n\n/** Default CSS for the console prefix. The colors are readable in light and dark devtools. */\nexport const CONSOLE_DEFAULT_STYLES: Readonly<Required<ConsoleStyles>> = {\n namespace: \"color:#888\",\n TRACE: \"color:#888;font-weight:bold\",\n DEBUG: \"color:#888;font-weight:bold\",\n INFO: \"color:#1e6fd9;font-weight:bold\",\n WARN: \"color:#c77700;font-weight:bold\",\n ERROR: \"color:#d32f2f;font-weight:bold\",\n FATAL: \"color:#d32f2f;font-weight:bold\",\n};\n\n// ----------------------------------\n// Runtime\n// ----------------------------------\n\n/** Minimum time between storage gap warning reports, in milliseconds. */\nexport const GAP_REPORT_THROTTLE_MS = 60_000;\n\n/** Default namespace for records the auto-capture modules emit. */\nexport const CAPTURE_NAMESPACE = \"uiobs.capture\";\n\n/** Default namespace for records the storage subsystems emit. */\nexport const STORAGE_NAMESPACE = \"uiobs.storage\";\n\n/** Namespace for the records `diagnostics.records` produces. */\nexport const DIAGNOSTICS_NAMESPACE = \"uiobs.diagnostics\";\n\n/** The measurement unit used when a call doesn't give one. */\nexport const DEFAULT_METRIC_UNIT = \"count\";\n\n/** Namespace for the points the counter and histogram instruments produce. */\nexport const METRIC_NAMESPACE = \"uiobs.metrics\";\n\n/** Maximum attribute sets per instrument per interval. Any more go into one overflow set. */\nexport const METRIC_MAX_SERIES = 100;\n\n/** Maximum bucket boundaries per histogram. More than that makes for a large point. */\nexport const METRIC_MAX_BOUNDARIES = 50;\n\n/** Attribute on the overflow set. OpenTelemetry uses the same key. */\nexport const ATTR_METRIC_OVERFLOW = \"otel.metric.overflow\";\n\n/** Default histogram boundaries, the same as OpenTelemetry's defaults. */\nexport const METRIC_DEFAULT_BOUNDARIES: readonly number[] = [\n 0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000,\n];\n\n/**\n * Attribute keys on an aggregated metric point, read by the OTLP metrics serializer.\n * Sampling keeps every record that has a start time, because sampling a sum gives a false sum.\n */\nexport const METRIC_KEYS = {\n start: \"metric.start_time_unix_nano\",\n attributeKeys: \"metric.attribute_keys\",\n count: \"metric.count\",\n sum: \"metric.sum\",\n min: \"metric.min\",\n max: \"metric.max\",\n bounds: \"metric.bounds\",\n buckets: \"metric.bucket_counts\",\n} as const;\n\n/**\n * Every metric field the library writes on a metric record. The OTLP metrics serializer keeps\n * them off a point's attributes, because the record holds the library's value under that name.\n */\nexport const METRIC_FIELD_KEYS: readonly string[] = [\n \"metric.name\",\n \"metric.value\",\n \"metric.unit\",\n \"metric.type\",\n ...Object.values(METRIC_KEYS),\n];\n\n/** Precision of the profiler histogram: 2^4 = 16 sub-buckets per power of two. */\nexport const PROFILE_SUB_BITS = 4;\n\n/** Buckets per probe: 16 for 0 to 15 us, then 16 for each exponent from 4 to 25. */\nexport const PROFILE_BUCKETS = 368;\n\n/** Largest tracked duration in microseconds (2^26 - 1). Larger values go in the last bucket. */\nexport const PROFILE_MAX_US = 67_108_863;\n\n/** Cap on the buckets in one profiler summary record, to keep the payload small. */\nexport const PROFILE_POINT_BUCKETS = 100;\n\n/** Default probe limit. The runtime fixes the limit at startup. */\nexport const PROFILER_MAX_PROBES = 64;\n\n/** Metric name for profiler summary records. */\nexport const PROFILE_METRIC_NAME = \"ui.profile.duration\";\n\n/** Attribute keys on profiler summary records. */\nexport const PROFILE_KEYS = {\n probe: \"profile.probe\",\n sampleEvery: \"profile.sample_every\",\n p50: \"profile.p50\",\n p90: \"profile.p90\",\n p99: \"profile.p99\",\n overhead: \"profile.overhead_ns\",\n selfP99: \"profile.self_p99\",\n framePhase: \"profile.frame_phase\",\n} as const;\n\n/** How deep spans can nest and still get a self time. Going deeper drops the frames below. */\nexport const PROFILER_STACK_DEPTH = 32;\n\n/** How many recent spans the profiler keeps for linking to long animation frames. */\nexport const PROFILER_RING_SPANS = 256;\n\n/** Shortest span, in ms, that gets linked to a long animation frame. */\nexport const PROFILER_LINK_MIN_MS = 1;\n\n/** Metric name for long animation frame phases, reported per probe in the frame. */\nexport const PROFILE_FRAME_METRIC_NAME = \"ui.profile.frame.duration\";\n\n/** Probe name for frame pacing. Each value is the time between two frames. */\nexport const PROFILE_FRAME_PROBE = \"frame.interval\";\n\n/** Reported when the library can't read an instrument's options. */\nexport const INSTRUMENT_OPTIONS_FAULT =\n \"The library could not read the options of an instrument. The library uses the defaults.\";\n\n/** Ambient attribute that ties every record to the session replay recording. */\nexport const REPLAY_ID_KEY = \"replay.id\";\n\n/** Put this attribute on an element to leave its text unmasked in session replay. */\nexport const REPLAY_UNMASK_ATTRIBUTE = \"data-observability-unmask\";\n\n/** Hard cap on registered probe names, and so the upper bound for profiler.maxProbes. */\nexport const PROFILER_PROBE_LIMIT = 1024;\n\n/** Global symbol key for the profiler core. Copies of the same library version share the core. */\nexport const PROFILER_GLOBAL_KEY = \"ui-observability.profiler\";\n\n/** Minimum window for the profiler's overhead measurement, in ms. */\nexport const PROFILER_CALIBRATION_MS = 2;\n\n/** Cap on begin()/end() pairs in the profiler's overhead measurement. */\nexport const PROFILER_CALIBRATION_PAIRS = 100_000;\n\n/** Namespace of the span records. */\nexport const TRACE_NAMESPACE = \"uiobs.traces\";\n\n/** Attribute keys for the span fields on a span record, read by the traces serializer. */\nexport const SPAN_KEYS = {\n kind: \"span.kind\",\n parentId: \"span.parent_id\",\n start: \"span.start_time_unix_nano\",\n end: \"span.end_time_unix_nano\",\n status: \"span.status\",\n linkTraceId: \"span.link.trace_id\",\n linkSpanId: \"span.link.span_id\",\n} as const;\n\n// ----------------------------------\n// Configuration\n// ----------------------------------\n\n/** Protocol for the private transport worker channel. */\nexport const TRANSPORT_WORKER_PROTOCOL = \"ui-observability.transport/1\";\n\n/** Type tags for the private transport worker messages. */\nexport const TRANSPORT_WORKER_TYPE = {\n connect: \"connect\",\n ready: \"ready\",\n send: \"send\",\n result: \"result\",\n cancel: \"cancel\",\n} as const;\n\n/** The worker entry's refusal message. A constant keeps the protocol code out of the main chunk. */\nexport const TRANSPORT_WORKER_REFUSAL = {\n p: TRANSPORT_WORKER_PROTOCOL,\n v: TELEMETRY_SDK_VERSION,\n t: TRANSPORT_WORKER_TYPE.ready,\n ok: false,\n} as const;\n\n/** Maximum requests in one transport worker. */\nexport const TRANSPORT_WORKER_MAX_JOBS = 64;\n\n/**\n * Extra wait for the transport worker's answer after the request deadline. The worker replies\n * with a status it got in time when the deadline ends its body read, and that reply needs a\n * message hop.\n */\nexport const WORKER_REPLY_GRACE_MS = 1_000;\n\n/** Longest the deferred logger waits for idle time before it builds its records. */\nexport const DEFER_IDLE_TIMEOUT_MS = 1000;\n\n/** Maximum pending payload references per runtime. A full queue builds its records first. */\nexport const DEFER_QUEUE_LIMIT = 1000;\n\n/** Default minimum duration for a slow resource event, in milliseconds. */\nexport const RESOURCE_SLOW_MS = 1000;\n\n/** Response header with server duration entries. */\nexport const SERVER_TIMING_HEADER = \"Server-Timing\";\n\n/** Maximum Server-Timing header length and entry count. */\nexport const SERVER_TIMING_MAX_CHARS = 4096;\nexport const SERVER_TIMING_MAX_ENTRIES = 32;\n\n/** Capture switches a remote rule can change. Privacy controls stay local. */\nexport const REMOTE_CAPTURE_FLAGS = [\n \"errors\",\n \"rejections\",\n \"resourceErrors\",\n \"fetch\",\n \"xhr\",\n \"httpMetrics\",\n \"navigation\",\n \"webVitals\",\n \"longFrames\",\n \"interactions\",\n \"console\",\n \"webSocket\",\n \"uncleanExit\",\n \"userTiming\",\n \"serverTiming\",\n \"reports\",\n \"resourceTiming\",\n \"lifecycle\",\n] as const;\n\n/** Default `service.name` when a consumer sets none. */\nexport const UNKNOWN_SERVICE_NAME = \"unknown-service\";\n\n/** Lowest sampling rate (drop everything). */\nexport const SAMPLING_RATE_MIN = 0;\n\n/** Highest sampling rate (keep everything). */\nexport const SAMPLING_RATE_MAX = 1;\n\n/** The remote sampling rules version this library accepts. */\nexport const REMOTE_SAMPLING_VERSION = 1;\n\n/** Maximum length of the sampling header, in characters. */\nexport const REMOTE_SAMPLING_MAX_CHARS = 4096;\n\n/** Longest that remote sampling rules stay in effect, in milliseconds. */\nexport const REMOTE_SAMPLING_MAX_TTL_MS = 60 * 60 * 1000;\n\n/** Maximum namespace rates in one set of remote sampling rules. */\nexport const REMOTE_SAMPLING_MAX_RATES = 100;\n\n/** How often a forwarder asks for the remote sampling rules, in milliseconds. */\nexport const REMOTE_SAMPLING_POLL_MS = 30_000;\n\n/**\n * Config keys with no default, excluded from `DEFAULT_CONFIG`.\n * @see {@link DEFAULT_CONFIG}\n */\nexport const UNDEFAULTED_CONFIG_KEYS = [\n \"contextProvider\",\n \"redact\",\n \"onDiagnostic\",\n \"onDrop\",\n \"headers\",\n \"serializer\",\n \"otelLoader\",\n \"transport\",\n \"transportOnExit\",\n \"transportWorker\",\n] as const;\n\n/**\n * Nested config section keys.\n * @see {@link ResolvedConfig}\n */\nexport const CONFIG_SECTIONS = [\n \"captureLimits\",\n \"metadata\",\n \"storage\",\n \"diagnostics\",\n \"correlation\",\n \"metrics\",\n \"buffering\",\n \"delivery\",\n \"loggerCache\",\n \"securityContext\",\n \"sampling\",\n \"bus\",\n \"journey\",\n \"batching\",\n \"retention\",\n \"limits\",\n \"capture\",\n \"debugBuffer\",\n \"profiler\",\n \"replay\",\n] as const;\n\n/**\n * Section keys with no default, excluded from their section of `DEFAULT_CONFIG`.\n * @see {@link UNDEFAULTED_CONFIG_KEYS}\n */\nexport const UNDEFAULTED_SECTION_KEYS: Record<(typeof CONFIG_SECTIONS)[number], string[]> = {\n captureLimits: [],\n metadata: [],\n storage: [],\n diagnostics: [],\n correlation: [],\n metrics: [],\n buffering: [],\n delivery: [],\n loggerCache: [],\n securityContext: [],\n sampling: [],\n bus: [],\n journey: [],\n batching: [],\n retention: [],\n limits: [],\n capture: [\"urlTransform\"],\n debugBuffer: [],\n profiler: [],\n replay: [],\n};\n\n/** Console output level used when a consumer passes `consoleOutput: true`. */\nexport const CONSOLE_DEFAULT_LEVEL: LogLevel = \"DEBUG\";\n\n// ----------------------------------\n// Batching\n// ----------------------------------\n\n/** Max time a partial log batch waits before the pipeline sends it, in milliseconds. */\nexport const LOG_FLUSH_INTERVAL_MS = 2000;\n\n/** Max records per log batch. At this count, the pipeline sends the batch early. */\nexport const LOG_BATCH_SIZE = 100;\n\n/**\n * Default interval of the counter, histogram and profiler points, in milliseconds. A partial\n * metric batch waits this long too, longer than a log batch, because metrics have a higher\n * volume and no caller is waiting for them.\n */\nexport const METRIC_INTERVAL_MS = 10_000;\n\n/** Max records per metric batch. At this count, the pipeline sends the batch early. */\nexport const METRIC_BATCH_SIZE = 500;\n\n/** Max concurrent ingest requests, across both streams. */\nexport const MAX_CONCURRENT_REQUESTS = 2;\n\n// ----------------------------------\n// HTTP transport\n// ----------------------------------\n\n/** Max time for one ingest request, in milliseconds. The transport then aborts and retries it. */\nexport const REQUEST_TIMEOUT_MS = 15_000;\n\n/** Min payload size to compress, in bytes. */\nexport const COMPRESSION_THRESHOLD_BYTES = 1024;\n\n// ----------------------------------\n// Storage retention\n// ----------------------------------\n\n/** IndexedDB database name. */\nexport const STORAGE_DB_NAME = \"UiObservability\";\n\n/** Capacity and retention thresholds every storage adapter enforces. */\nexport const STORAGE_LIMITS: StorageLimits = {\n maxBatches: 500,\n maxAgeMs: 24 * 60 * 60 * 1000,\n maxAttempts: 5,\n};\n\n/**\n * Max time for one storage call, in milliseconds. After that the call counts as failed, because\n * a call that never settles would hold on to a dispatch slot or the drain flag.\n */\nexport const STORAGE_DEADLINE_MS = 10_000;\n\n/** Default wait of flush() and of a rotation's flush, in milliseconds. */\nexport const FLUSH_TIMEOUT_MS = 5000;\n\n/**\n * Longest wait of flush() and of a rotation's flush, in milliseconds. A browser timer fires at\n * once for a delay above 2^31 - 1 ms, so the wait has a ceiling.\n */\nexport const FLUSH_TIMEOUT_MAX_MS = 600_000;\n\n// ----------------------------------\n// Retry backoff\n// ----------------------------------\n\n/** First backoff step, in milliseconds. Doubles with every attempt. */\nexport const RETRY_BASE_DELAY_MS = 2000;\n\n/** Backoff ceiling, in milliseconds. */\nexport const RETRY_MAX_DELAY_MS = 60_000;\n\n/** How often to check for stored work when nothing has failed recently, in milliseconds. */\nexport const RETRY_IDLE_DELAY_MS = 30_000;\n\n// ----------------------------------\n// Journey lifetime\n// ----------------------------------\n\n/** Max time a journey stays open, in milliseconds. After that it counts as abandoned. */\nexport const JOURNEY_MAX_AGE_MS = 30 * 60 * 1000;\n\n/** True if the journey ends for all contexts when the owning context closes. */\nexport const JOURNEY_END_ON_OWNER_CLOSE = false;\n\n/** Query parameter checked at boot for a seeded journey token. */\nexport const JOURNEY_URL_PARAM = \"__uiobs_journey\";\n\n// ----------------------------------\n// Bus handshake\n// ----------------------------------\n\n/** BroadcastChannel name for the control plane. */\nexport const BUS_CHANNEL_NAME = \"ui_observability_control\";\n\n/** Max time a forwarder waits for an owner to answer before it promotes itself, in milliseconds. */\nexport const BUS_HANDSHAKE_TIMEOUT_MS = 1500;\n\n/** Handshake attempts allowed before a cross-origin forwarder promotes itself to sender. */\nexport const BUS_MAX_HANDSHAKE_ATTEMPTS = 3;\n\n/**\n * Max named sources, for example OpenFin identities, whose message rate the bus tracks at once.\n * A new source past it is refused, so a flood of fake names can't grow the map without end.\n */\nexport const BUS_MAX_TRACKED_SOURCES = 256;\n\n/**\n * Max flush requests from other contexts that wait for the next flush. A request past it gets\n * no answer, so a flood of requests can't grow the list without end.\n */\nexport const BUS_MAX_FLUSH_REQUESTS = 100;\n\n/** Max flush requests of one source that wait, so one frame can't fill the whole list. */\nexport const BUS_MAX_FLUSH_REQUESTS_PER_SOURCE = 4;\n\n/**\n * Min time between the starts of two flushes that the bus runs for other contexts, in\n * milliseconds. A request in the gap joins the next one, so a flood can't flush without a pause.\n */\nexport const BUS_FLUSH_GAP_MS = 1000;\n\n/**\n * Share of a forwarder's time left that it gives its sender in a flush request. The rest is for\n * the answer, so the caller's wait outlasts the callee's deadline at each hop of a chain.\n */\nexport const FLUSH_REQUEST_SHARE = 0.9;\n\n/** Default of buffering.maxHeldRecords, the cap on non-action records in one hold buffer. */\nexport const BUS_MAX_BOOT_BUFFER_RECORDS = 500;\n\n/** Max action records in one hold buffer. Their own cap means a log storm can't push one out. */\nexport const BUS_MAX_BOOT_BUFFER_ACTIONS = 2000;\n\n/**\n * Records of each kind that a full hold buffer never drops, counted from the first one. The\n * first error of a failed startup is usually the cause, so it has to outlive the storm.\n */\nexport const HOLD_BUFFER_HEAD_RECORDS = 100;\n\n/** Max distinct values in each list of an onDrop summary. */\nexport const DROP_SUMMARY_MAX_ITEMS = 20;\n\n/**\n * Max characters of an untrusted message type in a diagnostic detail, since the sender controls\n * that text. The longest BUS_TYPE value is 41 characters, so every valid type fits.\n */\nexport const BUS_TYPE_DETAIL_MAX_CHARS = 48;\n\n// ----------------------------------\n// Capture\n// ----------------------------------\n\n/** Breadcrumbs kept as context for the next error. */\nexport const MAX_BREADCRUMBS = 50;\n\n/** How long identical errors are counted without being sent again, in milliseconds. */\nexport const ERROR_DEDUPE_MS = 5000;\n\n// ----------------------------------\n// Per-record size caps\n// ----------------------------------\n\n/** Size caps for every record, applied after sanitize and after redact. */\nexport const RECORD_LIMITS = {\n maxBodyChars: 4096,\n maxAttributeChars: 8192,\n maxAttributeCount: 128,\n maxStackChars: 8192,\n maxDepth: 6,\n maxArrayLength: 100,\n maxNodes: 10_000,\n maxRecordBytes: 32_768,\n};\n\n// ----------------------------------\n// Config defaults\n// ----------------------------------\n\n/**\n * Routing settings a rotation resets when the update leaves them out. The rotation also spreads\n * this into its base, where undefined means no hook, so an undefined key in the update resets too.\n */\nexport const ROUTING_RESET = {\n endpoint: null,\n metricsEndpoint: null,\n tracesEndpoint: null,\n headers: undefined,\n credentials: \"omit\",\n transport: undefined,\n transportOnExit: undefined,\n transportWorker: undefined,\n} as const;\n\n/** Routing settings that configure() can't change while isolation is on. */\nexport const ROUTING_KEYS = Object.keys(ROUTING_RESET) as (keyof typeof ROUTING_RESET)[];\n\n/**\n * The default runtime config, before the consumer calls `configure()`. `serializer` is left\n * out, because `resolveConfig` supplies that default to avoid a circular import.\n * This sits below the constants it reads, since a const can't be read before its own line.\n * @see {@link ResolvedConfig}\n * @see {@link UNDEFAULTED_CONFIG_KEYS}\n */\nexport const DEFAULT_CONFIG: Omit<ResolvedConfig, \"serializer\"> = {\n captureLimits: {\n breadcrumbs: MAX_BREADCRUMBS,\n errorDedupeMs: ERROR_DEDUPE_MS,\n errorsPerWindow: 20,\n consolePerWindow: 20,\n longFramesPerWindow: 20,\n webSocketPerWindow: 20,\n reportsPerWindow: 20,\n resourcesPerWindow: 100,\n lifecyclePerWindow: 20,\n windowMs: ERROR_STORM_WINDOW_MS,\n },\n metadata: { pageUrl: true, userAgent: true, openfin: true, clockOffset: true },\n debugBuffer: { enabled: false, maxRecords: 200, maxAgeMs: 60_000 },\n profiler: {\n enabled: false,\n maxProbes: PROFILER_MAX_PROBES,\n framePhases: false,\n framePacing: false,\n },\n replay: {\n enabled: false,\n mode: \"onError\",\n endpoint: null,\n requireConsent: false,\n bufferMs: 60_000,\n maxBufferBytes: 10_000_000,\n afterErrorMs: 5000,\n uploadsPerWindow: 3,\n uploadWindowMs: ERROR_STORM_WINDOW_MS,\n maxSegmentEvents: 200,\n maxSegmentBytes: 512_000,\n flushIntervalMs: 2000,\n maxQueueBytes: 20_000_000,\n maxAttempts: 3,\n maskText: true,\n maskInputs: true,\n recordCanvas: false,\n maskSelectors: [],\n blockSelectors: [],\n loader: null,\n onSegment: null,\n headers: null,\n plugins: [],\n recordOptions: {},\n },\n storage: { backend: \"auto\", namespace: \"\", requestPersistent: false },\n diagnostics: { throttleMs: 1000, consoleFallback: false, records: false },\n correlation: { sessionIdleMs: SESSION_IDLE_MS, traceMaxAgeMs: TRACE_MAX_AGE_MS },\n metrics: {\n intervalMs: METRIC_INTERVAL_MS,\n maxSeries: METRIC_MAX_SERIES,\n maxInstruments: 1000,\n maxHistogramBoundaries: METRIC_MAX_BOUNDARIES,\n },\n buffering: {\n maxPendingRecords: 10000,\n maxPendingBytes: 16777216,\n maxHeldRecords: BUS_MAX_BOOT_BUFFER_RECORDS,\n overflow: \"drop-oldest\",\n },\n delivery: {\n requestTimeoutMs: REQUEST_TIMEOUT_MS,\n maxConcurrentRequests: MAX_CONCURRENT_REQUESTS,\n retryBaseDelayMs: RETRY_BASE_DELAY_MS,\n retryMaxDelayMs: RETRY_MAX_DELAY_MS,\n priority: \"low\",\n },\n lockConfiguration: false,\n loggerCache: { maxEntries: 256 },\n securityContext: { id: \"\", isolation: true },\n // \"\" means not set, so a configure() without an endpoint reports it. An app can't pass \"\".\n endpoint: \"\",\n metricsEndpoint: null,\n tracesEndpoint: null,\n serviceName: \"\",\n serviceVersion: \"\",\n environment: \"\",\n enabled: true,\n payloadMode: \"copy\",\n minLevel: \"INFO\",\n minLevels: {},\n processors: [],\n compression: \"gzip\",\n credentials: \"omit\",\n identity: \"storage\",\n sampling: {\n defaultRate: 1,\n rates: {},\n alwaysSampleTypes: [\"action\"],\n alwaysSampleFrom: \"ERROR\",\n errorCeiling: ERROR_CEILING_MAX_PER_WINDOW,\n errorCeilingWindowMs: ERROR_STORM_WINDOW_MS,\n remote: false,\n remoteMaxRate: 1,\n },\n bus: {\n mode: \"auto\",\n trustedOrigins: [],\n openFinRole: \"auto\",\n sourcePolicy: \"registered\",\n maxMessageBytes: 262144,\n maxRecordsPerMessage: 100,\n maxMessagesPerSecond: 100,\n },\n journey: { scope: \"auto\", maxAgeMs: JOURNEY_MAX_AGE_MS },\n batching: {\n logFlushIntervalMs: LOG_FLUSH_INTERVAL_MS,\n logBatchSize: LOG_BATCH_SIZE,\n metricBatchSize: METRIC_BATCH_SIZE,\n },\n retention: { ...STORAGE_LIMITS },\n limits: { ...RECORD_LIMITS },\n capture: {\n errors: true,\n rejections: true,\n resourceErrors: false,\n fetch: false,\n xhr: false,\n httpMetrics: true,\n interactions: false,\n navigation: false,\n webVitals: false,\n longFrames: false,\n console: false,\n fullUrls: false,\n ignoreUrls: [],\n propagateTraceHeaderTo: [],\n webSocket: false,\n uncleanExit: false,\n userTiming: false,\n remoteToggles: [],\n serverTiming: false,\n reports: false,\n resourceTiming: false,\n lifecycle: false,\n plugins: [],\n },\n consoleOutput: { level: null, styles: CONSOLE_DEFAULT_STYLES },\n};\n"],"mappings":";AAcA,IAAaA,KAAqB,sBAUrBC,KAAyB,KAOzBC,KAAiB,4BAGjBC,IAAa,wBAGbC,IAAY,0BAGZC,KAAkB,KAGlBC,IAAkB,MAGlBC,KAAmB,KAanBC,KAAqB,YAGrBC,KAA6B,UAG7BC,KAAwB,0BAGxBC,KAAuB,iBAGvBC,KAAoB,cAGpBC,KAAkB,eAGlBC,KAAkB,WAOlBC,IAAqB,OAGrBC,IAAqB,OAMrBC,IAAwB,MA+BxBC,IAA4C;CACvD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;AACT,GAMaC,IAAwCD,GAUxCE,IAAgB,YAGhBC,IAAe,WAGfC,IAAqB,iBAGrBC,IAAgB,YAOhBC,IAAgB,YAGhBC,IAAkB,cAGlBC,IAAoB,gBAGpBC,IAAyB,qBAGzBC,IAAuB,yBAGvBC,IAAkB,cAGlBC,IAAmB,eAMnBC,IAA0B,4BAM1BC,IAAwB,0BAGxBC,IAAuB,yBAGvBC,IAAoB,sBAMpBC,IAAwB,gBAGxBC,IAA2B,mBAG3BC,IAAkC,0BAMlCC,IAA8B,sBAM9BC,IAAiC,yBAMjCC,IAAkC,0BAGlCC,IAAyB,iBAGzB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