@sentry/react-native 8.5.0 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/build.gradle +2 -2
  3. package/android/expo-handler/build.gradle +20 -0
  4. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryExpoPackage.java +22 -0
  5. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryReactNativeHostHandler.java +48 -0
  6. package/android/expo-stubs/README.md +7 -0
  7. package/android/expo-stubs/build.gradle +23 -0
  8. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.jar +0 -0
  9. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.properties +7 -0
  10. package/android/expo-stubs/gradlew +251 -0
  11. package/android/expo-stubs/gradlew.bat +94 -0
  12. package/android/expo-stubs/settings.gradle +1 -0
  13. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/Package.java +11 -0
  14. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.java +7 -0
  15. package/android/libs/expo-stubs.jar +0 -0
  16. package/android/libs/replay-stubs.jar +0 -0
  17. package/android/replay-stubs/build.gradle +1 -1
  18. package/android/src/main/java/io/sentry/react/RNSentryFrameDelayCollector.java +128 -0
  19. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +63 -11
  20. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  21. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +6 -0
  22. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +6 -0
  23. package/dist/js/NativeLogListener.d.ts.map +1 -1
  24. package/dist/js/NativeLogListener.js.map +1 -1
  25. package/dist/js/NativeRNSentry.d.ts +1 -0
  26. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  27. package/dist/js/NativeRNSentry.js.map +1 -1
  28. package/dist/js/RNSentryReplayMaskNativeComponent.d.ts.map +1 -1
  29. package/dist/js/RNSentryReplayMaskNativeComponent.js +1 -2
  30. package/dist/js/RNSentryReplayMaskNativeComponent.js.map +1 -1
  31. package/dist/js/RNSentryReplayUnmaskNativeComponent.d.ts.map +1 -1
  32. package/dist/js/RNSentryReplayUnmaskNativeComponent.js +1 -2
  33. package/dist/js/RNSentryReplayUnmaskNativeComponent.js.map +1 -1
  34. package/dist/js/breadcrumb.d.ts.map +1 -1
  35. package/dist/js/breadcrumb.js.map +1 -1
  36. package/dist/js/client.d.ts.map +1 -1
  37. package/dist/js/client.js +1 -1
  38. package/dist/js/client.js.map +1 -1
  39. package/dist/js/feedback/FeedbackButton.d.ts +2 -1
  40. package/dist/js/feedback/FeedbackButton.d.ts.map +1 -1
  41. package/dist/js/feedback/FeedbackButton.js +5 -4
  42. package/dist/js/feedback/FeedbackButton.js.map +1 -1
  43. package/dist/js/feedback/{FeedbackWidget.d.ts → FeedbackForm.d.ts} +5 -5
  44. package/dist/js/feedback/FeedbackForm.d.ts.map +1 -0
  45. package/dist/js/feedback/{FeedbackWidget.js → FeedbackForm.js} +32 -30
  46. package/dist/js/feedback/FeedbackForm.js.map +1 -0
  47. package/dist/js/feedback/FeedbackForm.styles.d.ts +11 -0
  48. package/dist/js/feedback/FeedbackForm.styles.d.ts.map +1 -0
  49. package/dist/js/feedback/{FeedbackWidget.styles.js → FeedbackForm.styles.js} +1 -1
  50. package/dist/js/feedback/FeedbackForm.styles.js.map +1 -0
  51. package/dist/js/feedback/{FeedbackWidget.theme.d.ts → FeedbackForm.theme.d.ts} +7 -5
  52. package/dist/js/feedback/FeedbackForm.theme.d.ts.map +1 -0
  53. package/dist/js/feedback/{FeedbackWidget.theme.js → FeedbackForm.theme.js} +1 -1
  54. package/dist/js/feedback/FeedbackForm.theme.js.map +1 -0
  55. package/{ts3.8/dist/js/feedback/FeedbackWidget.types.d.ts → dist/js/feedback/FeedbackForm.types.d.ts} +305 -299
  56. package/dist/js/feedback/FeedbackForm.types.d.ts.map +1 -0
  57. package/dist/js/feedback/FeedbackForm.types.js +2 -0
  58. package/dist/js/feedback/FeedbackForm.types.js.map +1 -0
  59. package/dist/js/feedback/{FeedbackWidgetManager.d.ts → FeedbackFormManager.d.ts} +12 -4
  60. package/dist/js/feedback/FeedbackFormManager.d.ts.map +1 -0
  61. package/dist/js/feedback/{FeedbackWidgetManager.js → FeedbackFormManager.js} +22 -13
  62. package/dist/js/feedback/FeedbackFormManager.js.map +1 -0
  63. package/dist/js/feedback/{FeedbackWidgetProvider.d.ts → FeedbackFormProvider.d.ts} +10 -10
  64. package/dist/js/feedback/FeedbackFormProvider.d.ts.map +1 -0
  65. package/dist/js/feedback/{FeedbackWidgetProvider.js → FeedbackFormProvider.js} +18 -15
  66. package/dist/js/feedback/FeedbackFormProvider.js.map +1 -0
  67. package/dist/js/feedback/ScreenshotButton.d.ts +2 -2
  68. package/dist/js/feedback/ScreenshotButton.d.ts.map +1 -1
  69. package/dist/js/feedback/ScreenshotButton.js +6 -5
  70. package/dist/js/feedback/ScreenshotButton.js.map +1 -1
  71. package/dist/js/feedback/ShakeToReportBug.d.ts.map +1 -1
  72. package/dist/js/feedback/ShakeToReportBug.js.map +1 -1
  73. package/dist/js/feedback/defaults.d.ts +2 -2
  74. package/dist/js/feedback/defaults.d.ts.map +1 -1
  75. package/dist/js/feedback/defaults.js.map +1 -1
  76. package/dist/js/feedback/integration.d.ts +13 -13
  77. package/dist/js/feedback/integration.d.ts.map +1 -1
  78. package/dist/js/feedback/integration.js.map +1 -1
  79. package/dist/js/feedback/lazy.d.ts +5 -0
  80. package/dist/js/feedback/lazy.d.ts.map +1 -1
  81. package/dist/js/feedback/lazy.js +12 -0
  82. package/dist/js/feedback/lazy.js.map +1 -1
  83. package/dist/js/feedback/utils.d.ts.map +1 -1
  84. package/dist/js/feedback/utils.js +1 -0
  85. package/dist/js/feedback/utils.js.map +1 -1
  86. package/dist/js/index.d.ts +12 -3
  87. package/dist/js/index.d.ts.map +1 -1
  88. package/dist/js/index.js +12 -3
  89. package/dist/js/index.js.map +1 -1
  90. package/dist/js/integrations/appRegistry.d.ts.map +1 -1
  91. package/dist/js/integrations/appRegistry.js.map +1 -1
  92. package/dist/js/integrations/breadcrumbs.d.ts.map +1 -1
  93. package/dist/js/integrations/breadcrumbs.js +1 -1
  94. package/dist/js/integrations/breadcrumbs.js.map +1 -1
  95. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  96. package/dist/js/integrations/debugsymbolicator.js +4 -5
  97. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  98. package/dist/js/integrations/debugsymbolicatorutils.d.ts.map +1 -1
  99. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  100. package/dist/js/integrations/default.d.ts.map +1 -1
  101. package/dist/js/integrations/default.js +1 -2
  102. package/dist/js/integrations/default.js.map +1 -1
  103. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  104. package/dist/js/integrations/devicecontext.js +1 -1
  105. package/dist/js/integrations/devicecontext.js.map +1 -1
  106. package/dist/js/integrations/expoconstants.d.ts.map +1 -1
  107. package/dist/js/integrations/expoconstants.js.map +1 -1
  108. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  109. package/dist/js/integrations/expocontext.js.map +1 -1
  110. package/dist/js/integrations/expoupdateslistener.d.ts.map +1 -1
  111. package/dist/js/integrations/expoupdateslistener.js +0 -1
  112. package/dist/js/integrations/expoupdateslistener.js.map +1 -1
  113. package/dist/js/integrations/graphql.d.ts.map +1 -1
  114. package/dist/js/integrations/graphql.js.map +1 -1
  115. package/dist/js/integrations/logEnricherIntegration.d.ts.map +1 -1
  116. package/dist/js/integrations/logEnricherIntegration.js +1 -1
  117. package/dist/js/integrations/logEnricherIntegration.js.map +1 -1
  118. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  119. package/dist/js/integrations/modulesloader.js.map +1 -1
  120. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  121. package/dist/js/integrations/nativelinkederrors.js +1 -0
  122. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  123. package/dist/js/integrations/primitiveTagIntegration.d.ts.map +1 -1
  124. package/dist/js/integrations/primitiveTagIntegration.js.map +1 -1
  125. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  126. package/dist/js/integrations/reactnativeerrorhandlers.js +2 -1
  127. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  128. package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts.map +1 -1
  129. package/dist/js/integrations/reactnativeerrorhandlersutils.js +0 -5
  130. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  131. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  132. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  133. package/dist/js/integrations/release.d.ts.map +1 -1
  134. package/dist/js/integrations/release.js +1 -1
  135. package/dist/js/integrations/release.js.map +1 -1
  136. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  137. package/dist/js/integrations/rewriteframes.js.map +1 -1
  138. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  139. package/dist/js/integrations/screenshot.js +1 -1
  140. package/dist/js/integrations/screenshot.js.map +1 -1
  141. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  142. package/dist/js/integrations/sdkinfo.js.map +1 -1
  143. package/dist/js/integrations/spotlight.d.ts.map +1 -1
  144. package/dist/js/integrations/spotlight.js.map +1 -1
  145. package/dist/js/integrations/supabase.d.ts.map +1 -1
  146. package/dist/js/integrations/supabase.js.map +1 -1
  147. package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
  148. package/dist/js/integrations/viewhierarchy.js +1 -1
  149. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  150. package/dist/js/misc.js.map +1 -1
  151. package/dist/js/options.d.ts +1 -1
  152. package/dist/js/options.d.ts.map +1 -1
  153. package/dist/js/options.js.map +1 -1
  154. package/dist/js/playground/examples.d.ts.map +1 -1
  155. package/dist/js/playground/examples.js.map +1 -1
  156. package/dist/js/playground/modal.d.ts +2 -2
  157. package/dist/js/playground/modal.d.ts.map +1 -1
  158. package/dist/js/playground/modal.js +5 -103
  159. package/dist/js/playground/modal.js.map +1 -1
  160. package/dist/js/playground/modal.styles.d.ts +100 -0
  161. package/dist/js/playground/modal.styles.d.ts.map +1 -0
  162. package/dist/js/playground/modal.styles.js +98 -0
  163. package/dist/js/playground/modal.styles.js.map +1 -0
  164. package/dist/js/profiling/cache.js +2 -2
  165. package/dist/js/profiling/cache.js.map +1 -1
  166. package/dist/js/profiling/convertHermesProfile.d.ts.map +1 -1
  167. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  168. package/dist/js/profiling/debugid.d.ts.map +1 -1
  169. package/dist/js/profiling/debugid.js.map +1 -1
  170. package/dist/js/profiling/hermes.d.ts.map +1 -1
  171. package/dist/js/profiling/hermes.js.map +1 -1
  172. package/dist/js/profiling/integration.d.ts.map +1 -1
  173. package/dist/js/profiling/integration.js.map +1 -1
  174. package/dist/js/profiling/types.d.ts.map +1 -1
  175. package/dist/js/profiling/types.js.map +1 -1
  176. package/dist/js/profiling/utils.d.ts.map +1 -1
  177. package/dist/js/profiling/utils.js +1 -1
  178. package/dist/js/profiling/utils.js.map +1 -1
  179. package/dist/js/replay/CustomMask.d.ts +1 -1
  180. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  181. package/dist/js/replay/CustomMask.js +1 -1
  182. package/dist/js/replay/CustomMask.js.map +1 -1
  183. package/dist/js/replay/CustomMask.web.d.ts +1 -1
  184. package/dist/js/replay/CustomMask.web.d.ts.map +1 -1
  185. package/dist/js/replay/CustomMask.web.js +2 -2
  186. package/dist/js/replay/CustomMask.web.js.map +1 -1
  187. package/dist/js/replay/browserReplay.d.ts.map +1 -1
  188. package/dist/js/replay/browserReplay.js +0 -2
  189. package/dist/js/replay/browserReplay.js.map +1 -1
  190. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  191. package/dist/js/replay/mobilereplay.js +21 -2
  192. package/dist/js/replay/mobilereplay.js.map +1 -1
  193. package/dist/js/replay/networkUtils.d.ts +0 -1
  194. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  195. package/dist/js/replay/networkUtils.js.map +1 -1
  196. package/dist/js/replay/xhrUtils.d.ts.map +1 -1
  197. package/dist/js/replay/xhrUtils.js.map +1 -1
  198. package/dist/js/scopeSync.d.ts.map +1 -1
  199. package/dist/js/scopeSync.js +1 -1
  200. package/dist/js/scopeSync.js.map +1 -1
  201. package/dist/js/sdk.d.ts +21 -0
  202. package/dist/js/sdk.d.ts.map +1 -1
  203. package/dist/js/sdk.js +42 -18
  204. package/dist/js/sdk.js.map +1 -1
  205. package/dist/js/tools/ModulesCollector.js +1 -1
  206. package/dist/js/tools/ModulesCollector.js.map +1 -1
  207. package/dist/js/tools/collectModules.js +0 -1
  208. package/dist/js/tools/collectModules.js.map +1 -1
  209. package/dist/js/tools/easBuildHooks.d.ts.map +1 -1
  210. package/dist/js/tools/easBuildHooks.js +13 -14
  211. package/dist/js/tools/easBuildHooks.js.map +1 -1
  212. package/dist/js/tools/enableLogger.js +1 -2
  213. package/dist/js/tools/enableLogger.js.map +1 -1
  214. package/dist/js/tools/metroMiddleware.d.ts.map +1 -1
  215. package/dist/js/tools/metroMiddleware.js.map +1 -1
  216. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  217. package/dist/js/tools/metroconfig.js +10 -12
  218. package/dist/js/tools/metroconfig.js.map +1 -1
  219. package/dist/js/tools/sentryBabelTransformerUtils.d.ts.map +1 -1
  220. package/dist/js/tools/sentryBabelTransformerUtils.js +9 -10
  221. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  222. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  223. package/dist/js/tools/sentryMetroSerializer.js +6 -7
  224. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  225. package/dist/js/tools/sentryOptionsSerializer.d.ts.map +1 -1
  226. package/dist/js/tools/sentryOptionsSerializer.js +3 -5
  227. package/dist/js/tools/sentryOptionsSerializer.js.map +1 -1
  228. package/dist/js/tools/sentryReleaseInjector.d.ts +1 -1
  229. package/dist/js/tools/sentryReleaseInjector.d.ts.map +1 -1
  230. package/dist/js/tools/sentryReleaseInjector.js.map +1 -1
  231. package/dist/js/tools/utils.d.ts.map +1 -1
  232. package/dist/js/tools/utils.js +7 -10
  233. package/dist/js/tools/utils.js.map +1 -1
  234. package/dist/js/tools/vendor/metro/countLines.d.ts.map +1 -1
  235. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  236. package/dist/js/tools/vendor/metro/utils.js +5 -5
  237. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  238. package/dist/js/touchevents.d.ts.map +1 -1
  239. package/dist/js/touchevents.js +19 -19
  240. package/dist/js/touchevents.js.map +1 -1
  241. package/dist/js/tracing/expoAsset.js.map +1 -1
  242. package/dist/js/tracing/expoImage.d.ts.map +1 -1
  243. package/dist/js/tracing/expoImage.js +1 -1
  244. package/dist/js/tracing/expoImage.js.map +1 -1
  245. package/dist/js/tracing/expoRouter.d.ts.map +1 -1
  246. package/dist/js/tracing/expoRouter.js.map +1 -1
  247. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  248. package/dist/js/tracing/gesturetracing.js.map +1 -1
  249. package/dist/js/tracing/integrations/appStart.d.ts +19 -1
  250. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  251. package/dist/js/tracing/integrations/appStart.js +144 -9
  252. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  253. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
  254. package/dist/js/tracing/integrations/nativeFrames.js +47 -1
  255. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  256. package/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  257. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -1
  258. package/dist/js/tracing/integrations/stalltracking.js +4 -2
  259. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  260. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -1
  261. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +15 -15
  262. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  263. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -1
  264. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  265. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -1
  266. package/dist/js/tracing/onSpanEndUtils.js +43 -14
  267. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  268. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  269. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  270. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  271. package/dist/js/tracing/reactnativeprofiler.js +2 -2
  272. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  273. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  274. package/dist/js/tracing/reactnativetracing.js +0 -1
  275. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  276. package/dist/js/tracing/reactnavigation.d.ts +3 -0
  277. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  278. package/dist/js/tracing/reactnavigation.js +6 -4
  279. package/dist/js/tracing/reactnavigation.js.map +1 -1
  280. package/dist/js/tracing/span.d.ts +2 -17
  281. package/dist/js/tracing/span.d.ts.map +1 -1
  282. package/dist/js/tracing/span.js +1 -1
  283. package/dist/js/tracing/span.js.map +1 -1
  284. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -1
  285. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  286. package/dist/js/tracing/timetodisplay.js +42 -19
  287. package/dist/js/tracing/timetodisplay.js.map +1 -1
  288. package/dist/js/tracing/timetodisplaynative.d.ts +1 -1
  289. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  290. package/dist/js/tracing/timetodisplaynative.js +5 -4
  291. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  292. package/dist/js/tracing/types.js.map +1 -1
  293. package/dist/js/tracing/utils.d.ts.map +1 -1
  294. package/dist/js/tracing/utils.js.map +1 -1
  295. package/dist/js/transports/encodePolyfill.d.ts +1 -1
  296. package/dist/js/transports/encodePolyfill.d.ts.map +1 -1
  297. package/dist/js/transports/encodePolyfill.js.map +1 -1
  298. package/dist/js/transports/native.d.ts.map +1 -1
  299. package/dist/js/transports/native.js.map +1 -1
  300. package/dist/js/utils/AsyncExpiringMap.js.map +1 -1
  301. package/dist/js/utils/encode.js.map +1 -1
  302. package/dist/js/utils/envelope.d.ts.map +1 -1
  303. package/dist/js/utils/envelope.js.map +1 -1
  304. package/dist/js/utils/environment.d.ts.map +1 -1
  305. package/dist/js/utils/environment.js.map +1 -1
  306. package/dist/js/utils/expomodules.d.ts.map +1 -1
  307. package/dist/js/utils/expomodules.js.map +1 -1
  308. package/dist/js/utils/fill.js +1 -1
  309. package/dist/js/utils/fill.js.map +1 -1
  310. package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -1
  311. package/dist/js/utils/normalize.js +2 -2
  312. package/dist/js/utils/normalize.js.map +1 -1
  313. package/dist/js/utils/outcome.js.map +1 -1
  314. package/dist/js/utils/primitiveConverter.js.map +1 -1
  315. package/dist/js/utils/release.js.map +1 -1
  316. package/dist/js/utils/rnlibraries.d.ts.map +1 -1
  317. package/dist/js/utils/rnlibraries.js +1 -7
  318. package/dist/js/utils/rnlibraries.js.map +1 -1
  319. package/dist/js/utils/safe.d.ts.map +1 -1
  320. package/dist/js/utils/safe.js.map +1 -1
  321. package/dist/js/utils/span.d.ts.map +1 -1
  322. package/dist/js/utils/span.js.map +1 -1
  323. package/dist/js/utils/worldwide.d.ts +0 -1
  324. package/dist/js/utils/worldwide.d.ts.map +1 -1
  325. package/dist/js/utils/worldwide.js.map +1 -1
  326. package/dist/js/utils/xhr.d.ts +0 -1
  327. package/dist/js/utils/xhr.d.ts.map +1 -1
  328. package/dist/js/utils/xhr.js.map +1 -1
  329. package/dist/js/vendor/base64-js/fromByteArray.js +1 -1
  330. package/dist/js/vendor/base64-js/fromByteArray.js.map +1 -1
  331. package/dist/js/vendor/buffer/utf8ToBytes.js +1 -1
  332. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -1
  333. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  334. package/dist/js/vendor/react-native/index.js.map +1 -1
  335. package/dist/js/version.d.ts +1 -1
  336. package/dist/js/version.js +1 -1
  337. package/dist/js/version.js.map +1 -1
  338. package/dist/js/wrapper.d.ts +1 -0
  339. package/dist/js/wrapper.d.ts.map +1 -1
  340. package/dist/js/wrapper.js +20 -9
  341. package/dist/js/wrapper.js.map +1 -1
  342. package/expo-module.config.json +7 -0
  343. package/ios/RNSentry.mm +18 -1
  344. package/ios/RNSentryReplay.mm +1 -1
  345. package/ios/RNSentrySDK.m +1 -1
  346. package/ios/RNSentryStart.m +4 -1
  347. package/ios/RNSentryTimeToDisplay.m +48 -32
  348. package/ios/RNSentryVersion.m +1 -1
  349. package/ios/SentryScreenFramesWrapper.h +2 -0
  350. package/ios/SentryScreenFramesWrapper.m +35 -0
  351. package/package.json +18 -22
  352. package/plugin/build/logger.js +1 -1
  353. package/plugin/build/utils.js +2 -0
  354. package/plugin/build/withSentry.js +1 -2
  355. package/plugin/build/withSentryAndroid.js +2 -0
  356. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -1
  357. package/plugin/build/withSentryAndroidGradlePlugin.js +1 -1
  358. package/plugin/build/withSentryIOS.js +1 -3
  359. package/scripts/eas-build-hook.js +0 -2
  360. package/scripts/expo-upload-sourcemaps.js +0 -1
  361. package/src/js/NativeRNSentry.ts +3 -0
  362. package/src/js/RNSentryReplayMaskNativeComponent.ts +2 -3
  363. package/src/js/RNSentryReplayUnmaskNativeComponent.ts +2 -3
  364. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  365. package/ts3.8/dist/js/feedback/FeedbackButton.d.ts +2 -1
  366. package/ts3.8/dist/js/feedback/{FeedbackWidget.d.ts → FeedbackForm.d.ts} +5 -5
  367. package/ts3.8/dist/js/feedback/FeedbackForm.styles.d.ts +11 -0
  368. package/ts3.8/dist/js/feedback/{FeedbackWidget.theme.d.ts → FeedbackForm.theme.d.ts} +7 -5
  369. package/{dist/js/feedback/FeedbackWidget.types.d.ts → ts3.8/dist/js/feedback/FeedbackForm.types.d.ts} +305 -299
  370. package/ts3.8/dist/js/feedback/{FeedbackWidgetManager.d.ts → FeedbackFormManager.d.ts} +12 -4
  371. package/ts3.8/dist/js/feedback/{FeedbackWidgetProvider.d.ts → FeedbackFormProvider.d.ts} +10 -10
  372. package/ts3.8/dist/js/feedback/ScreenshotButton.d.ts +2 -2
  373. package/ts3.8/dist/js/feedback/defaults.d.ts +2 -2
  374. package/ts3.8/dist/js/feedback/integration.d.ts +13 -13
  375. package/ts3.8/dist/js/feedback/lazy.d.ts +5 -0
  376. package/ts3.8/dist/js/index.d.ts +12 -3
  377. package/ts3.8/dist/js/options.d.ts +1 -1
  378. package/ts3.8/dist/js/playground/modal.d.ts +2 -2
  379. package/ts3.8/dist/js/playground/modal.styles.d.ts +100 -0
  380. package/ts3.8/dist/js/replay/CustomMask.d.ts +1 -1
  381. package/ts3.8/dist/js/replay/CustomMask.web.d.ts +1 -1
  382. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  383. package/ts3.8/dist/js/sdk.d.ts +21 -0
  384. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +19 -1
  385. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  386. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +3 -0
  387. package/ts3.8/dist/js/tracing/span.d.ts +2 -17
  388. package/ts3.8/dist/js/tracing/timetodisplaynative.d.ts +1 -1
  389. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +1 -1
  390. package/ts3.8/dist/js/utils/worldwide.d.ts +0 -1
  391. package/ts3.8/dist/js/utils/xhr.d.ts +0 -1
  392. package/ts3.8/dist/js/version.d.ts +1 -1
  393. package/ts3.8/dist/js/wrapper.d.ts +1 -0
  394. package/dist/js/feedback/FeedbackWidget.d.ts.map +0 -1
  395. package/dist/js/feedback/FeedbackWidget.js.map +0 -1
  396. package/dist/js/feedback/FeedbackWidget.styles.d.ts +0 -11
  397. package/dist/js/feedback/FeedbackWidget.styles.d.ts.map +0 -1
  398. package/dist/js/feedback/FeedbackWidget.styles.js.map +0 -1
  399. package/dist/js/feedback/FeedbackWidget.theme.d.ts.map +0 -1
  400. package/dist/js/feedback/FeedbackWidget.theme.js.map +0 -1
  401. package/dist/js/feedback/FeedbackWidget.types.d.ts.map +0 -1
  402. package/dist/js/feedback/FeedbackWidget.types.js +0 -2
  403. package/dist/js/feedback/FeedbackWidget.types.js.map +0 -1
  404. package/dist/js/feedback/FeedbackWidgetManager.d.ts.map +0 -1
  405. package/dist/js/feedback/FeedbackWidgetManager.js.map +0 -1
  406. package/dist/js/feedback/FeedbackWidgetProvider.d.ts.map +0 -1
  407. package/dist/js/feedback/FeedbackWidgetProvider.js.map +0 -1
  408. package/ts3.8/dist/js/feedback/FeedbackWidget.styles.d.ts +0 -11
@@ -30,23 +30,74 @@ const MAX_APP_START_AGE_MS = 60000;
30
30
  const APP_START_TX_NAME = 'App Start';
31
31
  let appStartEndData = undefined;
32
32
  let isRecordedAppStartEndTimestampMsManual = false;
33
+ let isAppLoadedManuallyInvoked = false;
33
34
  let rootComponentCreationTimestampMs = undefined;
34
35
  let isRootComponentCreationTimestampMsManual = false;
35
36
  /**
36
37
  * Records the application start end.
37
38
  * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.
39
+ *
40
+ * @deprecated Use {@link appLoaded} from the public SDK API instead (`Sentry.appLoaded()`).
38
41
  */
39
42
  export function captureAppStart() {
40
43
  return _captureAppStart({ isManual: true });
41
44
  }
42
45
  /**
43
- * For internal use only.
46
+ * Signals that the app has finished loading and is ready for user interaction.
47
+ * Called internally by `appLoaded()` from the public SDK API.
44
48
  *
45
49
  * @private
46
50
  */
47
- export function _captureAppStart({ isManual }) {
48
- var _a;
51
+ export function _appLoaded() {
49
52
  return __awaiter(this, void 0, void 0, function* () {
53
+ if (isAppLoadedManuallyInvoked) {
54
+ debug.warn('[AppStart] appLoaded() was already called. Subsequent calls are ignored.');
55
+ return;
56
+ }
57
+ const client = getClient();
58
+ if (!client) {
59
+ debug.warn('[AppStart] appLoaded() was called before Sentry.init(). App start end will not be recorded.');
60
+ return;
61
+ }
62
+ isAppLoadedManuallyInvoked = true;
63
+ const timestampMs = timestampInSeconds() * 1000;
64
+ // If auto-capture already ran (ReactNativeProfiler.componentDidMount), overwrite the timestamp.
65
+ // The transaction hasn't been sent yet in non-standalone mode so this is safe.
66
+ if (appStartEndData) {
67
+ debug.log('[AppStart] appLoaded() overwriting auto-detected app start end timestamp.');
68
+ appStartEndData.timestampMs = timestampMs;
69
+ appStartEndData.endFrames = null;
70
+ }
71
+ else {
72
+ _setAppStartEndData({ timestampMs, endFrames: null });
73
+ }
74
+ isRecordedAppStartEndTimestampMsManual = true;
75
+ yield fetchAndUpdateEndFrames();
76
+ const integration = client.getIntegrationByName(INTEGRATION_NAME);
77
+ if (integration) {
78
+ // Cancel any deferred standalone send from auto-capture — we'll send our own
79
+ // with the correct manual timestamp instead of sending two transactions.
80
+ integration.cancelDeferredStandaloneCapture();
81
+ // In standalone mode, auto-capture may have already flushed the transaction.
82
+ // Reset the flag so captureStandaloneAppStart can re-send with the manual timestamp.
83
+ integration.resetAppStartDataFlushed();
84
+ yield integration.captureStandaloneAppStart();
85
+ }
86
+ });
87
+ }
88
+ /**
89
+ * For internal use only.
90
+ *
91
+ * @private
92
+ */
93
+ export function _captureAppStart(_a) {
94
+ return __awaiter(this, arguments, void 0, function* ({ isManual }) {
95
+ // If appLoaded() was already called manually, skip the auto-capture to avoid
96
+ // overwriting the manual end timestamp (race B: appLoaded before componentDidMount).
97
+ if (!isManual && isAppLoadedManuallyInvoked) {
98
+ debug.log('[AppStart] Skipping auto app start capture because appLoaded() was already called.');
99
+ return;
100
+ }
50
101
  const client = getClient();
51
102
  if (!client) {
52
103
  debug.warn('[AppStart] Could not capture App Start, missing client.');
@@ -60,6 +111,27 @@ export function _captureAppStart({ isManual }) {
60
111
  timestampMs,
61
112
  endFrames: null,
62
113
  });
114
+ yield fetchAndUpdateEndFrames();
115
+ const integration = client.getIntegrationByName(INTEGRATION_NAME);
116
+ if (integration) {
117
+ if (!isManual) {
118
+ // For auto-capture, defer the standalone send to give appLoaded() a chance
119
+ // to override the end timestamp before the transaction is sent.
120
+ // If appLoaded() is called, it cancels this deferred send and sends its own.
121
+ // In non-standalone mode, scheduleDeferredStandaloneCapture is a no-op.
122
+ integration.scheduleDeferredStandaloneCapture();
123
+ }
124
+ else {
125
+ yield integration.captureStandaloneAppStart();
126
+ }
127
+ }
128
+ });
129
+ }
130
+ /**
131
+ * Fetches native frames data and attaches it to the current app start end data.
132
+ */
133
+ function fetchAndUpdateEndFrames() {
134
+ return __awaiter(this, void 0, void 0, function* () {
63
135
  if (NATIVE.enableNative) {
64
136
  try {
65
137
  const endFrames = yield NATIVE.fetchNativeFrames();
@@ -70,7 +142,6 @@ export function _captureAppStart({ isManual }) {
70
142
  debug.log('[AppStart] Failed to capture end frames for app start.', error);
71
143
  }
72
144
  }
73
- yield ((_a = client.getIntegrationByName(INTEGRATION_NAME)) === null || _a === void 0 ? void 0 : _a.captureStandaloneAppStart());
74
145
  });
75
146
  }
76
147
  /**
@@ -121,11 +192,21 @@ export const _updateAppStartEndFrames = (endFrames) => {
121
192
  export function _clearRootComponentCreationTimestampMs() {
122
193
  rootComponentCreationTimestampMs = undefined;
123
194
  }
195
+ /**
196
+ * For testing purposes only.
197
+ *
198
+ * @private
199
+ */
200
+ export function _clearAppStartEndData() {
201
+ appStartEndData = undefined;
202
+ isRecordedAppStartEndTimestampMsManual = false;
203
+ isAppLoadedManuallyInvoked = false;
204
+ }
124
205
  /**
125
206
  * Attaches frame data to a span's data object.
126
207
  */
127
208
  function attachFrameDataToSpan(span, frames) {
128
- if (frames.totalFrames <= 0 && frames.slowFrames <= 0 && frames.totalFrames <= 0) {
209
+ if (frames.totalFrames <= 0 && frames.slowFrames <= 0 && frames.frozenFrames <= 0) {
129
210
  debug.warn(`[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (${span.span_id}).`);
130
211
  return;
131
212
  }
@@ -152,6 +233,8 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
152
233
  let afterAllSetupCalled = false;
153
234
  let firstStartedActiveRootSpanId = undefined;
154
235
  let firstStartedActiveRootSpan = undefined;
236
+ let cachedNativeAppStart = undefined;
237
+ let deferredStandaloneTimeout = undefined;
155
238
  const setup = (client) => {
156
239
  _client = client;
157
240
  const { enableAppStartTracking } = client.getOptions();
@@ -174,6 +257,12 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
174
257
  appStartDataFlushed = false;
175
258
  firstStartedActiveRootSpanId = undefined;
176
259
  firstStartedActiveRootSpan = undefined;
260
+ isAppLoadedManuallyInvoked = false;
261
+ cachedNativeAppStart = undefined;
262
+ if (deferredStandaloneTimeout !== undefined) {
263
+ clearTimeout(deferredStandaloneTimeout);
264
+ deferredStandaloneTimeout = undefined;
265
+ }
177
266
  }
178
267
  else {
179
268
  debug.log('[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.');
@@ -238,7 +327,7 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
238
327
  return __awaiter(this, void 0, void 0, function* () {
239
328
  if (!_client) {
240
329
  // If client is not set, SDK was not initialized, logger is thus disabled
241
- // eslint-disable-next-line no-console
330
+ // oxlint-disable-next-line eslint(no-console)
242
331
  console.warn('[AppStart] Could not capture App Start, missing client, call `Sentry.init` first.');
243
332
  return;
244
333
  }
@@ -287,8 +376,8 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
287
376
  });
288
377
  }
289
378
  function attachAppStartToTransactionEvent(event) {
290
- var _a;
291
379
  return __awaiter(this, void 0, void 0, function* () {
380
+ var _a;
292
381
  if (appStartDataFlushed) {
293
382
  // App start data is only relevant for the first transaction of the app run
294
383
  debug.log('[AppStart] App start data already flushed. Skipping.');
@@ -313,13 +402,23 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
313
402
  }
314
403
  // All failure paths below set appStartDataFlushed = true to prevent
315
404
  // wasteful retries — these conditions won't change within the same app start.
316
- const appStart = yield NATIVE.fetchNativeAppStart();
405
+ //
406
+ // Use cached response if available (e.g. when _appLoaded() re-triggers
407
+ // standalone capture after auto-capture already fetched from the native layer).
408
+ // The native layer sets has_fetched = true after the first fetch, so a second
409
+ // NATIVE.fetchNativeAppStart() call would incorrectly bail out.
410
+ const isCached = cachedNativeAppStart !== undefined;
411
+ const appStart = isCached ? cachedNativeAppStart : yield NATIVE.fetchNativeAppStart();
412
+ cachedNativeAppStart = appStart;
317
413
  if (!appStart) {
318
414
  debug.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');
319
415
  appStartDataFlushed = true;
320
416
  return;
321
417
  }
322
- if (appStart.has_fetched) {
418
+ // Skip the has_fetched check when using a cached response — the native layer
419
+ // sets has_fetched = true after the first fetch, but we intentionally re-use
420
+ // the data when _appLoaded() overrides the app start end timestamp.
421
+ if (!isCached && appStart.has_fetched) {
323
422
  debug.warn('[AppStart] Measured app start metrics were already reported from the native layer.');
324
423
  appStartDataFlushed = true;
325
424
  return;
@@ -396,6 +495,19 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
396
495
  });
397
496
  if (appStartEndData === null || appStartEndData === void 0 ? void 0 : appStartEndData.endFrames) {
398
497
  attachFrameDataToSpan(appStartSpanJSON, appStartEndData.endFrames);
498
+ try {
499
+ const framesDelay = yield Promise.race([
500
+ NATIVE.fetchNativeFramesDelay(appStartTimestampSeconds, appStartEndTimestampSeconds),
501
+ new Promise(resolve => setTimeout(() => resolve(null), 2000)),
502
+ ]);
503
+ if (framesDelay != null) {
504
+ appStartSpanJSON.data = appStartSpanJSON.data || {};
505
+ appStartSpanJSON.data['frames.delay'] = framesDelay;
506
+ }
507
+ }
508
+ catch (error) {
509
+ debug.log('[AppStart] Error while fetching frames delay for app start span.', error);
510
+ }
399
511
  }
400
512
  const jsExecutionSpanJSON = createJSExecutionStartSpan(appStartSpanJSON, rootComponentCreationTimestampMs);
401
513
  const appStartSpans = [
@@ -415,12 +527,35 @@ export const appStartIntegration = ({ standalone = false, } = {}) => {
415
527
  debug.log('[AppStart] Added app start measurement to transaction event.', JSON.stringify(measurementValue, undefined, 2));
416
528
  });
417
529
  }
530
+ const resetAppStartDataFlushed = () => {
531
+ appStartDataFlushed = false;
532
+ };
533
+ const cancelDeferredStandaloneCapture = () => {
534
+ if (deferredStandaloneTimeout !== undefined) {
535
+ clearTimeout(deferredStandaloneTimeout);
536
+ deferredStandaloneTimeout = undefined;
537
+ debug.log('[AppStart] Cancelled deferred standalone app start capture.');
538
+ }
539
+ };
540
+ const scheduleDeferredStandaloneCapture = () => {
541
+ if (!standalone) {
542
+ return;
543
+ }
544
+ deferredStandaloneTimeout = setTimeout(() => {
545
+ deferredStandaloneTimeout = undefined;
546
+ // oxlint-disable-next-line typescript-eslint(no-floating-promises)
547
+ captureStandaloneAppStart();
548
+ }, 0);
549
+ };
418
550
  return {
419
551
  name: INTEGRATION_NAME,
420
552
  setup,
421
553
  afterAllSetup,
422
554
  processEvent,
423
555
  captureStandaloneAppStart,
556
+ resetAppStartDataFlushed,
557
+ cancelDeferredStandaloneCapture,
558
+ scheduleDeferredStandaloneCapture,
424
559
  setFirstStartedActiveRootSpanId,
425
560
  };
426
561
  };
@@ -1 +1 @@
1
- {"version":3,"file":"appStart.js","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/appStart.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EACL,KAAK,EACL,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,gCAAgC,EAChC,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,yBA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E;YAC9B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,kBAAkB,GAAG,IAAI;YAC/C,SAAS,EAAE,IAAI,CAAC,gBAAgB,GAAG,IAAI;YACvC,MAAM,EAAE,0BAA0B;SACnC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,UAAoB,EAAE,eAAwD;IACrG,MAAM,WAAW,GAAG,yBAAyB,EAAE,CAAC;IAEhD,iFAAiF;IACjF,yCAAyC;IACzC,6DAA6D;IAC7D,IAAI,WAAW,IAAI,WAAW,GAAG,eAAe,CAAC,gBAAgB,EAAE;QACjE,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,6BAA6B;YAC1C,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,WAAW,GAAG,IAAI;YAC7B,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,YAAY;YACzB,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,eAAe,CAAC,gBAAgB,GAAG,IAAI;YAClD,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;AACH,CAAC","sourcesContent":["/* eslint-disable complexity, max-lines */\nimport type { Client, Event, Integration, Span, SpanJSON, TransactionEvent } from '@sentry/core';\nimport {\n debug,\n getCapturedScopesOnSpan,\n getClient,\n getCurrentScope,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SentryNonRecordingSpan,\n spanIsSampled,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\nimport { getAppRegistryIntegration } from '../../integrations/appRegistry';\nimport {\n APP_START_COLD as APP_START_COLD_MEASUREMENT,\n APP_START_WARM as APP_START_WARM_MEASUREMENT,\n} from '../../measurements';\nimport type { NativeAppStartResponse, NativeFramesResponse } from '../../NativeRNSentry';\nimport type { ReactNativeClientOptions } from '../../options';\nimport { convertSpanToTransaction, isRootSpan, setEndTimeValue } from '../../utils/span';\nimport { NATIVE } from '../../wrapper';\nimport {\n APP_START_COLD as APP_START_COLD_OP,\n APP_START_WARM as APP_START_WARM_OP,\n UI_LOAD as UI_LOAD_OP,\n} from '../ops';\nimport { SPAN_ORIGIN_AUTO_APP_START, SPAN_ORIGIN_MANUAL_APP_START } from '../origin';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../semanticAttributes';\nimport { setMainThreadInfo } from '../span';\nimport { createChildSpanJSON, createSpanJSON, getBundleStartTimestampMs } from '../utils';\n\nconst INTEGRATION_NAME = 'AppStart';\n\nexport type AppStartIntegration = Integration & {\n captureStandaloneAppStart: () => Promise<void>;\n};\n\n/**\n * We filter out app start more than 60s.\n * This could be due to many different reasons.\n * We've seen app starts with hours, days and even months.\n */\nconst MAX_APP_START_DURATION_MS = 60_000;\n\n/** We filter out App starts which timestamp is 60s and more before the transaction start */\nconst MAX_APP_START_AGE_MS = 60_000;\n\n/** App Start transaction name */\nconst APP_START_TX_NAME = 'App Start';\n\ninterface AppStartEndData {\n timestampMs: number;\n endFrames: NativeFramesResponse | null;\n}\n\nlet appStartEndData: AppStartEndData | undefined = undefined;\nlet isRecordedAppStartEndTimestampMsManual = false;\n\nlet rootComponentCreationTimestampMs: number | undefined = undefined;\nlet isRootComponentCreationTimestampMsManual = false;\n\n/**\n * Records the application start end.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function captureAppStart(): Promise<void> {\n return _captureAppStart({ isManual: true });\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport async function _captureAppStart({ isManual }: { isManual: boolean }): Promise<void> {\n const client = getClient();\n if (!client) {\n debug.warn('[AppStart] Could not capture App Start, missing client.');\n return;\n }\n\n isRecordedAppStartEndTimestampMsManual = isManual;\n\n const timestampMs = timestampInSeconds() * 1000;\n\n // Set end timestamp immediately to avoid race with processEvent\n // Frames data will be updated after the async fetch\n _setAppStartEndData({\n timestampMs,\n endFrames: null,\n });\n\n if (NATIVE.enableNative) {\n try {\n const endFrames = await NATIVE.fetchNativeFrames();\n debug.log('[AppStart] Captured end frames for app start.', endFrames);\n _updateAppStartEndFrames(endFrames);\n } catch (error) {\n debug.log('[AppStart] Failed to capture end frames for app start.', error);\n }\n }\n\n await client.getIntegrationByName<AppStartIntegration>(INTEGRATION_NAME)?.captureStandaloneAppStart();\n}\n\n/**\n * Sets the root component first constructor call timestamp.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function setRootComponentCreationTimestampMs(timestampMs: number): void {\n appStartEndData?.timestampMs && debug.warn('Setting Root component creation timestamp after app start end is set.');\n rootComponentCreationTimestampMs && debug.warn('Overwriting already set root component creation timestamp.');\n rootComponentCreationTimestampMs = timestampMs;\n isRootComponentCreationTimestampMsManual = true;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport function _setRootComponentCreationTimestampMs(timestampMs: number): void {\n setRootComponentCreationTimestampMs(timestampMs);\n isRootComponentCreationTimestampMsManual = false;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport const _setAppStartEndData = (data: AppStartEndData): void => {\n appStartEndData && debug.warn('Overwriting already set app start end data.');\n appStartEndData = data;\n};\n\n/**\n * Updates only the endFrames on existing appStartEndData.\n * Used after the async fetchNativeFrames completes to attach frame data\n * without triggering the overwrite warning from _setAppStartEndData.\n *\n * @private\n */\nexport const _updateAppStartEndFrames = (endFrames: NativeFramesResponse | null): void => {\n if (appStartEndData) {\n appStartEndData.endFrames = endFrames;\n }\n};\n\n/**\n * For testing purposes only.\n *\n * @private\n */\nexport function _clearRootComponentCreationTimestampMs(): void {\n rootComponentCreationTimestampMs = undefined;\n}\n\n/**\n * Attaches frame data to a span's data object.\n */\nfunction attachFrameDataToSpan(span: SpanJSON, frames: NativeFramesResponse): void {\n if (frames.totalFrames <= 0 && frames.slowFrames <= 0 && frames.totalFrames <= 0) {\n debug.warn(`[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (${span.span_id}).`);\n return;\n }\n span.data = span.data || {};\n span.data['frames.total'] = frames.totalFrames;\n span.data['frames.slow'] = frames.slowFrames;\n span.data['frames.frozen'] = frames.frozenFrames;\n\n debug.log('[AppStart] Attached frame data to span.', {\n spanId: span.span_id,\n frameData: {\n total: frames.totalFrames,\n slow: frames.slowFrames,\n frozen: frames.frozenFrames,\n },\n });\n}\n\n/**\n * Adds AppStart spans from the native layer to the transaction event.\n */\nexport const appStartIntegration = ({\n standalone = false,\n}: {\n /**\n * Should the integration send App Start as a standalone root span (transaction)?\n * If false, App Start will be added as a child span to the first transaction.\n *\n * @default false\n */\n standalone?: boolean;\n} = {}): AppStartIntegration => {\n let _client: Client | undefined = undefined;\n let isEnabled = true;\n let appStartDataFlushed = false;\n let afterAllSetupCalled = false;\n let firstStartedActiveRootSpanId: string | undefined = undefined;\n let firstStartedActiveRootSpan: Span | undefined = undefined;\n\n const setup = (client: Client): void => {\n _client = client;\n const { enableAppStartTracking } = client.getOptions() as ReactNativeClientOptions;\n\n if (!enableAppStartTracking) {\n isEnabled = false;\n debug.warn('[AppStart] App start tracking is disabled.');\n }\n\n client.on('spanStart', recordFirstStartedActiveRootSpanId);\n };\n\n const afterAllSetup = (client: Client): void => {\n if (afterAllSetupCalled) {\n return;\n }\n afterAllSetupCalled = true;\n\n // TODO: automatically set standalone based on the presence of the native layer navigation integration\n\n getAppRegistryIntegration(client)?.onRunApplication(() => {\n if (appStartDataFlushed) {\n debug.log('[AppStartIntegration] Resetting app start data flushed flag based on runApplication call.');\n appStartDataFlushed = false;\n firstStartedActiveRootSpanId = undefined;\n firstStartedActiveRootSpan = undefined;\n } else {\n debug.log(\n '[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.',\n );\n }\n });\n };\n\n const processEvent = async (event: Event): Promise<Event> => {\n if (!isEnabled || standalone) {\n return event;\n }\n\n if (event.type !== 'transaction') {\n // App start data is only relevant for transactions\n return event;\n }\n\n await attachAppStartToTransactionEvent(event as TransactionEvent);\n\n return event;\n };\n\n const recordFirstStartedActiveRootSpanId = (rootSpan: Span): void => {\n if (firstStartedActiveRootSpanId) {\n // Check if the previously locked span was dropped after it ended (e.g., by\n // ignoreEmptyRouteChangeTransactions or ignoreEmptyBackNavigation setting\n // _sampled = false during spanEnd). If so, reset and allow this new span.\n // We check here (at the next spanStart) rather than at spanEnd because\n // the discard listeners run after the app start listener in registration order,\n // so _sampled is not yet false when our own spanEnd listener would fire.\n if (firstStartedActiveRootSpan && !spanIsSampled(firstStartedActiveRootSpan)) {\n debug.log(\n '[AppStart] Previously locked root span was unsampled after ending. Resetting to allow next transaction.',\n );\n resetFirstStartedActiveRootSpanId();\n // Fall through to lock to this new span\n } else {\n return;\n }\n }\n\n if (!isRootSpan(rootSpan)) {\n return;\n }\n\n if (!spanIsSampled(rootSpan)) {\n return;\n }\n\n firstStartedActiveRootSpan = rootSpan;\n setFirstStartedActiveRootSpanId(rootSpan.spanContext().spanId);\n };\n\n /**\n * Resets the first started active root span id and span reference to allow\n * the next root span's transaction to attempt app start attachment.\n */\n const resetFirstStartedActiveRootSpanId = (): void => {\n debug.log('[AppStart] Resetting first started active root span id to allow retry on next transaction.');\n firstStartedActiveRootSpanId = undefined;\n firstStartedActiveRootSpan = undefined;\n };\n\n /**\n * For testing purposes only.\n * @private\n */\n const setFirstStartedActiveRootSpanId = (spanId: string | undefined): void => {\n firstStartedActiveRootSpanId = spanId;\n debug.log('[AppStart] First started active root span id recorded.', firstStartedActiveRootSpanId);\n };\n\n async function captureStandaloneAppStart(): Promise<void> {\n if (!_client) {\n // If client is not set, SDK was not initialized, logger is thus disabled\n // eslint-disable-next-line no-console\n console.warn('[AppStart] Could not capture App Start, missing client, call `Sentry.init` first.');\n return;\n }\n\n if (!standalone) {\n debug.log(\n '[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.',\n );\n return;\n }\n\n debug.log('[AppStart] App start tracking standalone root span (transaction).');\n\n if (!appStartEndData?.endFrames && NATIVE.enableNative) {\n try {\n const endFrames = await NATIVE.fetchNativeFrames();\n debug.log('[AppStart] Captured end frames for standalone app start.', endFrames);\n\n const currentTimestamp = appStartEndData?.timestampMs || timestampInSeconds() * 1000;\n _setAppStartEndData({\n timestampMs: currentTimestamp,\n endFrames,\n });\n } catch (error) {\n debug.log('[AppStart] Failed to capture frames for standalone app start.', error);\n }\n }\n\n const span = startInactiveSpan({\n forceTransaction: true,\n name: APP_START_TX_NAME,\n op: UI_LOAD_OP,\n });\n if (span instanceof SentryNonRecordingSpan) {\n // Tracing is disabled or the transaction was sampled\n return;\n }\n\n setEndTimeValue(span, timestampInSeconds());\n _client.emit('spanEnd', span);\n\n const event = convertSpanToTransaction(span);\n if (!event) {\n debug.warn('[AppStart] Failed to convert App Start span to transaction.');\n return;\n }\n\n await attachAppStartToTransactionEvent(event);\n if (!event.spans || event.spans.length === 0) {\n // No spans were added to the transaction, so we don't need to send it\n return;\n }\n\n const scope = getCapturedScopesOnSpan(span).scope || getCurrentScope();\n scope.captureEvent(event);\n }\n\n async function attachAppStartToTransactionEvent(event: TransactionEvent): Promise<void> {\n if (appStartDataFlushed) {\n // App start data is only relevant for the first transaction of the app run\n debug.log('[AppStart] App start data already flushed. Skipping.');\n return;\n }\n\n if (!event.contexts?.trace) {\n debug.warn('[AppStart] Transaction event is missing trace context. Can not attach app start.');\n return;\n }\n\n // When standalone is true, we create our own transaction and don't need to verify\n // it matches the first navigation transaction. When standalone is false, we need to\n // ensure we're attaching app start to the first transaction (not a later one).\n if (!standalone) {\n if (!firstStartedActiveRootSpanId) {\n debug.warn('[AppStart] No first started active root span id recorded. Can not attach app start.');\n return;\n }\n\n if (firstStartedActiveRootSpanId !== event.contexts.trace.span_id) {\n debug.warn(\n '[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start.',\n );\n return;\n }\n }\n\n // All failure paths below set appStartDataFlushed = true to prevent\n // wasteful retries — these conditions won't change within the same app start.\n const appStart = await NATIVE.fetchNativeAppStart();\n if (!appStart) {\n debug.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n if (appStart.has_fetched) {\n debug.warn('[AppStart] Measured app start metrics were already reported from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n debug.warn('[AppStart] App start timestamp could not be loaded from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartEndTimestampMs = appStartEndData?.timestampMs || getBundleStartTimestampMs();\n if (!appStartEndTimestampMs) {\n debug.warn(\n '[AppStart] Javascript failed to record app start end. `_setAppStartEndData` was not called nor could the bundle start be found.',\n );\n appStartDataFlushed = true;\n return;\n }\n\n const isAppStartWithinBounds =\n !!event.start_timestamp && appStartTimestampMs >= event.start_timestamp * 1_000 - MAX_APP_START_AGE_MS;\n if (!__DEV__ && !isAppStartWithinBounds) {\n debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartDurationMs = appStartEndTimestampMs - appStartTimestampMs;\n if (!__DEV__ && appStartDurationMs >= MAX_APP_START_DURATION_MS) {\n // Dev builds can have long app start waiting over minute for the first bundle to be produced\n debug.warn('[AppStart] App start duration is over a minute long, not adding app start span.');\n appStartDataFlushed = true;\n return;\n }\n\n if (appStartDurationMs < 0) {\n // This can happen when MainActivity on Android is recreated,\n // and the app start end timestamp is not updated, for example\n // due to missing `Sentry.wrap(RootComponent)` call.\n debug.warn(\n '[AppStart] Last recorded app start end timestamp is before the app start timestamp.',\n 'This is usually caused by missing `Sentry.wrap(RootComponent)` call.',\n );\n appStartDataFlushed = true;\n return;\n }\n\n appStartDataFlushed = true;\n\n event.contexts.trace.data = event.contexts.trace.data || {};\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD_OP;\n event.contexts.trace.op = UI_LOAD_OP;\n\n const origin = isRecordedAppStartEndTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START;\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = origin;\n event.contexts.trace.origin = origin;\n\n const appStartTimestampSeconds = appStartTimestampMs / 1000;\n event.start_timestamp = appStartTimestampSeconds;\n\n event.spans = event.spans || [];\n /** event.spans reference */\n const children: SpanJSON[] = event.spans;\n\n const maybeTtidSpan = children.find(({ op }) => op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = children.find(({ op }) => op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_full_display', maybeTtfdSpan);\n }\n\n const appStartEndTimestampSeconds = appStartEndTimestampMs / 1000;\n if (event.timestamp && event.timestamp < appStartEndTimestampSeconds) {\n debug.log(\n '[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.',\n );\n event.timestamp = appStartEndTimestampSeconds;\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpanJSON: SpanJSON = createSpanJSON({\n op,\n description: appStart.type === 'cold' ? 'Cold Start' : 'Warm Start',\n start_timestamp: appStartTimestampSeconds,\n timestamp: appStartEndTimestampSeconds,\n trace_id: event.contexts.trace.trace_id,\n parent_span_id: event.contexts.trace.span_id,\n origin,\n });\n\n if (appStartEndData?.endFrames) {\n attachFrameDataToSpan(appStartSpanJSON, appStartEndData.endFrames);\n }\n\n const jsExecutionSpanJSON = createJSExecutionStartSpan(appStartSpanJSON, rootComponentCreationTimestampMs);\n\n const appStartSpans = [\n appStartSpanJSON,\n ...(jsExecutionSpanJSON ? [jsExecutionSpanJSON] : []),\n ...convertNativeSpansToSpanJSON(appStartSpanJSON, appStart.spans),\n ];\n\n children.push(...appStartSpans);\n debug.log('[AppStart] Added app start spans to transaction event.', JSON.stringify(appStartSpans, undefined, 2));\n\n const measurementKey = appStart.type === 'cold' ? APP_START_COLD_MEASUREMENT : APP_START_WARM_MEASUREMENT;\n const measurementValue = {\n value: appStartDurationMs,\n unit: 'millisecond',\n };\n event.measurements = event.measurements || {};\n event.measurements[measurementKey] = measurementValue;\n debug.log(\n '[AppStart] Added app start measurement to transaction event.',\n JSON.stringify(measurementValue, undefined, 2),\n );\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n afterAllSetup,\n processEvent,\n captureStandaloneAppStart,\n setFirstStartedActiveRootSpanId,\n } as AppStartIntegration;\n};\n\nfunction setSpanDurationAsMeasurementOnTransactionEvent(event: TransactionEvent, label: string, span: SpanJSON): void {\n if (!span.timestamp || !span.start_timestamp) {\n debug.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');\n return;\n }\n\n event.measurements = event.measurements || {};\n event.measurements[label] = {\n value: (span.timestamp - span.start_timestamp) * 1000,\n unit: 'millisecond',\n };\n}\n\n/**\n * Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.\n */\nfunction createJSExecutionStartSpan(\n parentSpan: SpanJSON,\n rootComponentCreationTimestampMs: number | undefined,\n): SpanJSON | undefined {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return undefined;\n }\n\n const bundleStartTimestampSeconds = bundleStartTimestampMs / 1000;\n if (bundleStartTimestampSeconds < parentSpan.start_timestamp) {\n debug.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');\n return undefined;\n }\n\n if (!rootComponentCreationTimestampMs) {\n debug.warn('Missing the root component first constructor call timestamp.');\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Start',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: bundleStartTimestampSeconds,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Before React Root',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: rootComponentCreationTimestampMs / 1000,\n origin: isRootComponentCreationTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START,\n });\n}\n\n/**\n * Adds native spans to the app start span.\n */\nfunction convertNativeSpansToSpanJSON(parentSpan: SpanJSON, nativeSpans: NativeAppStartResponse['spans']): SpanJSON[] {\n return nativeSpans\n .filter(span => span.start_timestamp_ms / 1000 >= parentSpan.start_timestamp)\n .map(span => {\n if (span.description === 'UIKit init') {\n return setMainThreadInfo(createUIKitSpan(parentSpan, span));\n }\n\n return setMainThreadInfo(\n createChildSpanJSON(parentSpan, {\n description: span.description,\n start_timestamp: span.start_timestamp_ms / 1000,\n timestamp: span.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n }),\n );\n });\n}\n\n/**\n * UIKit init is measured by the native layers till the native SDK start\n * RN initializes the native SDK later, the end timestamp would be wrong\n */\nfunction createUIKitSpan(parentSpan: SpanJSON, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): SpanJSON {\n const bundleStart = getBundleStartTimestampMs();\n\n // If UIKit init ends after the bundle start, the native SDK was auto-initialized\n // and so the end timestamp is incorrect.\n // The timestamps can't equal, as RN initializes after UIKit.\n if (bundleStart && bundleStart < nativeUIKitSpan.end_timestamp_ms) {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init to JS Exec Start',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: bundleStart / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n } else {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"appStart.js","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/appStart.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EACL,KAAK,EACL,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,gCAAgC,EAChC,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EACL,cAAc,IAAI,0BAA0B,EAC5C,cAAc,IAAI,0BAA0B,GAC7C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,OAAO,IAAI,UAAU,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE1F,MAAM,gBAAgB,GAAG,UAAU,CAAC;AASpC;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,KAAM,CAAC;AAEzC,4FAA4F;AAC5F,MAAM,oBAAoB,GAAG,KAAM,CAAC;AAEpC,iCAAiC;AACjC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAOtC,IAAI,eAAe,GAAgC,SAAS,CAAC;AAC7D,IAAI,sCAAsC,GAAG,K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,EAAE;YACrC,WAAW,EAAE,6BAA6B;YAC1C,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,WAAW,GAAG,IAAI;YAC7B,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,YAAY;YACzB,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,eAAe,CAAC,gBAAgB,GAAG,IAAI;YAClD,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["/* oxlint-disable eslint(complexity), eslint(max-lines) */\nimport type { Client, Event, Integration, Span, SpanJSON, TransactionEvent } from '@sentry/core';\n\nimport {\n debug,\n getCapturedScopesOnSpan,\n getClient,\n getCurrentScope,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SentryNonRecordingSpan,\n spanIsSampled,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\n\nimport type { NativeAppStartResponse, NativeFramesResponse } from '../../NativeRNSentry';\nimport type { ReactNativeClientOptions } from '../../options';\n\nimport { getAppRegistryIntegration } from '../../integrations/appRegistry';\nimport {\n APP_START_COLD as APP_START_COLD_MEASUREMENT,\n APP_START_WARM as APP_START_WARM_MEASUREMENT,\n} from '../../measurements';\nimport { convertSpanToTransaction, isRootSpan, setEndTimeValue } from '../../utils/span';\nimport { NATIVE } from '../../wrapper';\nimport {\n APP_START_COLD as APP_START_COLD_OP,\n APP_START_WARM as APP_START_WARM_OP,\n UI_LOAD as UI_LOAD_OP,\n} from '../ops';\nimport { SPAN_ORIGIN_AUTO_APP_START, SPAN_ORIGIN_MANUAL_APP_START } from '../origin';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../semanticAttributes';\nimport { setMainThreadInfo } from '../span';\nimport { createChildSpanJSON, createSpanJSON, getBundleStartTimestampMs } from '../utils';\n\nconst INTEGRATION_NAME = 'AppStart';\n\nexport type AppStartIntegration = Integration & {\n captureStandaloneAppStart: () => Promise<void>;\n resetAppStartDataFlushed: () => void;\n cancelDeferredStandaloneCapture: () => void;\n scheduleDeferredStandaloneCapture: () => void;\n};\n\n/**\n * We filter out app start more than 60s.\n * This could be due to many different reasons.\n * We've seen app starts with hours, days and even months.\n */\nconst MAX_APP_START_DURATION_MS = 60_000;\n\n/** We filter out App starts which timestamp is 60s and more before the transaction start */\nconst MAX_APP_START_AGE_MS = 60_000;\n\n/** App Start transaction name */\nconst APP_START_TX_NAME = 'App Start';\n\ninterface AppStartEndData {\n timestampMs: number;\n endFrames: NativeFramesResponse | null;\n}\n\nlet appStartEndData: AppStartEndData | undefined = undefined;\nlet isRecordedAppStartEndTimestampMsManual = false;\nlet isAppLoadedManuallyInvoked = false;\n\nlet rootComponentCreationTimestampMs: number | undefined = undefined;\nlet isRootComponentCreationTimestampMsManual = false;\n\n/**\n * Records the application start end.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n *\n * @deprecated Use {@link appLoaded} from the public SDK API instead (`Sentry.appLoaded()`).\n */\nexport function captureAppStart(): Promise<void> {\n return _captureAppStart({ isManual: true });\n}\n\n/**\n * Signals that the app has finished loading and is ready for user interaction.\n * Called internally by `appLoaded()` from the public SDK API.\n *\n * @private\n */\nexport async function _appLoaded(): Promise<void> {\n if (isAppLoadedManuallyInvoked) {\n debug.warn('[AppStart] appLoaded() was already called. Subsequent calls are ignored.');\n return;\n }\n\n const client = getClient();\n if (!client) {\n debug.warn('[AppStart] appLoaded() was called before Sentry.init(). App start end will not be recorded.');\n return;\n }\n\n isAppLoadedManuallyInvoked = true;\n\n const timestampMs = timestampInSeconds() * 1000;\n\n // If auto-capture already ran (ReactNativeProfiler.componentDidMount), overwrite the timestamp.\n // The transaction hasn't been sent yet in non-standalone mode so this is safe.\n if (appStartEndData) {\n debug.log('[AppStart] appLoaded() overwriting auto-detected app start end timestamp.');\n appStartEndData.timestampMs = timestampMs;\n appStartEndData.endFrames = null;\n } else {\n _setAppStartEndData({ timestampMs, endFrames: null });\n }\n isRecordedAppStartEndTimestampMsManual = true;\n\n await fetchAndUpdateEndFrames();\n\n const integration = client.getIntegrationByName<AppStartIntegration>(INTEGRATION_NAME);\n if (integration) {\n // Cancel any deferred standalone send from auto-capture — we'll send our own\n // with the correct manual timestamp instead of sending two transactions.\n integration.cancelDeferredStandaloneCapture();\n // In standalone mode, auto-capture may have already flushed the transaction.\n // Reset the flag so captureStandaloneAppStart can re-send with the manual timestamp.\n integration.resetAppStartDataFlushed();\n await integration.captureStandaloneAppStart();\n }\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport async function _captureAppStart({ isManual }: { isManual: boolean }): Promise<void> {\n // If appLoaded() was already called manually, skip the auto-capture to avoid\n // overwriting the manual end timestamp (race B: appLoaded before componentDidMount).\n if (!isManual && isAppLoadedManuallyInvoked) {\n debug.log('[AppStart] Skipping auto app start capture because appLoaded() was already called.');\n return;\n }\n\n const client = getClient();\n if (!client) {\n debug.warn('[AppStart] Could not capture App Start, missing client.');\n return;\n }\n\n isRecordedAppStartEndTimestampMsManual = isManual;\n\n const timestampMs = timestampInSeconds() * 1000;\n\n // Set end timestamp immediately to avoid race with processEvent\n // Frames data will be updated after the async fetch\n _setAppStartEndData({\n timestampMs,\n endFrames: null,\n });\n\n await fetchAndUpdateEndFrames();\n\n const integration = client.getIntegrationByName<AppStartIntegration>(INTEGRATION_NAME);\n if (integration) {\n if (!isManual) {\n // For auto-capture, defer the standalone send to give appLoaded() a chance\n // to override the end timestamp before the transaction is sent.\n // If appLoaded() is called, it cancels this deferred send and sends its own.\n // In non-standalone mode, scheduleDeferredStandaloneCapture is a no-op.\n integration.scheduleDeferredStandaloneCapture();\n } else {\n await integration.captureStandaloneAppStart();\n }\n }\n}\n\n/**\n * Fetches native frames data and attaches it to the current app start end data.\n */\nasync function fetchAndUpdateEndFrames(): Promise<void> {\n if (NATIVE.enableNative) {\n try {\n const endFrames = await NATIVE.fetchNativeFrames();\n debug.log('[AppStart] Captured end frames for app start.', endFrames);\n _updateAppStartEndFrames(endFrames);\n } catch (error) {\n debug.log('[AppStart] Failed to capture end frames for app start.', error);\n }\n }\n}\n\n/**\n * Sets the root component first constructor call timestamp.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function setRootComponentCreationTimestampMs(timestampMs: number): void {\n appStartEndData?.timestampMs && debug.warn('Setting Root component creation timestamp after app start end is set.');\n rootComponentCreationTimestampMs && debug.warn('Overwriting already set root component creation timestamp.');\n rootComponentCreationTimestampMs = timestampMs;\n isRootComponentCreationTimestampMsManual = true;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport function _setRootComponentCreationTimestampMs(timestampMs: number): void {\n setRootComponentCreationTimestampMs(timestampMs);\n isRootComponentCreationTimestampMsManual = false;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport const _setAppStartEndData = (data: AppStartEndData): void => {\n appStartEndData && debug.warn('Overwriting already set app start end data.');\n appStartEndData = data;\n};\n\n/**\n * Updates only the endFrames on existing appStartEndData.\n * Used after the async fetchNativeFrames completes to attach frame data\n * without triggering the overwrite warning from _setAppStartEndData.\n *\n * @private\n */\nexport const _updateAppStartEndFrames = (endFrames: NativeFramesResponse | null): void => {\n if (appStartEndData) {\n appStartEndData.endFrames = endFrames;\n }\n};\n\n/**\n * For testing purposes only.\n *\n * @private\n */\nexport function _clearRootComponentCreationTimestampMs(): void {\n rootComponentCreationTimestampMs = undefined;\n}\n\n/**\n * For testing purposes only.\n *\n * @private\n */\nexport function _clearAppStartEndData(): void {\n appStartEndData = undefined;\n isRecordedAppStartEndTimestampMsManual = false;\n isAppLoadedManuallyInvoked = false;\n}\n\n/**\n * Attaches frame data to a span's data object.\n */\nfunction attachFrameDataToSpan(span: SpanJSON, frames: NativeFramesResponse): void {\n if (frames.totalFrames <= 0 && frames.slowFrames <= 0 && frames.frozenFrames <= 0) {\n debug.warn(`[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (${span.span_id}).`);\n return;\n }\n span.data = span.data || {};\n span.data['frames.total'] = frames.totalFrames;\n span.data['frames.slow'] = frames.slowFrames;\n span.data['frames.frozen'] = frames.frozenFrames;\n\n debug.log('[AppStart] Attached frame data to span.', {\n spanId: span.span_id,\n frameData: {\n total: frames.totalFrames,\n slow: frames.slowFrames,\n frozen: frames.frozenFrames,\n },\n });\n}\n\n/**\n * Adds AppStart spans from the native layer to the transaction event.\n */\nexport const appStartIntegration = ({\n standalone = false,\n}: {\n /**\n * Should the integration send App Start as a standalone root span (transaction)?\n * If false, App Start will be added as a child span to the first transaction.\n *\n * @default false\n */\n standalone?: boolean;\n} = {}): AppStartIntegration => {\n let _client: Client | undefined = undefined;\n let isEnabled = true;\n let appStartDataFlushed = false;\n let afterAllSetupCalled = false;\n let firstStartedActiveRootSpanId: string | undefined = undefined;\n let firstStartedActiveRootSpan: Span | undefined = undefined;\n let cachedNativeAppStart: NativeAppStartResponse | null | undefined = undefined;\n let deferredStandaloneTimeout: ReturnType<typeof setTimeout> | undefined = undefined;\n\n const setup = (client: Client): void => {\n _client = client;\n const { enableAppStartTracking } = client.getOptions() as ReactNativeClientOptions;\n\n if (!enableAppStartTracking) {\n isEnabled = false;\n debug.warn('[AppStart] App start tracking is disabled.');\n }\n\n client.on('spanStart', recordFirstStartedActiveRootSpanId);\n };\n\n const afterAllSetup = (client: Client): void => {\n if (afterAllSetupCalled) {\n return;\n }\n afterAllSetupCalled = true;\n\n // TODO: automatically set standalone based on the presence of the native layer navigation integration\n\n getAppRegistryIntegration(client)?.onRunApplication(() => {\n if (appStartDataFlushed) {\n debug.log('[AppStartIntegration] Resetting app start data flushed flag based on runApplication call.');\n appStartDataFlushed = false;\n firstStartedActiveRootSpanId = undefined;\n firstStartedActiveRootSpan = undefined;\n isAppLoadedManuallyInvoked = false;\n cachedNativeAppStart = undefined;\n if (deferredStandaloneTimeout !== undefined) {\n clearTimeout(deferredStandaloneTimeout);\n deferredStandaloneTimeout = undefined;\n }\n } else {\n debug.log(\n '[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.',\n );\n }\n });\n };\n\n const processEvent = async (event: Event): Promise<Event> => {\n if (!isEnabled || standalone) {\n return event;\n }\n\n if (event.type !== 'transaction') {\n // App start data is only relevant for transactions\n return event;\n }\n\n await attachAppStartToTransactionEvent(event as TransactionEvent);\n\n return event;\n };\n\n const recordFirstStartedActiveRootSpanId = (rootSpan: Span): void => {\n if (firstStartedActiveRootSpanId) {\n // Check if the previously locked span was dropped after it ended (e.g., by\n // ignoreEmptyRouteChangeTransactions or ignoreEmptyBackNavigation setting\n // _sampled = false during spanEnd). If so, reset and allow this new span.\n // We check here (at the next spanStart) rather than at spanEnd because\n // the discard listeners run after the app start listener in registration order,\n // so _sampled is not yet false when our own spanEnd listener would fire.\n if (firstStartedActiveRootSpan && !spanIsSampled(firstStartedActiveRootSpan)) {\n debug.log(\n '[AppStart] Previously locked root span was unsampled after ending. Resetting to allow next transaction.',\n );\n resetFirstStartedActiveRootSpanId();\n // Fall through to lock to this new span\n } else {\n return;\n }\n }\n\n if (!isRootSpan(rootSpan)) {\n return;\n }\n\n if (!spanIsSampled(rootSpan)) {\n return;\n }\n\n firstStartedActiveRootSpan = rootSpan;\n setFirstStartedActiveRootSpanId(rootSpan.spanContext().spanId);\n };\n\n /**\n * Resets the first started active root span id and span reference to allow\n * the next root span's transaction to attempt app start attachment.\n */\n const resetFirstStartedActiveRootSpanId = (): void => {\n debug.log('[AppStart] Resetting first started active root span id to allow retry on next transaction.');\n firstStartedActiveRootSpanId = undefined;\n firstStartedActiveRootSpan = undefined;\n };\n\n /**\n * For testing purposes only.\n * @private\n */\n const setFirstStartedActiveRootSpanId = (spanId: string | undefined): void => {\n firstStartedActiveRootSpanId = spanId;\n debug.log('[AppStart] First started active root span id recorded.', firstStartedActiveRootSpanId);\n };\n\n async function captureStandaloneAppStart(): Promise<void> {\n if (!_client) {\n // If client is not set, SDK was not initialized, logger is thus disabled\n // oxlint-disable-next-line eslint(no-console)\n console.warn('[AppStart] Could not capture App Start, missing client, call `Sentry.init` first.');\n return;\n }\n\n if (!standalone) {\n debug.log(\n '[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.',\n );\n return;\n }\n\n debug.log('[AppStart] App start tracking standalone root span (transaction).');\n\n if (!appStartEndData?.endFrames && NATIVE.enableNative) {\n try {\n const endFrames = await NATIVE.fetchNativeFrames();\n debug.log('[AppStart] Captured end frames for standalone app start.', endFrames);\n\n const currentTimestamp = appStartEndData?.timestampMs || timestampInSeconds() * 1000;\n _setAppStartEndData({\n timestampMs: currentTimestamp,\n endFrames,\n });\n } catch (error) {\n debug.log('[AppStart] Failed to capture frames for standalone app start.', error);\n }\n }\n\n const span = startInactiveSpan({\n forceTransaction: true,\n name: APP_START_TX_NAME,\n op: UI_LOAD_OP,\n });\n if (span instanceof SentryNonRecordingSpan) {\n // Tracing is disabled or the transaction was sampled\n return;\n }\n\n setEndTimeValue(span, timestampInSeconds());\n _client.emit('spanEnd', span);\n\n const event = convertSpanToTransaction(span);\n if (!event) {\n debug.warn('[AppStart] Failed to convert App Start span to transaction.');\n return;\n }\n\n await attachAppStartToTransactionEvent(event);\n if (!event.spans || event.spans.length === 0) {\n // No spans were added to the transaction, so we don't need to send it\n return;\n }\n\n const scope = getCapturedScopesOnSpan(span).scope || getCurrentScope();\n scope.captureEvent(event);\n }\n\n async function attachAppStartToTransactionEvent(event: TransactionEvent): Promise<void> {\n if (appStartDataFlushed) {\n // App start data is only relevant for the first transaction of the app run\n debug.log('[AppStart] App start data already flushed. Skipping.');\n return;\n }\n\n if (!event.contexts?.trace) {\n debug.warn('[AppStart] Transaction event is missing trace context. Can not attach app start.');\n return;\n }\n\n // When standalone is true, we create our own transaction and don't need to verify\n // it matches the first navigation transaction. When standalone is false, we need to\n // ensure we're attaching app start to the first transaction (not a later one).\n if (!standalone) {\n if (!firstStartedActiveRootSpanId) {\n debug.warn('[AppStart] No first started active root span id recorded. Can not attach app start.');\n return;\n }\n\n if (firstStartedActiveRootSpanId !== event.contexts.trace.span_id) {\n debug.warn(\n '[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start.',\n );\n return;\n }\n }\n\n // All failure paths below set appStartDataFlushed = true to prevent\n // wasteful retries — these conditions won't change within the same app start.\n //\n // Use cached response if available (e.g. when _appLoaded() re-triggers\n // standalone capture after auto-capture already fetched from the native layer).\n // The native layer sets has_fetched = true after the first fetch, so a second\n // NATIVE.fetchNativeAppStart() call would incorrectly bail out.\n const isCached = cachedNativeAppStart !== undefined;\n const appStart = isCached ? cachedNativeAppStart : await NATIVE.fetchNativeAppStart();\n cachedNativeAppStart = appStart;\n if (!appStart) {\n debug.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n // Skip the has_fetched check when using a cached response — the native layer\n // sets has_fetched = true after the first fetch, but we intentionally re-use\n // the data when _appLoaded() overrides the app start end timestamp.\n if (!isCached && appStart.has_fetched) {\n debug.warn('[AppStart] Measured app start metrics were already reported from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n debug.warn('[AppStart] App start timestamp could not be loaded from the native layer.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartEndTimestampMs = appStartEndData?.timestampMs || getBundleStartTimestampMs();\n if (!appStartEndTimestampMs) {\n debug.warn(\n '[AppStart] Javascript failed to record app start end. `_setAppStartEndData` was not called nor could the bundle start be found.',\n );\n appStartDataFlushed = true;\n return;\n }\n\n const isAppStartWithinBounds =\n !!event.start_timestamp && appStartTimestampMs >= event.start_timestamp * 1_000 - MAX_APP_START_AGE_MS;\n if (!__DEV__ && !isAppStartWithinBounds) {\n debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');\n appStartDataFlushed = true;\n return;\n }\n\n const appStartDurationMs = appStartEndTimestampMs - appStartTimestampMs;\n if (!__DEV__ && appStartDurationMs >= MAX_APP_START_DURATION_MS) {\n // Dev builds can have long app start waiting over minute for the first bundle to be produced\n debug.warn('[AppStart] App start duration is over a minute long, not adding app start span.');\n appStartDataFlushed = true;\n return;\n }\n\n if (appStartDurationMs < 0) {\n // This can happen when MainActivity on Android is recreated,\n // and the app start end timestamp is not updated, for example\n // due to missing `Sentry.wrap(RootComponent)` call.\n debug.warn(\n '[AppStart] Last recorded app start end timestamp is before the app start timestamp.',\n 'This is usually caused by missing `Sentry.wrap(RootComponent)` call.',\n );\n appStartDataFlushed = true;\n return;\n }\n\n appStartDataFlushed = true;\n\n event.contexts.trace.data = event.contexts.trace.data || {};\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD_OP;\n event.contexts.trace.op = UI_LOAD_OP;\n\n const origin = isRecordedAppStartEndTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START;\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = origin;\n event.contexts.trace.origin = origin;\n\n const appStartTimestampSeconds = appStartTimestampMs / 1000;\n event.start_timestamp = appStartTimestampSeconds;\n\n event.spans = event.spans || [];\n /** event.spans reference */\n const children: SpanJSON[] = event.spans;\n\n const maybeTtidSpan = children.find(({ op }) => op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = children.find(({ op }) => op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_full_display', maybeTtfdSpan);\n }\n\n const appStartEndTimestampSeconds = appStartEndTimestampMs / 1000;\n if (event.timestamp && event.timestamp < appStartEndTimestampSeconds) {\n debug.log(\n '[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.',\n );\n event.timestamp = appStartEndTimestampSeconds;\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpanJSON: SpanJSON = createSpanJSON({\n op,\n description: appStart.type === 'cold' ? 'Cold Start' : 'Warm Start',\n start_timestamp: appStartTimestampSeconds,\n timestamp: appStartEndTimestampSeconds,\n trace_id: event.contexts.trace.trace_id,\n parent_span_id: event.contexts.trace.span_id,\n origin,\n });\n\n if (appStartEndData?.endFrames) {\n attachFrameDataToSpan(appStartSpanJSON, appStartEndData.endFrames);\n\n try {\n const framesDelay = await Promise.race([\n NATIVE.fetchNativeFramesDelay(appStartTimestampSeconds, appStartEndTimestampSeconds),\n new Promise<null>(resolve => setTimeout(() => resolve(null), 2_000)),\n ]);\n if (framesDelay != null) {\n appStartSpanJSON.data = appStartSpanJSON.data || {};\n appStartSpanJSON.data['frames.delay'] = framesDelay;\n }\n } catch (error) {\n debug.log('[AppStart] Error while fetching frames delay for app start span.', error);\n }\n }\n\n const jsExecutionSpanJSON = createJSExecutionStartSpan(appStartSpanJSON, rootComponentCreationTimestampMs);\n\n const appStartSpans = [\n appStartSpanJSON,\n ...(jsExecutionSpanJSON ? [jsExecutionSpanJSON] : []),\n ...convertNativeSpansToSpanJSON(appStartSpanJSON, appStart.spans),\n ];\n\n children.push(...appStartSpans);\n debug.log('[AppStart] Added app start spans to transaction event.', JSON.stringify(appStartSpans, undefined, 2));\n\n const measurementKey = appStart.type === 'cold' ? APP_START_COLD_MEASUREMENT : APP_START_WARM_MEASUREMENT;\n const measurementValue = {\n value: appStartDurationMs,\n unit: 'millisecond',\n };\n event.measurements = event.measurements || {};\n event.measurements[measurementKey] = measurementValue;\n debug.log(\n '[AppStart] Added app start measurement to transaction event.',\n JSON.stringify(measurementValue, undefined, 2),\n );\n }\n\n const resetAppStartDataFlushed = (): void => {\n appStartDataFlushed = false;\n };\n\n const cancelDeferredStandaloneCapture = (): void => {\n if (deferredStandaloneTimeout !== undefined) {\n clearTimeout(deferredStandaloneTimeout);\n deferredStandaloneTimeout = undefined;\n debug.log('[AppStart] Cancelled deferred standalone app start capture.');\n }\n };\n\n const scheduleDeferredStandaloneCapture = (): void => {\n if (!standalone) {\n return;\n }\n deferredStandaloneTimeout = setTimeout(() => {\n deferredStandaloneTimeout = undefined;\n // oxlint-disable-next-line typescript-eslint(no-floating-promises)\n captureStandaloneAppStart();\n }, 0);\n };\n\n return {\n name: INTEGRATION_NAME,\n setup,\n afterAllSetup,\n processEvent,\n captureStandaloneAppStart,\n resetAppStartDataFlushed,\n cancelDeferredStandaloneCapture,\n scheduleDeferredStandaloneCapture,\n setFirstStartedActiveRootSpanId,\n } as AppStartIntegration;\n};\n\nfunction setSpanDurationAsMeasurementOnTransactionEvent(event: TransactionEvent, label: string, span: SpanJSON): void {\n if (!span.timestamp || !span.start_timestamp) {\n debug.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');\n return;\n }\n\n event.measurements = event.measurements || {};\n event.measurements[label] = {\n value: (span.timestamp - span.start_timestamp) * 1000,\n unit: 'millisecond',\n };\n}\n\n/**\n * Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.\n */\nfunction createJSExecutionStartSpan(\n parentSpan: SpanJSON,\n rootComponentCreationTimestampMs: number | undefined,\n): SpanJSON | undefined {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return undefined;\n }\n\n const bundleStartTimestampSeconds = bundleStartTimestampMs / 1000;\n if (bundleStartTimestampSeconds < parentSpan.start_timestamp) {\n debug.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');\n return undefined;\n }\n\n if (!rootComponentCreationTimestampMs) {\n debug.warn('Missing the root component first constructor call timestamp.');\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Start',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: bundleStartTimestampSeconds,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Before React Root',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: rootComponentCreationTimestampMs / 1000,\n origin: isRootComponentCreationTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START,\n });\n}\n\n/**\n * Adds native spans to the app start span.\n */\nfunction convertNativeSpansToSpanJSON(parentSpan: SpanJSON, nativeSpans: NativeAppStartResponse['spans']): SpanJSON[] {\n return nativeSpans\n .filter(span => span.start_timestamp_ms / 1000 >= parentSpan.start_timestamp)\n .map(span => {\n if (span.description === 'UIKit init') {\n return setMainThreadInfo(createUIKitSpan(parentSpan, span));\n }\n\n return setMainThreadInfo(\n createChildSpanJSON(parentSpan, {\n description: span.description,\n start_timestamp: span.start_timestamp_ms / 1000,\n timestamp: span.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n }),\n );\n });\n}\n\n/**\n * UIKit init is measured by the native layers till the native SDK start\n * RN initializes the native SDK later, the end timestamp would be wrong\n */\nfunction createUIKitSpan(parentSpan: SpanJSON, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): SpanJSON {\n const bundleStart = getBundleStartTimestampMs();\n\n // If UIKit init ends after the bundle start, the native SDK was auto-initialized\n // and so the end timestamp is incorrect.\n // The timestamps can't equal, as RN initializes after UIKit.\n if (bundleStart && bundleStart < nativeUIKitSpan.end_timestamp_ms) {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init to JS Exec Start',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: bundleStart / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n } else {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"nativeFrames.d.ts","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/nativeFrames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,WAAW,EAAE,YAAY,EAAE,eAAe,EAAQ,MAAM,cAAc,CAAC;AAkCpG,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IACvD,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IACtD,aAAa,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;CACzD;AAOD,eAAO,MAAM,8BAA8B,WAAY,OAAO,GAAG,SAAS,KAAG,WAAW,GAAG,SAQ1F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,WA8N1C,CAAC"}
1
+ {"version":3,"file":"nativeFrames.d.ts","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/nativeFrames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,WAAW,EAAE,YAAY,EAAE,eAAe,EAAQ,MAAM,cAAc,CAAC;AAqCpG,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IACvD,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IACtD,aAAa,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;CACzD;AAOD,eAAO,MAAM,8BAA8B,GAAI,QAAQ,OAAO,GAAG,SAAS,KAAG,WAAW,GAAG,SAQ1F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,WA8O1C,CAAC"}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { debug, getRootSpan, spanToJSON, timestampInSeconds } from '@sentry/core';
10
+ import { debug, getRootSpan, spanIsSampled, spanToJSON, timestampInSeconds } from '@sentry/core';
11
11
  import { AsyncExpiringMap } from '../../utils/AsyncExpiringMap';
12
12
  import { isRootSpan } from '../../utils/span';
13
13
  import { NATIVE } from '../../wrapper';
@@ -67,6 +67,9 @@ export const nativeFramesIntegration = () => {
67
67
  client.on('spanEnd', fetchEndFramesForSpan);
68
68
  };
69
69
  const fetchStartFramesForSpan = (span) => {
70
+ if (!spanIsSampled(span)) {
71
+ return;
72
+ }
70
73
  const spanId = span.spanContext().spanId;
71
74
  const spanType = isRootSpan(span) ? 'root' : 'child';
72
75
  debug.log(`[${INTEGRATION_NAME}] Fetching frames for ${spanType} span start (${spanId}).`);
@@ -148,6 +151,18 @@ export const nativeFramesIntegration = () => {
148
151
  span.setAttribute('frames.slow', slowFrames);
149
152
  span.setAttribute('frames.frozen', frozenFrames);
150
153
  debug.log(`[${INTEGRATION_NAME}] Attached frame data to span ${spanId}: total=${totalFrames}, slow=${slowFrames}, frozen=${frozenFrames}`);
154
+ const spanJson = spanToJSON(span);
155
+ if (spanJson.start_timestamp && spanJson.timestamp) {
156
+ try {
157
+ const delay = yield fetchNativeFramesDelay(spanJson.start_timestamp, spanJson.timestamp);
158
+ if (delay != null) {
159
+ span.setAttribute('frames.delay', delay);
160
+ }
161
+ }
162
+ catch (delayError) {
163
+ debug.log(`[${INTEGRATION_NAME}] Error while fetching frames delay for span ${spanId}.`, delayError);
164
+ }
165
+ }
151
166
  }
152
167
  }
153
168
  catch (error) {
@@ -218,6 +233,34 @@ export const nativeFramesIntegration = () => {
218
233
  processEvent,
219
234
  };
220
235
  };
236
+ function withNativeBridgeTimeout(promise, timeoutMessage) {
237
+ return new Promise((resolve, reject) => {
238
+ let settled = false;
239
+ const timeoutId = setTimeout(() => {
240
+ if (!settled) {
241
+ settled = true;
242
+ reject(timeoutMessage);
243
+ }
244
+ }, FETCH_FRAMES_TIMEOUT_MS);
245
+ promise
246
+ .then(value => {
247
+ if (settled) {
248
+ return;
249
+ }
250
+ clearTimeout(timeoutId);
251
+ settled = true;
252
+ resolve(value);
253
+ })
254
+ .then(undefined, error => {
255
+ if (settled) {
256
+ return;
257
+ }
258
+ clearTimeout(timeoutId);
259
+ settled = true;
260
+ reject(error);
261
+ });
262
+ });
263
+ }
221
264
  function fetchNativeFrames() {
222
265
  return new Promise((resolve, reject) => {
223
266
  let settled = false;
@@ -250,6 +293,9 @@ function fetchNativeFrames() {
250
293
  });
251
294
  });
252
295
  }
296
+ function fetchNativeFramesDelay(startTimestampSeconds, endTimestampSeconds) {
297
+ return withNativeBridgeTimeout(NATIVE.fetchNativeFramesDelay(startTimestampSeconds, endTimestampSeconds), 'Fetching native frames delay took too long.');
298
+ }
253
299
  function isClose(t1, t2) {
254
300
  return Math.abs(t1 - t2) < MARGIN_OF_ERROR_SECONDS;
255
301
  }