@sentry/react-native 5.9.2 → 5.11.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 (61) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/RNSentry.podspec +1 -1
  3. package/android/build.gradle +8 -1
  4. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +3 -0
  5. package/dist/js/client.d.ts.map +1 -1
  6. package/dist/js/client.js +1 -2
  7. package/dist/js/client.js.map +1 -1
  8. package/dist/js/integrations/reactnativeinfo.d.ts +1 -0
  9. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  10. package/dist/js/integrations/reactnativeinfo.js +31 -1
  11. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  12. package/dist/js/integrations/screenshot.d.ts +4 -2
  13. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  14. package/dist/js/integrations/screenshot.js +16 -2
  15. package/dist/js/integrations/screenshot.js.map +1 -1
  16. package/dist/js/options.d.ts +8 -1
  17. package/dist/js/options.d.ts.map +1 -1
  18. package/dist/js/options.js.map +1 -1
  19. package/dist/js/sdk.d.ts +1 -1
  20. package/dist/js/sdk.d.ts.map +1 -1
  21. package/dist/js/sdk.js +1 -2
  22. package/dist/js/sdk.js.map +1 -1
  23. package/dist/js/tools/ModulesCollector.js +1 -1
  24. package/dist/js/tools/ModulesCollector.js.map +1 -1
  25. package/dist/js/tools/sentryMetroSerializer.d.ts +9 -0
  26. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -0
  27. package/dist/js/tools/sentryMetroSerializer.js +146 -0
  28. package/dist/js/tools/sentryMetroSerializer.js.map +1 -0
  29. package/dist/js/tools/utils.d.ts +43 -0
  30. package/dist/js/tools/utils.d.ts.map +1 -0
  31. package/dist/js/tools/utils.js +39 -0
  32. package/dist/js/tools/utils.js.map +1 -0
  33. package/dist/js/tools/vendor/metro/utils.d.ts +23 -0
  34. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -0
  35. package/dist/js/tools/vendor/metro/utils.js +50 -0
  36. package/dist/js/tools/vendor/metro/utils.js.map +1 -0
  37. package/dist/js/tracing/reactnativetracing.d.ts +11 -0
  38. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  39. package/dist/js/tracing/reactnativetracing.js +49 -22
  40. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  41. package/dist/js/tracing/transaction.d.ts +5 -1
  42. package/dist/js/tracing/transaction.d.ts.map +1 -1
  43. package/dist/js/tracing/transaction.js +17 -0
  44. package/dist/js/tracing/transaction.js.map +1 -1
  45. package/dist/js/version.d.ts +1 -1
  46. package/dist/js/version.d.ts.map +1 -1
  47. package/dist/js/version.js +1 -1
  48. package/dist/js/version.js.map +1 -1
  49. package/package.json +20 -40
  50. package/scripts/copy-debugid.js +52 -0
  51. package/scripts/has-sourcemap-debugid.js +31 -0
  52. package/scripts/sentry-xcode-debug-files.sh +27 -0
  53. package/scripts/sentry-xcode.sh +32 -0
  54. package/sentry.gradle +129 -69
  55. package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +1 -0
  56. package/ts3.8/dist/js/integrations/screenshot.d.ts +4 -2
  57. package/ts3.8/dist/js/options.d.ts +8 -1
  58. package/ts3.8/dist/js/sdk.d.ts +1 -1
  59. package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +11 -0
  60. package/ts3.8/dist/js/tracing/transaction.d.ts +5 -1
  61. package/ts3.8/dist/js/version.d.ts +1 -1
package/sentry.gradle CHANGED
@@ -3,6 +3,10 @@ import org.apache.tools.ant.taskdefs.condition.Os
3
3
  import java.util.regex.Matcher
4
4
  import java.util.regex.Pattern
5
5
 
6
+ project.ext.shouldSentryAutoUpload = { ->
7
+ return System.getenv('SENTRY_DISABLE_AUTO_UPLOAD') != 'true'
8
+ }
9
+
6
10
  def config = project.hasProperty("sentryCli") ? project.sentryCli : [];
7
11
 
8
12
  gradle.projectsEvaluated {
@@ -39,6 +43,8 @@ gradle.projectsEvaluated {
39
43
  def shouldCleanUp
40
44
  def sourcemapOutput
41
45
  def bundleOutput
46
+ def packagerSourcemapOutput
47
+ def bundleCommand
42
48
  def props = bundleTask.getProperties()
43
49
  def reactRoot = props.get("workingDir")
44
50
  if (reactRoot == null) {
@@ -47,7 +53,7 @@ gradle.projectsEvaluated {
47
53
  def modulesOutput = "$reactRoot/android/app/src/main/assets/modules.json"
48
54
  def modulesTask = null
49
55
 
50
- (shouldCleanUp, bundleOutput, sourcemapOutput) = forceSourceMapOutputFromBundleTask(bundleTask)
56
+ (shouldCleanUp, bundleOutput, sourcemapOutput, packagerSourcemapOutput, bundleCommand) = forceSourceMapOutputFromBundleTask(bundleTask)
51
57
 
52
58
  // Lets leave this here if we need to debug
53
59
  // println bundleTask.properties
@@ -94,71 +100,108 @@ gradle.projectsEvaluated {
94
100
  try { tasks.named(nameCliTask); return } catch (Exception e) {}
95
101
 
96
102
  /** Upload source map file to the sentry server via CLI call. */
97
- def cliTask = tasks.create(nameCliTask, Exec) {
103
+ def cliTask = tasks.create(nameCliTask) {
104
+ onlyIf { shouldSentryAutoUpload() }
98
105
  description = "upload debug symbols to sentry"
99
106
  group = 'sentry.io'
100
107
 
101
- workingDir reactRoot
102
-
103
- def propertiesFile = config.sentryProperties
104
- ? config.sentryProperties
105
- : "$reactRoot/android/sentry.properties"
106
-
107
- if (config.flavorAware) {
108
- propertiesFile = "$reactRoot/android/sentry-${variant}.properties"
109
- project.logger.info("For $variant using: $propertiesFile")
110
- } else {
111
- environment("SENTRY_PROPERTIES", propertiesFile)
108
+ def extraArgs = []
109
+
110
+ def sentryPackage = resolveSentryReactNativeSDKPath(reactRoot)
111
+ def copyDebugIdScript = config.copyDebugIdScript
112
+ ? file(config.copyDebugIdScript).getAbsolutePath()
113
+ : "$sentryPackage/scripts/copy-debugid.js"
114
+ def hasSourceMapDebugIdScript = config.hasSourceMapDebugIdScript
115
+ ? file(config.hasSourceMapDebugIdScript).getAbsolutePath()
116
+ : "$sentryPackage/scripts/has-sourcemap-debugid.js"
117
+
118
+ doFirst {
119
+ // Copy Debug ID from packager source map to Hermes composed source map
120
+ exec {
121
+ def args = ["node",
122
+ copyDebugIdScript,
123
+ packagerSourcemapOutput,
124
+ sourcemapOutput]
125
+ def osCompatibilityCopyCommand = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c'] : []
126
+ commandLine(*osCompatibilityCopyCommand, *args)
127
+ }
128
+
129
+ // Add release and dist for backward compatibility if no Debug ID detected in output soruce map
130
+ def process = ["node", hasSourceMapDebugIdScript, sourcemapOutput].execute(null, new File("$reactRoot"))
131
+ project.logger.lifecycle("Check generated source map for Debug ID: ${process.text}")
132
+ def notIncludeRelease = "$bundleCommand" == "bundle" && process.exitValue() == 0
133
+ def not = notIncludeRelease ? 'not ' : ''
134
+ project.logger.lifecycle("Sentry Source Maps upload will ${not}include the release name and dist.")
135
+ extraArgs.addAll(notIncludeRelease ? [] : [
136
+ "--release", releaseName,
137
+ "--dist", versionCode
138
+ ])
112
139
  }
113
140
 
114
- Properties sentryProps = new Properties()
115
- try {
116
- sentryProps.load(new FileInputStream(propertiesFile))
117
- } catch (FileNotFoundException e) {
118
- project.logger.info("file not found '$propertiesFile' for '$variant'")
141
+ doLast {
142
+ exec {
143
+ workingDir reactRoot
144
+
145
+ def propertiesFile = config.sentryProperties
146
+ ? config.sentryProperties
147
+ : "$reactRoot/android/sentry.properties"
148
+
149
+ if (config.flavorAware) {
150
+ propertiesFile = "$reactRoot/android/sentry-${variant}.properties"
151
+ project.logger.info("For $variant using: $propertiesFile")
152
+ } else {
153
+ environment("SENTRY_PROPERTIES", propertiesFile)
154
+ }
155
+
156
+ Properties sentryProps = new Properties()
157
+ try {
158
+ sentryProps.load(new FileInputStream(propertiesFile))
159
+ } catch (FileNotFoundException e) {
160
+ project.logger.info("file not found '$propertiesFile' for '$variant'")
161
+ }
162
+
163
+ def resolvedCliPackage = null
164
+ try {
165
+ resolvedCliPackage = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
166
+ } catch (Throwable ignored) {}
167
+ def cliPackage = resolvedCliPackage != null && resolvedCliPackage.exists() ? resolvedCliPackage.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli"
168
+ def cliExecutable = sentryProps.get("cli.executable", "$cliPackage/bin/sentry-cli")
169
+
170
+ // fix path separator for Windows
171
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
172
+ cliExecutable = cliExecutable.replaceAll("/", "\\\\")
173
+ }
174
+
175
+ //
176
+ // based on:
177
+ // https://github.com/getsentry/sentry-cli/blob/master/src/commands/react_native_gradle.rs
178
+ //
179
+ def args = [cliExecutable]
180
+
181
+ args.addAll(!config.logLevel ? [] : [
182
+ "--log-level", config.logLevel // control verbosity of the output
183
+ ])
184
+ args.addAll(!config.flavorAware ? [] : [
185
+ "--url", sentryProps.get("defaults.url"),
186
+ "--auth-token", sentryProps.get("auth.token")
187
+ ])
188
+ args.addAll(["react-native", "gradle",
189
+ "--bundle", bundleOutput, // The path to a bundle that should be uploaded.
190
+ "--sourcemap", sourcemapOutput // The path to a sourcemap that should be uploaded.
191
+ ])
192
+ args.addAll(!config.flavorAware ? [] : [
193
+ "--org", sentryProps.get("defaults.org"),
194
+ "--project", sentryProps.get("defaults.project")
195
+ ])
196
+
197
+ args.addAll(extraArgs)
198
+
199
+ project.logger.lifecycle("Sentry-CLI arguments: ${args}")
200
+ def osCompatibility = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'node'] : []
201
+ commandLine(*osCompatibility, *args)
202
+ }
119
203
  }
120
204
 
121
- def resolvedCliPackage = null
122
- try {
123
- resolvedCliPackage = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
124
- } catch (Throwable ignored) {}
125
- def cliPackage = resolvedCliPackage != null && resolvedCliPackage.exists() ? resolvedCliPackage.getAbsolutePath() : "$reactRoot/node_modules/@sentry/cli"
126
- def cliExecutable = sentryProps.get("cli.executable", "$cliPackage/bin/sentry-cli")
127
-
128
- // fix path separator for Windows
129
- if (Os.isFamily(Os.FAMILY_WINDOWS)) {
130
- cliExecutable = cliExecutable.replaceAll("/", "\\\\")
131
- }
132
-
133
- //
134
- // based on:
135
- // https://github.com/getsentry/sentry-cli/blob/master/src/commands/react_native_gradle.rs
136
- //
137
- def args = [cliExecutable]
138
-
139
- args.addAll(!config.logLevel ? [] : [
140
- "--log-level", config.logLevel // control verbosity of the output
141
- ])
142
- args.addAll(!config.flavorAware ? [] : [
143
- "--url", sentryProps.get("defaults.url"),
144
- "--auth-token", sentryProps.get("auth.token")
145
- ])
146
- args.addAll(["react-native", "gradle",
147
- "--bundle", bundleOutput, // The path to a bundle that should be uploaded.
148
- "--sourcemap", sourcemapOutput, // The path to a sourcemap that should be uploaded.
149
- "--release", releaseName, // The name of the release to publish.
150
- "--dist", versionCode
151
- ])
152
- args.addAll(!config.flavorAware ? [] : [
153
- "--org", sentryProps.get("defaults.org"),
154
- "--project", sentryProps.get("defaults.project")
155
- ])
156
-
157
- project.logger.info("Sentry-CLI arguments: ${args}")
158
-
159
- def osCompatibility = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'node'] : []
160
- commandLine(*osCompatibility, *args)
161
-
162
205
  enabled true
163
206
  }
164
207
 
@@ -168,11 +211,7 @@ gradle.projectsEvaluated {
168
211
 
169
212
  workingDir reactRoot
170
213
 
171
- def resolvedSentryPath = null
172
- try {
173
- resolvedSentryPath = new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
174
- } catch (Throwable ignored) {} // if the resolve fails we fallback to the default path
175
- def sentryPackage = resolvedSentryPath != null && resolvedSentryPath.exists() ? resolvedSentryPath.getAbsolutePath() : "$reactRoot/node_modules/@sentry/react-native"
214
+ def sentryPackage = resolveSentryReactNativeSDKPath(reactRoot)
176
215
 
177
216
  def collectModulesScript = config.collectModulesScript
178
217
  ? file(config.collectModulesScript).getAbsolutePath()
@@ -248,6 +287,15 @@ gradle.projectsEvaluated {
248
287
  }
249
288
  }
250
289
 
290
+ def resolveSentryReactNativeSDKPath(reactRoot) {
291
+ def resolvedSentryPath = null
292
+ try {
293
+ resolvedSentryPath = new File(["node", "--print", "require.resolve('@sentry/react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
294
+ } catch (Throwable ignored) {} // if the resolve fails we fallback to the default path
295
+ def sentryPackage = resolvedSentryPath != null && resolvedSentryPath.exists() ? resolvedSentryPath.getAbsolutePath() : "$reactRoot/node_modules/@sentry/react-native"
296
+ return sentryPackage
297
+ }
298
+
251
299
  /** Compose lookup map of build variants - to - outputs. */
252
300
  def extractReleasesInfo() {
253
301
  def releases = [:]
@@ -275,6 +323,8 @@ def extractReleasesInfo() {
275
323
  static extractBundleTaskArgumentsLegacy(cmdArgs, Project project) {
276
324
  def bundleOutput = null
277
325
  def sourcemapOutput = null
326
+ def packagerSourcemapOutput = null
327
+ // packagerBundleOutput doesn't exist, because packager output is overwritten by Hermes
278
328
 
279
329
  cmdArgs.eachWithIndex { String arg, int i ->
280
330
  if (arg == "--bundle-output") {
@@ -282,6 +332,7 @@ static extractBundleTaskArgumentsLegacy(cmdArgs, Project project) {
282
332
  project.logger.info("--bundle-output: `${bundleOutput}`")
283
333
  } else if (arg == "--sourcemap-output") {
284
334
  sourcemapOutput = cmdArgs[i + 1]
335
+ packagerSourcemapOutput = sourcemapOutput
285
336
  project.logger.info("--sourcemap-output param: `${sourcemapOutput}`")
286
337
  }
287
338
  }
@@ -313,7 +364,11 @@ static extractBundleTaskArgumentsLegacy(cmdArgs, Project project) {
313
364
  }
314
365
  }
315
366
 
316
- return [bundleOutput, sourcemapOutput]
367
+ // get the current bundle command, if not peresent use default plain "bundle"
368
+ // we use this later to decide how to upload source maps
369
+ def bundleCommand = project.ext.react.get("bundleCommand", "bundle")
370
+
371
+ return [bundleOutput, sourcemapOutput, packagerSourcemapOutput, bundleCommand]
317
372
  }
318
373
 
319
374
  /** Extract bundle and sourcemap paths from bundle task props.
@@ -328,12 +383,15 @@ static extractBundleTaskArgumentsRN71AndAbove(bundleTask, logger) {
328
383
  return [null, null]
329
384
  }
330
385
 
386
+ def bundleCommand = props.bundleCommand.get()
331
387
  def bundleFile = new File(props.jsBundleDir.get().asFile.absolutePath, bundleAssetName)
332
388
  def outputSourceMap = new File(props.jsSourceMapsDir.get().asFile.absolutePath, "${bundleAssetName}.map")
389
+ def packagerOutputSourceMap = new File(props.jsIntermediateSourceMapsDir.get().asFile.absolutePath, "${bundleAssetName}.packager.map")
333
390
 
334
391
  logger.info("bundleFile: `${bundleFile}`")
335
392
  logger.info("outputSourceMap: `${outputSourceMap}`")
336
- return [bundleFile, outputSourceMap]
393
+ logger.info("packagerOutputSourceMap: `${packagerOutputSourceMap}`")
394
+ return [bundleFile, outputSourceMap, packagerOutputSourceMap, bundleCommand]
337
395
  }
338
396
 
339
397
  /** Force Bundle task to produce sourcemap files if they are not pre-configured by user yet. */
@@ -344,10 +402,12 @@ def forceSourceMapOutputFromBundleTask(bundleTask) {
344
402
  def shouldCleanUp = false
345
403
  def bundleOutput = null
346
404
  def sourcemapOutput = null
405
+ def packagerSourcemapOutput = null
406
+ def bundleCommand = null
347
407
 
348
- (bundleOutput, sourcemapOutput) = extractBundleTaskArgumentsRN71AndAbove(bundleTask, logger)
408
+ (bundleOutput, sourcemapOutput, packagerSourcemapOutput, bundleCommand) = extractBundleTaskArgumentsRN71AndAbove(bundleTask, logger)
349
409
  if (bundleOutput == null) {
350
- (bundleOutput, sourcemapOutput) = extractBundleTaskArgumentsLegacy(cmdArgs, project)
410
+ (bundleOutput, sourcemapOutput, packagerSourcemapOutput, bundleCommand) = extractBundleTaskArgumentsLegacy(cmdArgs, project)
351
411
  }
352
412
 
353
413
  if (sourcemapOutput == null) {
@@ -366,7 +426,7 @@ def forceSourceMapOutputFromBundleTask(bundleTask) {
366
426
  project.logger.info("Info: used pre-configured source map files: ${sourcemapOutput}")
367
427
  }
368
428
 
369
- return [shouldCleanUp, bundleOutput, sourcemapOutput]
429
+ return [shouldCleanUp, bundleOutput, sourcemapOutput, packagerSourcemapOutput, bundleCommand]
370
430
  }
371
431
 
372
432
  /** compose array with one item - current build flavor name */
@@ -7,6 +7,7 @@ export interface ReactNativeContext extends Context {
7
7
  hermes_version?: string;
8
8
  react_native_version: string;
9
9
  component_stack?: string;
10
+ hermes_debug_info?: boolean;
10
11
  }
11
12
  /** Loads React Native context at runtime */
12
13
  export declare class ReactNativeInfo implements Integration {
@@ -1,4 +1,4 @@
1
- import type { EventHint, Integration } from '@sentry/types';
1
+ import type { EventHint, EventProcessor, Integration } from '@sentry/types';
2
2
  /** Adds screenshots to error events */
3
3
  export declare class Screenshot implements Integration {
4
4
  /**
@@ -11,6 +11,8 @@ export declare class Screenshot implements Integration {
11
11
  name: string;
12
12
  /**
13
13
  * If enabled attaches a screenshot to the event hint.
14
+ *
15
+ * @deprecated Screenshots are now added in global event processor.
14
16
  */
15
17
  static attachScreenshotToEventHint(hint: EventHint, { attachScreenshot }: {
16
18
  attachScreenshot?: boolean;
@@ -18,6 +20,6 @@ export declare class Screenshot implements Integration {
18
20
  /**
19
21
  * @inheritDoc
20
22
  */
21
- setupOnce(): void;
23
+ setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
22
24
  }
23
25
  //# sourceMappingURL=screenshot.d.ts.map
@@ -33,7 +33,14 @@ export interface BaseReactNativeOptions {
33
33
  enableAutoSessionTracking?: boolean;
34
34
  /** The interval to end a session if the App goes to the background. */
35
35
  sessionTrackingIntervalMillis?: number;
36
- /** Enable scope sync from Java to NDK on Android */
36
+ /** Enable NDK on Android
37
+ *
38
+ * @default true
39
+ */
40
+ enableNdk?: boolean;
41
+ /** Enable scope sync from Java to NDK on Android
42
+ * Only has an effect if `enableNdk` is `true`.
43
+ */
37
44
  enableNdkScopeSync?: boolean;
38
45
  /** When enabled, all the threads are automatically attached to all logged events on Android */
39
46
  attachThreads?: boolean;
@@ -10,7 +10,7 @@ export declare function init(passedOptions: ReactNativeOptions): void;
10
10
  /**
11
11
  * Inits the Sentry React Native SDK with automatic instrumentation and wrapped features.
12
12
  */
13
- export declare function wrap<P extends JSX.IntrinsicAttributes>(RootComponent: React.ComponentType<P>, options?: ReactNativeWrapperOptions): React.ComponentType<P>;
13
+ export declare function wrap<P extends Record<string, unknown>>(RootComponent: React.ComponentType<P>, options?: ReactNativeWrapperOptions): React.ComponentType<P>;
14
14
  /**
15
15
  * Deprecated. Sets the release on the event.
16
16
  * NOTE: Does not set the release on sessions.
@@ -96,6 +96,8 @@ export declare class ReactNativeTracing implements Integration {
96
96
  private _awaitingAppStartData?;
97
97
  private _appStartFinishTimestamp?;
98
98
  private _currentRoute?;
99
+ private _hasSetTracePropagationTargets;
100
+ private _hasSetTracingOrigins;
99
101
  constructor(options?: Partial<ReactNativeTracingOptions>);
100
102
  /**
101
103
  * Registers routing and request instrumentation.
@@ -121,6 +123,11 @@ export declare class ReactNativeTracing implements Integration {
121
123
  elementId: string | undefined;
122
124
  op: string;
123
125
  }): TransactionType | undefined;
126
+ /**
127
+ * Returns the App Start Duration in Milliseconds. Also returns undefined if not able do
128
+ * define the duration.
129
+ */
130
+ private _getAppStartDurationMilliseconds;
124
131
  /**
125
132
  * Instruments the app start measurements on the first route transaction.
126
133
  * Starts a route transaction if there isn't routing instrumentation.
@@ -138,5 +145,9 @@ export declare class ReactNativeTracing implements Integration {
138
145
  private _onConfirmRoute;
139
146
  /** Create routing idle transaction. */
140
147
  private _createRouteTransaction;
148
+ /**
149
+ * Start app state aware idle transaction on the scope.
150
+ */
151
+ private _startIdleTransaction;
141
152
  }
142
153
  //# sourceMappingURL=reactnativetracing.d.ts.map
@@ -1,7 +1,11 @@
1
- import type { BeforeFinishCallback } from '@sentry/core';
1
+ import type { BeforeFinishCallback, IdleTransaction } from '@sentry/core';
2
2
  /**
3
3
  * Idle Transaction callback to only sample transactions with child spans.
4
4
  * To avoid side effects of other callbacks this should be hooked as the last callback.
5
5
  */
6
6
  export declare const onlySampleIfChildSpans: BeforeFinishCallback;
7
+ /**
8
+ * Hooks on AppState change to cancel the transaction if the app goes background.
9
+ */
10
+ export declare const cancelInBackground: (transaction: IdleTransaction) => void;
7
11
  //# sourceMappingURL=transaction.d.ts.map
@@ -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.9.2";
3
+ export declare const SDK_VERSION = "5.11.0";
4
4
  //# sourceMappingURL=version.d.ts.map