@nathanclaire/edge-telemetry-sdk 4.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 (272) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -30
  3. package/dist/appLifecycle-DS_fEclk.cjs +2 -0
  4. package/dist/appLifecycle-DS_fEclk.cjs.map +1 -0
  5. package/dist/{appLifecycle-DQErzJIR.js → appLifecycle-PffQ4vC1.js} +5 -3
  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-FupMnr1U.js → crashHandlerNative.native-DsCRd-oN.js} +13 -13
  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-BoeTZcD6.cjs.map → deviceInfo.native-D5gNBG7m.cjs.map} +1 -1
  21. package/dist/deviceInfo.native-DiiHrnI3.js +53 -0
  22. package/dist/{deviceInfo.native-BJ-3Jj1T.js.map → deviceInfo.native-DiiHrnI3.js.map} +1 -1
  23. package/dist/{deviceInfo.web-BFB1-pcA.js → deviceInfo.web-BHsjVveq.js} +3 -3
  24. package/dist/{deviceInfo.web-BFB1-pcA.js.map → deviceInfo.web-BHsjVveq.js.map} +1 -1
  25. package/dist/{deviceInfo.web-3L3IDQQA.cjs → deviceInfo.web-DGCUHAnv.cjs} +2 -2
  26. package/dist/{deviceInfo.web-3L3IDQQA.cjs.map → deviceInfo.web-DGCUHAnv.cjs.map} +1 -1
  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-DdB8W_kC.js → frameTracker-BzXnxSkb.js} +18 -19
  38. package/dist/frameTracker-BzXnxSkb.js.map +1 -0
  39. package/dist/{httpAttributes-BrrtM8zh.js → httpAttributes-BWXOr4eP.js} +1 -1
  40. package/dist/{httpAttributes-BrrtM8zh.js.map → httpAttributes-BWXOr4eP.js.map} +1 -1
  41. package/dist/{httpAttributes-D0m6UID7.cjs → httpAttributes-COY0_kiF.cjs} +1 -1
  42. package/dist/{httpAttributes-D0m6UID7.cjs.map → httpAttributes-COY0_kiF.cjs.map} +1 -1
  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 +128 -71
  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 +51 -38
  52. package/dist/index.web.js.map +1 -1
  53. package/dist/{interactionWeb.web-CJAviVQ7.js → interactionWeb.web-BWBjmovb.js} +8 -8
  54. package/dist/{interactionWeb.web-CJAviVQ7.js.map → interactionWeb.web-BWBjmovb.js.map} +1 -1
  55. package/dist/interactionWeb.web-CKDJLD9r.cjs +2 -0
  56. package/dist/{interactionWeb.web-Bl_cZlgh.cjs.map → interactionWeb.web-CKDJLD9r.cjs.map} +1 -1
  57. package/dist/{interceptFetchWeb.web-UXC2Lb6X.js → interceptFetchWeb.web-DjSR_Rft.js} +18 -17
  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-UXC2Lb6X.js.map → interceptFetchWeb.web-ZHw6IQkU.cjs.map} +1 -1
  61. package/dist/{interceptHttpNative.native-BVpFuoNB.cjs → interceptHttpNative.native-C5scIcgY.cjs} +2 -2
  62. package/dist/{interceptHttpNative.native-BVpFuoNB.cjs.map → interceptHttpNative.native-C5scIcgY.cjs.map} +1 -1
  63. package/dist/{interceptHttpNative.native-rX-lPNST.js → interceptHttpNative.native-vF_Fksjk.js} +2 -2
  64. package/dist/{interceptHttpNative.native-rX-lPNST.js.map → interceptHttpNative.native-vF_Fksjk.js.map} +1 -1
  65. package/dist/{loadingTime-Bhomd9qq.cjs → loadingTime-Cj5Oh8lT.cjs} +1 -1
  66. package/dist/{loadingTime-Bhomd9qq.cjs.map → loadingTime-Cj5Oh8lT.cjs.map} +1 -1
  67. package/dist/{loadingTime-ZkYvFijA.js → loadingTime-DMc0zTY8.js} +1 -1
  68. package/dist/{loadingTime-ZkYvFijA.js.map → loadingTime-DMc0zTY8.js.map} +1 -1
  69. package/dist/memoryNative.native-CK3QFVjY.cjs +2 -0
  70. package/dist/memoryNative.native-CK3QFVjY.cjs.map +1 -0
  71. package/dist/{memoryNative.native-C42h9SjK.js → memoryNative.native-DkA6f7id.js} +12 -12
  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-B2YlLNsI.js → networkInfo.web-CcUpXMUK.js} +2 -2
  94. package/dist/networkInfo.web-CcUpXMUK.js.map +1 -0
  95. package/dist/{networkInfo.web-PltJTHsy.cjs → networkInfo.web-DfO-BUFx.cjs} +2 -2
  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-C8fdIbVR.js → runtimeReady.web-JuE239Tg.js} +2 -2
  106. package/dist/{runtimeReady.web-C8fdIbVR.js.map → runtimeReady.web-JuE239Tg.js.map} +1 -1
  107. package/dist/{runtimeReady.web-DHW682RN.cjs → runtimeReady.web-vhAJFU61.cjs} +2 -2
  108. package/dist/{runtimeReady.web-DHW682RN.cjs.map → runtimeReady.web-vhAJFU61.cjs.map} +1 -1
  109. package/dist/{seedRuntimeReady-Cz8nOKoo.js → seedRuntimeReady-BlRdf3pR.js} +2 -2
  110. package/dist/{seedRuntimeReady-Cz8nOKoo.js.map → seedRuntimeReady-BlRdf3pR.js.map} +1 -1
  111. package/dist/seedRuntimeReady-CbjqbWCd.cjs +2 -0
  112. package/dist/{seedRuntimeReady-BKwkBEAF.cjs.map → seedRuntimeReady-CbjqbWCd.cjs.map} +1 -1
  113. package/dist/src/adapters/appLifecycle.d.ts +3 -3
  114. package/dist/src/adapters/batch.d.ts +44 -0
  115. package/dist/src/adapters/crashCapture.d.ts +5 -1
  116. package/dist/src/adapters/deviceState.d.ts +9 -0
  117. package/dist/src/adapters/frameAggregate.d.ts +15 -13
  118. package/dist/src/adapters/frameTracker.d.ts +1 -1
  119. package/dist/src/adapters/hangDetector.d.ts +41 -0
  120. package/dist/src/adapters/manualSpans.d.ts +41 -0
  121. package/dist/src/adapters/native/autoTaps.native.d.ts +15 -0
  122. package/dist/src/adapters/native/deviceState.native.d.ts +15 -0
  123. package/dist/src/adapters/native/memoryNative.native.d.ts +3 -3
  124. package/dist/src/adapters/native/networkInfo.native.d.ts +1 -1
  125. package/dist/src/adapters/native/runtimeReady.native.d.ts +16 -0
  126. package/dist/src/adapters/navigationRef.d.ts +17 -9
  127. package/dist/src/adapters/networkChange.d.ts +2 -2
  128. package/dist/src/adapters/traceManager.d.ts +18 -5
  129. package/dist/src/adapters/uiInteraction.d.ts +1 -1
  130. package/dist/src/adapters/viewManager.d.ts +24 -8
  131. package/dist/src/adapters/web/deviceState.web.d.ts +10 -0
  132. package/dist/src/adapters/web/navigationWeb.web.d.ts +6 -10
  133. package/dist/src/adapters/web/webVitals.web.d.ts +7 -0
  134. package/dist/src/adapters/xhrIntercept.d.ts +2 -0
  135. package/dist/src/core/breadcrumbs.d.ts +10 -0
  136. package/dist/src/core/telemetry.d.ts +139 -29
  137. package/dist/src/core/userProfile.d.ts +7 -0
  138. package/dist/src/createTelemetry.native.d.ts +3 -1
  139. package/dist/src/createTelemetry.web.d.ts +2 -1
  140. package/dist/src/golden.helper.d.ts +4 -0
  141. package/dist/src/index.base.d.ts +80 -6
  142. package/dist/src/index.native.d.ts +4 -61
  143. package/dist/src/index.web.d.ts +4 -51
  144. package/dist/src/react.d.ts +45 -0
  145. package/dist/src/telemetryNative.native.d.ts +79 -0
  146. package/dist/src/telemetryWeb.web.d.ts +59 -0
  147. package/dist/{store.native-TPqXngmF.cjs → store.native-BbS76uWV.cjs} +1 -1
  148. package/dist/{store.native-TPqXngmF.cjs.map → store.native-BbS76uWV.cjs.map} +1 -1
  149. package/dist/{store.native-BYBJcy6o.js → store.native-MlWyGgBp.js} +1 -1
  150. package/dist/{store.native-BYBJcy6o.js.map → store.native-MlWyGgBp.js.map} +1 -1
  151. package/dist/{store.web-CvqqN-_Z.cjs → store.web-BzKaP57Z.cjs} +1 -1
  152. package/dist/{store.web-CvqqN-_Z.cjs.map → store.web-BzKaP57Z.cjs.map} +1 -1
  153. package/dist/{store.web-DJAlN0nc.js → store.web-rhh0NOfs.js} +1 -1
  154. package/dist/{store.web-DJAlN0nc.js.map → store.web-rhh0NOfs.js.map} +1 -1
  155. package/dist/telemetry-60sfWkh0.js +1754 -0
  156. package/dist/telemetry-60sfWkh0.js.map +1 -0
  157. package/dist/telemetry-CW63glwb.cjs +2 -0
  158. package/dist/telemetry-CW63glwb.cjs.map +1 -0
  159. package/dist/{uiInteraction-DAqxxz0q.js → uiInteraction-BIDOMcrL.js} +39 -34
  160. package/dist/{uiInteraction-DAqxxz0q.js.map → uiInteraction-BIDOMcrL.js.map} +1 -1
  161. package/dist/uiInteraction-DxlwCVSn.cjs +2 -0
  162. package/dist/{uiInteraction-CdzvEI1p.cjs.map → uiInteraction-DxlwCVSn.cjs.map} +1 -1
  163. package/dist/{viewport-Dd85GUNO.cjs → viewport-9JcVIXYF.cjs} +1 -1
  164. package/dist/{viewport-Dd85GUNO.cjs.map → viewport-9JcVIXYF.cjs.map} +1 -1
  165. package/dist/{viewport-Dzmt5QwK.js → viewport-GWTEBt2K.js} +1 -1
  166. package/dist/{viewport-Dzmt5QwK.js.map → viewport-GWTEBt2K.js.map} +1 -1
  167. package/dist/{web-vitals.attribution-CVCPiX-h.cjs → web-vitals.attribution-DAvBvdng.cjs} +1 -1
  168. package/dist/{web-vitals.attribution-CVCPiX-h.cjs.map → web-vitals.attribution-DAvBvdng.cjs.map} +1 -1
  169. package/dist/{web-vitals.attribution-xw9N5MKQ.js → web-vitals.attribution-DcoMtvlY.js} +1 -1
  170. package/dist/{web-vitals.attribution-xw9N5MKQ.js.map → web-vitals.attribution-DcoMtvlY.js.map} +1 -1
  171. package/dist/webSender-DA087xb5.cjs +2 -0
  172. package/dist/webSender-DA087xb5.cjs.map +1 -0
  173. package/dist/webSender-g4rs5TIg.js +44 -0
  174. package/dist/webSender-g4rs5TIg.js.map +1 -0
  175. package/dist/{webVitals.web-CNIpsKlA.js → webVitals.web-DRTDK6s5.js} +39 -24
  176. package/dist/webVitals.web-DRTDK6s5.js.map +1 -0
  177. package/dist/webVitals.web-DvScDIjX.cjs +2 -0
  178. package/dist/webVitals.web-DvScDIjX.cjs.map +1 -0
  179. package/dist/{xhrIntercept-BNiA41Mj.js → xhrIntercept-9uAkQh3N.js} +16 -14
  180. package/dist/xhrIntercept-9uAkQh3N.js.map +1 -0
  181. package/dist/xhrIntercept-xG1Yl5RI.cjs +2 -0
  182. package/dist/xhrIntercept-xG1Yl5RI.cjs.map +1 -0
  183. package/docs/migration-v4.md +1 -1
  184. package/docs/migration-v5.md +178 -0
  185. package/package.json +12 -4
  186. package/dist/appLifecycle-CECgRVu_.cjs +0 -2
  187. package/dist/appLifecycle-CECgRVu_.cjs.map +0 -1
  188. package/dist/appLifecycle-DQErzJIR.js.map +0 -1
  189. package/dist/batch-CwoO7noL.js +0 -56
  190. package/dist/batch-CwoO7noL.js.map +0 -1
  191. package/dist/batch-DNu8Xr9T.cjs +0 -2
  192. package/dist/batch-DNu8Xr9T.cjs.map +0 -1
  193. package/dist/crashCapture-BOJ8nSAZ.cjs +0 -4
  194. package/dist/crashCapture-BOJ8nSAZ.cjs.map +0 -1
  195. package/dist/crashCapture-BW8WuyaU.js +0 -70
  196. package/dist/crashCapture-BW8WuyaU.js.map +0 -1
  197. package/dist/crashHandler.web-8F_k2veo.js +0 -29
  198. package/dist/crashHandler.web-8F_k2veo.js.map +0 -1
  199. package/dist/crashHandler.web-CWmF56mJ.cjs +0 -2
  200. package/dist/crashHandler.web-CWmF56mJ.cjs.map +0 -1
  201. package/dist/crashHandlerNative.native-C2kSikDt.cjs +0 -2
  202. package/dist/crashHandlerNative.native-C2kSikDt.cjs.map +0 -1
  203. package/dist/crashHandlerNative.native-FupMnr1U.js.map +0 -1
  204. package/dist/deviceInfo.native-BJ-3Jj1T.js +0 -53
  205. package/dist/deviceInfo.native-BoeTZcD6.cjs +0 -2
  206. package/dist/frameTracker-CHG6sIx9.cjs +0 -2
  207. package/dist/frameTracker-CHG6sIx9.cjs.map +0 -1
  208. package/dist/frameTracker-DdB8W_kC.js.map +0 -1
  209. package/dist/index-BtLlV1HA.js +0 -57
  210. package/dist/index-BtLlV1HA.js.map +0 -1
  211. package/dist/index-C2XQ-EYw.js +0 -1122
  212. package/dist/index-C2XQ-EYw.js.map +0 -1
  213. package/dist/index-CXsVZY35.cjs +0 -2
  214. package/dist/index-CXsVZY35.cjs.map +0 -1
  215. package/dist/index-DLquF88M.cjs +0 -2
  216. package/dist/index-DLquF88M.cjs.map +0 -1
  217. package/dist/interactionWeb.web-Bl_cZlgh.cjs +0 -2
  218. package/dist/interceptFetchWeb.web-T88kO-bE.cjs +0 -2
  219. package/dist/interceptFetchWeb.web-T88kO-bE.cjs.map +0 -1
  220. package/dist/memoryNative.native-C42h9SjK.js.map +0 -1
  221. package/dist/memoryNative.native-CA-7w9w1.cjs +0 -2
  222. package/dist/memoryNative.native-CA-7w9w1.cjs.map +0 -1
  223. package/dist/memoryStore-BIGZmmfD.cjs +0 -2
  224. package/dist/memoryStore-BIGZmmfD.cjs.map +0 -1
  225. package/dist/memoryStore-F5I-GQKM.js +0 -193
  226. package/dist/memoryStore-F5I-GQKM.js.map +0 -1
  227. package/dist/nativeSender-CfQaRuDK.cjs +0 -2
  228. package/dist/nativeSender-CfQaRuDK.cjs.map +0 -1
  229. package/dist/nativeSender-pgVSIv-X.js +0 -59
  230. package/dist/nativeSender-pgVSIv-X.js.map +0 -1
  231. package/dist/navigationRef-BzYbs8cm.js +0 -28
  232. package/dist/navigationRef-BzYbs8cm.js.map +0 -1
  233. package/dist/navigationRef-C-_qhb43.cjs +0 -2
  234. package/dist/navigationRef-C-_qhb43.cjs.map +0 -1
  235. package/dist/navigationTracker-BmywA_Bg.js +0 -19
  236. package/dist/navigationTracker-BmywA_Bg.js.map +0 -1
  237. package/dist/navigationTracker-HkwVyywz.cjs +0 -2
  238. package/dist/navigationTracker-HkwVyywz.cjs.map +0 -1
  239. package/dist/navigationWeb.web-CW_z7Ca4.cjs +0 -2
  240. package/dist/navigationWeb.web-CW_z7Ca4.cjs.map +0 -1
  241. package/dist/navigationWeb.web-CcwgKuIZ.js +0 -55
  242. package/dist/navigationWeb.web-CcwgKuIZ.js.map +0 -1
  243. package/dist/networkChange-CUO1hRLj.cjs.map +0 -1
  244. package/dist/networkChange-D39hdSb0.js.map +0 -1
  245. package/dist/networkInfo.native-CGrx9cnH.js +0 -343
  246. package/dist/networkInfo.native-CGrx9cnH.js.map +0 -1
  247. package/dist/networkInfo.native-YVySdv3S.cjs +0 -2
  248. package/dist/networkInfo.native-YVySdv3S.cjs.map +0 -1
  249. package/dist/networkInfo.web-B2YlLNsI.js.map +0 -1
  250. package/dist/networkInfo.web-PltJTHsy.cjs.map +0 -1
  251. package/dist/runtimeReady.native-Bh7EcYmK.js +0 -14
  252. package/dist/runtimeReady.native-Bh7EcYmK.js.map +0 -1
  253. package/dist/runtimeReady.native-jUmuE1lV.cjs +0 -2
  254. package/dist/runtimeReady.native-jUmuE1lV.cjs.map +0 -1
  255. package/dist/seedRuntimeReady-BKwkBEAF.cjs +0 -2
  256. package/dist/src/adapters/navigationTracker.d.ts +0 -6
  257. package/dist/src/adapters/screenTiming.d.ts +0 -15
  258. package/dist/telemetry-ByDJIz_9.js +0 -1280
  259. package/dist/telemetry-ByDJIz_9.js.map +0 -1
  260. package/dist/telemetry-CrU7i1Jc.cjs +0 -2
  261. package/dist/telemetry-CrU7i1Jc.cjs.map +0 -1
  262. package/dist/uiInteraction-CdzvEI1p.cjs +0 -2
  263. package/dist/webSender-BIwslfpT.js +0 -63
  264. package/dist/webSender-BIwslfpT.js.map +0 -1
  265. package/dist/webSender-CVtE4sOF.cjs +0 -2
  266. package/dist/webSender-CVtE4sOF.cjs.map +0 -1
  267. package/dist/webVitals.web-CNIpsKlA.js.map +0 -1
  268. package/dist/webVitals.web-DpWJ-iYp.cjs +0 -2
  269. package/dist/webVitals.web-DpWJ-iYp.cjs.map +0 -1
  270. package/dist/xhrIntercept-BADex6Cq.cjs +0 -2
  271. package/dist/xhrIntercept-BADex6Cq.cjs.map +0 -1
  272. package/dist/xhrIntercept-BNiA41Mj.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeReady.web-DHW682RN.cjs","sources":["../src/adapters/web/runtimeReady.web.ts"],"sourcesContent":["// The web half of §4.5.2's `initial_load` seed: the launch view is busy until the document's\n// own load marker, then settles. `loadEventEnd` is the platform's answer to \"the runtime is\n// ready\"; the SDK does not invent one.\n//\n// ⚠ Web's `initial_load` is systematically LARGER than native's — it includes DNS, TLS and\n// document download where native reads a bundle off local disk. Cross-platform `initial_load`\n// comparison is not apples-to-apples (§4.5.2); within-platform release comparison is fine.\n\nimport { LOADING_TIME_CAP_MS } from \"../loadingTime\";\n\n/** Epoch ms of `loadEventEnd`, or undefined where the entry is unavailable. */\nfunction readMarker(): number | undefined {\n if (typeof performance === \"undefined\") return undefined;\n const nav = performance.getEntriesByType?.(\"navigation\")?.[0] as PerformanceNavigationTiming | undefined;\n // Navigation-timing values are relative to timeOrigin; the settle module works in epoch ms.\n if (nav && nav.loadEventEnd > 0) return performance.timeOrigin + nav.loadEventEnd;\n // `performance.timing` is the removed-but-still-shipped legacy API; not in lib.dom's types.\n const legacy = (performance as unknown as { timing?: { loadEventEnd?: number } }).timing?.loadEventEnd;\n return typeof legacy === \"number\" && legacy > 0 ? legacy : undefined;\n}\n\n/**\n * Resolves once the marker is known — `undefined` when the platform has none to give, which\n * releases the gate rather than leaving every launch reporting `abandoned` (§4.5.2).\n */\nexport function runtimeReadyAt(): Promise<number | undefined> {\n if (typeof window === \"undefined\") return Promise.resolve(undefined);\n\n const early = readMarker();\n if (early !== undefined) return Promise.resolve(early);\n // Already loaded but the entry is missing (an old browser, a same-document navigation):\n // nothing more is coming, so release rather than wait forever.\n if (typeof document !== \"undefined\" && document.readyState === \"complete\") {\n return Promise.resolve(undefined);\n }\n\n return new Promise((resolve) => {\n let settled = false;\n const finish = (at?: number) => { if (!settled) { settled = true; resolve(at); } };\n\n window.addEventListener(\"load\", () => {\n // `loadEventEnd` is stamped *after* the load handlers run, so it is still 0 inside\n // one of them. Now is a truthful marker either way — we are in the load event.\n finish(readMarker() ?? Date.now());\n }, { once: true });\n\n // A `load` that never fires — a stalled subresource, a runtime with no such event —\n // would otherwise leave the gate shut forever and make every launch report\n // `abandoned`, which is the exact failure this module exists to avoid. Past the cap\n // the launch view is capped anyway, so there is nothing left to wait for.\n const timer = setTimeout(() => finish(undefined), LOADING_TIME_CAP_MS);\n (timer as any)?.unref?.(); // never hold a Node process open for a marker\n });\n}\n"],"names":["readMarker","nav","legacy","runtimeReadyAt","early","resolve","settled","finish","at","LOADING_TIME_CAP_MS"],"mappings":"8HAWA,SAASA,GAAiC,CACtC,GAAI,OAAO,YAAgB,IAAa,OACxC,MAAMC,EAAM,YAAY,mBAAmB,YAAY,IAAI,CAAC,EAE5D,GAAIA,GAAOA,EAAI,aAAe,EAAG,OAAO,YAAY,WAAaA,EAAI,aAErE,MAAMC,EAAU,YAAkE,QAAQ,aAC1F,OAAO,OAAOA,GAAW,UAAYA,EAAS,EAAIA,EAAS,MAC/D,CAMO,SAASC,GAA8C,CAC1D,GAAI,OAAO,OAAW,IAAa,OAAO,QAAQ,QAAQ,MAAS,EAEnE,MAAMC,EAAQJ,EAAA,EACd,OAAII,IAAU,OAAkB,QAAQ,QAAQA,CAAK,EAGjD,OAAO,SAAa,KAAe,SAAS,aAAe,WACpD,QAAQ,QAAQ,MAAS,EAG7B,IAAI,QAASC,GAAY,CAC5B,IAAIC,EAAU,GACd,MAAMC,EAAUC,GAAgB,CAAOF,IAAWA,EAAU,GAAMD,EAAQG,CAAE,EAAK,EAEjF,OAAO,iBAAiB,OAAQ,IAAM,CAGlCD,EAAOP,EAAA,GAAgB,KAAK,IAAA,CAAK,CACrC,EAAG,CAAE,KAAM,GAAM,EAMH,WAAW,IAAMO,EAAO,MAAS,EAAGE,EAAAA,mBAAmB,GACrD,QAAA,CACpB,CAAC,CACL"}
1
+ {"version":3,"file":"runtimeReady.web-vhAJFU61.cjs","sources":["../src/adapters/web/runtimeReady.web.ts"],"sourcesContent":["// The web half of §4.5.2's `initial_load` seed: the launch view is busy until the document's\n// own load marker, then settles. `loadEventEnd` is the platform's answer to \"the runtime is\n// ready\"; the SDK does not invent one.\n//\n// ⚠ Web's `initial_load` is systematically LARGER than native's — it includes DNS, TLS and\n// document download where native reads a bundle off local disk. Cross-platform `initial_load`\n// comparison is not apples-to-apples (§4.5.2); within-platform release comparison is fine.\n\nimport { LOADING_TIME_CAP_MS } from \"../loadingTime\";\n\n/** Epoch ms of `loadEventEnd`, or undefined where the entry is unavailable. */\nfunction readMarker(): number | undefined {\n if (typeof performance === \"undefined\") return undefined;\n const nav = performance.getEntriesByType?.(\"navigation\")?.[0] as PerformanceNavigationTiming | undefined;\n // Navigation-timing values are relative to timeOrigin; the settle module works in epoch ms.\n if (nav && nav.loadEventEnd > 0) return performance.timeOrigin + nav.loadEventEnd;\n // `performance.timing` is the removed-but-still-shipped legacy API; not in lib.dom's types.\n const legacy = (performance as unknown as { timing?: { loadEventEnd?: number } }).timing?.loadEventEnd;\n return typeof legacy === \"number\" && legacy > 0 ? legacy : undefined;\n}\n\n/**\n * Resolves once the marker is known — `undefined` when the platform has none to give, which\n * releases the gate rather than leaving every launch reporting `abandoned` (§4.5.2).\n */\nexport function runtimeReadyAt(): Promise<number | undefined> {\n if (typeof window === \"undefined\") return Promise.resolve(undefined);\n\n const early = readMarker();\n if (early !== undefined) return Promise.resolve(early);\n // Already loaded but the entry is missing (an old browser, a same-document navigation):\n // nothing more is coming, so release rather than wait forever.\n if (typeof document !== \"undefined\" && document.readyState === \"complete\") {\n return Promise.resolve(undefined);\n }\n\n return new Promise((resolve) => {\n let settled = false;\n const finish = (at?: number) => { if (!settled) { settled = true; resolve(at); } };\n\n window.addEventListener(\"load\", () => {\n // `loadEventEnd` is stamped *after* the load handlers run, so it is still 0 inside\n // one of them. Now is a truthful marker either way — we are in the load event.\n finish(readMarker() ?? Date.now());\n }, { once: true });\n\n // A `load` that never fires — a stalled subresource, a runtime with no such event —\n // would otherwise leave the gate shut forever and make every launch report\n // `abandoned`, which is the exact failure this module exists to avoid. Past the cap\n // the launch view is capped anyway, so there is nothing left to wait for.\n const timer = setTimeout(() => finish(undefined), LOADING_TIME_CAP_MS);\n (timer as any)?.unref?.(); // never hold a Node process open for a marker\n });\n}\n"],"names":["readMarker","nav","legacy","runtimeReadyAt","early","resolve","settled","finish","at","LOADING_TIME_CAP_MS"],"mappings":"8HAWA,SAASA,GAAiC,CACtC,GAAI,OAAO,YAAgB,IAAa,OACxC,MAAMC,EAAM,YAAY,mBAAmB,YAAY,IAAI,CAAC,EAE5D,GAAIA,GAAOA,EAAI,aAAe,EAAG,OAAO,YAAY,WAAaA,EAAI,aAErE,MAAMC,EAAU,YAAkE,QAAQ,aAC1F,OAAO,OAAOA,GAAW,UAAYA,EAAS,EAAIA,EAAS,MAC/D,CAMO,SAASC,GAA8C,CAC1D,GAAI,OAAO,OAAW,IAAa,OAAO,QAAQ,QAAQ,MAAS,EAEnE,MAAMC,EAAQJ,EAAA,EACd,OAAII,IAAU,OAAkB,QAAQ,QAAQA,CAAK,EAGjD,OAAO,SAAa,KAAe,SAAS,aAAe,WACpD,QAAQ,QAAQ,MAAS,EAG7B,IAAI,QAASC,GAAY,CAC5B,IAAIC,EAAU,GACd,MAAMC,EAAUC,GAAgB,CAAOF,IAAWA,EAAU,GAAMD,EAAQG,CAAE,EAAK,EAEjF,OAAO,iBAAiB,OAAQ,IAAM,CAGlCD,EAAOP,EAAA,GAAgB,KAAK,IAAA,CAAK,CACrC,EAAG,CAAE,KAAM,GAAM,EAMH,WAAW,IAAMO,EAAO,MAAS,EAAGE,EAAAA,mBAAmB,GACrD,QAAA,CACpB,CAAC,CACL"}
@@ -1,4 +1,4 @@
1
- import { d as r } from "./memoryStore-F5I-GQKM.js";
1
+ import { d as r } from "./react-urNtDGTL.js";
2
2
  function i(a, d, n) {
3
3
  Promise.resolve().then(d).then((e) => a.seedRuntimeReady(e)).catch((e) => {
4
4
  r.warn(`${n} runtime-ready marker unavailable:`, e), a.seedRuntimeReady(void 0);
@@ -7,4 +7,4 @@ function i(a, d, n) {
7
7
  export {
8
8
  i as seedRuntimeReady
9
9
  };
10
- //# sourceMappingURL=seedRuntimeReady-Cz8nOKoo.js.map
10
+ //# sourceMappingURL=seedRuntimeReady-BlRdf3pR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"seedRuntimeReady-Cz8nOKoo.js","sources":["../src/adapters/seedRuntimeReady.ts"],"sourcesContent":["// Arming §4.5.2's `initial_load` seed, shared by both entries because only the *source* of the\n// marker is platform-specific — the failure handling around it is not, and it is the part that\n// must not be got wrong twice.\n//\n// Every path here ends in exactly one `seedRuntimeReady()` call. A gate that is never released\n// makes every launch report `abandoned`, which is the one outcome this seed exists to prevent.\n\nimport { debug } from \"../core/debug\";\nimport type { ViewManager } from \"./viewManager\";\n\nexport type RuntimeReadyReader = () => Promise<number | undefined>;\n\n/**\n * Fire-and-forget on purpose: on web the marker arrives with the load event, and blocking init\n * on it would put every host call behind the page's own images. The caller awaits the *module*\n * import instead, so the seed is armed before the instance is visible.\n */\nexport function seedRuntimeReady(views: ViewManager, read: RuntimeReadyReader, build: string): void {\n // `Promise.resolve().then` and not a bare call: a reader that throws *synchronously* would\n // sidestep the catch below and leave the gate shut.\n void Promise.resolve()\n .then(read)\n .then((at) => views.seedRuntimeReady(at))\n .catch((err: unknown) => {\n debug.warn(`${build} runtime-ready marker unavailable:`, err);\n views.seedRuntimeReady(undefined); // release the gate anyway\n });\n}\n"],"names":["seedRuntimeReady","views","read","build","at","err","debug"],"mappings":";AAiBO,SAASA,EAAiBC,GAAoBC,GAA0BC,GAAqB;AAGhG,EAAK,QAAQ,QAAA,EACR,KAAKD,CAAI,EACT,KAAK,CAACE,MAAOH,EAAM,iBAAiBG,CAAE,CAAC,EACvC,MAAM,CAACC,MAAiB;AACrB,IAAAC,EAAM,KAAK,GAAGH,CAAK,sCAAsCE,CAAG,GAC5DJ,EAAM,iBAAiB,MAAS;AAAA,EACpC,CAAC;AACT;"}
1
+ {"version":3,"file":"seedRuntimeReady-BlRdf3pR.js","sources":["../src/adapters/seedRuntimeReady.ts"],"sourcesContent":["// Arming §4.5.2's `initial_load` seed, shared by both entries because only the *source* of the\n// marker is platform-specific — the failure handling around it is not, and it is the part that\n// must not be got wrong twice.\n//\n// Every path here ends in exactly one `seedRuntimeReady()` call. A gate that is never released\n// makes every launch report `abandoned`, which is the one outcome this seed exists to prevent.\n\nimport { debug } from \"../core/debug\";\nimport type { ViewManager } from \"./viewManager\";\n\nexport type RuntimeReadyReader = () => Promise<number | undefined>;\n\n/**\n * Fire-and-forget on purpose: on web the marker arrives with the load event, and blocking init\n * on it would put every host call behind the page's own images. The caller awaits the *module*\n * import instead, so the seed is armed before the instance is visible.\n */\nexport function seedRuntimeReady(views: ViewManager, read: RuntimeReadyReader, build: string): void {\n // `Promise.resolve().then` and not a bare call: a reader that throws *synchronously* would\n // sidestep the catch below and leave the gate shut.\n void Promise.resolve()\n .then(read)\n .then((at) => views.seedRuntimeReady(at))\n .catch((err: unknown) => {\n debug.warn(`${build} runtime-ready marker unavailable:`, err);\n views.seedRuntimeReady(undefined); // release the gate anyway\n });\n}\n"],"names":["seedRuntimeReady","views","read","build","at","err","debug"],"mappings":";AAiBO,SAASA,EAAiBC,GAAoBC,GAA0BC,GAAqB;AAGhG,EAAK,QAAQ,QAAA,EACR,KAAKD,CAAI,EACT,KAAK,CAACE,MAAOH,EAAM,iBAAiBG,CAAE,CAAC,EACvC,MAAM,CAACC,MAAiB;AACrB,IAAAC,EAAM,KAAK,GAAGH,CAAK,sCAAsCE,CAAG,GAC5DJ,EAAM,iBAAiB,MAAS;AAAA,EACpC,CAAC;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react-bqe7KPOf.cjs");function r(t,a,d){Promise.resolve().then(a).then(e=>t.seedRuntimeReady(e)).catch(e=>{n.debug.warn(`${d} runtime-ready marker unavailable:`,e),t.seedRuntimeReady(void 0)})}exports.seedRuntimeReady=r;
2
+ //# sourceMappingURL=seedRuntimeReady-CbjqbWCd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"seedRuntimeReady-BKwkBEAF.cjs","sources":["../src/adapters/seedRuntimeReady.ts"],"sourcesContent":["// Arming §4.5.2's `initial_load` seed, shared by both entries because only the *source* of the\n// marker is platform-specific — the failure handling around it is not, and it is the part that\n// must not be got wrong twice.\n//\n// Every path here ends in exactly one `seedRuntimeReady()` call. A gate that is never released\n// makes every launch report `abandoned`, which is the one outcome this seed exists to prevent.\n\nimport { debug } from \"../core/debug\";\nimport type { ViewManager } from \"./viewManager\";\n\nexport type RuntimeReadyReader = () => Promise<number | undefined>;\n\n/**\n * Fire-and-forget on purpose: on web the marker arrives with the load event, and blocking init\n * on it would put every host call behind the page's own images. The caller awaits the *module*\n * import instead, so the seed is armed before the instance is visible.\n */\nexport function seedRuntimeReady(views: ViewManager, read: RuntimeReadyReader, build: string): void {\n // `Promise.resolve().then` and not a bare call: a reader that throws *synchronously* would\n // sidestep the catch below and leave the gate shut.\n void Promise.resolve()\n .then(read)\n .then((at) => views.seedRuntimeReady(at))\n .catch((err: unknown) => {\n debug.warn(`${build} runtime-ready marker unavailable:`, err);\n views.seedRuntimeReady(undefined); // release the gate anyway\n });\n}\n"],"names":["seedRuntimeReady","views","read","build","at","err","debug"],"mappings":"8HAiBO,SAASA,EAAiBC,EAAoBC,EAA0BC,EAAqB,CAG3F,QAAQ,QAAA,EACR,KAAKD,CAAI,EACT,KAAME,GAAOH,EAAM,iBAAiBG,CAAE,CAAC,EACvC,MAAOC,GAAiB,CACrBC,EAAAA,MAAM,KAAK,GAAGH,CAAK,qCAAsCE,CAAG,EAC5DJ,EAAM,iBAAiB,MAAS,CACpC,CAAC,CACT"}
1
+ {"version":3,"file":"seedRuntimeReady-CbjqbWCd.cjs","sources":["../src/adapters/seedRuntimeReady.ts"],"sourcesContent":["// Arming §4.5.2's `initial_load` seed, shared by both entries because only the *source* of the\n// marker is platform-specific — the failure handling around it is not, and it is the part that\n// must not be got wrong twice.\n//\n// Every path here ends in exactly one `seedRuntimeReady()` call. A gate that is never released\n// makes every launch report `abandoned`, which is the one outcome this seed exists to prevent.\n\nimport { debug } from \"../core/debug\";\nimport type { ViewManager } from \"./viewManager\";\n\nexport type RuntimeReadyReader = () => Promise<number | undefined>;\n\n/**\n * Fire-and-forget on purpose: on web the marker arrives with the load event, and blocking init\n * on it would put every host call behind the page's own images. The caller awaits the *module*\n * import instead, so the seed is armed before the instance is visible.\n */\nexport function seedRuntimeReady(views: ViewManager, read: RuntimeReadyReader, build: string): void {\n // `Promise.resolve().then` and not a bare call: a reader that throws *synchronously* would\n // sidestep the catch below and leave the gate shut.\n void Promise.resolve()\n .then(read)\n .then((at) => views.seedRuntimeReady(at))\n .catch((err: unknown) => {\n debug.warn(`${build} runtime-ready marker unavailable:`, err);\n views.seedRuntimeReady(undefined); // release the gate anyway\n });\n}\n"],"names":["seedRuntimeReady","views","read","build","at","err","debug"],"mappings":"wHAiBO,SAASA,EAAiBC,EAAoBC,EAA0BC,EAAqB,CAG3F,QAAQ,QAAA,EACR,KAAKD,CAAI,EACT,KAAME,GAAOH,EAAM,iBAAiBG,CAAE,CAAC,EACvC,MAAOC,GAAiB,CACrBC,EAAAA,MAAM,KAAK,GAAGH,CAAK,qCAAsCE,CAAG,EAC5DJ,EAAM,iBAAiB,MAAS,CACpC,CAAC,CACT"}
@@ -2,10 +2,10 @@ import { Telemetry } from '../core/telemetry';
2
2
  /**
3
3
  * Shared foreground/background emitter — the single source of truth so the native
4
4
  * (RN AppState) and web (visibilitychange) lifecycle adapters stay in lockstep on the
5
- * v3 `app_lifecycle` contract (#30).
5
+ * `app.lifecycle` catalogue event (#30, #179).
6
6
  *
7
- * Feed it the current active state via `onState(isActive)`. It emits `app_lifecycle` only
8
- * on a transition, carrying the direction as `app_lifecycle.state` (foreground|background).
7
+ * Feed it the current active state via `onState(isActive)`. It emits `app.lifecycle` only
8
+ * on a transition, carrying the direction as `lifecycle.state` (foreground|background).
9
9
  */
10
10
  export declare class AppLifecycleEmitter {
11
11
  private telemetry;
@@ -1,4 +1,48 @@
1
1
  import { TelemetryEvent } from '../core/telemetry';
2
+ /**
3
+ * The catalogue's contract version this build speaks (#179, processor #29). Only the major gates
4
+ * parsing; the minor follows the catalogue tag pinned in `catalogue.version`.
5
+ */
6
+ export declare const CONTRACT_VERSION = "4.3.0";
7
+ /**
8
+ * The 8-key 4.x envelope (`envelope.yaml`), shared by both senders so the web and native POST
9
+ * bodies stay byte-identical. Identity comes from the rows themselves, so a batch persisted by
10
+ * a prior launch replays under that launch's `app` block. Every row of one batch shares it:
11
+ * the live queue has one identity per process, and `byIdentity()` splits a replayed one.
12
+ */
2
13
  export declare function buildBatch(events: TelemetryEvent[]): string;
14
+ /** Rows grouped by identity, first-seen order — one envelope per group on replay. */
15
+ export declare function byIdentity(events: TelemetryEvent[]): TelemetryEvent[][];
16
+ /**
17
+ * Replay a recovered queue, one POST per identity. On a failure the unsent rows go back to the
18
+ * store — minus the failed group itself when it was rejected (§2.5: a 4xx is dropped, never kept).
19
+ */
20
+ export declare function replayGroups(stored: TelemetryEvent[], post: (events: TelemetryEvent[]) => Promise<void>, persist: (events: TelemetryEvent[]) => unknown): Promise<void>;
3
21
  export declare function buildHeaders(credential: string | undefined): Record<string, string>;
22
+ /**
23
+ * A non-2xx the senders refuse to retry (§2.5): any 4xx, 429 included. `resetAt` is the epoch
24
+ * ms `X-RateLimit-Reset` names, when the collector sent one. Core reads `status` by shape, so
25
+ * a consumer's own sender can throw `{ status: 401 }` and get the same handling.
26
+ */
27
+ export declare class HttpStatusError extends Error {
28
+ readonly status: number;
29
+ readonly resetAt?: number | undefined;
30
+ constructor(status: number, resetAt?: number | undefined);
31
+ }
32
+ /** The status a send failed with, when it failed with one; `undefined` for network and the rest. */
33
+ export declare function statusOf(err: unknown): number | undefined;
34
+ /** 4xx except 429: drop the batch — no retry, no persist (§2.5). */
35
+ export declare const isRejected: (err: unknown) => boolean;
36
+ type PostResult = {
37
+ ok: boolean;
38
+ status: number;
39
+ headers?: any;
40
+ };
41
+ /**
42
+ * Retry + backoff, shared by both senders so the §2.5 status table is one rule. 5xx and network
43
+ * errors retry; a 4xx — 429 included — throws at once, because retrying a wrong credential three
44
+ * times only delays the drop and retrying a 429 is the stampede the header exists to stop.
45
+ */
46
+ export declare function sendWithRetry(post: () => Promise<PostResult>, retryCount: number, backoffMs: (attempt: number) => number): Promise<void>;
4
47
  export declare const DEFAULT_ENDPOINT = "https://your.telemetry.endpoint/telemetry";
48
+ export {};
@@ -6,7 +6,11 @@
6
6
  * `error.*`, and both explicit wire nulls go with them. #100
7
7
  */
8
8
  /** `error.source` — a full re-cut of v3's `crash.cause`, not a rename. 5 values. */
9
- export type ErrorSource = "global_handler" | "unhandled_rejection" | "cross_origin" | "console" | "reported";
9
+ export type ErrorSource = "global_handler" | "unhandled_rejection" | "cross_origin" | "console" | "reported" | "boundary";
10
+ /** `error.component_stack` (#166): raw, same 2000 cap, cut on a line boundary like a stack. */
11
+ export declare const capComponentStack: (stack: string) => string;
12
+ export declare function markBoundaryCaught(error: unknown): void;
13
+ export declare function isBoundaryCaught(error: unknown): boolean;
10
14
  /**
11
15
  * `error.type` is read from `error.name` **only, never `constructor.name`**: RN production
12
16
  * bundles minify class names, so `class PaymentError extends Error {}` would report as `"a"`
@@ -0,0 +1,9 @@
1
+ /** A failure row's battery keys, or none. `-1` (simulator), non-finite or out of range → omitted. */
2
+ export declare function batteryAttributes(level: unknown, charging: unknown, powerSave: unknown): Record<string, number | boolean>;
3
+ /**
4
+ * One read, settled to a value or `undefined` — a throw, a rejection, a missing method or a
5
+ * non-boolean/non-finite answer all omit that one key, never the others.
6
+ */
7
+ export declare function readOr<T>(read: () => T | Promise<T>, valid: (v: unknown) => boolean): Promise<T | undefined>;
8
+ export declare const isBool: (v: unknown) => v is boolean;
9
+ export declare const isFiniteNumber: (v: unknown) => boolean;
@@ -1,17 +1,19 @@
1
- export interface FrameAggregate {
2
- value: number;
3
- attributes: {
4
- "frame.max_ms": number;
5
- "frame.p95_ms": number;
6
- "frame.dropped_count": number;
7
- "frame.target_fps": number;
8
- "frame.window_duration_ms": number;
9
- "frame.source": string;
10
- };
11
- }
1
+ export type FrameWindow = {
2
+ "frame.total_frames": number;
3
+ "frame.slow_frames": number;
4
+ "frame.frozen_frames": number;
5
+ "frame.max_total_duration_ms": number;
6
+ "frame.p95_ms": number;
7
+ "display.refresh_rate": number;
8
+ "frame.window_duration_ms": number;
9
+ "frame.source": string;
10
+ };
12
11
  /**
13
12
  * `deltas` must be non-empty. Percentile is nearest-rank on the sorted deltas.
14
13
  * `windowMs` is the *actual* elapsed window — variable-length since §5.1's view-boundary
15
- * reset, which is exactly why `frame.window_duration_ms` is required on the wire.
14
+ * reset, which is exactly why `frame.window_duration_ms` rides every window.
15
+ *
16
+ * A rAF delta is a vsync interval, quantized to the budget: "slow" is a missed vsync, read as
17
+ * over twice the budget so jitter around one interval never counts.
16
18
  */
17
- export declare function aggregateFrames(deltas: number[], windowMs: number, source: string): FrameAggregate;
19
+ export declare function aggregateFrames(deltas: number[], windowMs: number, source: string): FrameWindow;
@@ -2,7 +2,7 @@
2
2
  * All this tracker needs of core. Structural, so it is testable without a `Telemetry`.
3
3
  */
4
4
  type FrameEmitter = {
5
- logMetric(name: string, value: number, data?: Record<string, any>): unknown;
5
+ log(name: string, data?: Record<string, any>): unknown;
6
6
  views: {
7
7
  onBoundary(fn: () => unknown): () => void;
8
8
  };
@@ -0,0 +1,41 @@
1
+ import { LogSnapshot } from '../core/telemetry';
2
+ import { TraceAttributes } from './traceManager';
3
+ /** Internal constants, never `TelemetryOpts` surface. */
4
+ export declare const HANG_TICK_MS = 1000;
5
+ export declare const HANG_THRESHOLD_MS = 2000;
6
+ /** Longer than this is a suspension (device sleep, a frozen tab), not a hang the user sat through. */
7
+ export declare const HANG_SUSPENSION_MS = 60000;
8
+ /**
9
+ * The stall between two ticks, or `undefined` when there is none to report: how late the
10
+ * timer fired past its schedule, so the tick interval itself is never booked as stall.
11
+ * ⚠ At 1 s resolution this under-reports by up to one tick — a stall that began mid-interval
12
+ * is partly absorbed by the wait the timer would have done anyway. Never over-reports.
13
+ */
14
+ export declare function stallMs(prevTick: number, now: number): number | undefined;
15
+ type Core = {
16
+ snapshot(at?: number): LogSnapshot;
17
+ trace: {
18
+ annotate(now?: number): TraceAttributes;
19
+ };
20
+ log(name: string, data?: Record<string, any>, snapshot?: LogSnapshot): Promise<void>;
21
+ };
22
+ export declare class HangDetector {
23
+ private core;
24
+ private now;
25
+ private timer?;
26
+ /** The last good tick — what a stall is attributed to: where the user was when it froze. */
27
+ private last?;
28
+ constructor(core: Core, now?: () => number);
29
+ private active;
30
+ private suspended;
31
+ /** Driven by the lifecycle emitter: foreground only, so background suspension never reads as a hang. */
32
+ setActive(active: boolean): void;
33
+ /** `disable()` / `enable()` (#172): off while collection is off, whatever the lifecycle says. */
34
+ suspend(suspended: boolean): void;
35
+ private sync;
36
+ start(): void;
37
+ /** Idempotent. `shutdown()` and backgrounding call it; the next start begins a fresh baseline. */
38
+ stop(): void;
39
+ private tick;
40
+ }
41
+ export {};
@@ -0,0 +1,41 @@
1
+ import { TraceAttributes } from './traceManager';
2
+ /** A leak in host code must not grow without bound. Internal, never `TelemetryOpts`. */
3
+ export declare const MAX_OPEN_SPANS = 32;
4
+ export type TaskOutcome = "completed" | "failed" | "abandoned";
5
+ export type OpenSpan = {
6
+ name: string;
7
+ start: number;
8
+ attrs?: Record<string, unknown>;
9
+ /** Frozen at start (§3.1). Unset only while a start waits on an expired session's rotation. */
10
+ keys?: TraceAttributes;
11
+ viewId?: string;
12
+ sessionId?: string;
13
+ sessionStart?: number;
14
+ /** That rotation — an end arriving before it settles waits on it. */
15
+ ready?: Promise<void>;
16
+ };
17
+ /** The persisted form: identity frozen, attributes as a JSON string so a cycle cannot break the record. */
18
+ export type PersistedSpan = Omit<OpenSpan, "attrs" | "ready"> & {
19
+ attrs?: string;
20
+ };
21
+ export declare function spanAttributes(attrs: unknown): Record<string, unknown> | undefined;
22
+ /** Unnormalized and capped at 255; blank or non-string is inert (`undefined`). */
23
+ export declare function taskName(name: unknown): string | undefined;
24
+ export declare class SpanRegistry {
25
+ private open;
26
+ /**
27
+ * Opens `name`, superseding an open span of the same name — dropped without a row, since
28
+ * `abandoned` means "the session ended first" and nothing else. `undefined` past the cap.
29
+ */
30
+ start(name: string, start: number, attrs?: Record<string, unknown>): OpenSpan | undefined;
31
+ /** Close by name. With `only`, a superseded handle cannot close its successor. */
32
+ take(name: string, only?: OpenSpan): OpenSpan | undefined;
33
+ /** `disable()` (#172): an opt-out keeps nothing, open journeys included. */
34
+ clear(): void;
35
+ has(span: OpenSpan): boolean;
36
+ /** Every span frozen to `sessionId`, removed — the ones a finalize owes `abandoned`. */
37
+ takeSession(sessionId: string): OpenSpan[];
38
+ toJSON(): PersistedSpan[];
39
+ /** Adopt a persisted record's spans. Anything malformed is skipped, never thrown. */
40
+ restore(saved: unknown): void;
41
+ }
@@ -0,0 +1,15 @@
1
+ export type AutoTapKind = "tap" | "long_press";
2
+ /** What the entry hands in: called synchronously at activation, *before* the host handler. */
3
+ export type AutoTapSink = {
4
+ /** Snapshot identity and mint the root now; returns the emit to run after the handler, or nothing. */
5
+ prepare(kind: AutoTapKind, testID: unknown): (() => void) | undefined;
6
+ /** Increments on every explicit `trackTap()` — an explicit call inside the handler wins. */
7
+ explicitCount(): number;
8
+ };
9
+ export declare function wrapProps(props: any): any;
10
+ /**
11
+ * Patch the element factories on the given module exports objects (`react/jsx-runtime`,
12
+ * `react/jsx-dev-runtime`, `react`). Idempotent per module. Never throws: a frozen exports
13
+ * object just stays unpatched.
14
+ */
15
+ export declare function patchElementFactories(modules: unknown[], next: AutoTapSink): void;
@@ -0,0 +1,15 @@
1
+ import { DeviceStateHandler } from '../../core/telemetry';
2
+ /**
3
+ * #173, native. Battery is a **cached** read — refreshed at start, on foreground and every 60 s —
4
+ * so a failure row never awaits a native call. `react-native-device-info` is an optional peer and
5
+ * an older one lacks these methods, so every read is optional-chained and guarded.
6
+ */
7
+ export declare class DeviceStateNative implements DeviceStateHandler {
8
+ private cached;
9
+ private timer;
10
+ battery(): Record<string, number | boolean>;
11
+ refresh(): Promise<void>;
12
+ start(): void;
13
+ stop(): void;
14
+ accessibility(): Promise<Record<string, number | boolean>>;
15
+ }
@@ -1,7 +1,7 @@
1
1
  import { Telemetry } from '../../core/telemetry';
2
2
  /**
3
- * §5.2 / #105 — `memory_usage`: RSS, **native only**, sampled every 30 s. The rationale for
4
- * every part of that sentence lives in CLAUDE.md's `memory_usage` section; this file is the
3
+ * §5.2 / #105 — `memory.usage`: RSS, **native only**, sampled every 30 s. The rationale for
4
+ * every part of that sentence lives in CLAUDE.md's `memory.usage` section; this file is the
5
5
  * mechanism.
6
6
  */
7
7
  export declare class TelemetryMemoryUsageNative {
@@ -9,7 +9,7 @@ export declare class TelemetryMemoryUsageNative {
9
9
  private intervalId;
10
10
  constructor(telemetry: Telemetry);
11
11
  /**
12
- * One sample: `value` = resident MB, with the device total alongside so headroom is
12
+ * One sample: `memory.usage_mb` = resident MB, with the device total alongside so headroom is
13
13
  * readable without a second join. An unusable read emits nothing — a fabricated 0 would
14
14
  * drag every percentile down and read as a memory *win*.
15
15
  *
@@ -6,7 +6,7 @@ export declare class NetworkInfoTrackerNative {
6
6
  /**
7
7
  * collect() feeds the steady-state Context block on every event (no standalone
8
8
  * network_info event, ADR-0002). A connectivity *transition* is still its own
9
- * v3 `network_change` event, emitted via the shared NetworkChangeEmitter.
9
+ * `network.change` event, emitted via the shared NetworkChangeEmitter.
10
10
  */
11
11
  start(telemetry: Telemetry): Promise<NetworkInfo>;
12
12
  }
@@ -1 +1,17 @@
1
+ /**
2
+ * The markers are stamped on the native monotonic clock — iOS `CACurrentMediaTime()`, Android
3
+ * `SystemClock.uptimeMillis()` — the same clock `performance.now()` reads, not epoch. Shifted
4
+ * onto `Date.now()`'s timeline here so every caller can compare them with wall time.
5
+ * ponytail: a value already past 1e12 is taken as epoch (31 years of uptime is not a device).
6
+ */
7
+ export declare function toEpoch(t: unknown): number | undefined;
8
+ /** Epoch ms of process start (#171's initial-view anchor), or undefined where unpublished. */
9
+ export declare function processStartAt(): number | undefined;
1
10
  export declare function runtimeReadyAt(): Promise<number | undefined>;
11
+ /**
12
+ * `app.start.duration_ms` (#179, catalogue app_start.yaml): process start → first display, read
13
+ * as `rnStartupTiming.endTime − startTime` (both on the native monotonic clock). `endTime` is
14
+ * stamped when the first content appears, usually after a module-scope init, so it is polled
15
+ * every 100 ms for up to 10 s. No marker at all (Old Architecture) resolves `undefined` at once.
16
+ */
17
+ export declare function startupDurationMs(): Promise<number | undefined>;
@@ -2,20 +2,28 @@ import { Telemetry } from '../core/telemetry';
2
2
  /**
3
3
  * React Navigation route tracking, **shared by both builds** (§4.5.1, #96).
4
4
  *
5
- * `getCurrentRoute()` is a navigation-tree API, not a native one — it works identically on
6
- * RN-Web — and `route.name` is rung 2 of the name ladder. Wiring it once means one
7
- * `GROUP BY view.name` spans web and native, instead of web reverse-engineering a template
8
- * out of a URL the app is already holding in memory.
5
+ * The navigation tree is a JS API, not a native one — it works identically on RN-Web — so
6
+ * wiring it once means one `GROUP BY view.name` spans web and native.
9
7
  *
10
- * Everything platform-specific stays in `Telemetry.recordRouteChange`, which gates the two
11
- * deprecated native feeds (§4.11) on an entry-supplied flag.
8
+ * `view.name` is the focused route names **joined root to leaf with `/`** (#170): nested
9
+ * screens sharing a leaf name (`HomeTab/Details`, `SearchTab/Details`) stay distinguishable,
10
+ * and under Expo Router the route names *are* the file-path template, so the join yields
11
+ * `(tabs)/settings/index` with no Expo dependency and no Expo API. Rung 2: **never
12
+ * normalized**, and route **params are never read** — the template is the name, the value
13
+ * is not.
12
14
  *
13
- * Usage: pass your navigationContainerRef.
15
+ * Usage: pass your navigation container ref — under Expo Router,
16
+ * `attachNavigation(useNavigationContainerRef())` in the root `_layout`.
14
17
  */
15
18
  export declare class NavigationRefTracker {
16
19
  private telemetry;
17
20
  private currentRoute?;
18
- constructor(telemetry: Telemetry);
21
+ constructor(telemetry: Pick<Telemetry, "recordRouteChange">);
19
22
  attach(navigationRef: any): void;
20
- private getActiveRouteName;
23
+ private onRoute;
21
24
  }
25
+ /**
26
+ * The focused route's name path, root to leaf. Reads `getRootState()` — `getCurrentRoute()`
27
+ * returns only the leaf — and falls back to the leaf's name on a ref that lacks it.
28
+ */
29
+ export declare function routePath(navigationRef: any): string;
@@ -1,9 +1,9 @@
1
1
  import { Telemetry } from '../core/telemetry';
2
2
  /**
3
3
  * Shared connectivity-transition emitter — the single source of truth so the web and
4
- * native network adapters stay in lockstep on the v3 `network_change` contract (#27).
4
+ * native network adapters stay in lockstep on the `network.change` catalogue event (#27, #179).
5
5
  *
6
- * Feed it every connectivity sample via `onSample`. It emits `network_change` only on an
6
+ * Feed it every connectivity sample via `onSample`. It emits `network.change` only on an
7
7
  * actual type transition, carrying `network.previous_type`; the current `network.*` context
8
8
  * rides on the event via the Context block (and is echoed here for an explicit at-emit value).
9
9
  */
@@ -1,5 +1,5 @@
1
- /** §6.1's four root types. */
2
- export type TraceRootType = "launch" | "interaction" | "navigation" | "request";
1
+ /** §6.1's four root types, plus `custom` — a manual span with no live root to join (#164). */
2
+ export type TraceRootType = "launch" | "interaction" | "navigation" | "request" | "custom";
3
3
  /** A flat bag of wire keys. An absent key means the SDK had nothing (§6.1). */
4
4
  export type TraceAttributes = Record<string, string | number>;
5
5
  /** What the interceptor observed at `send()`, and nothing it had to interpret. */
@@ -19,6 +19,12 @@ export type RequestTrace = {
19
19
  /** The one header value to write, or nothing at all. Never a `flags=00` placeholder. */
20
20
  header?: string;
21
21
  finish: (endedAt: number) => TraceAttributes;
22
+ /**
23
+ * For a `send()` that throws synchronously and so never reaches its finisher (#160):
24
+ * drops the root this request minted, if it is still the carrier. A joined root is left
25
+ * alone — the action it belongs to outlives one failed send.
26
+ */
27
+ discard: () => void;
22
28
  };
23
29
  export declare class TraceManager {
24
30
  private root?;
@@ -62,15 +68,22 @@ export declare class TraceManager {
62
68
  * (§6.1 — a root's width is derived server-side).
63
69
  */
64
70
  interactionSpan(mintedAt: number): TraceAttributes;
71
+ /**
72
+ * Tier 1 for a manual span (`task.complete`, #164), captured at **start**: a child of the
73
+ * live root — whose idle clock the start extends, like any span start — or else a fresh
74
+ * `custom` root. A leaf, never a parent: no context stack, so a request inside the span
75
+ * parents to the root. `span.duration_ms` is added at the end, on root *and* child — the
76
+ * flagged §6.3 exception, since a declared end is not derivable from children.
77
+ */
78
+ manualSpan(startedAt: number): TraceAttributes;
65
79
  /**
66
80
  * Tier 1 for an `http.request`, captured at **send** — the root live then is the parent,
67
81
  * and `span.start_time` is the send — plus §6.5's outcome ladder and the one header the
68
82
  * SDK ever writes. Returns the finisher, so duration is stamped from the same pair of
69
83
  * timestamps the row's `http.duration_ms` uses.
70
84
  *
71
- * ponytail: a `send()` that throws synchronously never calls the finisher, so a root it
72
- * minted lives on for up to 2 s with no row describing it. Rare enough to leave; give
73
- * the finisher a `discard()` sibling if the orphan ratio ever shows up.
85
+ * A `send()` that throws synchronously never calls the finisher; it calls `discard()`, so
86
+ * a root it minted does not live on for 2 s with no row describing it (#160).
74
87
  */
75
88
  requestTrace(startedAt: number, ctx: RequestTraceCtx): RequestTrace;
76
89
  /**
@@ -73,7 +73,7 @@ export declare function resolveUiName(path: readonly UiElement[], opts?: {
73
73
  * later or not at all.
74
74
  */
75
75
  export declare function uiAttributes(a: {
76
- type: "click" | "tap";
76
+ type: "click" | "tap" | "long_press";
77
77
  target: string;
78
78
  nameSource: UiNameSource;
79
79
  tag: string;
@@ -33,7 +33,25 @@ export declare class ViewManager {
33
33
  private readonly boundaryListeners;
34
34
  /** Retired `view.id` → final `view.name`, for `nameOf()`. Bounded; oldest evicted. */
35
35
  private readonly retiredNames;
36
+ /**
37
+ * `view.name`s this process has seen marked ready (#171). In memory only, never persisted:
38
+ * `abandoned` is claimed only for a screen known to be instrumented, so an uninstrumented
39
+ * screen never reads as abandoned. Its first visit per process can't be judged either.
40
+ */
41
+ private readonly markedNames;
36
42
  constructor(telemetry: Emitter);
43
+ /**
44
+ * The initial view's ready anchor — process start: web `performance.timeOrigin`, native
45
+ * `rnStartupTiming.startTime` (#171). So its `view.ready_time` *is* cold-start-to-ready.
46
+ * `undefined` (native Old Architecture) leaves the initial view unjudged.
47
+ */
48
+ anchorInitial(processStart: number | undefined): void;
49
+ /**
50
+ * `markScreenReady()`'s bind (#171) — the caller stamped `at` synchronously and arrives here
51
+ * a macrotask later, so a mount-effect mark lands on the view that mount belongs to. First
52
+ * mark per view wins; a view with no token (a resume or rotation successor) ignores it.
53
+ */
54
+ markReady(at: number): void;
37
55
  /** The two keys the Context block carries on every row. Name resolves at log time. */
38
56
  get id(): string;
39
57
  get name(): string;
@@ -54,13 +72,11 @@ export declare class ViewManager {
54
72
  * - a **higher** rung re-stamps the name and never changes `view.id` — that is what
55
73
  * "rank beats order" means, and it is why a route name arriving after a URL-derived
56
74
  * one upgrades the view in place instead of splitting it in two;
57
- * - a **lower** rung is ignored outright, whenever it arrives — ⚠ *including its
58
- * boundary*. A host that mixes rung 1 with `attachNavigation` therefore pins the view
59
- * to the `screenStart` name until the next `screenStart`: route changes stop minting
60
- * successors, and dwell keeps accruing under the explicit name. That is what §4.5.1's
61
- * "a lower rung arriving later does not overwrite a higher one" costs, and the two
62
- * rungs describing one navigation (the upgrade window) is the case it exists for.
63
- * It needs a contract ruling, not a local invention — see CLAUDE.md's known gaps;
75
+ * - a **lower** rung does not overwrite the name — **but a route change is always a
76
+ * boundary** (#169, the v5 ladder ruling). Rank-beats-order applies only *within one
77
+ * route*, the upgrade window where two rungs describe one navigation: a route or URL
78
+ * event naming a different route than the one this view was bound to emits `view` and
79
+ * mints a successor, so `screenStart()` can no longer pin a view across route changes;
64
80
  * - the **same** rung naming a different screen is a genuine navigation, so it ends the
65
81
  * view and mints a successor.
66
82
  *
@@ -137,7 +153,7 @@ export declare class ViewManager {
137
153
  * only explicit wire null). `view.loading_time_outcome` always ships: it is what tells the
138
154
  * three null causes apart, and reading p75-of-settled beside %-capped is the whole point.
139
155
  */
140
- endView(): Promise<void>;
156
+ endView(cause?: ViewLoadType): Promise<void>;
141
157
  /**
142
158
  * Mint the successor. Called directly by session rotation, which has to mint *after*
143
159
  * the new `session.id` is in place — `view.id` never spans a `session.id` (§4.5).
@@ -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
+ }
@@ -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
  /**
@@ -27,9 +24,8 @@ export declare class NavigationTrackerWeb {
27
24
  */
28
25
  private listenPopState;
29
26
  /**
30
- * One route change: the existing `navigation` row, then rung 3 of the name ladder
31
- * (§4.5.1) — the *last* rung, so an `attachNavigation` consumer's `route.name` outranks
32
- * it whichever arrives first.
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.
33
29
  *
34
30
  * Normalized by §4.4.1's rule, and the query string is dropped: there is no `view.url`
35
31
  * and no raw path on the wire, because the identifier lives in the path
@@ -15,6 +15,8 @@ export declare class WebVitalsTracker {
15
15
  /** What each held name last shipped, so an unchanged value does not re-ship at every hide. */
16
16
  private emitted;
17
17
  private started;
18
+ private stopped;
19
+ private unsubscribe?;
18
20
  constructor(telemetry: VitalsEmitter);
19
21
  /**
20
22
  * Idempotent: a second call must not double-subscribe and double every vital row.
@@ -33,6 +35,11 @@ export declare class WebVitalsTracker {
33
35
  * around — view-scoping would need the Chrome-only Soft Navigations API.
34
36
  */
35
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;
36
43
  /**
37
44
  * Awaited inside `beginView` while the departing view is still current, so the rows carry
38
45
  * the view they were accumulated under. A name whose running value has not moved since its
@@ -18,6 +18,8 @@ interface PendingRequest {
18
18
  * the same pair of timestamps `http.duration_ms` uses.
19
19
  */
20
20
  span?: (endedAt: number) => TraceAttributes;
21
+ /** Drops the `request` root this send minted — only for a synchronous `send()` throw. */
22
+ discardRoot?: () => void;
21
23
  /**
22
24
  * §6.4's ownership flag: the consumer's own `traceparent`, recorded **at their write
23
25
  * time** in the `setRequestHeader` patch. Never inferred from the value's shape — an