@nathanclaire/edge-telemetry-sdk 3.0.0 → 5.0.1

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 (319) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +985 -185
  3. package/dist/appLifecycle-DS_fEclk.cjs +2 -0
  4. package/dist/appLifecycle-DS_fEclk.cjs.map +1 -0
  5. package/dist/appLifecycle-PffQ4vC1.js +24 -0
  6. package/dist/appLifecycle-PffQ4vC1.js.map +1 -0
  7. package/dist/autoTaps.native-By9I4Kr2.cjs +2 -0
  8. package/dist/autoTaps.native-By9I4Kr2.cjs.map +1 -0
  9. package/dist/autoTaps.native-DQCXevD7.js +66 -0
  10. package/dist/autoTaps.native-DQCXevD7.js.map +1 -0
  11. package/dist/crashHandler.web-6KvedEB-.cjs +2 -0
  12. package/dist/crashHandler.web-6KvedEB-.cjs.map +1 -0
  13. package/dist/crashHandler.web-BUlSXYoS.js +30 -0
  14. package/dist/crashHandler.web-BUlSXYoS.js.map +1 -0
  15. package/dist/crashHandlerNative.native-CFVQ5UcO.cjs +2 -0
  16. package/dist/crashHandlerNative.native-CFVQ5UcO.cjs.map +1 -0
  17. package/dist/crashHandlerNative.native-DsCRd-oN.js +39 -0
  18. package/dist/crashHandlerNative.native-DsCRd-oN.js.map +1 -0
  19. package/dist/deviceInfo.native-D5gNBG7m.cjs +2 -0
  20. package/dist/deviceInfo.native-D5gNBG7m.cjs.map +1 -0
  21. package/dist/deviceInfo.native-DiiHrnI3.js +53 -0
  22. package/dist/deviceInfo.native-DiiHrnI3.js.map +1 -0
  23. package/dist/deviceInfo.web-BHsjVveq.js +41 -0
  24. package/dist/deviceInfo.web-BHsjVveq.js.map +1 -0
  25. package/dist/deviceInfo.web-DGCUHAnv.cjs +2 -0
  26. package/dist/deviceInfo.web-DGCUHAnv.cjs.map +1 -0
  27. package/dist/deviceState.native-BEysbZ6O.js +58 -0
  28. package/dist/deviceState.native-BEysbZ6O.js.map +1 -0
  29. package/dist/deviceState.native-CrQMy11_.cjs +2 -0
  30. package/dist/deviceState.native-CrQMy11_.cjs.map +1 -0
  31. package/dist/deviceState.web-ByaQm9Ry.js +14 -0
  32. package/dist/deviceState.web-ByaQm9Ry.js.map +1 -0
  33. package/dist/deviceState.web-CSfUgHDU.cjs +2 -0
  34. package/dist/deviceState.web-CSfUgHDU.cjs.map +1 -0
  35. package/dist/frameTracker-9j0en6Zm.cjs +2 -0
  36. package/dist/frameTracker-9j0en6Zm.cjs.map +1 -0
  37. package/dist/frameTracker-BzXnxSkb.js +53 -0
  38. package/dist/frameTracker-BzXnxSkb.js.map +1 -0
  39. package/dist/httpAttributes-BWXOr4eP.js +70 -0
  40. package/dist/httpAttributes-BWXOr4eP.js.map +1 -0
  41. package/dist/httpAttributes-COY0_kiF.cjs +2 -0
  42. package/dist/httpAttributes-COY0_kiF.cjs.map +1 -0
  43. package/dist/index.native.cjs +1 -1
  44. package/dist/index.native.cjs.map +1 -1
  45. package/dist/index.native.d.ts +1 -1
  46. package/dist/index.native.js +173 -81
  47. package/dist/index.native.js.map +1 -1
  48. package/dist/index.web.cjs +1 -1
  49. package/dist/index.web.cjs.map +1 -1
  50. package/dist/index.web.d.ts +1 -1
  51. package/dist/index.web.js +107 -39
  52. package/dist/index.web.js.map +1 -1
  53. package/dist/interactionWeb.web-BWBjmovb.js +109 -0
  54. package/dist/interactionWeb.web-BWBjmovb.js.map +1 -0
  55. package/dist/interactionWeb.web-CKDJLD9r.cjs +2 -0
  56. package/dist/interactionWeb.web-CKDJLD9r.cjs.map +1 -0
  57. package/dist/interceptFetchWeb.web-DjSR_Rft.js +62 -0
  58. package/dist/interceptFetchWeb.web-DjSR_Rft.js.map +1 -0
  59. package/dist/interceptFetchWeb.web-ZHw6IQkU.cjs +2 -0
  60. package/dist/interceptFetchWeb.web-ZHw6IQkU.cjs.map +1 -0
  61. package/dist/interceptHttpNative.native-C5scIcgY.cjs +2 -0
  62. package/dist/interceptHttpNative.native-C5scIcgY.cjs.map +1 -0
  63. package/dist/interceptHttpNative.native-vF_Fksjk.js +18 -0
  64. package/dist/interceptHttpNative.native-vF_Fksjk.js.map +1 -0
  65. package/dist/loadingTime-Cj5Oh8lT.cjs +2 -0
  66. package/dist/loadingTime-Cj5Oh8lT.cjs.map +1 -0
  67. package/dist/loadingTime-DMc0zTY8.js +70 -0
  68. package/dist/loadingTime-DMc0zTY8.js.map +1 -0
  69. package/dist/memoryNative.native-CK3QFVjY.cjs +2 -0
  70. package/dist/memoryNative.native-CK3QFVjY.cjs.map +1 -0
  71. package/dist/memoryNative.native-DkA6f7id.js +54 -0
  72. package/dist/memoryNative.native-DkA6f7id.js.map +1 -0
  73. package/dist/nativeSender-Dt1HLaLi.js +37 -0
  74. package/dist/nativeSender-Dt1HLaLi.js.map +1 -0
  75. package/dist/nativeSender-hCgUa7Vz.cjs +2 -0
  76. package/dist/nativeSender-hCgUa7Vz.cjs.map +1 -0
  77. package/dist/navigationRef-CVIv0aIK.js +30 -0
  78. package/dist/navigationRef-CVIv0aIK.js.map +1 -0
  79. package/dist/navigationRef-CfIbeXX8.cjs +2 -0
  80. package/dist/navigationRef-CfIbeXX8.cjs.map +1 -0
  81. package/dist/navigationWeb.web-CRHpr5zl.js +51 -0
  82. package/dist/navigationWeb.web-CRHpr5zl.js.map +1 -0
  83. package/dist/navigationWeb.web-DwWjL80b.cjs +2 -0
  84. package/dist/navigationWeb.web-DwWjL80b.cjs.map +1 -0
  85. package/dist/{networkChange-CUO1hRLj.cjs → networkChange-2FGIQM-N.cjs} +2 -2
  86. package/dist/networkChange-2FGIQM-N.cjs.map +1 -0
  87. package/dist/{networkChange-D39hdSb0.js → networkChange-QA0893vW.js} +2 -2
  88. package/dist/networkChange-QA0893vW.js.map +1 -0
  89. package/dist/networkInfo.native-CcJ3JVRF.js +31 -0
  90. package/dist/networkInfo.native-CcJ3JVRF.js.map +1 -0
  91. package/dist/networkInfo.native-whB2wf6a.cjs +2 -0
  92. package/dist/networkInfo.native-whB2wf6a.cjs.map +1 -0
  93. package/dist/{networkInfo.web-twcNn_hc.js → networkInfo.web-CcUpXMUK.js} +4 -4
  94. package/dist/networkInfo.web-CcUpXMUK.js.map +1 -0
  95. package/dist/networkInfo.web-DfO-BUFx.cjs +2 -0
  96. package/dist/networkInfo.web-DfO-BUFx.cjs.map +1 -0
  97. package/dist/react-bqe7KPOf.cjs +4 -0
  98. package/dist/react-bqe7KPOf.cjs.map +1 -0
  99. package/dist/react-urNtDGTL.js +413 -0
  100. package/dist/react-urNtDGTL.js.map +1 -0
  101. package/dist/runtimeReady.native-CxFl1rQR.js +35 -0
  102. package/dist/runtimeReady.native-CxFl1rQR.js.map +1 -0
  103. package/dist/runtimeReady.native-zueSbsEv.cjs +2 -0
  104. package/dist/runtimeReady.native-zueSbsEv.cjs.map +1 -0
  105. package/dist/runtimeReady.web-JuE239Tg.js +25 -0
  106. package/dist/runtimeReady.web-JuE239Tg.js.map +1 -0
  107. package/dist/runtimeReady.web-vhAJFU61.cjs +2 -0
  108. package/dist/runtimeReady.web-vhAJFU61.cjs.map +1 -0
  109. package/dist/seedRuntimeReady-BlRdf3pR.js +10 -0
  110. package/dist/seedRuntimeReady-BlRdf3pR.js.map +1 -0
  111. package/dist/seedRuntimeReady-CbjqbWCd.cjs +2 -0
  112. package/dist/seedRuntimeReady-CbjqbWCd.cjs.map +1 -0
  113. package/dist/src/adapters/appLifecycle.d.ts +11 -4
  114. package/dist/src/adapters/batch.d.ts +46 -0
  115. package/dist/src/adapters/crashCapture.d.ts +42 -9
  116. package/dist/src/adapters/deviceState.d.ts +9 -0
  117. package/dist/src/adapters/failedEvents.d.ts +43 -0
  118. package/dist/src/adapters/frameAggregate.d.ts +19 -12
  119. package/dist/src/adapters/frameTracker.d.ts +30 -0
  120. package/dist/src/adapters/hangDetector.d.ts +41 -0
  121. package/dist/src/adapters/httpAttributes.d.ts +18 -0
  122. package/dist/src/adapters/loadingTime.d.ts +67 -0
  123. package/dist/src/adapters/manualSpans.d.ts +41 -0
  124. package/dist/src/adapters/native/autoTaps.native.d.ts +15 -0
  125. package/dist/src/adapters/native/deviceState.native.d.ts +15 -0
  126. package/dist/src/adapters/native/interceptHttpNative.native.d.ts +18 -0
  127. package/dist/src/adapters/native/memoryNative.native.d.ts +15 -11
  128. package/dist/src/adapters/native/networkInfo.native.d.ts +1 -1
  129. package/dist/src/adapters/native/runtimeReady.native.d.ts +17 -0
  130. package/dist/src/adapters/native/store.native.d.ts +10 -0
  131. package/dist/src/adapters/nativeSender.d.ts +2 -2
  132. package/dist/src/adapters/navigationRef.d.ts +29 -0
  133. package/dist/src/adapters/networkChange.d.ts +2 -2
  134. package/dist/src/adapters/seedRuntimeReady.d.ts +8 -0
  135. package/dist/src/adapters/traceHeader.d.ts +33 -0
  136. package/dist/src/adapters/traceManager.d.ts +144 -0
  137. package/dist/src/adapters/uiInteraction.d.ts +111 -0
  138. package/dist/src/adapters/viewManager.d.ts +177 -0
  139. package/dist/src/adapters/viewport.d.ts +15 -0
  140. package/dist/src/adapters/web/deviceState.web.d.ts +10 -0
  141. package/dist/src/adapters/web/interactionWeb.web.d.ts +36 -0
  142. package/dist/src/adapters/web/interceptFetchWeb.web.d.ts +3 -11
  143. package/dist/src/adapters/web/navigationWeb.web.d.ts +13 -7
  144. package/dist/src/adapters/web/runtimeReady.web.d.ts +5 -0
  145. package/dist/src/adapters/web/store.web.d.ts +12 -0
  146. package/dist/src/adapters/web/webVitals.web.d.ts +56 -0
  147. package/dist/src/adapters/webSender.d.ts +2 -2
  148. package/dist/src/adapters/webVitals.d.ts +25 -0
  149. package/dist/src/adapters/xhrIntercept.d.ts +55 -0
  150. package/dist/src/core/beforeSend.d.ts +20 -0
  151. package/dist/src/core/breadcrumbs.d.ts +10 -0
  152. package/dist/src/core/debug.d.ts +7 -0
  153. package/dist/src/core/memoryStore.d.ts +23 -0
  154. package/dist/src/core/store.d.ts +41 -0
  155. package/dist/src/core/telemetry.d.ts +422 -42
  156. package/dist/src/core/userProfile.d.ts +19 -0
  157. package/dist/src/core/utils/json.d.ts +7 -0
  158. package/dist/src/core/utils/uuid.d.ts +10 -1
  159. package/dist/src/createTelemetry.native.d.ts +10 -1
  160. package/dist/src/createTelemetry.web.d.ts +9 -1
  161. package/dist/src/golden.helper.d.ts +4 -0
  162. package/dist/src/index.base.d.ts +93 -3
  163. package/dist/src/index.native.d.ts +7 -27
  164. package/dist/src/index.web.d.ts +7 -23
  165. package/dist/src/react.d.ts +45 -0
  166. package/dist/src/telemetryNative.native.d.ts +79 -0
  167. package/dist/src/telemetryWeb.web.d.ts +59 -0
  168. package/dist/store.native-BbS76uWV.cjs +2 -0
  169. package/dist/store.native-BbS76uWV.cjs.map +1 -0
  170. package/dist/store.native-MlWyGgBp.js +32 -0
  171. package/dist/store.native-MlWyGgBp.js.map +1 -0
  172. package/dist/store.web-BzKaP57Z.cjs +2 -0
  173. package/dist/store.web-BzKaP57Z.cjs.map +1 -0
  174. package/dist/store.web-rhh0NOfs.js +31 -0
  175. package/dist/store.web-rhh0NOfs.js.map +1 -0
  176. package/dist/telemetry-60sfWkh0.js +1754 -0
  177. package/dist/telemetry-60sfWkh0.js.map +1 -0
  178. package/dist/telemetry-CW63glwb.cjs +2 -0
  179. package/dist/telemetry-CW63glwb.cjs.map +1 -0
  180. package/dist/uiInteraction-BIDOMcrL.js +109 -0
  181. package/dist/uiInteraction-BIDOMcrL.js.map +1 -0
  182. package/dist/uiInteraction-DxlwCVSn.cjs +2 -0
  183. package/dist/uiInteraction-DxlwCVSn.cjs.map +1 -0
  184. package/dist/viewport-9JcVIXYF.cjs +2 -0
  185. package/dist/viewport-9JcVIXYF.cjs.map +1 -0
  186. package/dist/viewport-GWTEBt2K.js +15 -0
  187. package/dist/viewport-GWTEBt2K.js.map +1 -0
  188. package/dist/web-vitals.attribution-DAvBvdng.cjs +2 -0
  189. package/dist/web-vitals.attribution-DAvBvdng.cjs.map +1 -0
  190. package/dist/web-vitals.attribution-DcoMtvlY.js +488 -0
  191. package/dist/web-vitals.attribution-DcoMtvlY.js.map +1 -0
  192. package/dist/webSender-DA087xb5.cjs +2 -0
  193. package/dist/webSender-DA087xb5.cjs.map +1 -0
  194. package/dist/webSender-g4rs5TIg.js +44 -0
  195. package/dist/webSender-g4rs5TIg.js.map +1 -0
  196. package/dist/webVitals.web-DRTDK6s5.js +100 -0
  197. package/dist/webVitals.web-DRTDK6s5.js.map +1 -0
  198. package/dist/webVitals.web-DvScDIjX.cjs +2 -0
  199. package/dist/webVitals.web-DvScDIjX.cjs.map +1 -0
  200. package/dist/xhrIntercept-9uAkQh3N.js +55 -0
  201. package/dist/xhrIntercept-9uAkQh3N.js.map +1 -0
  202. package/dist/xhrIntercept-xG1Yl5RI.cjs +2 -0
  203. package/dist/xhrIntercept-xG1Yl5RI.cjs.map +1 -0
  204. package/docs/migration-v4.md +190 -0
  205. package/docs/migration-v5.md +178 -0
  206. package/package.json +22 -6
  207. package/dist/appLifecycle-Cynw0kAv.js +0 -14
  208. package/dist/appLifecycle-Cynw0kAv.js.map +0 -1
  209. package/dist/appLifecycle-DvJIt7ym.cjs +0 -2
  210. package/dist/appLifecycle-DvJIt7ym.cjs.map +0 -1
  211. package/dist/batch-CLBFgYPC.cjs +0 -2
  212. package/dist/batch-CLBFgYPC.cjs.map +0 -1
  213. package/dist/batch-DLG_gtOm.js +0 -12
  214. package/dist/batch-DLG_gtOm.js.map +0 -1
  215. package/dist/crashCapture-BYTM4FLC.cjs +0 -2
  216. package/dist/crashCapture-BYTM4FLC.cjs.map +0 -1
  217. package/dist/crashCapture-D_rkkBVa.js +0 -31
  218. package/dist/crashCapture-D_rkkBVa.js.map +0 -1
  219. package/dist/crashHandler.web-BSxDpFTo.cjs +0 -2
  220. package/dist/crashHandler.web-BSxDpFTo.cjs.map +0 -1
  221. package/dist/crashHandler.web-D59bmhg9.js +0 -32
  222. package/dist/crashHandler.web-D59bmhg9.js.map +0 -1
  223. package/dist/crashHandlerNative.native-DeAFze4E.cjs +0 -2
  224. package/dist/crashHandlerNative.native-DeAFze4E.cjs.map +0 -1
  225. package/dist/crashHandlerNative.native-d7qJkzA6.js +0 -41
  226. package/dist/crashHandlerNative.native-d7qJkzA6.js.map +0 -1
  227. package/dist/debug-DsvQ9y3W.js +0 -68
  228. package/dist/debug-DsvQ9y3W.js.map +0 -1
  229. package/dist/debug-rnOOxFpN.cjs +0 -2
  230. package/dist/debug-rnOOxFpN.cjs.map +0 -1
  231. package/dist/deviceInfo.native-7hbRYixR.cjs +0 -2
  232. package/dist/deviceInfo.native-7hbRYixR.cjs.map +0 -1
  233. package/dist/deviceInfo.native-D2k0LDhI.js +0 -1171
  234. package/dist/deviceInfo.native-D2k0LDhI.js.map +0 -1
  235. package/dist/deviceInfo.web-ByNAlEJh.cjs +0 -2
  236. package/dist/deviceInfo.web-ByNAlEJh.cjs.map +0 -1
  237. package/dist/deviceInfo.web-DzQyEku6.js +0 -40
  238. package/dist/deviceInfo.web-DzQyEku6.js.map +0 -1
  239. package/dist/frameAggregate-C_HoVFcK.cjs +0 -2
  240. package/dist/frameAggregate-C_HoVFcK.cjs.map +0 -1
  241. package/dist/frameAggregate-Cwh1juw1.js +0 -17
  242. package/dist/frameAggregate-Cwh1juw1.js.map +0 -1
  243. package/dist/frameDropsNative.native-CP7zrXDf.js +0 -23
  244. package/dist/frameDropsNative.native-CP7zrXDf.js.map +0 -1
  245. package/dist/frameDropsNative.native-DKqEDqip.cjs +0 -2
  246. package/dist/frameDropsNative.native-DKqEDqip.cjs.map +0 -1
  247. package/dist/frameDropsWeb.web-C9Lt3Fuj.js +0 -22
  248. package/dist/frameDropsWeb.web-C9Lt3Fuj.js.map +0 -1
  249. package/dist/frameDropsWeb.web-azpwQCUz.cjs +0 -2
  250. package/dist/frameDropsWeb.web-azpwQCUz.cjs.map +0 -1
  251. package/dist/httpAttributes-BV50UKQU.js +0 -19
  252. package/dist/httpAttributes-BV50UKQU.js.map +0 -1
  253. package/dist/httpAttributes-xXOD9trQ.cjs +0 -2
  254. package/dist/httpAttributes-xXOD9trQ.cjs.map +0 -1
  255. package/dist/interaction-CH8yoY5-.js +0 -23
  256. package/dist/interaction-CH8yoY5-.js.map +0 -1
  257. package/dist/interaction-DcNFBW7a.cjs +0 -2
  258. package/dist/interaction-DcNFBW7a.cjs.map +0 -1
  259. package/dist/interceptFetchNative.native-VlhtMG-U.js +0 -49
  260. package/dist/interceptFetchNative.native-VlhtMG-U.js.map +0 -1
  261. package/dist/interceptFetchNative.native-jEAldH14.cjs +0 -2
  262. package/dist/interceptFetchNative.native-jEAldH14.cjs.map +0 -1
  263. package/dist/interceptFetchWeb.web-DFzZliik.cjs +0 -2
  264. package/dist/interceptFetchWeb.web-DFzZliik.cjs.map +0 -1
  265. package/dist/interceptFetchWeb.web-DfsMfoRP.js +0 -77
  266. package/dist/interceptFetchWeb.web-DfsMfoRP.js.map +0 -1
  267. package/dist/memoryNative.native-BWLh2S9L.js +0 -48
  268. package/dist/memoryNative.native-BWLh2S9L.js.map +0 -1
  269. package/dist/memoryNative.native-DCXSOd4Q.cjs +0 -2
  270. package/dist/memoryNative.native-DCXSOd4Q.cjs.map +0 -1
  271. package/dist/memoryWeb.web-B3YuV-cB.js +0 -48
  272. package/dist/memoryWeb.web-B3YuV-cB.js.map +0 -1
  273. package/dist/memoryWeb.web-CheXAcJn.cjs +0 -2
  274. package/dist/memoryWeb.web-CheXAcJn.cjs.map +0 -1
  275. package/dist/nativeSender-BE_mzw_S.js +0 -70
  276. package/dist/nativeSender-BE_mzw_S.js.map +0 -1
  277. package/dist/nativeSender-DyAUGY7c.cjs +0 -2
  278. package/dist/nativeSender-DyAUGY7c.cjs.map +0 -1
  279. package/dist/navigationNative.native-3tO5JxSd.cjs +0 -2
  280. package/dist/navigationNative.native-3tO5JxSd.cjs.map +0 -1
  281. package/dist/navigationNative.native-BUCGPQX2.js +0 -25
  282. package/dist/navigationNative.native-BUCGPQX2.js.map +0 -1
  283. package/dist/navigationTracker-B2GMwyKk.cjs +0 -2
  284. package/dist/navigationTracker-B2GMwyKk.cjs.map +0 -1
  285. package/dist/navigationTracker-Cts68dgG.js +0 -19
  286. package/dist/navigationTracker-Cts68dgG.js.map +0 -1
  287. package/dist/navigationWeb.web-B0necr5j.cjs +0 -2
  288. package/dist/navigationWeb.web-B0necr5j.cjs.map +0 -1
  289. package/dist/navigationWeb.web-CORzE_Id.js +0 -46
  290. package/dist/navigationWeb.web-CORzE_Id.js.map +0 -1
  291. package/dist/networkChange-CUO1hRLj.cjs.map +0 -1
  292. package/dist/networkChange-D39hdSb0.js.map +0 -1
  293. package/dist/networkInfo.native-BK5fpAOL.js +0 -343
  294. package/dist/networkInfo.native-BK5fpAOL.js.map +0 -1
  295. package/dist/networkInfo.native-cxuw93Uy.cjs +0 -2
  296. package/dist/networkInfo.native-cxuw93Uy.cjs.map +0 -1
  297. package/dist/networkInfo.web-DJmw1sNK.cjs +0 -2
  298. package/dist/networkInfo.web-DJmw1sNK.cjs.map +0 -1
  299. package/dist/networkInfo.web-twcNn_hc.js.map +0 -1
  300. package/dist/src/adapters/interaction.d.ts +0 -17
  301. package/dist/src/adapters/native/frameDropsNative.native.d.ts +0 -16
  302. package/dist/src/adapters/native/interceptFetchNative.native.d.ts +0 -23
  303. package/dist/src/adapters/native/navigationNative.native.d.ts +0 -12
  304. package/dist/src/adapters/navigationTracker.d.ts +0 -6
  305. package/dist/src/adapters/screenTiming.d.ts +0 -9
  306. package/dist/src/adapters/web/frameDropsWeb.web.d.ts +0 -16
  307. package/dist/src/adapters/web/memoryWeb.web.d.ts +0 -26
  308. package/dist/telemetry-Co4MYdwa.cjs +0 -2
  309. package/dist/telemetry-Co4MYdwa.cjs.map +0 -1
  310. package/dist/telemetry-KI0x4gzC.js +0 -389
  311. package/dist/telemetry-KI0x4gzC.js.map +0 -1
  312. package/dist/v4-BysszJq8.js +0 -31
  313. package/dist/v4-BysszJq8.js.map +0 -1
  314. package/dist/v4-CqdK_b8Y.cjs +0 -2
  315. package/dist/v4-CqdK_b8Y.cjs.map +0 -1
  316. package/dist/webSender-B27tmT1w.js +0 -42
  317. package/dist/webSender-B27tmT1w.js.map +0 -1
  318. package/dist/webSender-BWi4x1df.cjs +0 -2
  319. package/dist/webSender-BWi4x1df.cjs.map +0 -1
@@ -0,0 +1,10 @@
1
+ import { DeviceStateHandler } from '../../core/telemetry';
2
+ /**
3
+ * #173, web. Only `device.reduce_motion`, via `matchMedia`. No battery — `navigator.getBattery`
4
+ * is Chromium-only, a browser-detection signal wearing a battery label (§5.2's defect) — and no
5
+ * screen reader or font scale: RN-Web answers both with constants, and a fake value is worse
6
+ * than none.
7
+ */
8
+ export declare class DeviceStateWeb implements DeviceStateHandler {
9
+ accessibility(): Promise<Record<string, boolean>>;
10
+ }
@@ -0,0 +1,36 @@
1
+ import { Telemetry } from '../../core/telemetry';
2
+ export declare class InteractionTrackerWeb {
3
+ private telemetry;
4
+ private started;
5
+ private readonly rage;
6
+ /**
7
+ * Monotonic aliveness counter. A DOM mutation, a request start or a view mint bumps it;
8
+ * a click that sees the same value a window later saw nothing happen. A counter rather
9
+ * than a timestamp so the comparison needs no clock and cannot be fooled by a clock that
10
+ * moved backwards.
11
+ */
12
+ private aliveTick;
13
+ private readonly pending;
14
+ private observer?;
15
+ constructor(telemetry: Telemetry);
16
+ start(): void;
17
+ private onClick;
18
+ /** Arm one dead-click window and emit when it closes. */
19
+ private watchForDeath;
20
+ /**
21
+ * Emit every open window **now**, with `ui.dead` **omitted** — the window never closed,
22
+ * so it was not evaluated, which is exactly what its absence means (§4.6). Inventing a
23
+ * verdict from a partial window is the false accusation the key is built to avoid.
24
+ */
25
+ private drainPending;
26
+ private emit;
27
+ private canObserve;
28
+ /**
29
+ * Observed only while a window is open. A permanently-connected whole-document observer
30
+ * is a real cost on a busy React tree, and there is nothing to answer between clicks.
31
+ * `attributes: true` because §4.6 counts an attribute-only change as alive — a CSS class
32
+ * flip is a response.
33
+ */
34
+ private connectObserver;
35
+ private disconnectObserver;
36
+ }
@@ -1,14 +1,9 @@
1
1
  import { Telemetry } from '../../core/telemetry';
2
2
  /**
3
- * NetworkTrackerWeb intercepts all HTTP requests made through
4
- * `window.fetch` and `XMLHttpRequest` in a browser environment.
3
+ * NetworkTrackerWeb intercepts HTTP made through `window.fetch` and `XMLHttpRequest`.
5
4
  *
6
- * It logs detailed telemetry data such as request URL, HTTP method,
7
- * response status, request and response body sizes, request duration,
8
- * and error information, if any.
9
- *
10
- * This class should be instantiated once and the `start` method called
11
- * during application initialization to begin interception.
5
+ * Both are patched here, unlike native: browser `fetch` is a native implementation, not
6
+ * XHR-backed, so the two are genuinely separate channels and neither double-counts (§4.4).
12
7
  */
13
8
  export declare class NetworkTrackerWeb {
14
9
  private telemetry;
@@ -20,9 +15,6 @@ export declare class NetworkTrackerWeb {
20
15
  /**
21
16
  * Starts intercepting HTTP requests made through `fetch` and `XMLHttpRequest`.
22
17
  *
23
- * This method patches the global `fetch` function and `XMLHttpRequest` methods
24
- * `open` and `send` to gather telemetry and log it asynchronously.
25
- *
26
18
  * @returns A Promise that resolves immediately once interception is setup.
27
19
  */
28
20
  start(): Promise<void>;
@@ -1,13 +1,11 @@
1
1
  import { Telemetry } from '../../core/telemetry';
2
2
  /**
3
- * Tracks navigation route changes in web environments by patching
4
- * history API methods and listening to popstate events.
5
- * Logs route transitions using an internal NavigationTracker instance.
3
+ * Tracks route changes in web environments by patching the history API methods and listening
4
+ * to popstate events, feeding rung 3 (`url`) of the view-name ladder. Emits no `navigation`
5
+ * row: that feed is removed in v5 (#163), which also closes its raw query-string leak.
6
6
  */
7
7
  export declare class NavigationTrackerWeb {
8
8
  private telemetry;
9
- private tracker;
10
- private currentPath;
11
9
  constructor(telemetry: Telemetry);
12
10
  /**
13
11
  * Initializes tracking by patching history methods and listening
@@ -17,8 +15,7 @@ export declare class NavigationTrackerWeb {
17
15
  */
18
16
  start(): Promise<void>;
19
17
  /**
20
- * Patches history.pushState and history.replaceState to intercept
21
- * route changes and notify the NavigationTracker.
18
+ * Patches history.pushState and history.replaceState to intercept route changes.
22
19
  */
23
20
  private patchHistory;
24
21
  /**
@@ -26,4 +23,13 @@ export declare class NavigationTrackerWeb {
26
23
  * to detect route changes triggered by browser controls.
27
24
  */
28
25
  private listenPopState;
26
+ /**
27
+ * One route change: rung 3 of the name ladder (§4.5.1) — the *last* rung, so an
28
+ * `attachNavigation` consumer's `route.name` outranks it whichever arrives first.
29
+ *
30
+ * Normalized by §4.4.1's rule, and the query string is dropped: there is no `view.url`
31
+ * and no raw path on the wire, because the identifier lives in the path
32
+ * (`/accounts/GB29-NWBK-…`) and query-stripping alone would not have addressed that.
33
+ */
34
+ private handleChange;
29
35
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Resolves once the marker is known — `undefined` when the platform has none to give, which
3
+ * releases the gate rather than leaving every launch reporting `abandoned` (§4.5.2).
4
+ */
5
+ export declare function runtimeReadyAt(): Promise<number | undefined>;
@@ -0,0 +1,12 @@
1
+ import { SyncStore } from '../../core/store';
2
+ /**
3
+ * localStorage-backed Store for the web build (#89). Reads are synchronous, and
4
+ * that is the point: state written here is durable before the next line runs, so
5
+ * the crash-loss window closes rather than narrows.
6
+ *
7
+ * Every access is guarded. Touching `localStorage` throws — not returns null — in
8
+ * incognito with cookies blocked, in a partitioned third-party iframe, and once
9
+ * quota is exhausted; and the identifier isn't declared at all outside a browser.
10
+ * All of those are `unavailable`, never an exception out of the SDK.
11
+ */
12
+ export declare function webStore(): SyncStore;
@@ -0,0 +1,56 @@
1
+ import { ViewLoadType } from '../viewManager';
2
+ /**
3
+ * All this tracker needs of core. Structural, so it is testable without a `Telemetry`.
4
+ */
5
+ type VitalsEmitter = {
6
+ logMetric(name: string, value: number, data?: Record<string, any>): unknown;
7
+ views: {
8
+ onBoundary(fn: (successorLoadType: ViewLoadType) => unknown): () => void;
9
+ };
10
+ };
11
+ export declare class WebVitalsTracker {
12
+ private telemetry;
13
+ /** The running values, held rather than emitted — see `start()`. */
14
+ private held;
15
+ /** What each held name last shipped, so an unchanged value does not re-ship at every hide. */
16
+ private emitted;
17
+ private started;
18
+ private stopped;
19
+ private unsubscribe?;
20
+ constructor(telemetry: VitalsEmitter);
21
+ /**
22
+ * Idempotent: a second call must not double-subscribe and double every vital row.
23
+ *
24
+ * LCP, FCP and TTFB fire once on the initial load, so they emit straight from the callback.
25
+ *
26
+ * ⚠ **CLS and INP subscribe with `reportAllChanges: true` as a running-value subscription,
27
+ * not an emission trigger.** The latest value is held in memory and shipped at the
28
+ * `ViewManager`'s background boundary — the library's default page-hide report loses both
29
+ * on a closed tab, because that report races the document's own teardown.
30
+ *
31
+ * ⚠ **All five are page-load-scoped, not view-scoped.** `LCP`, `FCP` and `TTFB` physically
32
+ * cannot recur on a soft navigation, so `view.id` on a vital row is always the *initial*
33
+ * view's. It is a real join key, it is just not "the view this happened in" for CLS and INP:
34
+ * `GROUP BY view.name` over vitals reads **"by entry point"**. Documented, not engineered
35
+ * around — view-scoping would need the Chrome-only Soft Navigations API.
36
+ */
37
+ start(): Promise<void>;
38
+ /**
39
+ * `shutdown()`'s teardown (#160): no boundary may `logMetric` after it. The library's own
40
+ * observers have no detach API, so `emit` is gated instead — a late LCP is dropped too.
41
+ */
42
+ stop(): void;
43
+ /**
44
+ * Awaited inside `beginView` while the departing view is still current, so the rows carry
45
+ * the view they were accumulated under. A name whose running value has not moved since its
46
+ * last row is skipped — a tab hidden twice with no shifts in between is not two CLS
47
+ * samples, and the library's own report has the same no-delta-no-report property.
48
+ *
49
+ * Keying on `value` alone is exact for both held vitals, not a shortcut: CLS is cumulative,
50
+ * so *any* shift moves it, and INP only changes when a worse interaction happens. An
51
+ * unchanged value therefore means the attribution is unchanged too.
52
+ */
53
+ private drain;
54
+ private emit;
55
+ }
56
+ export {};
@@ -1,3 +1,3 @@
1
1
  import { Sender } from '../core/telemetry';
2
- export declare function webSender(endpoint?: string, apiKey?: string, retryCount?: number): Sender;
3
- export declare function replayFailedWeb(endpoint?: string, apiKey?: string, retryCount?: number): Promise<void> | undefined;
2
+ import { SyncStore } from '../core/store';
3
+ export declare function webSender(endpoint?: string, apiKey?: string, store?: SyncStore, retryCount?: number): Sender;
@@ -0,0 +1,25 @@
1
+ /** The five names. All are already on `ALLOWED_NAMES`, and all ride the **metric** path. */
2
+ export type VitalName = "LCP" | "FCP" | "CLS" | "INP" | "TTFB";
3
+ /**
4
+ * Structurally typed against `web-vitals/attribution`'s metric, so this module compiles and
5
+ * tests without the library and cannot pull it into a shared import graph.
6
+ */
7
+ export type VitalMetric = {
8
+ name: string;
9
+ value: number;
10
+ rating: string;
11
+ navigationType: string;
12
+ attribution?: Record<string, any>;
13
+ };
14
+ /**
15
+ * Build a vital row's attribute bag: four shared keys plus the per-vital ones (§5.3).
16
+ *
17
+ * ⚠ **LCP's four phases sum exactly to `value`** — that is the library's own guarantee and a
18
+ * testable claim, which is why `lcp.time_to_first_byte` deliberately duplicates the `TTFB` row
19
+ * rather than forcing a cross-row join to decompose one number.
20
+ *
21
+ * Everything the library did not produce is **omitted**, never nulled: `vital.target` and
22
+ * `vital.load_state` are absent on the vitals that have no element and no load state, and the
23
+ * SDK's absent-means-nothing discipline is what tells that apart from a zero.
24
+ */
25
+ export declare function vitalAttributes(m: VitalMetric): Record<string, any>;
@@ -0,0 +1,55 @@
1
+ import { Telemetry, LogSnapshot } from '../core/telemetry';
2
+ import { TraceAttributes } from './traceManager';
3
+ declare const PATCHED = "__edgeTelemetryXhrPatched";
4
+ interface PendingRequest {
5
+ method: string;
6
+ url: string;
7
+ start: number;
8
+ body?: unknown;
9
+ /**
10
+ * Closes this request's contribution to §4.5.2's network settle. Bound at `send()` to the
11
+ * view that was live *then*, so a response landing after a route change belongs to the view
12
+ * it started in and does not hold the arriving one open.
13
+ */
14
+ settled?: (endedAt?: number) => void;
15
+ /**
16
+ * §6.3's Tier 1 keys, captured at `send()` so the parent is the root live *then* and
17
+ * `span.start_time` is the send. Called at `loadend` to stamp `span.duration_ms` off
18
+ * the same pair of timestamps `http.duration_ms` uses.
19
+ */
20
+ span?: (endedAt: number) => TraceAttributes;
21
+ /** Drops the `request` root this send minted — only for a synchronous `send()` throw. */
22
+ discardRoot?: () => void;
23
+ /**
24
+ * §6.4's ownership flag: the consumer's own `traceparent`, recorded **at their write
25
+ * time** in the `setRequestHeader` patch. Never inferred from the value's shape — an
26
+ * SDK-minted and a consumer-minted header are byte-identical by construction — and reset
27
+ * by `open()`, which per spec clears the author request headers anyway.
28
+ */
29
+ consumerTraceparent?: string;
30
+ /**
31
+ * §3.1's attribution freeze: `session.id`, `session.start_time` and `view.id` as they
32
+ * were at `send()`. The 4-hour cap can rotate a session *while this request is in
33
+ * flight*, which would otherwise put S1's trace on an S2 row. No `at` — the row still
34
+ * reports its completion timestamp (§4.4).
35
+ */
36
+ snap?: LogSnapshot;
37
+ }
38
+ interface PatchedXhr extends XMLHttpRequest {
39
+ _telemetryRequest?: PendingRequest;
40
+ _telemetryListening?: boolean;
41
+ }
42
+ type XhrCtor = {
43
+ prototype: PatchedXhr;
44
+ [PATCHED]?: boolean;
45
+ };
46
+ /**
47
+ * Patches an `XMLHttpRequest` prototype so every completed request emits one `http.request`.
48
+ * Shared because the native build is XHR-*only* (§4.4: RN's `global.fetch` is XHR underneath,
49
+ * so patching both emits two events per call) while the web build patches XHR alongside its
50
+ * own `fetch` patch — same emit rules, two different sets of callers.
51
+ *
52
+ * @returns the unpatch, so `stop()` can restore the prototype.
53
+ */
54
+ export declare function patchXHR(telemetry: Telemetry, xhr: XhrCtor): () => void;
55
+ export {};
@@ -0,0 +1,20 @@
1
+ import { TelemetryEvent } from './telemetry';
2
+ /**
3
+ * The consumer's scrubbing hook (§3.6). One event, **synchronous**, run at **enqueue**.
4
+ *
5
+ * Enqueue and not flush: a failed send persists the batch through the `Store`, so a
6
+ * flush-time hook would let unscrubbed PII hit disk — and on native that disk outlives
7
+ * the process. Synchronous because `app.crash` flushes during teardown and a
8
+ * Promise-returning hook would put a host `await` in a dying app's path.
9
+ */
10
+ export type BeforeSend = (event: TelemetryEvent) => TelemetryEvent | null;
11
+ export type HookOutcome = {
12
+ kind: "kept";
13
+ event: TelemetryEvent;
14
+ } | {
15
+ kind: "dropped";
16
+ } | {
17
+ kind: "failed";
18
+ };
19
+ /** Run the hook and enforce the tiers on what comes back. */
20
+ export declare function applyBeforeSend(original: TelemetryEvent, hook: BeforeSend): HookOutcome;
@@ -1,3 +1,13 @@
1
+ /** #167's bounds on one crumb, so 20 of them cannot blow `app.crash`'s budget. */
2
+ export declare const CRUMB_NAME_MAX = 64;
3
+ export declare const CRUMB_DATA_KEYS = 8;
4
+ /**
5
+ * A crumb, bounded: `name` capped at 64, the first 8 `data` keys kept, each value by the
6
+ * `user.custom.*` bag rule (primitive as itself, else stringified; capped at 255; dropped if it
7
+ * cannot be stringified). `name` and `timestamp` are set last, so `data` cannot rename the crumb.
8
+ * No `category`, no `level` — a crumb is a name and a little context.
9
+ */
10
+ export declare function boundCrumb(name: unknown, data?: Record<string, unknown>, at?: Date): Record<string, unknown>;
1
11
  /**
2
12
  * Fixed-size ring buffer of recent actions, attached to `app.crash` as the
3
13
  * JSON-stringified `crash.breadcrumbs` (last N, oldest evicted first). See #28.
@@ -4,3 +4,10 @@ export declare const debug: {
4
4
  warn: (...args: any[]) => void;
5
5
  error: (...args: any[]) => void;
6
6
  };
7
+ /**
8
+ * `__DEV__` on RN, `NODE_ENV` elsewhere. Dev-only *config* diagnostics (a malformed
9
+ * allowlist, the `Error.stackTraceLimit` advisory) surface through this rather than the
10
+ * `debug` gate above: they are wiring mistakes the consumer has to see while building,
11
+ * and `debug: true` is exactly what a consumer with a wiring mistake has not set.
12
+ */
13
+ export declare function isDev(): boolean;
@@ -0,0 +1,23 @@
1
+ import { AsyncStore, SyncStore } from './store';
2
+ export type MemoryStoreOpts = {
3
+ /** Mirror the native build's Promise-returning shape instead of the web build's. */
4
+ async?: boolean;
5
+ /** Behave like incognito / a full disk: every call reports `unavailable`. */
6
+ unavailable?: boolean;
7
+ /** Pre-seeded contents. */
8
+ seed?: Record<string, string>;
9
+ };
10
+ /**
11
+ * In-memory Store (#89). A production-shaped seam that tests get to use, not a
12
+ * test-only affordance — it ships, and it is the right injection for a consumer
13
+ * that wants telemetry state to die with the process.
14
+ *
15
+ * Configurable to either build's shape so the sync/async asymmetry can be tested
16
+ * deliberately rather than assumed away.
17
+ */
18
+ export declare function memoryStore(opts: MemoryStoreOpts & {
19
+ async: true;
20
+ }): AsyncStore;
21
+ export declare function memoryStore(opts?: MemoryStoreOpts & {
22
+ async?: false;
23
+ }): SyncStore;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Reading storage has three outcomes, not two.
3
+ *
4
+ * `unavailable` is a first-class path, not an error: incognito, partitioned iframes,
5
+ * Safari ITP eviction and full disks all land here, and they are the population
6
+ * `device.id_ephemeral` reports (wire contract §3.2). It is deliberately distinct
7
+ * from `miss` — "storage said no" is not "storage had nothing stored".
8
+ */
9
+ export type StoreRead = {
10
+ status: "hit";
11
+ value: string;
12
+ } | {
13
+ status: "miss";
14
+ } | {
15
+ status: "unavailable";
16
+ };
17
+ /** Writes and removes carry the same unavailable path — quota exceeded, disk full. */
18
+ export type StoreWrite = {
19
+ status: "ok";
20
+ } | {
21
+ status: "unavailable";
22
+ };
23
+ /** Storage whose reads have completed by the time they return. The web build. */
24
+ export interface SyncStore {
25
+ readonly sync: true;
26
+ get(key: string): StoreRead;
27
+ set(key: string, value: string): StoreWrite;
28
+ remove(key: string): StoreWrite;
29
+ }
30
+ /** Storage whose reads settle later. The native build. */
31
+ export interface AsyncStore {
32
+ readonly sync: false;
33
+ get(key: string): Promise<StoreRead>;
34
+ set(key: string, value: string): Promise<StoreWrite>;
35
+ remove(key: string): Promise<StoreWrite>;
36
+ }
37
+ /**
38
+ * Either build. Shared core takes this; a caller that needs the synchronous
39
+ * guarantee narrows with `if (store.sync)` or takes `SyncStore` outright.
40
+ */
41
+ export type Store = SyncStore | AsyncStore;