@sentry/react-native 5.26.0-alpha.3 → 5.27.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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,42 @@
1
1
  # Changelog
2
2
 
3
- ## 5.26.0-alpha.3
3
+ ## 5.27.0
4
+
5
+ ### Fixes
6
+
7
+ - Pass `sampleRate` option to the Android SDK ([#3979](https://github.com/getsentry/sentry-react-native/pull/3979))
8
+ - Drop app start data older than one minute ([#3974](https://github.com/getsentry/sentry-react-native/pull/3974))
9
+ - Use `Platform.constants.reactNativeVersion` instead of `react-native` internal export ([#3949](https://github.com/getsentry/sentry-react-native/pull/3949))
10
+
11
+ ### Dependencies
12
+
13
+ - Bump Android SDK from v7.12.0 to v7.13.0 ([#3970](https://github.com/getsentry/sentry-react-native/pull/3970), [#3984](https://github.com/getsentry/sentry-react-native/pull/3984))
14
+ - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7130)
15
+ - [diff](https://github.com/getsentry/sentry-java/compare/7.12.0...7.13.0)
16
+ - Bump Cocoa SDK from v8.31.1 to v8.32.0 ([#3969](https://github.com/getsentry/sentry-react-native/pull/3969))
17
+ - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8320)
18
+ - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.31.1...8.32.0)
19
+
20
+ ## 5.26.0
4
21
 
5
22
  ### Features
6
23
 
7
- - Redact `react-native-svg` SVGs when `maskAllVectors` ([#3930](https://github.com/getsentry/sentry-react-native/pull/3930))
8
- - Add `annotateReactComponents` option to `@sentry/react-native/metro` ([#3916](https://github.com/getsentry/sentry-react-native/pull/3916))
24
+ - Session Replay Public Beta ([#3830](https://github.com/getsentry/sentry-react-native/pull/3830))
25
+
26
+ To enable Replay use the `replaysSessionSampleRate` or `replaysOnErrorSampleRate` options.
27
+
28
+ ```js
29
+ import * as Sentry from '@sentry/react-native';
30
+
31
+ Sentry.init({
32
+ _experiments: {
33
+ replaysSessionSampleRate: 1.0,
34
+ replaysOnErrorSampleRate: 1.0,
35
+ },
36
+ });
37
+ ```
38
+
39
+ To add React Component Names use `annotateReactComponents` in `metro.config.js`.
9
40
 
10
41
  ```js
11
42
  // For Expo
@@ -18,18 +49,36 @@
18
49
  module.exports = withSentryConfig(getDefaultConfig(__dirname), { annotateReactComponents: true });
19
50
  ```
20
51
 
21
- ### Fixes
52
+ To change default redaction behavior add the `mobileReplayIntegration`.
22
53
 
23
- - Add `app.foreground/background` breadcrumbs to iOS Replays ([#3932](https://github.com/getsentry/sentry-react-native/pull/3932))
54
+ ```js
55
+ import * as Sentry from '@sentry/react-native';
56
+
57
+ Sentry.init({
58
+ _experiments: {
59
+ replaysSessionSampleRate: 1.0,
60
+ replaysOnErrorSampleRate: 1.0,
61
+ },
62
+ integrations: [
63
+ Sentry.mobileReplayIntegration({
64
+ maskAllImages: true,
65
+ maskAllVectors: true,
66
+ maskAllText: true,
67
+ }),
68
+ ],
69
+ });
70
+ ```
71
+
72
+ To learn more visit [Sentry's Mobile Session Replay](https://docs.sentry.io/product/explore/session-replay/mobile/) documentation page.
24
73
 
25
74
  ### Dependencies
26
75
 
27
- - Bump Android SDK from v7.11.0-alpha.2 to v7.12.0-alpha.4 ([#3830](https://github.com/getsentry/sentry-react-native/pull/3830))
28
- - [changelog](https://github.com/getsentry/sentry-java/blob/7.12.0-alpha.3/CHANGELOG.md#7120-alpha4)
29
- - [diff](https://github.com/getsentry/sentry-java/compare/7.11.0-alpha.2...7.12.0-alpha.4)
30
- - Bump Cocoa SDK from v8.30.0 to v8.30.1 ([#3936](https://github.com/getsentry/sentry-react-native/pull/3936))
31
- - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8301)
32
- - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.30.0...8.30.1)
76
+ - Bump Cocoa SDK from v8.30.0 to v8.31.1 ([#3954](https://github.com/getsentry/sentry-react-native/pull/3954))
77
+ - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8311)
78
+ - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.30.0...8.31.1)
79
+ - Bump Android SDK from v7.11.0 to v7.12.0 ([#3950](https://github.com/getsentry/sentry-react-native/pull/3949))
80
+ - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7120)
81
+ - [diff](https://github.com/getsentry/sentry-java/compare/7.11.0...7.12.0)
33
82
 
34
83
  ## 5.25.0
35
84
 
@@ -243,7 +292,7 @@ Access to Mobile Replay is limited to early access orgs on Sentry. If you're int
243
292
  replaysSessionSampleRate: 1.0,
244
293
  replaysOnErrorSampleRate: 1.0,
245
294
  },
246
- integration: [
295
+ integrations: [
247
296
  Sentry.mobileReplayIntegration({
248
297
  maskAllText: true,
249
298
  maskAllImages: true,
package/RNSentry.podspec CHANGED
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
33
33
  s.preserve_paths = '*.js'
34
34
 
35
35
  s.dependency 'React-Core'
36
- s.dependency 'Sentry/HybridSDK', '8.30.1'
36
+ s.dependency 'Sentry/HybridSDK', '8.32.0'
37
37
 
38
38
  s.source_files = 'ios/**/*.{h,m,mm}'
39
39
  s.public_header_files = 'ios/RNSentry.h'
@@ -54,5 +54,5 @@ android {
54
54
 
55
55
  dependencies {
56
56
  implementation 'com.facebook.react:react-native:+'
57
- api 'io.sentry:sentry-android:7.12.0-alpha.4'
57
+ api 'io.sentry:sentry-android:7.13.0'
58
58
  }
@@ -203,6 +203,9 @@ public class RNSentryModuleImpl {
203
203
  // SentryAndroid needs an empty string fallback for the dsn.
204
204
  options.setDsn("");
205
205
  }
206
+ if (rnOptions.hasKey("sampleRate")) {
207
+ options.setSampleRate(rnOptions.getDouble("sampleRate"));
208
+ }
206
209
  if (rnOptions.hasKey("sendClientReports")) {
207
210
  options.setSendClientReports(rnOptions.getBoolean("sendClientReports"));
208
211
  }
@@ -438,7 +441,7 @@ public class RNSentryModuleImpl {
438
441
  }
439
442
 
440
443
  public void captureReplay(boolean isHardCrash, Promise promise) {
441
- Sentry.getCurrentHub().getOptions().getReplayController().sendReplay(isHardCrash, null, null);
444
+ Sentry.getCurrentHub().getOptions().getReplayController().captureReplay(isHardCrash);
442
445
  promise.resolve(getCurrentReplayId());
443
446
  }
444
447
 
@@ -82,6 +82,8 @@ export declare class ReactNativeTracing implements Integration {
82
82
  static id: string;
83
83
  /** We filter out App starts more than 60s */
84
84
  private static _maxAppStart;
85
+ /** We filter out App starts which timestamp is 60s and more before the transaction start */
86
+ private static _maxAppStartBeforeTransactionMs;
85
87
  /**
86
88
  * @inheritDoc
87
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativetracing.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAE,GAAG,EAAmB,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EAEX,WAAW,IAAI,eAAe,EAE/B,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAA0B,MAAM,SAAS,CAAC;AAStE,MAAM,WAAW,yBAA0B,SAAQ,6BAA6B;IAC9E;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;;OAOG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,8BA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B,6FAA6F;IAC7F,OAAO,CAAC,kBAAkB;IAI1B;;OAEG;IACH,OAAO,CAAC,eAAe;IA4BvB,uCAAuC;IACvC,OAAO,CAAC,uBAAuB;IAqE/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAO9B"}
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from '@sentry/browser';
3
- import { getActiveTransaction, getCurrentHub, startIdleTransaction } from '@sentry/core';
3
+ import { getActiveTransaction, getCurrentHub, spanToJSON, startIdleTransaction } from '@sentry/core';
4
4
  import { logger } from '@sentry/utils';
5
5
  import { APP_START_COLD, APP_START_WARM } from '../measurements';
6
6
  import { NATIVE } from '../wrapper';
@@ -271,6 +271,12 @@ export class ReactNativeTracing {
271
271
  logger.warn('App start timestamp could not be loaded from the native layer.');
272
272
  return;
273
273
  }
274
+ const isAppStartWithinBounds = appStartTimestampMs >=
275
+ getTransactionStartTimestampMs(transaction) - ReactNativeTracing._maxAppStartBeforeTransactionMs;
276
+ if (!__DEV__ && !isAppStartWithinBounds) {
277
+ logger.warn('[ReactNativeTracing] App start timestamp is too far in the past to be used for app start span.');
278
+ return;
279
+ }
274
280
  const appStartDurationMilliseconds = this._getAppStartDurationMilliseconds(appStartTimestampMs);
275
281
  if (!appStartDurationMilliseconds) {
276
282
  logger.warn('[ReactNativeTracing] App start end has not been recorded, not adding app start span.');
@@ -472,4 +478,13 @@ export class ReactNativeTracing {
472
478
  ReactNativeTracing.id = 'ReactNativeTracing';
473
479
  /** We filter out App starts more than 60s */
474
480
  ReactNativeTracing._maxAppStart = 60000;
481
+ /** We filter out App starts which timestamp is 60s and more before the transaction start */
482
+ ReactNativeTracing._maxAppStartBeforeTransactionMs = 60000;
483
+ /**
484
+ * Returns transaction start timestamp in milliseconds.
485
+ * If start timestamp is not available, returns 0.
486
+ */
487
+ function getTransactionStartTimestampMs(transaction) {
488
+ return (spanToJSON(transaction).start_timestamp || 0) * 1000;
489
+ }
475
490
  //# sourceMappingURL=reactnativetracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativetracing.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AASzF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,cAAc,IAAI,iBAAiB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1G,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,WAAW,EACX,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AAgFjB,MAAM,iCAAiC,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAErE,MAAM,gCAAgC,mCACjC,oCAAoC,KACvC,WAAW,EAAE,IAAI,EACjB,sBAAsB,EAAE,GAAG,EAC3B,aAAa,EAAE,IAAI,EACnB,cAAc,EAAE,MAAM,EACtB,qCAAqC,EAAE,IAAI,EAC3C,cAAc,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,EAClC,sBAAsB,EAAE,IAAI,EAC5B,0BAA0B,EAAE,IAAI,EAChC,mBAAmB,EAAE,IAAI,EACzB,4BAA4B,EAAE,KAAK,GACpC,CAAC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C,4BAA4B,CAAC,WAAW,CAAC,EAAE;;gBACzD;gBACE,sEAAsE;gBACtE,CAAA,MAAA,MAAA,WAAW,CAAC,IAAI,0CAAE,KAAK,0CAAE,WAAW;oBACpC,CAAC,CAAC,WAAW,CAAC,YAAY;wBACxB,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CACnC,IAAI,CAAC,EAAE,CACL,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM;4BAClC,IAAI,CAAC,EAAE,KAAK,yBAAyB;4BACrC,IAAI,CAAC,EAAE,KAAK,uBAAuB,CACtC,CAAC,MAAM,KAAK,CAAC,CAAC,EACjB;oBACA,MAAM,CAAC,GAAG,CACR,0JAA0J,CAC3J,CAAC;oBACF,qDAAqD;oBACrD,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;iBAC7B;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,OAA2B;;QACvD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACvD,MAAM,GAAG,GAAG,CAAA,MAAA,IAAI,CAAC,cAAc,oDAAI,KAAI,aAAa,EAAE,CAAC;QACvD,MAAM,EAAE,GAAG,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;QACnF,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;;AArkBD;;GAEG;AACW,qBAAE,GAAW,oBAAoB,CAAC;AAChD,6CAA6C;AAC9B,+BAAY,GAAW,KAAK,CAAC","sourcesContent":["/* eslint-disable max-lines */\nimport type { RequestInstrumentationOptions } from '@sentry/browser';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from '@sentry/browser';\nimport type { Hub, IdleTransaction, Transaction } from '@sentry/core';\nimport { getActiveTransaction, getCurrentHub, startIdleTransaction } from '@sentry/core';\nimport type {\n Event,\n EventProcessor,\n Integration,\n Span,\n Transaction as TransactionType,\n TransactionContext,\n} from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { APP_START_COLD, APP_START_WARM } from '../measurements';\nimport type { NativeAppStartResponse } from '../NativeRNSentry';\nimport type { RoutingInstrumentationInstance } from '../tracing/routingInstrumentation';\nimport { NATIVE } from '../wrapper';\nimport { NativeFramesInstrumentation } from './nativeframes';\nimport { APP_START_COLD as APP_START_COLD_OP, APP_START_WARM as APP_START_WARM_OP, UI_LOAD } from './ops';\nimport { StallTrackingInstrumentation } from './stalltracking';\nimport { cancelInBackground, onlySampleIfChildSpans } from './transaction';\nimport type { BeforeNavigate, RouteChangeContextData } from './types';\nimport {\n adjustTransactionDuration,\n getBundleStartTimestampMs,\n getTimeOriginMilliseconds,\n isNearToNow,\n setSpanDurationAsMeasurement,\n} from './utils';\n\nexport interface ReactNativeTracingOptions extends RequestInstrumentationOptions {\n /**\n * @deprecated Replaced by idleTimeoutMs\n */\n idleTimeout: number;\n\n /**\n * @deprecated Replaced by maxTransactionDurationMs\n */\n maxTransactionDuration: number;\n\n /**\n * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of\n * the last finished span as the endtime for the transaction.\n * Time is in ms.\n *\n * Default: 1000\n */\n idleTimeoutMs: number;\n\n /**\n * The maximum duration (transaction duration + idle timeout) of a transaction\n * before it will be marked as \"deadline_exceeded\".\n * If you never want to mark a transaction set it to 0.\n * Time is in ms.\n *\n * Default: 600000\n */\n finalTimeoutMs: number;\n\n /**\n * The routing instrumentation to be used with the tracing integration.\n * There is no routing instrumentation if nothing is passed.\n */\n routingInstrumentation?: RoutingInstrumentationInstance;\n\n /**\n * Does not sample transactions that are from routes that have been seen any more and don't have any spans.\n * This removes a lot of the clutter as most back navigation transactions are now ignored.\n *\n * Default: true\n */\n ignoreEmptyBackNavigationTransactions: boolean;\n\n /**\n * beforeNavigate is called before a navigation transaction is created and allows users to modify transaction\n * context data, or drop the transaction entirely (by setting `sampled = false` in the context).\n *\n * @param context: The context data which will be passed to `startTransaction` by default\n *\n * @returns A (potentially) modified context object, with `sampled = false` if the transaction should be dropped.\n */\n beforeNavigate: BeforeNavigate;\n\n /**\n * Track the app start time by adding measurements to the first route transaction. If there is no routing instrumentation\n * an app start transaction will be started.\n *\n * Default: true\n */\n enableAppStartTracking: boolean;\n\n /**\n * Track slow/frozen frames from the native layer and adds them as measurements to all transactions.\n */\n enableNativeFramesTracking: boolean;\n\n /**\n * Track when and how long the JS event loop stalls for. Adds stalls as measurements to all transactions.\n */\n enableStallTracking: boolean;\n\n /**\n * Trace User Interaction events like touch and gestures.\n */\n enableUserInteractionTracing: boolean;\n}\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\nconst defaultReactNativeTracingOptions: ReactNativeTracingOptions = {\n ...defaultRequestInstrumentationOptions,\n idleTimeout: 1000,\n maxTransactionDuration: 600,\n idleTimeoutMs: 1000,\n finalTimeoutMs: 600000,\n ignoreEmptyBackNavigationTransactions: true,\n beforeNavigate: context => context,\n enableAppStartTracking: true,\n enableNativeFramesTracking: true,\n enableStallTracking: true,\n enableUserInteractionTracing: false,\n};\n\n/**\n * Tracing integration for React Native.\n */\nexport class ReactNativeTracing implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReactNativeTracing';\n /** We filter out App starts more than 60s */\n private static _maxAppStart: number = 60000;\n /**\n * @inheritDoc\n */\n public name: string = ReactNativeTracing.id;\n\n /** ReactNativeTracing options */\n public options: ReactNativeTracingOptions;\n\n public nativeFramesInstrumentation?: NativeFramesInstrumentation;\n public stallTrackingInstrumentation?: StallTrackingInstrumentation;\n public useAppStartWithProfiler: boolean = false;\n\n private _inflightInteractionTransaction?: IdleTransaction;\n private _getCurrentHub?: () => Hub;\n private _awaitingAppStartData?: NativeAppStartResponse;\n private _appStartFinishTimestamp?: number;\n private _currentRoute?: string;\n private _hasSetTracePropagationTargets: boolean;\n private _hasSetTracingOrigins: boolean;\n private _currentViewName: string | undefined;\n private _firstConstructorCallTimestampMs: number | undefined;\n\n public constructor(options: Partial<ReactNativeTracingOptions> = {}) {\n this._hasSetTracePropagationTargets = !!(\n options &&\n // eslint-disable-next-line deprecation/deprecation\n options.tracePropagationTargets\n );\n this._hasSetTracingOrigins = !!(\n options &&\n // eslint-disable-next-line deprecation/deprecation\n options.tracingOrigins\n );\n\n this.options = {\n ...defaultReactNativeTracingOptions,\n ...options,\n finalTimeoutMs:\n options.finalTimeoutMs ??\n // eslint-disable-next-line deprecation/deprecation\n (typeof options.maxTransactionDuration === 'number'\n ? // eslint-disable-next-line deprecation/deprecation\n options.maxTransactionDuration * 1000\n : undefined) ??\n defaultReactNativeTracingOptions.finalTimeoutMs,\n idleTimeoutMs:\n options.idleTimeoutMs ??\n // eslint-disable-next-line deprecation/deprecation\n options.idleTimeout ??\n defaultReactNativeTracingOptions.idleTimeoutMs,\n };\n }\n\n /**\n * Registers routing and request instrumentation.\n */\n public async setupOnce(\n addGlobalEventProcessor: (callback: EventProcessor) => void,\n getCurrentHub: () => Hub,\n ): Promise<void> {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets: thisOptionsTracePropagationTargets,\n routingInstrumentation,\n enableAppStartTracking,\n enableStallTracking,\n } = this.options;\n\n this._getCurrentHub = getCurrentHub;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via ReactNativeTracing option `tracePropagationTargets`\n // 3. via ReactNativeTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // ReactNativeTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n const tracePropagationTargets =\n clientOptionsTracePropagationTargets ||\n (this._hasSetTracePropagationTargets && thisOptionsTracePropagationTargets) ||\n (this._hasSetTracingOrigins && tracingOrigins) ||\n DEFAULT_TRACE_PROPAGATION_TARGETS;\n if (\n __DEV__ &&\n (this._hasSetTracePropagationTargets || this._hasSetTracingOrigins) &&\n clientOptionsTracePropagationTargets\n ) {\n logger.warn(\n '[ReactNativeTracing] The `tracePropagationTargets` option was set in the ReactNativeTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n if (enableAppStartTracking) {\n this._instrumentAppStart().then(undefined, (reason: unknown) => {\n logger.error(`[ReactNativeTracing] Error while instrumenting app start:`, reason);\n });\n }\n\n this._enableNativeFramesTracking(addGlobalEventProcessor);\n\n if (enableStallTracking) {\n this.stallTrackingInstrumentation = new StallTrackingInstrumentation();\n }\n\n if (routingInstrumentation) {\n routingInstrumentation.registerRoutingInstrumentation(\n this._onRouteWillChange.bind(this),\n this.options.beforeNavigate,\n this._onConfirmRoute.bind(this),\n );\n } else {\n logger.log('[ReactNativeTracing] Not instrumenting route changes as routingInstrumentation has not been set.');\n }\n\n addGlobalEventProcessor(this._getCurrentViewEventProcessor.bind(this));\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n tracePropagationTargets,\n });\n }\n\n /**\n * To be called on a transaction start. Can have async methods\n */\n public onTransactionStart(transaction: Transaction): void {\n if (isNearToNow(transaction.startTimestamp)) {\n // Only if this method is called at or within margin of error to the start timestamp.\n this.nativeFramesInstrumentation?.onTransactionStart(transaction);\n this.stallTrackingInstrumentation?.onTransactionStart(transaction);\n } else {\n logger.warn(\n `[ReactNativeTracing] onTransactionStart called with delay (larger than margin of error) for transaction ${\n transaction.description\n } (${transaction.spanContext().spanId}). Not fetching native frames or tracking stalls.`,\n );\n }\n }\n\n /**\n * To be called on a transaction finish. Cannot have async methods.\n */\n public onTransactionFinish(transaction: Transaction, endTimestamp?: number): void {\n this.nativeFramesInstrumentation?.onTransactionFinish(transaction);\n this.stallTrackingInstrumentation?.onTransactionFinish(transaction, endTimestamp);\n }\n\n /**\n * Called by the ReactNativeProfiler component on first component mount.\n */\n public onAppStartFinish(endTimestamp: number): void {\n this._appStartFinishTimestamp = endTimestamp;\n }\n\n /**\n * Sets the root component first constructor call timestamp.\n */\n public setRootComponentFirstConstructorCallTimestampMs(timestamp: number): void {\n this._firstConstructorCallTimestampMs = timestamp;\n }\n\n /**\n * Starts a new transaction for a user interaction.\n * @param userInteractionId Consists of `op` representation UI Event and `elementId` unique element identifier on current screen.\n */\n public startUserInteractionTransaction(userInteractionId: {\n elementId: string | undefined;\n op: string;\n }): TransactionType | undefined {\n const { elementId, op } = userInteractionId;\n if (!this.options.enableUserInteractionTracing) {\n logger.log('[ReactNativeTracing] User Interaction Tracing is disabled.');\n return;\n }\n if (!this.options.routingInstrumentation) {\n logger.error(\n '[ReactNativeTracing] User Interaction Tracing is not working because no routing instrumentation is set.',\n );\n return;\n }\n if (!elementId) {\n logger.log('[ReactNativeTracing] User Interaction Tracing can not create transaction with undefined elementId.');\n return;\n }\n if (!this._currentRoute) {\n logger.log('[ReactNativeTracing] User Interaction Tracing can not create transaction without a current route.');\n return;\n }\n\n const hub = this._getCurrentHub?.() || getCurrentHub();\n const activeTransaction = getActiveTransaction(hub);\n const activeTransactionIsNotInteraction =\n activeTransaction?.spanId !== this._inflightInteractionTransaction?.spanId;\n if (activeTransaction && activeTransactionIsNotInteraction) {\n logger.warn(\n `[ReactNativeTracing] Did not create ${op} transaction because active transaction ${activeTransaction.name} exists on the scope.`,\n );\n return;\n }\n\n if (this._inflightInteractionTransaction) {\n this._inflightInteractionTransaction.cancelIdleTimeout(undefined, { restartOnChildSpanChange: false });\n this._inflightInteractionTransaction = undefined;\n }\n\n const name = `${this._currentRoute}.${elementId}`;\n const context: TransactionContext = {\n name,\n op,\n trimEnd: true,\n };\n this._inflightInteractionTransaction = this._startIdleTransaction(context);\n this._inflightInteractionTransaction.registerBeforeFinishCallback((transaction: IdleTransaction) => {\n this._inflightInteractionTransaction = undefined;\n this.onTransactionFinish(transaction);\n });\n this._inflightInteractionTransaction.registerBeforeFinishCallback(onlySampleIfChildSpans);\n this.onTransactionStart(this._inflightInteractionTransaction);\n logger.log(`[ReactNativeTracing] User Interaction Tracing Created ${op} transaction ${name}.`);\n return this._inflightInteractionTransaction;\n }\n\n /**\n * Enables or disables native frames tracking based on the `enableNativeFramesTracking` option.\n */\n private _enableNativeFramesTracking(addGlobalEventProcessor: (callback: EventProcessor) => void): void {\n if (this.options.enableNativeFramesTracking && !NATIVE.enableNative) {\n // Do not enable native frames tracking if native is not available.\n logger.warn(\n '[ReactNativeTracing] NativeFramesTracking is not available on the Web, Expo Go and other platforms without native modules.',\n );\n return;\n }\n\n if (!this.options.enableNativeFramesTracking && NATIVE.enableNative) {\n // Disable native frames tracking when native available and option is false.\n NATIVE.disableNativeFramesTracking();\n return;\n }\n\n if (!this.options.enableNativeFramesTracking) {\n return;\n }\n\n NATIVE.enableNativeFramesTracking();\n this.nativeFramesInstrumentation = new NativeFramesInstrumentation(addGlobalEventProcessor, () => {\n const self = getCurrentHub().getIntegration(ReactNativeTracing);\n\n if (self) {\n return !!self.nativeFramesInstrumentation;\n }\n\n return false;\n });\n }\n\n /**\n * Sets the current view name into the app context.\n * @param event Le event.\n */\n private _getCurrentViewEventProcessor(event: Event): Event {\n if (event.contexts && this._currentViewName) {\n event.contexts.app = { view_names: [this._currentViewName], ...event.contexts.app };\n }\n return event;\n }\n\n /**\n * Returns the App Start Duration in Milliseconds. Also returns undefined if not able do\n * define the duration.\n */\n private _getAppStartDurationMilliseconds(appStartTimestampMs: number): number | undefined {\n if (!this._appStartFinishTimestamp) {\n return undefined;\n }\n return this._appStartFinishTimestamp * 1000 - appStartTimestampMs;\n }\n\n /**\n * Instruments the app start measurements on the first route transaction.\n * Starts a route transaction if there isn't routing instrumentation.\n */\n private async _instrumentAppStart(): Promise<void> {\n if (!this.options.enableAppStartTracking || !NATIVE.enableNative) {\n return;\n }\n\n const appStart = await NATIVE.fetchNativeAppStart();\n\n if (!appStart) {\n logger.warn('[ReactNativeTracing] Not instrumenting App Start because native returned null.');\n return;\n }\n\n if (appStart.has_fetched) {\n logger.warn('[ReactNativeTracing] Not instrumenting App Start because this start was already reported.');\n return;\n }\n\n if (!this.useAppStartWithProfiler) {\n logger.warn('[ReactNativeTracing] `Sentry.wrap` not detected, using JS context init as app start end.');\n this._appStartFinishTimestamp = getTimeOriginMilliseconds() / 1000;\n }\n\n if (this.options.routingInstrumentation) {\n this._awaitingAppStartData = appStart;\n } else {\n const idleTransaction = this._createRouteTransaction({\n name: 'App Start',\n op: UI_LOAD,\n });\n\n if (idleTransaction) {\n this._addAppStartData(idleTransaction, appStart);\n }\n }\n }\n\n /**\n * Adds app start measurements and starts a child span on a transaction.\n */\n private _addAppStartData(transaction: IdleTransaction, appStart: NativeAppStartResponse): void {\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n logger.warn('App start timestamp could not be loaded from the native layer.');\n return;\n }\n\n const appStartDurationMilliseconds = this._getAppStartDurationMilliseconds(appStartTimestampMs);\n if (!appStartDurationMilliseconds) {\n logger.warn('[ReactNativeTracing] App start end has not been recorded, not adding app start span.');\n return;\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 if (appStartDurationMilliseconds >= ReactNativeTracing._maxAppStart) {\n logger.warn('[ReactNativeTracing] App start duration is over a minute long, not adding app start span.');\n return;\n }\n\n const appStartTimeSeconds = appStartTimestampMs / 1000;\n\n transaction.startTimestamp = appStartTimeSeconds;\n\n const maybeTtidSpan = transaction.spanRecorder?.spans.find(span => span.op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.startTimestamp = appStartTimeSeconds;\n setSpanDurationAsMeasurement('time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = transaction.spanRecorder?.spans.find(span => span.op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.startTimestamp = appStartTimeSeconds;\n setSpanDurationAsMeasurement('time_to_full_display', maybeTtfdSpan);\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpan = transaction.startChild({\n description: appStart.type === 'cold' ? 'Cold App Start' : 'Warm App Start',\n op,\n startTimestamp: appStartTimeSeconds,\n endTimestamp: this._appStartFinishTimestamp,\n });\n this._addJSExecutionBeforeRoot(appStartSpan);\n this._addNativeSpansTo(appStartSpan, appStart.spans);\n\n const measurement = appStart.type === 'cold' ? APP_START_COLD : APP_START_WARM;\n transaction.setMeasurement(measurement, appStartDurationMilliseconds, 'millisecond');\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 */\n private _addJSExecutionBeforeRoot(appStartSpan: Span): void {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return;\n }\n\n if (!this._firstConstructorCallTimestampMs) {\n logger.warn('Missing the root component first constructor call timestamp.');\n appStartSpan.startChild({\n description: 'JS Bundle Execution Start',\n op: appStartSpan.op,\n startTimestamp: bundleStartTimestampMs / 1000,\n endTimestamp: bundleStartTimestampMs / 1000,\n });\n return;\n }\n\n appStartSpan.startChild({\n description: 'JS Bundle Execution Before React Root',\n op: appStartSpan.op,\n startTimestamp: bundleStartTimestampMs / 1000,\n endTimestamp: this._firstConstructorCallTimestampMs / 1000,\n });\n }\n\n /**\n * Adds native spans to the app start span.\n */\n private _addNativeSpansTo(appStartSpan: Span, nativeSpans: NativeAppStartResponse['spans']): void {\n nativeSpans.forEach(span => {\n if (span.description === 'UIKit init') {\n return this._createUIKitSpan(appStartSpan, span);\n }\n\n appStartSpan.startChild({\n op: appStartSpan.op,\n description: span.description,\n startTimestamp: span.start_timestamp_ms / 1000,\n endTimestamp: span.end_timestamp_ms / 1000,\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 */\n private _createUIKitSpan(parentSpan: Span, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): void {\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 parentSpan.startChild({\n op: parentSpan.op,\n description: 'UIKit Init to JS Exec Start',\n startTimestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n endTimestamp: bundleStart / 1000,\n });\n } else {\n parentSpan.startChild({\n op: parentSpan.op,\n description: 'UIKit Init',\n startTimestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n endTimestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n });\n }\n }\n\n /** To be called when the route changes, but BEFORE the components of the new route mount. */\n private _onRouteWillChange(context: TransactionContext): TransactionType | undefined {\n return this._createRouteTransaction(context);\n }\n\n /**\n * Creates a breadcrumb and sets the current route as a tag.\n */\n private _onConfirmRoute(context: TransactionContext): void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._currentRoute = context.data?.route?.name;\n\n this._getCurrentHub?.().configureScope(scope => {\n if (context.data) {\n const contextData = context.data as RouteChangeContextData;\n\n scope.addBreadcrumb({\n category: 'navigation',\n type: 'navigation',\n // We assume that context.name is the name of the route.\n message: `Navigation to ${context.name}`,\n data: {\n from: contextData.previousRoute?.name,\n to: contextData.route.name,\n },\n });\n }\n\n this._currentViewName = context.name;\n /**\n * @deprecated tag routing.route.name will be removed in the future.\n */\n scope.setTag('routing.route.name', context.name);\n });\n }\n\n /** Create routing idle transaction. */\n private _createRouteTransaction(context: TransactionContext): IdleTransaction | undefined {\n if (!this._getCurrentHub) {\n logger.warn(`[ReactNativeTracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (this._inflightInteractionTransaction) {\n logger.log(\n `[ReactNativeTracing] Canceling ${this._inflightInteractionTransaction.op} transaction because navigation ${context.op}.`,\n );\n this._inflightInteractionTransaction.setStatus('cancelled');\n this._inflightInteractionTransaction.finish();\n }\n\n const { finalTimeoutMs } = this.options;\n\n const expandedContext = {\n ...context,\n trimEnd: true,\n };\n\n const idleTransaction = this._startIdleTransaction(expandedContext);\n\n this.onTransactionStart(idleTransaction);\n\n logger.log(`[ReactNativeTracing] Starting ${context.op} transaction \"${context.name}\" on scope`);\n\n idleTransaction.registerBeforeFinishCallback((transaction, endTimestamp) => {\n this.onTransactionFinish(transaction, endTimestamp);\n });\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n if (this.options.enableAppStartTracking && this._awaitingAppStartData) {\n transaction.op = UI_LOAD;\n this._addAppStartData(transaction, this._awaitingAppStartData);\n\n this._awaitingAppStartData = undefined;\n }\n });\n\n idleTransaction.registerBeforeFinishCallback((transaction, endTimestamp) => {\n adjustTransactionDuration(finalTimeoutMs, transaction, endTimestamp);\n });\n\n if (this.options.ignoreEmptyBackNavigationTransactions) {\n idleTransaction.registerBeforeFinishCallback(transaction => {\n if (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n transaction.data?.route?.hasBeenSeen &&\n (!transaction.spanRecorder ||\n transaction.spanRecorder.spans.filter(\n span =>\n span.spanId !== transaction.spanId &&\n span.op !== 'ui.load.initial_display' &&\n span.op !== 'navigation.processing',\n ).length === 0)\n ) {\n logger.log(\n '[ReactNativeTracing] Not sampling transaction as route has been seen before. Pass ignoreEmptyBackNavigationTransactions = false to disable this feature.',\n );\n // Route has been seen before and has no child spans.\n transaction.sampled = false;\n }\n });\n }\n\n return idleTransaction;\n }\n\n /**\n * Start app state aware idle transaction on the scope.\n */\n private _startIdleTransaction(context: TransactionContext): IdleTransaction {\n const { idleTimeoutMs, finalTimeoutMs } = this.options;\n const hub = this._getCurrentHub?.() || getCurrentHub();\n const tx = startIdleTransaction(hub, context, idleTimeoutMs, finalTimeoutMs, true);\n cancelInBackground(tx);\n return tx;\n }\n}\n"]}
1
+ {"version":3,"file":"reactnativetracing.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AASrG,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,cAAc,IAAI,iBAAiB,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1G,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,WAAW,EACX,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AAgFjB,MAAM,iCAAiC,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAErE,MAAM,gCAAgC,mCACjC,oCAAoC,KACvC,WAAW,EAAE,IAAI,EACjB,sBAAsB,EAAE,GAAG,EAC3B,aAAa,EAAE,IAAI,EACnB,cAAc,EAAE,MAAM,EACtB,qCAAqC,EAAE,IAAI,EAC3C,cAAc,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,EACl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BAAkB,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;;AA/kBD;;GAEG;AACW,qBAAE,GAAW,oBAAoB,CAAC;AAChD,6CAA6C;AAC9B,+BAAY,GAAW,KAAK,CAAC;AAC5C,4FAA4F;AAC7E,kDAA+B,GAAW,KAAK,CAAC;AA2kBjE;;;GAGG;AACH,SAAS,8BAA8B,CAAC,WAAwB;IAC9D,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;AAC/D,CAAC","sourcesContent":["/* eslint-disable max-lines */\nimport type { RequestInstrumentationOptions } from '@sentry/browser';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from '@sentry/browser';\nimport type { Hub, IdleTransaction, Transaction } from '@sentry/core';\nimport { getActiveTransaction, getCurrentHub, spanToJSON, startIdleTransaction } from '@sentry/core';\nimport type {\n Event,\n EventProcessor,\n Integration,\n Span,\n Transaction as TransactionType,\n TransactionContext,\n} from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { APP_START_COLD, APP_START_WARM } from '../measurements';\nimport type { NativeAppStartResponse } from '../NativeRNSentry';\nimport type { RoutingInstrumentationInstance } from '../tracing/routingInstrumentation';\nimport { NATIVE } from '../wrapper';\nimport { NativeFramesInstrumentation } from './nativeframes';\nimport { APP_START_COLD as APP_START_COLD_OP, APP_START_WARM as APP_START_WARM_OP, UI_LOAD } from './ops';\nimport { StallTrackingInstrumentation } from './stalltracking';\nimport { cancelInBackground, onlySampleIfChildSpans } from './transaction';\nimport type { BeforeNavigate, RouteChangeContextData } from './types';\nimport {\n adjustTransactionDuration,\n getBundleStartTimestampMs,\n getTimeOriginMilliseconds,\n isNearToNow,\n setSpanDurationAsMeasurement,\n} from './utils';\n\nexport interface ReactNativeTracingOptions extends RequestInstrumentationOptions {\n /**\n * @deprecated Replaced by idleTimeoutMs\n */\n idleTimeout: number;\n\n /**\n * @deprecated Replaced by maxTransactionDurationMs\n */\n maxTransactionDuration: number;\n\n /**\n * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of\n * the last finished span as the endtime for the transaction.\n * Time is in ms.\n *\n * Default: 1000\n */\n idleTimeoutMs: number;\n\n /**\n * The maximum duration (transaction duration + idle timeout) of a transaction\n * before it will be marked as \"deadline_exceeded\".\n * If you never want to mark a transaction set it to 0.\n * Time is in ms.\n *\n * Default: 600000\n */\n finalTimeoutMs: number;\n\n /**\n * The routing instrumentation to be used with the tracing integration.\n * There is no routing instrumentation if nothing is passed.\n */\n routingInstrumentation?: RoutingInstrumentationInstance;\n\n /**\n * Does not sample transactions that are from routes that have been seen any more and don't have any spans.\n * This removes a lot of the clutter as most back navigation transactions are now ignored.\n *\n * Default: true\n */\n ignoreEmptyBackNavigationTransactions: boolean;\n\n /**\n * beforeNavigate is called before a navigation transaction is created and allows users to modify transaction\n * context data, or drop the transaction entirely (by setting `sampled = false` in the context).\n *\n * @param context: The context data which will be passed to `startTransaction` by default\n *\n * @returns A (potentially) modified context object, with `sampled = false` if the transaction should be dropped.\n */\n beforeNavigate: BeforeNavigate;\n\n /**\n * Track the app start time by adding measurements to the first route transaction. If there is no routing instrumentation\n * an app start transaction will be started.\n *\n * Default: true\n */\n enableAppStartTracking: boolean;\n\n /**\n * Track slow/frozen frames from the native layer and adds them as measurements to all transactions.\n */\n enableNativeFramesTracking: boolean;\n\n /**\n * Track when and how long the JS event loop stalls for. Adds stalls as measurements to all transactions.\n */\n enableStallTracking: boolean;\n\n /**\n * Trace User Interaction events like touch and gestures.\n */\n enableUserInteractionTracing: boolean;\n}\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\nconst defaultReactNativeTracingOptions: ReactNativeTracingOptions = {\n ...defaultRequestInstrumentationOptions,\n idleTimeout: 1000,\n maxTransactionDuration: 600,\n idleTimeoutMs: 1000,\n finalTimeoutMs: 600000,\n ignoreEmptyBackNavigationTransactions: true,\n beforeNavigate: context => context,\n enableAppStartTracking: true,\n enableNativeFramesTracking: true,\n enableStallTracking: true,\n enableUserInteractionTracing: false,\n};\n\n/**\n * Tracing integration for React Native.\n */\nexport class ReactNativeTracing implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ReactNativeTracing';\n /** We filter out App starts more than 60s */\n private static _maxAppStart: number = 60000;\n /** We filter out App starts which timestamp is 60s and more before the transaction start */\n private static _maxAppStartBeforeTransactionMs: number = 60000;\n /**\n * @inheritDoc\n */\n public name: string = ReactNativeTracing.id;\n\n /** ReactNativeTracing options */\n public options: ReactNativeTracingOptions;\n\n public nativeFramesInstrumentation?: NativeFramesInstrumentation;\n public stallTrackingInstrumentation?: StallTrackingInstrumentation;\n public useAppStartWithProfiler: boolean = false;\n\n private _inflightInteractionTransaction?: IdleTransaction;\n private _getCurrentHub?: () => Hub;\n private _awaitingAppStartData?: NativeAppStartResponse;\n private _appStartFinishTimestamp?: number;\n private _currentRoute?: string;\n private _hasSetTracePropagationTargets: boolean;\n private _hasSetTracingOrigins: boolean;\n private _currentViewName: string | undefined;\n private _firstConstructorCallTimestampMs: number | undefined;\n\n public constructor(options: Partial<ReactNativeTracingOptions> = {}) {\n this._hasSetTracePropagationTargets = !!(\n options &&\n // eslint-disable-next-line deprecation/deprecation\n options.tracePropagationTargets\n );\n this._hasSetTracingOrigins = !!(\n options &&\n // eslint-disable-next-line deprecation/deprecation\n options.tracingOrigins\n );\n\n this.options = {\n ...defaultReactNativeTracingOptions,\n ...options,\n finalTimeoutMs:\n options.finalTimeoutMs ??\n // eslint-disable-next-line deprecation/deprecation\n (typeof options.maxTransactionDuration === 'number'\n ? // eslint-disable-next-line deprecation/deprecation\n options.maxTransactionDuration * 1000\n : undefined) ??\n defaultReactNativeTracingOptions.finalTimeoutMs,\n idleTimeoutMs:\n options.idleTimeoutMs ??\n // eslint-disable-next-line deprecation/deprecation\n options.idleTimeout ??\n defaultReactNativeTracingOptions.idleTimeoutMs,\n };\n }\n\n /**\n * Registers routing and request instrumentation.\n */\n public async setupOnce(\n addGlobalEventProcessor: (callback: EventProcessor) => void,\n getCurrentHub: () => Hub,\n ): Promise<void> {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets: thisOptionsTracePropagationTargets,\n routingInstrumentation,\n enableAppStartTracking,\n enableStallTracking,\n } = this.options;\n\n this._getCurrentHub = getCurrentHub;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via ReactNativeTracing option `tracePropagationTargets`\n // 3. via ReactNativeTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // ReactNativeTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n const tracePropagationTargets =\n clientOptionsTracePropagationTargets ||\n (this._hasSetTracePropagationTargets && thisOptionsTracePropagationTargets) ||\n (this._hasSetTracingOrigins && tracingOrigins) ||\n DEFAULT_TRACE_PROPAGATION_TARGETS;\n if (\n __DEV__ &&\n (this._hasSetTracePropagationTargets || this._hasSetTracingOrigins) &&\n clientOptionsTracePropagationTargets\n ) {\n logger.warn(\n '[ReactNativeTracing] The `tracePropagationTargets` option was set in the ReactNativeTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n if (enableAppStartTracking) {\n this._instrumentAppStart().then(undefined, (reason: unknown) => {\n logger.error(`[ReactNativeTracing] Error while instrumenting app start:`, reason);\n });\n }\n\n this._enableNativeFramesTracking(addGlobalEventProcessor);\n\n if (enableStallTracking) {\n this.stallTrackingInstrumentation = new StallTrackingInstrumentation();\n }\n\n if (routingInstrumentation) {\n routingInstrumentation.registerRoutingInstrumentation(\n this._onRouteWillChange.bind(this),\n this.options.beforeNavigate,\n this._onConfirmRoute.bind(this),\n );\n } else {\n logger.log('[ReactNativeTracing] Not instrumenting route changes as routingInstrumentation has not been set.');\n }\n\n addGlobalEventProcessor(this._getCurrentViewEventProcessor.bind(this));\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n tracePropagationTargets,\n });\n }\n\n /**\n * To be called on a transaction start. Can have async methods\n */\n public onTransactionStart(transaction: Transaction): void {\n if (isNearToNow(transaction.startTimestamp)) {\n // Only if this method is called at or within margin of error to the start timestamp.\n this.nativeFramesInstrumentation?.onTransactionStart(transaction);\n this.stallTrackingInstrumentation?.onTransactionStart(transaction);\n } else {\n logger.warn(\n `[ReactNativeTracing] onTransactionStart called with delay (larger than margin of error) for transaction ${\n transaction.description\n } (${transaction.spanContext().spanId}). Not fetching native frames or tracking stalls.`,\n );\n }\n }\n\n /**\n * To be called on a transaction finish. Cannot have async methods.\n */\n public onTransactionFinish(transaction: Transaction, endTimestamp?: number): void {\n this.nativeFramesInstrumentation?.onTransactionFinish(transaction);\n this.stallTrackingInstrumentation?.onTransactionFinish(transaction, endTimestamp);\n }\n\n /**\n * Called by the ReactNativeProfiler component on first component mount.\n */\n public onAppStartFinish(endTimestamp: number): void {\n this._appStartFinishTimestamp = endTimestamp;\n }\n\n /**\n * Sets the root component first constructor call timestamp.\n */\n public setRootComponentFirstConstructorCallTimestampMs(timestamp: number): void {\n this._firstConstructorCallTimestampMs = timestamp;\n }\n\n /**\n * Starts a new transaction for a user interaction.\n * @param userInteractionId Consists of `op` representation UI Event and `elementId` unique element identifier on current screen.\n */\n public startUserInteractionTransaction(userInteractionId: {\n elementId: string | undefined;\n op: string;\n }): TransactionType | undefined {\n const { elementId, op } = userInteractionId;\n if (!this.options.enableUserInteractionTracing) {\n logger.log('[ReactNativeTracing] User Interaction Tracing is disabled.');\n return;\n }\n if (!this.options.routingInstrumentation) {\n logger.error(\n '[ReactNativeTracing] User Interaction Tracing is not working because no routing instrumentation is set.',\n );\n return;\n }\n if (!elementId) {\n logger.log('[ReactNativeTracing] User Interaction Tracing can not create transaction with undefined elementId.');\n return;\n }\n if (!this._currentRoute) {\n logger.log('[ReactNativeTracing] User Interaction Tracing can not create transaction without a current route.');\n return;\n }\n\n const hub = this._getCurrentHub?.() || getCurrentHub();\n const activeTransaction = getActiveTransaction(hub);\n const activeTransactionIsNotInteraction =\n activeTransaction?.spanId !== this._inflightInteractionTransaction?.spanId;\n if (activeTransaction && activeTransactionIsNotInteraction) {\n logger.warn(\n `[ReactNativeTracing] Did not create ${op} transaction because active transaction ${activeTransaction.name} exists on the scope.`,\n );\n return;\n }\n\n if (this._inflightInteractionTransaction) {\n this._inflightInteractionTransaction.cancelIdleTimeout(undefined, { restartOnChildSpanChange: false });\n this._inflightInteractionTransaction = undefined;\n }\n\n const name = `${this._currentRoute}.${elementId}`;\n const context: TransactionContext = {\n name,\n op,\n trimEnd: true,\n };\n this._inflightInteractionTransaction = this._startIdleTransaction(context);\n this._inflightInteractionTransaction.registerBeforeFinishCallback((transaction: IdleTransaction) => {\n this._inflightInteractionTransaction = undefined;\n this.onTransactionFinish(transaction);\n });\n this._inflightInteractionTransaction.registerBeforeFinishCallback(onlySampleIfChildSpans);\n this.onTransactionStart(this._inflightInteractionTransaction);\n logger.log(`[ReactNativeTracing] User Interaction Tracing Created ${op} transaction ${name}.`);\n return this._inflightInteractionTransaction;\n }\n\n /**\n * Enables or disables native frames tracking based on the `enableNativeFramesTracking` option.\n */\n private _enableNativeFramesTracking(addGlobalEventProcessor: (callback: EventProcessor) => void): void {\n if (this.options.enableNativeFramesTracking && !NATIVE.enableNative) {\n // Do not enable native frames tracking if native is not available.\n logger.warn(\n '[ReactNativeTracing] NativeFramesTracking is not available on the Web, Expo Go and other platforms without native modules.',\n );\n return;\n }\n\n if (!this.options.enableNativeFramesTracking && NATIVE.enableNative) {\n // Disable native frames tracking when native available and option is false.\n NATIVE.disableNativeFramesTracking();\n return;\n }\n\n if (!this.options.enableNativeFramesTracking) {\n return;\n }\n\n NATIVE.enableNativeFramesTracking();\n this.nativeFramesInstrumentation = new NativeFramesInstrumentation(addGlobalEventProcessor, () => {\n const self = getCurrentHub().getIntegration(ReactNativeTracing);\n\n if (self) {\n return !!self.nativeFramesInstrumentation;\n }\n\n return false;\n });\n }\n\n /**\n * Sets the current view name into the app context.\n * @param event Le event.\n */\n private _getCurrentViewEventProcessor(event: Event): Event {\n if (event.contexts && this._currentViewName) {\n event.contexts.app = { view_names: [this._currentViewName], ...event.contexts.app };\n }\n return event;\n }\n\n /**\n * Returns the App Start Duration in Milliseconds. Also returns undefined if not able do\n * define the duration.\n */\n private _getAppStartDurationMilliseconds(appStartTimestampMs: number): number | undefined {\n if (!this._appStartFinishTimestamp) {\n return undefined;\n }\n return this._appStartFinishTimestamp * 1000 - appStartTimestampMs;\n }\n\n /**\n * Instruments the app start measurements on the first route transaction.\n * Starts a route transaction if there isn't routing instrumentation.\n */\n private async _instrumentAppStart(): Promise<void> {\n if (!this.options.enableAppStartTracking || !NATIVE.enableNative) {\n return;\n }\n\n const appStart = await NATIVE.fetchNativeAppStart();\n\n if (!appStart) {\n logger.warn('[ReactNativeTracing] Not instrumenting App Start because native returned null.');\n return;\n }\n\n if (appStart.has_fetched) {\n logger.warn('[ReactNativeTracing] Not instrumenting App Start because this start was already reported.');\n return;\n }\n\n if (!this.useAppStartWithProfiler) {\n logger.warn('[ReactNativeTracing] `Sentry.wrap` not detected, using JS context init as app start end.');\n this._appStartFinishTimestamp = getTimeOriginMilliseconds() / 1000;\n }\n\n if (this.options.routingInstrumentation) {\n this._awaitingAppStartData = appStart;\n } else {\n const idleTransaction = this._createRouteTransaction({\n name: 'App Start',\n op: UI_LOAD,\n });\n\n if (idleTransaction) {\n this._addAppStartData(idleTransaction, appStart);\n }\n }\n }\n\n /**\n * Adds app start measurements and starts a child span on a transaction.\n */\n private _addAppStartData(transaction: IdleTransaction, appStart: NativeAppStartResponse): void {\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n logger.warn('App start timestamp could not be loaded from the native layer.');\n return;\n }\n\n const isAppStartWithinBounds =\n appStartTimestampMs >=\n getTransactionStartTimestampMs(transaction) - ReactNativeTracing._maxAppStartBeforeTransactionMs;\n if (!__DEV__ && !isAppStartWithinBounds) {\n logger.warn('[ReactNativeTracing] App start timestamp is too far in the past to be used for app start span.');\n return;\n }\n\n const appStartDurationMilliseconds = this._getAppStartDurationMilliseconds(appStartTimestampMs);\n if (!appStartDurationMilliseconds) {\n logger.warn('[ReactNativeTracing] App start end has not been recorded, not adding app start span.');\n return;\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 if (appStartDurationMilliseconds >= ReactNativeTracing._maxAppStart) {\n logger.warn('[ReactNativeTracing] App start duration is over a minute long, not adding app start span.');\n return;\n }\n\n const appStartTimeSeconds = appStartTimestampMs / 1000;\n\n transaction.startTimestamp = appStartTimeSeconds;\n\n const maybeTtidSpan = transaction.spanRecorder?.spans.find(span => span.op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.startTimestamp = appStartTimeSeconds;\n setSpanDurationAsMeasurement('time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = transaction.spanRecorder?.spans.find(span => span.op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.startTimestamp = appStartTimeSeconds;\n setSpanDurationAsMeasurement('time_to_full_display', maybeTtfdSpan);\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpan = transaction.startChild({\n description: appStart.type === 'cold' ? 'Cold App Start' : 'Warm App Start',\n op,\n startTimestamp: appStartTimeSeconds,\n endTimestamp: this._appStartFinishTimestamp,\n });\n this._addJSExecutionBeforeRoot(appStartSpan);\n this._addNativeSpansTo(appStartSpan, appStart.spans);\n\n const measurement = appStart.type === 'cold' ? APP_START_COLD : APP_START_WARM;\n transaction.setMeasurement(measurement, appStartDurationMilliseconds, 'millisecond');\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 */\n private _addJSExecutionBeforeRoot(appStartSpan: Span): void {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return;\n }\n\n if (!this._firstConstructorCallTimestampMs) {\n logger.warn('Missing the root component first constructor call timestamp.');\n appStartSpan.startChild({\n description: 'JS Bundle Execution Start',\n op: appStartSpan.op,\n startTimestamp: bundleStartTimestampMs / 1000,\n endTimestamp: bundleStartTimestampMs / 1000,\n });\n return;\n }\n\n appStartSpan.startChild({\n description: 'JS Bundle Execution Before React Root',\n op: appStartSpan.op,\n startTimestamp: bundleStartTimestampMs / 1000,\n endTimestamp: this._firstConstructorCallTimestampMs / 1000,\n });\n }\n\n /**\n * Adds native spans to the app start span.\n */\n private _addNativeSpansTo(appStartSpan: Span, nativeSpans: NativeAppStartResponse['spans']): void {\n nativeSpans.forEach(span => {\n if (span.description === 'UIKit init') {\n return this._createUIKitSpan(appStartSpan, span);\n }\n\n appStartSpan.startChild({\n op: appStartSpan.op,\n description: span.description,\n startTimestamp: span.start_timestamp_ms / 1000,\n endTimestamp: span.end_timestamp_ms / 1000,\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 */\n private _createUIKitSpan(parentSpan: Span, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): void {\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 parentSpan.startChild({\n op: parentSpan.op,\n description: 'UIKit Init to JS Exec Start',\n startTimestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n endTimestamp: bundleStart / 1000,\n });\n } else {\n parentSpan.startChild({\n op: parentSpan.op,\n description: 'UIKit Init',\n startTimestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n endTimestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n });\n }\n }\n\n /** To be called when the route changes, but BEFORE the components of the new route mount. */\n private _onRouteWillChange(context: TransactionContext): TransactionType | undefined {\n return this._createRouteTransaction(context);\n }\n\n /**\n * Creates a breadcrumb and sets the current route as a tag.\n */\n private _onConfirmRoute(context: TransactionContext): void {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n this._currentRoute = context.data?.route?.name;\n\n this._getCurrentHub?.().configureScope(scope => {\n if (context.data) {\n const contextData = context.data as RouteChangeContextData;\n\n scope.addBreadcrumb({\n category: 'navigation',\n type: 'navigation',\n // We assume that context.name is the name of the route.\n message: `Navigation to ${context.name}`,\n data: {\n from: contextData.previousRoute?.name,\n to: contextData.route.name,\n },\n });\n }\n\n this._currentViewName = context.name;\n /**\n * @deprecated tag routing.route.name will be removed in the future.\n */\n scope.setTag('routing.route.name', context.name);\n });\n }\n\n /** Create routing idle transaction. */\n private _createRouteTransaction(context: TransactionContext): IdleTransaction | undefined {\n if (!this._getCurrentHub) {\n logger.warn(`[ReactNativeTracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (this._inflightInteractionTransaction) {\n logger.log(\n `[ReactNativeTracing] Canceling ${this._inflightInteractionTransaction.op} transaction because navigation ${context.op}.`,\n );\n this._inflightInteractionTransaction.setStatus('cancelled');\n this._inflightInteractionTransaction.finish();\n }\n\n const { finalTimeoutMs } = this.options;\n\n const expandedContext = {\n ...context,\n trimEnd: true,\n };\n\n const idleTransaction = this._startIdleTransaction(expandedContext);\n\n this.onTransactionStart(idleTransaction);\n\n logger.log(`[ReactNativeTracing] Starting ${context.op} transaction \"${context.name}\" on scope`);\n\n idleTransaction.registerBeforeFinishCallback((transaction, endTimestamp) => {\n this.onTransactionFinish(transaction, endTimestamp);\n });\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n if (this.options.enableAppStartTracking && this._awaitingAppStartData) {\n transaction.op = UI_LOAD;\n this._addAppStartData(transaction, this._awaitingAppStartData);\n\n this._awaitingAppStartData = undefined;\n }\n });\n\n idleTransaction.registerBeforeFinishCallback((transaction, endTimestamp) => {\n adjustTransactionDuration(finalTimeoutMs, transaction, endTimestamp);\n });\n\n if (this.options.ignoreEmptyBackNavigationTransactions) {\n idleTransaction.registerBeforeFinishCallback(transaction => {\n if (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n transaction.data?.route?.hasBeenSeen &&\n (!transaction.spanRecorder ||\n transaction.spanRecorder.spans.filter(\n span =>\n span.spanId !== transaction.spanId &&\n span.op !== 'ui.load.initial_display' &&\n span.op !== 'navigation.processing',\n ).length === 0)\n ) {\n logger.log(\n '[ReactNativeTracing] Not sampling transaction as route has been seen before. Pass ignoreEmptyBackNavigationTransactions = false to disable this feature.',\n );\n // Route has been seen before and has no child spans.\n transaction.sampled = false;\n }\n });\n }\n\n return idleTransaction;\n }\n\n /**\n * Start app state aware idle transaction on the scope.\n */\n private _startIdleTransaction(context: TransactionContext): IdleTransaction {\n const { idleTimeoutMs, finalTimeoutMs } = this.options;\n const hub = this._getCurrentHub?.() || getCurrentHub();\n const tx = startIdleTransaction(hub, context, idleTimeoutMs, finalTimeoutMs, true);\n cancelInBackground(tx);\n return tx;\n }\n}\n\n/**\n * Returns transaction start timestamp in milliseconds.\n * If start timestamp is not available, returns 0.\n */\nfunction getTransactionStartTimestampMs(transaction: Transaction): number {\n return (spanToJSON(transaction).start_timestamp || 0) * 1000;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibraries.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,6BAA6B,CA6BxE,CAAC"}
1
+ {"version":3,"file":"rnlibraries.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAE5E,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,6BAA6B,CA6BxE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-var-requires */
2
- import { TurboModuleRegistry } from 'react-native';
3
- import { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
2
+ var _a;
3
+ import { Platform, TurboModuleRegistry } from 'react-native';
4
4
  export const ReactNativeLibraries = {
5
5
  Devtools: {
6
6
  parseErrorStack: (errorStack) => {
@@ -24,7 +24,7 @@ export const ReactNativeLibraries = {
24
24
  },
25
25
  },
26
26
  ReactNativeVersion: {
27
- version: RNV,
27
+ version: (_a = Platform.constants) === null || _a === void 0 ? void 0 : _a.reactNativeVersion,
28
28
  },
29
29
  TurboModuleRegistry,
30
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibraries.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAKhF,MAAM,CAAC,MAAM,oBAAoB,GAA4C;IAC3E,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,UAAkB,EAAiC,EAAE;YACrE,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YACxF,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,qBAAqB,EAAE,CACrB,KAAoC,EACpC,SAAmC,EACU,EAAE;YAC/C,MAAM,qBAAqB,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;YACpG,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,YAAY,EAAE,GAA8B,EAAE;YAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAClF,OAAO,YAAY,EAAE,CAAC;QACxB,CAAC;KACF;IACD,OAAO,EAAE,OAAO,CAAC,gCAAgC,CAAC;IAClD,SAAS,EAAE;QACT,cAAc,EAAE,CAAI,IAAY,EAAE,QAAiB,EAAQ,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,oDAAoD,CAAC,CAAC;YACzF,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,GAAG;KACb;IACD,mBAAmB;CACpB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n\nimport { TurboModuleRegistry } from 'react-native';\nimport { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';\n\nimport type * as ReactNative from '../vendor/react-native';\nimport type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nexport const ReactNativeLibraries: Required<ReactNativeLibrariesInterface> = {\n Devtools: {\n parseErrorStack: (errorStack: string): Array<ReactNative.StackFrame> => {\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n return parseErrorStack(errorStack);\n },\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ): Promise<ReactNative.SymbolicatedStackTrace> => {\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n return symbolicateStackTrace(stack, extraData);\n },\n getDevServer: (): ReactNative.DevServerInfo => {\n const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n return getDevServer();\n },\n },\n Promise: require('react-native/Libraries/Promise'),\n Utilities: {\n polyfillGlobal: <T>(name: string, getValue: () => T): void => {\n const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n polyfillGlobal(name, getValue);\n },\n },\n ReactNativeVersion: {\n version: RNV,\n },\n TurboModuleRegistry,\n};\n"]}
1
+ {"version":3,"file":"rnlibraries.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibraries.ts"],"names":[],"mappings":"AAAA,uDAAuD;;AAEvD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,oBAAoB,GAA4C;IAC3E,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC,UAAkB,EAAiC,EAAE;YACrE,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YACxF,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,qBAAqB,EAAE,CACrB,KAAoC,EACpC,SAAmC,EACU,EAAE;YAC/C,MAAM,qBAAqB,GAAG,OAAO,CAAC,4DAA4D,CAAC,CAAC;YACpG,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACjD,CAAC;QACD,YAAY,EAAE,GAA8B,EAAE;YAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAClF,OAAO,YAAY,EAAE,CAAC;QACxB,CAAC;KACF;IACD,OAAO,EAAE,OAAO,CAAC,gCAAgC,CAAC;IAClD,SAAS,EAAE;QACT,cAAc,EAAE,CAAI,IAAY,EAAE,QAAiB,EAAQ,EAAE;YAC3D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,oDAAoD,CAAC,CAAC;YACzF,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,MAAA,QAAQ,CAAC,SAAS,0CAAE,kBAAkB;KAChD;IACD,mBAAmB;CACpB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-var-requires */\n\nimport { Platform, TurboModuleRegistry } from 'react-native';\n\nimport type * as ReactNative from '../vendor/react-native';\nimport type { ReactNativeLibrariesInterface } from './rnlibrariesinterface';\n\nexport const ReactNativeLibraries: Required<ReactNativeLibrariesInterface> = {\n Devtools: {\n parseErrorStack: (errorStack: string): Array<ReactNative.StackFrame> => {\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n return parseErrorStack(errorStack);\n },\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ): Promise<ReactNative.SymbolicatedStackTrace> => {\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n return symbolicateStackTrace(stack, extraData);\n },\n getDevServer: (): ReactNative.DevServerInfo => {\n const getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n return getDevServer();\n },\n },\n Promise: require('react-native/Libraries/Promise'),\n Utilities: {\n polyfillGlobal: <T>(name: string, getValue: () => T): void => {\n const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');\n polyfillGlobal(name, getValue);\n },\n },\n ReactNativeVersion: {\n version: Platform.constants?.reactNativeVersion,\n },\n TurboModuleRegistry,\n};\n"]}
@@ -1,4 +1,3 @@
1
- import type { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
2
1
  import type * as ReactNative from '../vendor/react-native';
3
2
  export type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
4
3
  export type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
@@ -12,9 +11,7 @@ export interface ReactNativeLibrariesInterface {
12
11
  polyfillGlobal: <T>(name: string, getValue: () => T) => void;
13
12
  };
14
13
  Promise?: typeof Promise;
15
- ReactNativeVersion?: {
16
- version: typeof RNV;
17
- };
14
+ ReactNativeVersion?: ReactNative.ReactNativeVersion;
18
15
  TurboModuleRegistry?: ReactNative.TurboModuleRegistry;
19
16
  }
20
17
  //# sourceMappingURL=rnlibrariesinterface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibrariesinterface.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAErF,OAAO,KAAK,KAAK,WAAW,MAAM,wBAAwB,CAAC;AAE3D,YAAY,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE;QACT,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACvE,qBAAqB,EAAE,CACrB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QACjD,YAAY,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;KAC/C,CAAC;IACF,SAAS,CAAC,EAAE;QACV,cAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;KAC9D,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE;QACnB,OAAO,EAAE,OAAO,GAAG,CAAC;KACrB,CAAC;IACF,mBAAmB,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;CACvD"}
1
+ {"version":3,"file":"rnlibrariesinterface.d.ts","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,WAAW,MAAM,wBAAwB,CAAC;AAE3D,YAAY,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE;QACT,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACvE,qBAAqB,EAAE,CACrB,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,EACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAChC,OAAO,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;QACjD,YAAY,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;KAC/C,CAAC;IACF,SAAS,CAAC,EAAE;QACV,cAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;KAC9D,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;IACpD,mBAAmB,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;CACvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"rnlibrariesinterface.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,EAAE","sourcesContent":["//\n// This interface contains all of react-native internals Libraries used in Sentry RN SDK.\n//\n// Containing the internals in one place enables us to handle platforms\n// that don't have all the internals available. For example react-native-web.\n//\n\nimport type { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';\n\nimport type * as ReactNative from '../vendor/react-native';\n\nexport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\nexport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nexport interface ReactNativeLibrariesInterface {\n Devtools?: {\n parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ) => Promise<ReactNative.SymbolicatedStackTrace>;\n getDevServer: () => ReactNative.DevServerInfo;\n };\n Utilities?: {\n polyfillGlobal: <T>(name: string, getValue: () => T) => void;\n };\n Promise?: typeof Promise;\n ReactNativeVersion?: {\n version: typeof RNV;\n };\n TurboModuleRegistry?: ReactNative.TurboModuleRegistry;\n}\n"]}
1
+ {"version":3,"file":"rnlibrariesinterface.js","sourceRoot":"","sources":["../../../src/js/utils/rnlibrariesinterface.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,yFAAyF;AACzF,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,EAAE","sourcesContent":["//\n// This interface contains all of react-native internals Libraries used in Sentry RN SDK.\n//\n// Containing the internals in one place enables us to handle platforms\n// that don't have all the internals available. For example react-native-web.\n//\n\nimport type * as ReactNative from '../vendor/react-native';\n\nexport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\nexport type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';\n\nexport interface ReactNativeLibrariesInterface {\n Devtools?: {\n parseErrorStack: (errorStack: string) => Array<ReactNative.StackFrame>;\n symbolicateStackTrace: (\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n ) => Promise<ReactNative.SymbolicatedStackTrace>;\n getDevServer: () => ReactNative.DevServerInfo;\n };\n Utilities?: {\n polyfillGlobal: <T>(name: string, getValue: () => T) => void;\n };\n Promise?: typeof Promise;\n ReactNativeVersion?: ReactNative.ReactNativeVersion;\n TurboModuleRegistry?: ReactNative.TurboModuleRegistry;\n}\n"]}
@@ -31,5 +31,13 @@ export type TurboModuleRegistry = {
31
31
  get<T extends TurboModule>(name: string): T | null;
32
32
  getEnforcing<T extends TurboModule>(name: string): T;
33
33
  };
34
+ export type ReactNativeVersion = {
35
+ version: {
36
+ major: number;
37
+ minor: number;
38
+ patch: number;
39
+ prerelease?: number | null | undefined;
40
+ };
41
+ };
34
42
  export {};
35
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QACvB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC,CAAC;AAGH,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,YAAY,CAAC,IAAI,MAAM,CAAC;CACzB,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,CAAC,SAAS,WAAW,EA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IAAI,CAAC;IACnD,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;CACtD,CAAC;AAGF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;KACxC,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["// MIT License\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L17\nexport type StackFrame = {\n column?: number;\n file?: string;\n lineNumber?: number;\n methodName: string;\n collapse?: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L17\nexport type CodeFrame = Readonly<{\n content: string;\n location?: {\n [key: string]: unknown;\n row: number;\n column: number;\n };\n fileName: string;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L27\nexport type SymbolicatedStackTrace = Readonly<{\n stack: Array<StackFrame>;\n codeFrame?: CodeFrame;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/getDevServer.js#L17\nexport type DevServerInfo = {\n [key: string]: unknown;\n url: string;\n fullBundleUrl?: string;\n bundleLoadedFromServer: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/TurboModule/RCTExport.d.ts#L10\ntype TurboModule = {\n getConstants?(): object;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.d.ts#L12\nexport type TurboModuleRegistry = {\n get<T extends TurboModule>(name: string): T | null;\n getEnforcing<T extends TurboModule>(name: string): T;\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/js/vendor/react-native/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["// MIT License\n\n// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L17\nexport type StackFrame = {\n column?: number;\n file?: string;\n lineNumber?: number;\n methodName: string;\n collapse?: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L17\nexport type CodeFrame = Readonly<{\n content: string;\n location?: {\n [key: string]: unknown;\n row: number;\n column: number;\n };\n fileName: string;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L27\nexport type SymbolicatedStackTrace = Readonly<{\n stack: Array<StackFrame>;\n codeFrame?: CodeFrame;\n}>;\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/Core/Devtools/getDevServer.js#L17\nexport type DevServerInfo = {\n [key: string]: unknown;\n url: string;\n fullBundleUrl?: string;\n bundleLoadedFromServer: boolean;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/TurboModule/RCTExport.d.ts#L10\ntype TurboModule = {\n getConstants?(): object;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/d09c02f9e2d468e4d0bde51890e312ae7003a3e6/packages/react-native/Libraries/TurboModule/TurboModuleRegistry.d.ts#L12\nexport type TurboModuleRegistry = {\n get<T extends TurboModule>(name: string): T | null;\n getEnforcing<T extends TurboModule>(name: string): T;\n};\n\n// Adapted from https://github.com/facebook/react-native/blob/575ab7862553d7ad7bc753951ed19dcd50d59b95/packages/react-native/Libraries/Utilities/Platform.d.ts#L23-L28\nexport type ReactNativeVersion = {\n version: {\n major: number;\n minor: number;\n patch: number;\n prerelease?: number | null | undefined;\n };\n};\n"]}
@@ -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.26.0-alpha.3";
3
+ export declare const SDK_VERSION = "5.27.0";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AACzD,eAAO,MAAM,WAAW,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
2
2
  export const SDK_NAME = 'sentry.javascript.react-native';
3
- export const SDK_VERSION = '5.26.0-alpha.3';
3
+ export const SDK_VERSION = '5.27.0';
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.26.0-alpha.3';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '5.27.0';\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentry/react-native",
3
3
  "homepage": "https://github.com/getsentry/sentry-react-native",
4
4
  "repository": "https://github.com/getsentry/sentry-react-native",
5
- "version": "5.26.0-alpha.3",
5
+ "version": "5.27.0",
6
6
  "description": "Official Sentry SDK for react-native",
7
7
  "typings": "dist/js/index.d.ts",
8
8
  "types": "dist/js/index.d.ts",
@@ -107,7 +107,7 @@
107
107
  "metro": "0.76",
108
108
  "prettier": "^2.0.5",
109
109
  "react": "18.2.0",
110
- "react-native": "0.73.2",
110
+ "react-native": "0.73.9",
111
111
  "react-native-version": "^4.0.0",
112
112
  "react-test-renderer": "^18.2.0",
113
113
  "replace-in-file": "^7.0.1",
@@ -82,6 +82,8 @@ export declare class ReactNativeTracing implements Integration {
82
82
  static id: string;
83
83
  /** We filter out App starts more than 60s */
84
84
  private static _maxAppStart;
85
+ /** We filter out App starts which timestamp is 60s and more before the transaction start */
86
+ private static _maxAppStartBeforeTransactionMs;
85
87
  /**
86
88
  * @inheritDoc
87
89
  */
@@ -1,4 +1,3 @@
1
- import type { version as RNV } from 'react-native/Libraries/Core/ReactNativeVersion';
2
1
  import type * as ReactNative from '../vendor/react-native';
3
2
  export type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
4
3
  export type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
@@ -12,9 +11,7 @@ export interface ReactNativeLibrariesInterface {
12
11
  polyfillGlobal: <T>(name: string, getValue: () => T) => void;
13
12
  };
14
13
  Promise?: typeof Promise;
15
- ReactNativeVersion?: {
16
- version: typeof RNV;
17
- };
14
+ ReactNativeVersion?: ReactNative.ReactNativeVersion;
18
15
  TurboModuleRegistry?: ReactNative.TurboModuleRegistry;
19
16
  }
20
17
  //# sourceMappingURL=rnlibrariesinterface.d.ts.map
@@ -31,5 +31,13 @@ export type TurboModuleRegistry = {
31
31
  get<T extends TurboModule>(name: string): T | null;
32
32
  getEnforcing<T extends TurboModule>(name: string): T;
33
33
  };
34
+ export type ReactNativeVersion = {
35
+ version: {
36
+ major: number;
37
+ minor: number;
38
+ patch: number;
39
+ prerelease?: number | null | undefined;
40
+ };
41
+ };
34
42
  export {};
35
43
  //# sourceMappingURL=index.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.26.0-alpha.3";
3
+ export declare const SDK_VERSION = "5.27.0";
4
4
  //# sourceMappingURL=version.d.ts.map