@sentry/react-native 5.31.1 → 6.0.0-alpha.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 (294) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/js/client.d.ts +5 -9
  3. package/dist/js/client.d.ts.map +1 -1
  4. package/dist/js/client.js +11 -42
  5. package/dist/js/client.js.map +1 -1
  6. package/dist/js/index.d.ts +5 -10
  7. package/dist/js/index.d.ts.map +1 -1
  8. package/dist/js/index.js +4 -21
  9. package/dist/js/index.js.map +1 -1
  10. package/dist/js/integrations/debugsymbolicator.d.ts +2 -8
  11. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  12. package/dist/js/integrations/debugsymbolicator.js +1 -9
  13. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  14. package/dist/js/integrations/default.d.ts.map +1 -1
  15. package/dist/js/integrations/default.js +16 -4
  16. package/dist/js/integrations/default.js.map +1 -1
  17. package/dist/js/integrations/devicecontext.d.ts +2 -8
  18. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  19. package/dist/js/integrations/devicecontext.js +0 -9
  20. package/dist/js/integrations/devicecontext.js.map +1 -1
  21. package/dist/js/integrations/eventorigin.d.ts +2 -8
  22. package/dist/js/integrations/eventorigin.d.ts.map +1 -1
  23. package/dist/js/integrations/eventorigin.js +0 -8
  24. package/dist/js/integrations/eventorigin.js.map +1 -1
  25. package/dist/js/integrations/expocontext.d.ts +2 -8
  26. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  27. package/dist/js/integrations/expocontext.js +0 -8
  28. package/dist/js/integrations/expocontext.js.map +1 -1
  29. package/dist/js/integrations/exports.d.ts +5 -0
  30. package/dist/js/integrations/exports.d.ts.map +1 -1
  31. package/dist/js/integrations/exports.js +5 -0
  32. package/dist/js/integrations/exports.js.map +1 -1
  33. package/dist/js/integrations/modulesloader.d.ts +2 -8
  34. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  35. package/dist/js/integrations/modulesloader.js +0 -8
  36. package/dist/js/integrations/modulesloader.js.map +1 -1
  37. package/dist/js/integrations/nativelinkederrors.d.ts +2 -8
  38. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  39. package/dist/js/integrations/nativelinkederrors.js +0 -8
  40. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  41. package/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
  42. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  43. package/dist/js/integrations/reactnativeerrorhandlers.js +1 -8
  44. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  45. package/dist/js/integrations/reactnativeinfo.d.ts +2 -8
  46. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  47. package/dist/js/integrations/reactnativeinfo.js +0 -8
  48. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  49. package/dist/js/integrations/release.d.ts +2 -8
  50. package/dist/js/integrations/release.d.ts.map +1 -1
  51. package/dist/js/integrations/release.js +0 -8
  52. package/dist/js/integrations/release.js.map +1 -1
  53. package/dist/js/integrations/rewriteframes.js +1 -1
  54. package/dist/js/integrations/rewriteframes.js.map +1 -1
  55. package/dist/js/integrations/screenshot.d.ts +2 -8
  56. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  57. package/dist/js/integrations/screenshot.js +2 -11
  58. package/dist/js/integrations/screenshot.js.map +1 -1
  59. package/dist/js/integrations/sdkinfo.d.ts +2 -8
  60. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  61. package/dist/js/integrations/sdkinfo.js +0 -8
  62. package/dist/js/integrations/sdkinfo.js.map +1 -1
  63. package/dist/js/integrations/spotlight.d.ts +2 -10
  64. package/dist/js/integrations/spotlight.d.ts.map +1 -1
  65. package/dist/js/integrations/spotlight.js +1 -10
  66. package/dist/js/integrations/spotlight.js.map +1 -1
  67. package/dist/js/integrations/viewhierarchy.d.ts +2 -8
  68. package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
  69. package/dist/js/integrations/viewhierarchy.js +0 -8
  70. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  71. package/dist/js/options.d.ts +34 -2
  72. package/dist/js/options.d.ts.map +1 -1
  73. package/dist/js/options.js.map +1 -1
  74. package/dist/js/profiling/cache.d.ts +1 -1
  75. package/dist/js/profiling/hermes.d.ts +1 -1
  76. package/dist/js/profiling/hermes.d.ts.map +1 -1
  77. package/dist/js/profiling/integration.d.ts +1 -7
  78. package/dist/js/profiling/integration.d.ts.map +1 -1
  79. package/dist/js/profiling/integration.js +39 -25
  80. package/dist/js/profiling/integration.js.map +1 -1
  81. package/dist/js/profiling/utils.js +2 -1
  82. package/dist/js/profiling/utils.js.map +1 -1
  83. package/dist/js/replay/mobilereplay.d.ts +2 -2
  84. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  85. package/dist/js/replay/mobilereplay.js.map +1 -1
  86. package/dist/js/replay/networkUtils.d.ts +0 -1
  87. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  88. package/dist/js/scopeSync.d.ts +6 -0
  89. package/dist/js/scopeSync.d.ts.map +1 -0
  90. package/dist/js/scopeSync.js +60 -0
  91. package/dist/js/scopeSync.js.map +1 -0
  92. package/dist/js/sdk.d.ts +1 -20
  93. package/dist/js/sdk.d.ts.map +1 -1
  94. package/dist/js/sdk.js +20 -53
  95. package/dist/js/sdk.js.map +1 -1
  96. package/dist/js/tools/metroconfig.d.ts +1 -1
  97. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  98. package/dist/js/tools/metroconfig.js.map +1 -1
  99. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  100. package/dist/js/touchevents.d.ts +0 -1
  101. package/dist/js/touchevents.d.ts.map +1 -1
  102. package/dist/js/touchevents.js +5 -9
  103. package/dist/js/touchevents.js.map +1 -1
  104. package/dist/js/tracing/gesturetracing.d.ts +1 -6
  105. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  106. package/dist/js/tracing/gesturetracing.js +8 -12
  107. package/dist/js/tracing/gesturetracing.js.map +1 -1
  108. package/dist/js/tracing/index.d.ts +6 -7
  109. package/dist/js/tracing/index.d.ts.map +1 -1
  110. package/dist/js/tracing/index.js +4 -7
  111. package/dist/js/tracing/index.js.map +1 -1
  112. package/dist/js/tracing/integrations/appStart.d.ts +39 -0
  113. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -0
  114. package/dist/js/tracing/integrations/appStart.js +301 -0
  115. package/dist/js/tracing/integrations/appStart.js.map +1 -0
  116. package/dist/js/tracing/integrations/nativeFrames.d.ts +21 -0
  117. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -0
  118. package/dist/js/tracing/integrations/nativeFrames.js +195 -0
  119. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -0
  120. package/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
  121. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -0
  122. package/dist/js/tracing/integrations/stalltracking.js +236 -0
  123. package/dist/js/tracing/integrations/stalltracking.js.map +1 -0
  124. package/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
  125. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -0
  126. package/dist/js/tracing/integrations/userInteraction.js +70 -0
  127. package/dist/js/tracing/integrations/userInteraction.js.map +1 -0
  128. package/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
  129. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -0
  130. package/dist/js/tracing/onSpanEndUtils.js +112 -0
  131. package/dist/js/tracing/onSpanEndUtils.js.map +1 -0
  132. package/dist/js/tracing/origin.d.ts +2 -0
  133. package/dist/js/tracing/origin.d.ts.map +1 -0
  134. package/dist/js/tracing/origin.js +2 -0
  135. package/dist/js/tracing/origin.js.map +1 -0
  136. package/dist/js/tracing/reactnativenavigation.d.ts +21 -39
  137. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  138. package/dist/js/tracing/reactnativenavigation.js +98 -87
  139. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  140. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  141. package/dist/js/tracing/reactnativeprofiler.js +6 -13
  142. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  143. package/dist/js/tracing/reactnativetracing.d.ts +44 -160
  144. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  145. package/dist/js/tracing/reactnativetracing.js +51 -481
  146. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  147. package/dist/js/tracing/reactnavigation.d.ts +18 -63
  148. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  149. package/dist/js/tracing/reactnavigation.js +200 -205
  150. package/dist/js/tracing/reactnavigation.js.map +1 -1
  151. package/dist/js/tracing/semanticAttributes.d.ts +12 -0
  152. package/dist/js/tracing/semanticAttributes.d.ts.map +1 -0
  153. package/dist/js/tracing/semanticAttributes.js +12 -0
  154. package/dist/js/tracing/semanticAttributes.js.map +1 -0
  155. package/dist/js/tracing/span.d.ts +52 -0
  156. package/dist/js/tracing/span.d.ts.map +1 -0
  157. package/dist/js/tracing/span.js +82 -0
  158. package/dist/js/tracing/span.js.map +1 -0
  159. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  160. package/dist/js/tracing/timetodisplay.js +14 -29
  161. package/dist/js/tracing/timetodisplay.js.map +1 -1
  162. package/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  163. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  164. package/dist/js/tracing/types.d.ts +2 -9
  165. package/dist/js/tracing/types.d.ts.map +1 -1
  166. package/dist/js/tracing/types.js.map +1 -1
  167. package/dist/js/tracing/utils.d.ts +19 -14
  168. package/dist/js/tracing/utils.d.ts.map +1 -1
  169. package/dist/js/tracing/utils.js +38 -52
  170. package/dist/js/tracing/utils.js.map +1 -1
  171. package/dist/js/transports/encodePolyfill.d.ts +3 -0
  172. package/dist/js/transports/encodePolyfill.d.ts.map +1 -0
  173. package/dist/js/transports/encodePolyfill.js +13 -0
  174. package/dist/js/transports/encodePolyfill.js.map +1 -0
  175. package/dist/js/transports/native.d.ts +2 -2
  176. package/dist/js/transports/native.d.ts.map +1 -1
  177. package/dist/js/transports/native.js +2 -1
  178. package/dist/js/transports/native.js.map +1 -1
  179. package/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  180. package/dist/js/utils/AsyncExpiringMap.d.ts.map +1 -0
  181. package/dist/js/utils/AsyncExpiringMap.js +130 -0
  182. package/dist/js/utils/AsyncExpiringMap.js.map +1 -0
  183. package/dist/js/utils/fill.d.ts +7 -0
  184. package/dist/js/utils/fill.d.ts.map +1 -0
  185. package/dist/js/utils/fill.js +9 -0
  186. package/dist/js/utils/fill.js.map +1 -0
  187. package/dist/js/utils/span.d.ts +19 -0
  188. package/dist/js/utils/span.d.ts.map +1 -0
  189. package/dist/js/utils/span.js +29 -0
  190. package/dist/js/utils/span.js.map +1 -0
  191. package/dist/js/vendor/react-native/index.d.ts +1 -2
  192. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  193. package/dist/js/vendor/react-native/index.js.map +1 -1
  194. package/dist/js/version.d.ts +1 -1
  195. package/dist/js/version.d.ts.map +1 -1
  196. package/dist/js/version.js +1 -1
  197. package/dist/js/version.js.map +1 -1
  198. package/dist/js/wrapper.d.ts.map +1 -1
  199. package/dist/js/wrapper.js +1 -0
  200. package/dist/js/wrapper.js.map +1 -1
  201. package/package.json +11 -12
  202. package/ts3.8/dist/js/client.d.ts +5 -9
  203. package/ts3.8/dist/js/index.d.ts +5 -10
  204. package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +2 -8
  205. package/ts3.8/dist/js/integrations/devicecontext.d.ts +2 -8
  206. package/ts3.8/dist/js/integrations/eventorigin.d.ts +2 -8
  207. package/ts3.8/dist/js/integrations/expocontext.d.ts +2 -8
  208. package/ts3.8/dist/js/integrations/exports.d.ts +5 -0
  209. package/ts3.8/dist/js/integrations/modulesloader.d.ts +2 -8
  210. package/ts3.8/dist/js/integrations/nativelinkederrors.d.ts +2 -8
  211. package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
  212. package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +2 -8
  213. package/ts3.8/dist/js/integrations/release.d.ts +2 -8
  214. package/ts3.8/dist/js/integrations/screenshot.d.ts +2 -8
  215. package/ts3.8/dist/js/integrations/sdkinfo.d.ts +2 -8
  216. package/ts3.8/dist/js/integrations/spotlight.d.ts +2 -10
  217. package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +2 -8
  218. package/ts3.8/dist/js/options.d.ts +34 -2
  219. package/ts3.8/dist/js/profiling/cache.d.ts +1 -1
  220. package/ts3.8/dist/js/profiling/hermes.d.ts +1 -1
  221. package/ts3.8/dist/js/profiling/integration.d.ts +1 -7
  222. package/ts3.8/dist/js/replay/mobilereplay.d.ts +2 -2
  223. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  224. package/ts3.8/dist/js/scopeSync.d.ts +6 -0
  225. package/ts3.8/dist/js/sdk.d.ts +1 -20
  226. package/ts3.8/dist/js/touchevents.d.ts +0 -1
  227. package/ts3.8/dist/js/tracing/gesturetracing.d.ts +1 -6
  228. package/ts3.8/dist/js/tracing/index.d.ts +6 -7
  229. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +39 -0
  230. package/ts3.8/dist/js/tracing/integrations/nativeFrames.d.ts +21 -0
  231. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
  232. package/ts3.8/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
  233. package/ts3.8/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
  234. package/ts3.8/dist/js/tracing/origin.d.ts +2 -0
  235. package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +21 -39
  236. package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +44 -160
  237. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +18 -63
  238. package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +12 -0
  239. package/ts3.8/dist/js/tracing/span.d.ts +52 -0
  240. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  241. package/ts3.8/dist/js/tracing/types.d.ts +2 -9
  242. package/ts3.8/dist/js/tracing/utils.d.ts +19 -14
  243. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +3 -0
  244. package/ts3.8/dist/js/transports/native.d.ts +2 -2
  245. package/ts3.8/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  246. package/ts3.8/dist/js/utils/fill.d.ts +7 -0
  247. package/ts3.8/dist/js/utils/span.d.ts +19 -0
  248. package/ts3.8/dist/js/vendor/react-native/index.d.ts +1 -2
  249. package/ts3.8/dist/js/version.d.ts +1 -1
  250. package/dist/js/integrations/index.d.ts +0 -16
  251. package/dist/js/integrations/index.d.ts.map +0 -1
  252. package/dist/js/integrations/index.js +0 -17
  253. package/dist/js/integrations/index.js.map +0 -1
  254. package/dist/js/scope.d.ts +0 -54
  255. package/dist/js/scope.d.ts.map +0 -1
  256. package/dist/js/scope.js +0 -89
  257. package/dist/js/scope.js.map +0 -1
  258. package/dist/js/tracing/addTracingExtensions.d.ts +0 -8
  259. package/dist/js/tracing/addTracingExtensions.d.ts.map +0 -1
  260. package/dist/js/tracing/addTracingExtensions.js +0 -66
  261. package/dist/js/tracing/addTracingExtensions.js.map +0 -1
  262. package/dist/js/tracing/nativeframes.d.ts +0 -60
  263. package/dist/js/tracing/nativeframes.d.ts.map +0 -1
  264. package/dist/js/tracing/nativeframes.js +0 -210
  265. package/dist/js/tracing/nativeframes.js.map +0 -1
  266. package/dist/js/tracing/reactnavigationv4.d.ts +0 -92
  267. package/dist/js/tracing/reactnavigationv4.d.ts.map +0 -1
  268. package/dist/js/tracing/reactnavigationv4.js +0 -229
  269. package/dist/js/tracing/reactnavigationv4.js.map +0 -1
  270. package/dist/js/tracing/routingInstrumentation.d.ts +0 -52
  271. package/dist/js/tracing/routingInstrumentation.d.ts.map +0 -1
  272. package/dist/js/tracing/routingInstrumentation.js +0 -36
  273. package/dist/js/tracing/routingInstrumentation.js.map +0 -1
  274. package/dist/js/tracing/stalltracking.d.ts +0 -99
  275. package/dist/js/tracing/stalltracking.d.ts.map +0 -1
  276. package/dist/js/tracing/stalltracking.js +0 -286
  277. package/dist/js/tracing/stalltracking.js.map +0 -1
  278. package/dist/js/tracing/transaction.d.ts +0 -11
  279. package/dist/js/tracing/transaction.d.ts.map +0 -1
  280. package/dist/js/tracing/transaction.js +0 -37
  281. package/dist/js/tracing/transaction.js.map +0 -1
  282. package/dist/js/transports/TextEncoder.d.ts +0 -3
  283. package/dist/js/transports/TextEncoder.d.ts.map +0 -1
  284. package/dist/js/transports/TextEncoder.js +0 -12
  285. package/dist/js/transports/TextEncoder.js.map +0 -1
  286. package/ts3.8/dist/js/integrations/index.d.ts +0 -16
  287. package/ts3.8/dist/js/scope.d.ts +0 -54
  288. package/ts3.8/dist/js/tracing/addTracingExtensions.d.ts +0 -8
  289. package/ts3.8/dist/js/tracing/nativeframes.d.ts +0 -60
  290. package/ts3.8/dist/js/tracing/reactnavigationv4.d.ts +0 -92
  291. package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +0 -52
  292. package/ts3.8/dist/js/tracing/stalltracking.d.ts +0 -99
  293. package/ts3.8/dist/js/tracing/transaction.d.ts +0 -11
  294. package/ts3.8/dist/js/transports/TextEncoder.d.ts +0 -3
@@ -0,0 +1,12 @@
1
+ export { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, } from '@sentry/core';
2
+ export declare const SEMANTIC_ATTRIBUTE_ROUTING_INSTRUMENTATION = "routing.instrumentation";
3
+ export declare const SEMANTIC_ATTRIBUTE_ROUTE_NAME = "route.name";
4
+ export declare const SEMANTIC_ATTRIBUTE_ROUTE_KEY = "route.key";
5
+ export declare const SEMANTIC_ATTRIBUTE_ROUTE_COMPONENT_ID = "route.component_id";
6
+ export declare const SEMANTIC_ATTRIBUTE_ROUTE_COMPONENT_TYPE = "route.component_type";
7
+ export declare const SEMANTIC_ATTRIBUTE_ROUTE_HAS_BEEN_SEEN = "route.has_been_seen";
8
+ export declare const SEMANTIC_ATTRIBUTE_PREVIOUS_ROUTE_NAME = "previous_route.name";
9
+ export declare const SEMANTIC_ATTRIBUTE_PREVIOUS_ROUTE_KEY = "previous_route.key";
10
+ export declare const SEMANTIC_ATTRIBUTE_PREVIOUS_ROUTE_COMPONENT_ID = "previous_route.component_id";
11
+ export declare const SEMANTIC_ATTRIBUTE_PREVIOUS_ROUTE_COMPONENT_TYPE = "previous_route.component_type";
12
+ //# sourceMappingURL=semanticAttributes.d.ts.map
@@ -0,0 +1,52 @@
1
+ import type { Client, Scope, Span, StartSpanOptions } from '@sentry/types';
2
+ export declare const DEFAULT_NAVIGATION_SPAN_NAME = "Route Change";
3
+ export declare const defaultIdleOptions: {
4
+ /**
5
+ * The time that has to pass without any span being created.
6
+ * If this time is exceeded, the idle span will finish.
7
+ *
8
+ * @default 1_000 (ms)
9
+ */
10
+ finalTimeout: number;
11
+ /**
12
+ * The max. time an idle span may run.
13
+ * If this time is exceeded, the idle span will finish no matter what.
14
+ *
15
+ * @default 60_0000 (ms)
16
+ */
17
+ idleTimeout: number;
18
+ };
19
+ export declare const startIdleNavigationSpan: (startSpanOption: StartSpanOptions, { finalTimeout, idleTimeout, }?: Partial<typeof defaultIdleOptions>) => Span | undefined;
20
+ /**
21
+ * Starts an idle span from `@sentry/core` with React Native application
22
+ * context awareness.
23
+ *
24
+ * - Span will be started with new propagation context.
25
+ * - Span will be canceled if the app goes to background.
26
+ */
27
+ export declare const startIdleSpan: (startSpanOption: StartSpanOptions, { finalTimeout, idleTimeout }: {
28
+ finalTimeout: number | undefined;
29
+ idleTimeout: number | undefined;
30
+ }) => Span;
31
+ /**
32
+ * Returns the default options for the idle navigation span.
33
+ */
34
+ export declare function getDefaultIdleNavigationSpanOptions(): StartSpanOptions;
35
+ /**
36
+ * Checks if the span is a Sentry User Interaction span.
37
+ */
38
+ export declare function isSentryInteractionSpan(span: Span): boolean;
39
+ declare const SCOPE_SPAN_FIELD = "_sentrySpan";
40
+ type ScopeWithMaybeSpan = Scope & {
41
+ [SCOPE_SPAN_FIELD]?: Span;
42
+ };
43
+ /**
44
+ * Removes the active span from the scope.
45
+ */
46
+ export declare function clearActiveSpanFromScope(scope: ScopeWithMaybeSpan): void;
47
+ /**
48
+ * Ensures that all created spans have an operation name.
49
+ */
50
+ export declare function addDefaultOpForSpanFrom(client: Client): void;
51
+ export {};
52
+ //# sourceMappingURL=span.d.ts.map
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface RNSentryOnDrawNextFrameEvent {
3
2
  newFrameTimestampInSeconds: number;
4
3
  type: 'initialDisplay' | 'fullDisplay';
@@ -1,4 +1,4 @@
1
- import type { TransactionContext } from '@sentry/types';
1
+ import type { Span } from '@sentry/types';
2
2
  export interface ReactNavigationRoute {
3
3
  name: string;
4
4
  key: string;
@@ -18,12 +18,5 @@ export type RouteChangeContextData = {
18
18
  hasBeenSeen: boolean;
19
19
  };
20
20
  };
21
- export interface ReactNavigationTransactionContext extends TransactionContext {
22
- tags: {
23
- 'routing.instrumentation': string;
24
- 'routing.route.name': string;
25
- };
26
- data: RouteChangeContextData;
27
- }
28
- export type BeforeNavigate = (context: TransactionContext) => TransactionContext;
21
+ export type BeforeNavigate = (context: Span) => void;
29
22
  //# sourceMappingURL=types.d.ts.map
@@ -1,30 +1,19 @@
1
- import type { Transaction } from '@sentry/core';
2
- import type { IdleTransaction, Span as SpanClass } from '@sentry/core';
3
- import type { Span, Transaction as TransactionType, TransactionContext, TransactionSource } from '@sentry/types';
1
+ import type { MeasurementUnit, Span, SpanJSON, TransactionSource } from '@sentry/types';
4
2
  export declare const defaultTransactionSource: TransactionSource;
5
3
  export declare const customTransactionSource: TransactionSource;
6
- export declare const getBlankTransactionContext: (name: string) => TransactionContext;
7
4
  /**
8
5
  * A margin of error of 50ms is allowed for the async native bridge call.
9
6
  * Anything larger would reduce the accuracy of our frames measurements.
10
7
  */
11
8
  export declare const MARGIN_OF_ERROR_SECONDS = 0.05;
12
- /**
13
- *
14
- */
15
- export declare function adjustTransactionDuration(maxDurationMs: number, transaction: IdleTransaction, endTimestamp: number): void;
16
9
  /**
17
10
  * Returns the timestamp where the JS global scope was initialized.
18
11
  */
19
12
  export declare function getTimeOriginMilliseconds(): number;
20
- /**
21
- * Calls the callback every time a child span of the transaction is finished.
22
- */
23
- export declare function instrumentChildSpanFinish(transaction: Transaction, callback: (span: SpanClass, endTimestamp?: number) => void): void;
24
13
  /**
25
14
  * Determines if the timestamp is now or within the specified margin of error from now.
26
15
  */
27
- export declare function isNearToNow(timestamp: number): boolean;
16
+ export declare function isNearToNow(timestamp: number | undefined): boolean;
28
17
  /**
29
18
  * Sets the duration of the span as a measurement.
30
19
  * Uses `setMeasurement` function from @sentry/core.
@@ -34,11 +23,27 @@ export declare function setSpanDurationAsMeasurement(name: string, span: Span):
34
23
  * Sets the duration of the span as a measurement.
35
24
  * Uses `setMeasurement` function from @sentry/core.
36
25
  */
37
- export declare function setSpanDurationAsMeasurementOnTransaction(transaction: TransactionType, name: string, span: Span): void;
26
+ export declare function setSpanDurationAsMeasurementOnSpan(name: string, span: Span, on: Span): void;
27
+ /**
28
+ * Sets measurement on the give span.
29
+ */
30
+ export declare function setSpanMeasurement(span: Span, key: string, value: number, unit: MeasurementUnit): void;
31
+ /**
32
+ * Returns the latest end timestamp of the child spans of the given span.
33
+ */
34
+ export declare function getLatestChildSpanEndTimestamp(span: Span): number | undefined;
38
35
  /**
39
36
  * Returns unix timestamp in ms of the bundle start time.
40
37
  *
41
38
  * If not available, returns undefined.
42
39
  */
43
40
  export declare function getBundleStartTimestampMs(): number | undefined;
41
+ /**
42
+ * Creates valid span JSON object from the given data.
43
+ */
44
+ export declare function createSpanJSON(from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp' | 'origin'>): SpanJSON;
45
+ /**
46
+ *
47
+ */
48
+ export declare function createChildSpanJSON(parent: SpanJSON, from: Partial<SpanJSON> & Pick<Required<SpanJSON>, 'description' | 'start_timestamp' | 'timestamp'>): SpanJSON;
44
49
  //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,3 @@
1
+ export declare const useEncodePolyfill: () => void;
2
+ export declare const encodePolyfill: (text: string) => Uint8Array;
3
+ //# sourceMappingURL=encodePolyfill.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { BaseTransportOptions, Envelope, Transport } from '@sentry/types';
1
+ import type { BaseTransportOptions, Envelope, Transport, TransportMakeRequestResponse } from '@sentry/types';
2
2
  import type { PromiseBuffer } from '@sentry/utils';
3
3
  export declare const DEFAULT_BUFFER_SIZE = 30;
4
4
  export type BaseNativeTransport = BaseTransportOptions;
@@ -15,7 +15,7 @@ export declare class NativeTransport implements Transport {
15
15
  *
16
16
  * @param envelope Envelope that should be sent to Sentry.
17
17
  */
18
- send(envelope: Envelope): PromiseLike<void>;
18
+ send(envelope: Envelope): PromiseLike<TransportMakeRequestResponse>;
19
19
  /**
20
20
  * Wait for all envelopes to be sent or the timeout to expire, whichever comes first.
21
21
  *
@@ -0,0 +1,56 @@
1
+ /**
2
+ * A Map that automatically removes entries after their TTL has expired.
3
+ *
4
+ * The map is Promise-aware, meaning it will start TTL countdown only after the promise has resolved.
5
+ */
6
+ export declare class AsyncExpiringMap<K, V> {
7
+ private _ttl;
8
+ private _cleanupIntervalMs;
9
+ private _map;
10
+ private _cleanupInterval;
11
+ constructor({ cleanupInterval, ttl, }?: {
12
+ cleanupInterval?: number;
13
+ ttl?: number;
14
+ });
15
+ /**
16
+ * Set a key-value pair.
17
+ */
18
+ set(key: K, promise: PromiseLike<V> | V): void;
19
+ /**
20
+ * Pops a key-value pair.
21
+ */
22
+ pop(key: K): PromiseLike<V> | V | undefined;
23
+ /**
24
+ * Get a value by key.
25
+ *
26
+ * If the values is expired it will be returned and removed from the map.
27
+ */
28
+ get(key: K): PromiseLike<V> | V | undefined;
29
+ /**
30
+ * Check if a key exists in the map.
31
+ *
32
+ * If the key is expired it's not present in the map.
33
+ */
34
+ has(key: K): boolean;
35
+ /**
36
+ * Get the remaining time to live of a key.
37
+ */
38
+ ttl(key: K): number | undefined;
39
+ /**
40
+ * Remove expired entries.
41
+ */
42
+ cleanup(): void;
43
+ /**
44
+ * Clear all entries.
45
+ */
46
+ clear(): void;
47
+ /**
48
+ * Stop the cleanup interval.
49
+ */
50
+ stopCleanup(): void;
51
+ /**
52
+ * Start the cleanup interval.
53
+ */
54
+ startCleanup(): void;
55
+ }
56
+ //# sourceMappingURL=AsyncExpiringMap.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The same as `import { fill } from '@sentry/utils';` but with explicit types.
3
+ */
4
+ export declare function fillTyped<Source extends {
5
+ [key: string]: any;
6
+ }, Name extends keyof Source & string>(source: Source, name: Name, replacement: (original: Source[Name]) => Source[Name]): void;
7
+ //# sourceMappingURL=fill.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { SentrySpan } from '@sentry/core';
2
+ import type { Span, TransactionEvent } from '@sentry/types';
3
+ /**
4
+ *
5
+ */
6
+ export declare function isSentrySpan(span: Span): span is SentrySpan;
7
+ /**
8
+ *
9
+ */
10
+ export declare function isRootSpan(span: Span): boolean;
11
+ /**
12
+ *
13
+ */
14
+ export declare function setEndTimeValue(span: Span, endTimestamp: number): void;
15
+ /**
16
+ *
17
+ */
18
+ export declare function convertSpanToTransaction(span: Span): TransactionEvent | undefined;
19
+ //# sourceMappingURL=span.d.ts.map
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type StackFrame = {
3
2
  column?: number;
4
3
  file?: string;
@@ -18,7 +17,7 @@ export type CodeFrame = Readonly<{
18
17
  export type SymbolicatedStackTrace = Readonly<{
19
18
  stack: Array<StackFrame>;
20
19
  codeFrame?: CodeFrame;
21
- }>;
20
+ }> | Array<StackFrame>;
22
21
  export type DevServerInfo = {
23
22
  [key: string]: unknown;
24
23
  url: string;
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "5.31.1";
3
+ export declare const SDK_VERSION = "6.0.0-alpha.1";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1,16 +0,0 @@
1
- export { DebugSymbolicator } from './debugsymbolicator';
2
- export { DeviceContext } from './devicecontext';
3
- export { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
4
- export { NativeLinkedErrors } from './nativelinkederrors';
5
- export { Release } from './release';
6
- export { EventOrigin } from './eventorigin';
7
- export { SdkInfo } from './sdkinfo';
8
- export { ReactNativeInfo } from './reactnativeinfo';
9
- export { ModulesLoader } from './modulesloader';
10
- export { HermesProfiling } from '../profiling/integration';
11
- export { Screenshot } from './screenshot';
12
- export { ViewHierarchy } from './viewhierarchy';
13
- export { ExpoContext } from './expocontext';
14
- export { Spotlight } from './spotlight';
15
- export { mobileReplayIntegration } from '../replay/mobilereplay';
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,17 +0,0 @@
1
- // THESE EXPORTS WILL BE REMOVED IN THE NEXT MAJOR RELEASE
2
- export { DebugSymbolicator } from './debugsymbolicator';
3
- export { DeviceContext } from './devicecontext';
4
- export { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
5
- export { NativeLinkedErrors } from './nativelinkederrors';
6
- export { Release } from './release';
7
- export { EventOrigin } from './eventorigin';
8
- export { SdkInfo } from './sdkinfo';
9
- export { ReactNativeInfo } from './reactnativeinfo';
10
- export { ModulesLoader } from './modulesloader';
11
- export { HermesProfiling } from '../profiling/integration';
12
- export { Screenshot } from './screenshot';
13
- export { ViewHierarchy } from './viewhierarchy';
14
- export { ExpoContext } from './expocontext';
15
- export { Spotlight } from './spotlight';
16
- export { mobileReplayIntegration } from '../replay/mobilereplay';
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/js/integrations/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["// THESE EXPORTS WILL BE REMOVED IN THE NEXT MAJOR RELEASE\n\nexport { DebugSymbolicator } from './debugsymbolicator';\nexport { DeviceContext } from './devicecontext';\nexport { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';\nexport { NativeLinkedErrors } from './nativelinkederrors';\nexport { Release } from './release';\nexport { EventOrigin } from './eventorigin';\nexport { SdkInfo } from './sdkinfo';\nexport { ReactNativeInfo } from './reactnativeinfo';\nexport { ModulesLoader } from './modulesloader';\nexport { HermesProfiling } from '../profiling/integration';\nexport { Screenshot } from './screenshot';\nexport { ViewHierarchy } from './viewhierarchy';\nexport { ExpoContext } from './expocontext';\nexport { Spotlight } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\n"]}
@@ -1,54 +0,0 @@
1
- import { Scope } from '@sentry/core';
2
- import type { Attachment, Breadcrumb, User } from '@sentry/types';
3
- /**
4
- * Extends the scope methods to set scope on the Native SDKs
5
- */
6
- export declare class ReactNativeScope extends Scope {
7
- /**
8
- * @inheritDoc
9
- */
10
- setUser(user: User | null): this;
11
- /**
12
- * @inheritDoc
13
- */
14
- setTag(key: string, value: string): this;
15
- /**
16
- * @inheritDoc
17
- */
18
- setTags(tags: {
19
- [key: string]: string;
20
- }): this;
21
- /**
22
- * @inheritDoc
23
- */
24
- setExtras(extras: {
25
- [key: string]: any;
26
- }): this;
27
- /**
28
- * @inheritDoc
29
- */
30
- setExtra(key: string, extra: any): this;
31
- /**
32
- * @inheritDoc
33
- */
34
- addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
35
- /**
36
- * @inheritDoc
37
- */
38
- clearBreadcrumbs(): this;
39
- /**
40
- * @inheritDoc
41
- */
42
- setContext(key: string, context: {
43
- [key: string]: any;
44
- } | null): this;
45
- /**
46
- * @inheritDoc
47
- */
48
- addAttachment(attachment: Attachment): this;
49
- /**
50
- * @inheritDoc
51
- */
52
- clearAttachments(): this;
53
- }
54
- //# sourceMappingURL=scope.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/js/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMlE;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI;IAKvC;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAK/C;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI;IAQrD;;OAEG;IAEI,SAAS,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI;IAOtD;;OAEG;IAEI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAK9C;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI;IAc3E;;OAEG;IACI,gBAAgB,IAAI,IAAI;IAK/B;;OAEG;IAEI,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI;IAK5E;;OAEG;IACI,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAIlD;;OAEG;IACI,gBAAgB,IAAI,IAAI;CAGhC"}
package/dist/js/scope.js DELETED
@@ -1,89 +0,0 @@
1
- import { Scope } from '@sentry/core';
2
- import { DEFAULT_BREADCRUMB_LEVEL } from './breadcrumb';
3
- import { convertToNormalizedObject } from './utils/normalize';
4
- import { NATIVE } from './wrapper';
5
- /**
6
- * Extends the scope methods to set scope on the Native SDKs
7
- */
8
- export class ReactNativeScope extends Scope {
9
- /**
10
- * @inheritDoc
11
- */
12
- setUser(user) {
13
- NATIVE.setUser(user);
14
- return super.setUser(user);
15
- }
16
- /**
17
- * @inheritDoc
18
- */
19
- setTag(key, value) {
20
- NATIVE.setTag(key, value);
21
- return super.setTag(key, value);
22
- }
23
- /**
24
- * @inheritDoc
25
- */
26
- setTags(tags) {
27
- // As native only has setTag, we just loop through each tag key.
28
- Object.keys(tags).forEach(key => {
29
- NATIVE.setTag(key, tags[key]);
30
- });
31
- return super.setTags(tags);
32
- }
33
- /**
34
- * @inheritDoc
35
- */
36
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
- setExtras(extras) {
38
- Object.keys(extras).forEach(key => {
39
- NATIVE.setExtra(key, extras[key]);
40
- });
41
- return super.setExtras(extras);
42
- }
43
- /**
44
- * @inheritDoc
45
- */
46
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
47
- setExtra(key, extra) {
48
- NATIVE.setExtra(key, extra);
49
- return super.setExtra(key, extra);
50
- }
51
- /**
52
- * @inheritDoc
53
- */
54
- addBreadcrumb(breadcrumb, maxBreadcrumbs) {
55
- const mergedBreadcrumb = Object.assign(Object.assign({}, breadcrumb), { level: breadcrumb.level || DEFAULT_BREADCRUMB_LEVEL, data: breadcrumb.data ? convertToNormalizedObject(breadcrumb.data) : undefined });
56
- super.addBreadcrumb(mergedBreadcrumb, maxBreadcrumbs);
57
- const finalBreadcrumb = this._breadcrumbs[this._breadcrumbs.length - 1];
58
- NATIVE.addBreadcrumb(finalBreadcrumb);
59
- return this;
60
- }
61
- /**
62
- * @inheritDoc
63
- */
64
- clearBreadcrumbs() {
65
- NATIVE.clearBreadcrumbs();
66
- return super.clearBreadcrumbs();
67
- }
68
- /**
69
- * @inheritDoc
70
- */
71
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
72
- setContext(key, context) {
73
- NATIVE.setContext(key, context);
74
- return super.setContext(key, context);
75
- }
76
- /**
77
- * @inheritDoc
78
- */
79
- addAttachment(attachment) {
80
- return super.addAttachment(attachment);
81
- }
82
- /**
83
- * @inheritDoc
84
- */
85
- clearAttachments() {
86
- return super.clearAttachments();
87
- }
88
- }
89
- //# sourceMappingURL=scope.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/js/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAGrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC;;OAEG;IACI,OAAO,CAAC,IAAiB;QAC9B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,GAAW,EAAE,KAAa;QACtC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,IAA+B;QAC5C,gEAAgE;QAChE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC9B,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,8DAA8D;IACvD,SAAS,CAAC,MAA8B;QAC7C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,gHAAgH;IACzG,QAAQ,CAAC,GAAW,EAAE,KAAU;QACrC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,UAAsB,EAAE,cAAuB;QAClE,MAAM,gBAAgB,mCACjB,UAAU,KACb,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,wBAAwB,EACnD,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,GAC/E,CAAC;QAEF,KAAK,CAAC,aAAa,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAEtD,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,8DAA8D;IACvD,UAAU,CAAC,GAAW,EAAE,OAAsC;QACnE,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,UAAsB;QACzC,OAAO,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,OAAO,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAClC,CAAC;CACF","sourcesContent":["import { Scope } from '@sentry/core';\nimport type { Attachment, Breadcrumb, User } from '@sentry/types';\n\nimport { DEFAULT_BREADCRUMB_LEVEL } from './breadcrumb';\nimport { convertToNormalizedObject } from './utils/normalize';\nimport { NATIVE } from './wrapper';\n\n/**\n * Extends the scope methods to set scope on the Native SDKs\n */\nexport class ReactNativeScope extends Scope {\n /**\n * @inheritDoc\n */\n public setUser(user: User | null): this {\n NATIVE.setUser(user);\n return super.setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n public setTag(key: string, value: string): this {\n NATIVE.setTag(key, value);\n return super.setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n public setTags(tags: { [key: string]: string }): this {\n // As native only has setTag, we just loop through each tag key.\n Object.keys(tags).forEach(key => {\n NATIVE.setTag(key, tags[key]);\n });\n return super.setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setExtras(extras: { [key: string]: any }): this {\n Object.keys(extras).forEach(key => {\n NATIVE.setExtra(key, extras[key]);\n });\n return super.setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any\n public setExtra(key: string, extra: any): this {\n NATIVE.setExtra(key, extra);\n return super.setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const mergedBreadcrumb: Breadcrumb = {\n ...breadcrumb,\n level: breadcrumb.level || DEFAULT_BREADCRUMB_LEVEL,\n data: breadcrumb.data ? convertToNormalizedObject(breadcrumb.data) : undefined,\n };\n\n super.addBreadcrumb(mergedBreadcrumb, maxBreadcrumbs);\n\n const finalBreadcrumb = this._breadcrumbs[this._breadcrumbs.length - 1];\n NATIVE.addBreadcrumb(finalBreadcrumb);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n public clearBreadcrumbs(): this {\n NATIVE.clearBreadcrumbs();\n return super.clearBreadcrumbs();\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setContext(key: string, context: { [key: string]: any } | null): this {\n NATIVE.setContext(key, context);\n return super.setContext(key, context);\n }\n\n /**\n * @inheritDoc\n */\n public addAttachment(attachment: Attachment): this {\n return super.addAttachment(attachment);\n }\n\n /**\n * @inheritDoc\n */\n public clearAttachments(): this {\n return super.clearAttachments();\n }\n}\n"]}
@@ -1,8 +0,0 @@
1
- import type { Hub, Transaction } from '@sentry/core';
2
- import type { CustomSamplingContext, TransactionContext } from '@sentry/types';
3
- /**
4
- * Adds React Native's extensions. Needs to be called before any transactions are created.
5
- */
6
- export declare function _addTracingExtensions(): void;
7
- export type StartTransactionFunction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
8
- //# sourceMappingURL=addTracingExtensions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addTracingExtensions.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/addTracingExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAe,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAK5F;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAiB5C;AAED,MAAM,MAAM,wBAAwB,GAAG,CACrC,IAAI,EAAE,GAAG,EACT,kBAAkB,EAAE,kBAAkB,EACtC,qBAAqB,CAAC,EAAE,qBAAqB,KAC1C,WAAW,CAAC"}
@@ -1,66 +0,0 @@
1
- import { addTracingExtensions, getCurrentHub, getMainCarrier } from '@sentry/core';
2
- import { DEFAULT } from '../tracing/ops';
3
- import { ReactNativeTracing } from '../tracing/reactnativetracing';
4
- /**
5
- * Adds React Native's extensions. Needs to be called before any transactions are created.
6
- */
7
- export function _addTracingExtensions() {
8
- addTracingExtensions();
9
- const carrier = getMainCarrier();
10
- if (carrier.__SENTRY__) {
11
- carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
12
- if (carrier.__SENTRY__.extensions.startTransaction) {
13
- const originalStartTransaction = carrier.__SENTRY__.extensions.startTransaction;
14
- /*
15
- Overwrites the transaction start and finish to start and finish stall tracking.
16
- Preferably instead of overwriting add a callback method for this in the Transaction itself.
17
- */
18
- const _startTransaction = _patchStartTransaction(originalStartTransaction);
19
- carrier.__SENTRY__.extensions.startTransaction = _startTransaction;
20
- }
21
- }
22
- }
23
- /**
24
- * Overwrite the startTransaction extension method to start and end stall tracking.
25
- */
26
- const _patchStartTransaction = (originalStartTransaction) => {
27
- /**
28
- * Method to overwrite with
29
- */
30
- function _startTransaction(transactionContext, customSamplingContext) {
31
- // Native SDKs require op to be set - for JS Relay sets `default`
32
- if (!transactionContext.op) {
33
- transactionContext.op = DEFAULT;
34
- }
35
- const transaction = originalStartTransaction.apply(this, [transactionContext, customSamplingContext]);
36
- const originalStartChild = transaction.startChild.bind(transaction);
37
- transaction.startChild = (spanContext) => {
38
- return originalStartChild(Object.assign(Object.assign({}, spanContext), {
39
- // Native SDKs require op to be set
40
- op: (spanContext === null || spanContext === void 0 ? void 0 : spanContext.op) || DEFAULT }));
41
- };
42
- const reactNativeTracing = getCurrentHub().getIntegration(ReactNativeTracing);
43
- if (reactNativeTracing) {
44
- reactNativeTracing.onTransactionStart(transaction);
45
- // eslint-disable-next-line @typescript-eslint/unbound-method
46
- const originalFinish = transaction.finish;
47
- transaction.finish = (endTimestamp) => {
48
- if (reactNativeTracing) {
49
- reactNativeTracing.onTransactionFinish(transaction, endTimestamp);
50
- }
51
- return originalFinish.apply(transaction, [endTimestamp]);
52
- };
53
- // eslint-disable-next-line @typescript-eslint/unbound-method
54
- const originalEnd = transaction.end;
55
- transaction.end = (endTimestamp) => {
56
- if (reactNativeTracing) {
57
- reactNativeTracing.onTransactionFinish(transaction, endTimestamp);
58
- }
59
- return originalEnd.apply(transaction, [endTimestamp]);
60
- };
61
- }
62
- return transaction;
63
- }
64
- return _startTransaction;
65
- };
66
- //# sourceMappingURL=addTracingExtensions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addTracingExtensions.js","sourceRoot":"","sources":["../../../src/js/tracing/addTracingExtensions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,oBAAoB,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,UAAU,EAAE;QACtB,OAAO,CAAC,UAAU,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC;QACpE,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,EAAE;YAClD,MAAM,wBAAwB,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,gBAA4C,CAAC;YAE5G;;;cAGE;YACF,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,wBAAwB,CAAC,CAAC;YAE3E,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;SACpE;KACF;AACH,CAAC;AAQD;;GAEG;AACH,MAAM,sBAAsB,GAAG,CAAC,wBAAkD,EAA4B,EAAE;IAC9G;;OAEG;IACH,SAAS,iBAAiB,CAExB,kBAAsC,EACtC,qBAA6C;QAE7C,iEAAiE;QACjE,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE;YAC1B,kBAAkB,CAAC,EAAE,GAAG,OAAO,CAAC;SACjC;QAED,MAAM,WAAW,GAAgB,wBAAwB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC,CAAC;QACnH,MAAM,kBAAkB,GAA8B,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/F,WAAW,CAAC,UAAU,GAAG,CACvB,WAAmG,EAC5D,EAAE;YACzC,OAAO,kBAAkB,iCACpB,WAAW;gBACd,mCAAmC;gBACnC,EAAE,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,EAAE,KAAI,OAAO,IAC9B,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,kBAAkB,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;QAE9E,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YAEnD,6DAA6D;YAC7D,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;YAE1C,WAAW,CAAC,MAAM,GAAG,CAAC,YAAgC,EAAE,EAAE;gBACxD,IAAI,kBAAkB,EAAE;oBACtB,kBAAkB,CAAC,mBAAmB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;iBACnE;gBAED,OAAO,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YAC3D,CAAC,CAAC;YAEF,6DAA6D;YAC7D,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC;YAEpC,WAAW,CAAC,GAAG,GAAG,CAAC,YAAgC,EAAE,EAAE;gBACrD,IAAI,kBAAkB,EAAE;oBACtB,kBAAkB,CAAC,mBAAmB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;iBACnE;gBAED,OAAO,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC;SACH;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import type { Hub, Transaction } from '@sentry/core';\nimport { addTracingExtensions, getCurrentHub, getMainCarrier } from '@sentry/core';\nimport type { CustomSamplingContext, SpanContext, TransactionContext } from '@sentry/types';\n\nimport { DEFAULT } from '../tracing/ops';\nimport { ReactNativeTracing } from '../tracing/reactnativetracing';\n\n/**\n * Adds React Native's extensions. Needs to be called before any transactions are created.\n */\nexport function _addTracingExtensions(): void {\n addTracingExtensions();\n const carrier = getMainCarrier();\n if (carrier.__SENTRY__) {\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (carrier.__SENTRY__.extensions.startTransaction) {\n const originalStartTransaction = carrier.__SENTRY__.extensions.startTransaction as StartTransactionFunction;\n\n /*\n Overwrites the transaction start and finish to start and finish stall tracking.\n Preferably instead of overwriting add a callback method for this in the Transaction itself.\n */\n const _startTransaction = _patchStartTransaction(originalStartTransaction);\n\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n }\n}\n\nexport type StartTransactionFunction = (\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n) => Transaction;\n\n/**\n * Overwrite the startTransaction extension method to start and end stall tracking.\n */\nconst _patchStartTransaction = (originalStartTransaction: StartTransactionFunction): StartTransactionFunction => {\n /**\n * Method to overwrite with\n */\n function _startTransaction(\n this: Hub,\n transactionContext: TransactionContext,\n customSamplingContext?: CustomSamplingContext,\n ): Transaction {\n // Native SDKs require op to be set - for JS Relay sets `default`\n if (!transactionContext.op) {\n transactionContext.op = DEFAULT;\n }\n\n const transaction: Transaction = originalStartTransaction.apply(this, [transactionContext, customSamplingContext]);\n const originalStartChild: Transaction['startChild'] = transaction.startChild.bind(transaction);\n transaction.startChild = (\n spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>,\n ): ReturnType<Transaction['startChild']> => {\n return originalStartChild({\n ...spanContext,\n // Native SDKs require op to be set\n op: spanContext?.op || DEFAULT,\n });\n };\n\n const reactNativeTracing = getCurrentHub().getIntegration(ReactNativeTracing);\n\n if (reactNativeTracing) {\n reactNativeTracing.onTransactionStart(transaction);\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalFinish = transaction.finish;\n\n transaction.finish = (endTimestamp: number | undefined) => {\n if (reactNativeTracing) {\n reactNativeTracing.onTransactionFinish(transaction, endTimestamp);\n }\n\n return originalFinish.apply(transaction, [endTimestamp]);\n };\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const originalEnd = transaction.end;\n\n transaction.end = (endTimestamp: number | undefined) => {\n if (reactNativeTracing) {\n reactNativeTracing.onTransactionFinish(transaction, endTimestamp);\n }\n\n return originalEnd.apply(transaction, [endTimestamp]);\n };\n }\n\n return transaction;\n }\n\n return _startTransaction;\n};\n"]}
@@ -1,60 +0,0 @@
1
- import type { Transaction } from '@sentry/core';
2
- import type { EventProcessor, Measurements, MeasurementUnit } from '@sentry/types';
3
- export interface FramesMeasurements extends Measurements {
4
- frames_total: {
5
- value: number;
6
- unit: MeasurementUnit;
7
- };
8
- frames_slow: {
9
- value: number;
10
- unit: MeasurementUnit;
11
- };
12
- frames_frozen: {
13
- value: number;
14
- unit: MeasurementUnit;
15
- };
16
- }
17
- /**
18
- * Instrumentation to add native slow/frozen frames measurements onto transactions.
19
- */
20
- export declare class NativeFramesInstrumentation {
21
- /** The native frames at the finish time of the most recent span. */
22
- private _lastSpanFinishFrames?;
23
- constructor(addGlobalEventProcessor: (e: EventProcessor) => void, doesExist: () => boolean);
24
- /**
25
- * To be called when a transaction is started.
26
- * Logs the native frames at this start point and instruments child span finishes.
27
- */
28
- onTransactionStart(transaction: Transaction): void;
29
- /**
30
- * To be called when a transaction is finished
31
- */
32
- onTransactionFinish(transaction: Transaction): void;
33
- /**
34
- * Called on a span finish to fetch native frames to support transactions with trimEnd.
35
- * Only to be called when a span does not have an end timestamp.
36
- */
37
- private _onSpanFinish;
38
- /**
39
- * Returns the computed frames measurements and awaits for them if they are not ready yet.
40
- */
41
- private _getFramesMeasurements;
42
- /**
43
- * Returns the computed frames measurements given ready data
44
- */
45
- private _prepareMeasurements;
46
- /**
47
- * Fetch finish frames for a transaction at the current time. Calls any awaiting listeners.
48
- */
49
- private _fetchEndFramesForTransaction;
50
- /**
51
- * On a finish frames failure, we cancel the await.
52
- */
53
- private _cancelEndFrames;
54
- /**
55
- * Adds frames measurements to an event. Called from a valid event processor.
56
- * Awaits for finish frames if needed.
57
- */
58
- private _processEvent;
59
- }
60
- //# sourceMappingURL=nativeframes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nativeframes.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/nativeframes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAS,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAc1F,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;AAcD;;GAEG;AACH,qBAAa,2BAA2B;IACtC,oEAAoE;IACpE,OAAO,CAAC,qBAAqB,CAAC,CAG5B;gBAEiB,uBAAuB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO;IAMjG;;;OAGG;IACI,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IA4BzD;;OAEG;IACI,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAS1D;;;OAGG;IACH,OAAO,CAAC,aAAa;IAiBrB;;OAEG;YACW,sBAAsB;IA4BpC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA4D5B;;OAEG;YACW,6BAA6B;IAoB3C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAUxB;;;OAGG;YACW,aAAa;CAiD5B"}