@sentry/react-native 7.3.0 → 7.5.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 (78) hide show
  1. package/RNSentry.podspec +2 -2
  2. package/android/build.gradle +1 -1
  3. package/android/libs/replay-stubs.jar +0 -0
  4. package/android/replay-stubs/build.gradle +1 -1
  5. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +67 -13
  6. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  7. package/android/src/main/java/io/sentry/react/replay/RNSentryReplayFragmentLifecycleTracer.java +137 -0
  8. package/dist/js/NativeRNSentry.d.ts +0 -1
  9. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  10. package/dist/js/NativeRNSentry.js.map +1 -1
  11. package/dist/js/RNSentryReplayMaskNativeComponent.js +1 -1
  12. package/dist/js/RNSentryReplayMaskNativeComponent.js.map +1 -1
  13. package/dist/js/RNSentryReplayUnmaskNativeComponent.js +1 -1
  14. package/dist/js/RNSentryReplayUnmaskNativeComponent.js.map +1 -1
  15. package/dist/js/integrations/default.d.ts.map +1 -1
  16. package/dist/js/integrations/default.js +2 -1
  17. package/dist/js/integrations/default.js.map +1 -1
  18. package/dist/js/integrations/exports.d.ts +2 -0
  19. package/dist/js/integrations/exports.d.ts.map +1 -1
  20. package/dist/js/integrations/exports.js +2 -0
  21. package/dist/js/integrations/exports.js.map +1 -1
  22. package/dist/js/integrations/graphql.d.ts +11 -0
  23. package/dist/js/integrations/graphql.d.ts.map +1 -0
  24. package/dist/js/integrations/graphql.js +9 -0
  25. package/dist/js/integrations/graphql.js.map +1 -0
  26. package/dist/js/integrations/supabase.d.ts +12 -0
  27. package/dist/js/integrations/supabase.d.ts.map +1 -0
  28. package/dist/js/integrations/supabase.js +10 -0
  29. package/dist/js/integrations/supabase.js.map +1 -0
  30. package/dist/js/options.d.ts +25 -1
  31. package/dist/js/options.d.ts.map +1 -1
  32. package/dist/js/options.js.map +1 -1
  33. package/dist/js/replay/mobilereplay.d.ts +22 -0
  34. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  35. package/dist/js/replay/mobilereplay.js +1 -0
  36. package/dist/js/replay/mobilereplay.js.map +1 -1
  37. package/dist/js/replay/networkUtils.d.ts +0 -1
  38. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  39. package/dist/js/sdk.d.ts.map +1 -1
  40. package/dist/js/sdk.js +1 -0
  41. package/dist/js/sdk.js.map +1 -1
  42. package/dist/js/tools/vendor/metro/utils.js +1 -1
  43. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  44. package/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  45. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  46. package/dist/js/vendor/react-native/index.d.ts +0 -1
  47. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  48. package/dist/js/version.d.ts +1 -1
  49. package/dist/js/version.js +1 -1
  50. package/dist/js/version.js.map +1 -1
  51. package/dist/js/wrapper.d.ts.map +1 -1
  52. package/dist/js/wrapper.js +2 -3
  53. package/dist/js/wrapper.js.map +1 -1
  54. package/ios/RNSentry+fetchNativeStack.m +0 -2
  55. package/ios/RNSentry.h +0 -1
  56. package/ios/RNSentry.mm +33 -9
  57. package/ios/RNSentryDependencyContainer.m +1 -1
  58. package/ios/RNSentryExperimentalOptions.h +9 -0
  59. package/ios/RNSentryExperimentalOptions.m +9 -0
  60. package/ios/RNSentryOnDrawReporter.m +1 -2
  61. package/ios/RNSentryReplay.h +5 -1
  62. package/ios/RNSentryReplay.mm +10 -6
  63. package/ios/RNSentryVersion.m +1 -1
  64. package/package.json +20 -18
  65. package/sentry.gradle +269 -277
  66. package/src/js/NativeRNSentry.ts +0 -1
  67. package/src/js/RNSentryReplayMaskNativeComponent.ts +1 -1
  68. package/src/js/RNSentryReplayUnmaskNativeComponent.ts +1 -1
  69. package/ts3.8/dist/js/NativeRNSentry.d.ts +0 -1
  70. package/ts3.8/dist/js/integrations/exports.d.ts +2 -0
  71. package/ts3.8/dist/js/integrations/graphql.d.ts +11 -0
  72. package/ts3.8/dist/js/integrations/supabase.d.ts +12 -0
  73. package/ts3.8/dist/js/options.d.ts +25 -1
  74. package/ts3.8/dist/js/replay/mobilereplay.d.ts +22 -0
  75. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  76. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  77. package/ts3.8/dist/js/vendor/react-native/index.d.ts +0 -1
  78. package/ts3.8/dist/js/version.d.ts +1 -1
@@ -41,13 +41,20 @@ export interface BaseReactNativeOptions {
41
41
  /** Enable NDK on Android
42
42
  *
43
43
  * @default true
44
+ * @platform android
44
45
  */
45
46
  enableNdk?: boolean;
46
47
  /** Enable scope sync from Java to NDK on Android
47
48
  * Only has an effect if `enableNdk` is `true`.
49
+ *
50
+ * @platform android
48
51
  */
49
52
  enableNdkScopeSync?: boolean;
50
- /** When enabled, all the threads are automatically attached to all logged events on Android */
53
+ /**
54
+ * When enabled, all the threads are automatically attached to all logged events on Android
55
+ *
56
+ * @platform android
57
+ */
51
58
  attachThreads?: boolean;
52
59
  /**
53
60
  * When enabled, certain personally identifiable information (PII) is added by active integrations.
@@ -72,6 +79,7 @@ export interface BaseReactNativeOptions {
72
79
  * Renamed from `enableOutOfMemoryTracking` in v5.
73
80
  *
74
81
  * @default true
82
+ * @platform ios
75
83
  */
76
84
  enableWatchdogTerminationTracking?: boolean;
77
85
  /**
@@ -102,6 +110,7 @@ export interface BaseReactNativeOptions {
102
110
  * iOS only
103
111
  *
104
112
  * @default true
113
+ * @platform ios
105
114
  */
106
115
  enableAppHangTracking?: boolean;
107
116
  /**
@@ -113,6 +122,7 @@ export interface BaseReactNativeOptions {
113
122
  * iOS only
114
123
  *
115
124
  * @default 2
125
+ * @platform ios
116
126
  */
117
127
  appHangTimeoutInterval?: number;
118
128
  /**
@@ -239,6 +249,7 @@ export interface BaseReactNativeOptions {
239
249
  * - Note: The mechanism of hooking into `__cxa_throw` could cause issues with symbolication on iOS due to caching of symbol references.
240
250
  *
241
251
  * @default false
252
+ * @platform ios
242
253
  */
243
254
  enableUnhandledCPPExceptionsV2?: boolean;
244
255
  };
@@ -249,6 +260,19 @@ export interface BaseReactNativeOptions {
249
260
  * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.
250
261
  */
251
262
  useThreadsForMessageStack?: boolean;
263
+ /**
264
+ * If set to `true`, the SDK propagates the W3C `traceparent` header to any outgoing requests,
265
+ * in addition to the `sentry-trace` and `baggage` headers. Use the {@link CoreOptions.tracePropagationTargets}
266
+ * option to control to which outgoing requests the header will be attached.
267
+ *
268
+ * **Important:** If you set this option to `true`, make sure that you configured your servers'
269
+ * CORS settings to allow the `traceparent` header. Otherwise, requests might get blocked.
270
+ *
271
+ * @see https://www.w3.org/TR/trace-context/
272
+ *
273
+ * @default false
274
+ */
275
+ propagateTraceparent?: boolean;
252
276
  }
253
277
  export type SentryReplayQuality = 'low' | 'medium' | 'high';
254
278
  export interface ReactNativeTransportOptions extends BrowserTransportOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC3D,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC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C;AACd,CAAC","sourcesContent":["import type { makeFetchTransport } from '@sentry/browser';\nimport type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/core';\nimport type { BrowserOptions, Profiler } from '@sentry/react';\nimport type * as React from 'react';\nimport { Platform } from 'react-native';\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { isExpoGo } from './utils/environment';\n\ntype ProfilerProps = React.ComponentProps<typeof Profiler>;\ntype BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];\n\ntype BrowserExperiments = NonNullable<BrowserOptions['_experiments']>;\ntype SharedExperimentsSubset = BrowserExperiments;\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable NDK on Android\n *\n * @default true\n */\n enableNdk?: boolean;\n\n /** Enable scope sync from Java to NDK on Android\n * Only has an effect if `enableNdk` is `true`.\n */\n enableNdkScopeSync?: boolean;\n\n /** When enabled, all the threads are automatically attached to all logged events on Android */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n\n /**\n * If you use Spotlight by Sentry during development, use\n * this option to forward captured Sentry events to Spotlight.\n *\n * Either set it to true, or provide a specific Spotlight Sidecar URL.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n */\n spotlight?: boolean | string;\n\n /**\n * Sets a callback which is executed before capturing screenshots. Only\n * relevant if `attachScreenshot` is set to true. When false is returned\n * from the function, no screenshot will be attached.\n */\n beforeScreenshot?: (event: Event, hint: EventHint) => boolean;\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 * Requires performance monitoring to be enabled.\n *\n * @default true\n */\n enableAppStartTracking?: boolean;\n\n /**\n * Track the slow and frozen frames in the application. Enabling this options will add\n * slow and frozen frames measurements to all created root spans (transactions).\n *\n * @default true\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 * @default true\n */\n enableStallTracking?: boolean;\n\n /**\n * Trace User Interaction events like touch and gestures.\n *\n * @default false\n */\n enableUserInteractionTracing?: boolean;\n\n /**\n * The sample rate for profiling\n * 1.0 will profile all transactions and 0 will profile none.\n */\n profilesSampleRate?: number;\n\n /**\n * The sample rate for session-long replays.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * The sample rate for sessions that has had an error occur.\n * This is independent of `sessionSampleRate`.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysOnErrorSampleRate?: number;\n\n /**\n * Controls how many milliseconds to wait before shutting down. The default is 2 seconds. Setting this too low can cause\n * problems for sending events from command line applications. Setting it too\n * high can cause the application to block for users with network connectivity\n * problems.\n */\n shutdownTimeout?: number;\n\n /**\n * Defines the quality of the session replay. The higher the quality, the more accurate the replay\n * will be, but also more data to transfer and more CPU load.\n *\n * @default 'medium'\n */\n replaysSessionQuality?: SentryReplayQuality;\n\n /**\n * Options which are in beta, or otherwise not guaranteed to be stable.\n */\n _experiments?: SharedExperimentsSubset & {\n [key: string]: unknown;\n\n /**\n * @deprecated Use `replaysSessionSampleRate` in the options root instead.\n *\n * This will be removed in the next major version.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * @deprecated Use `replaysOnErrorSampleRate` in the options root instead.\n *\n * This will be removed in the next major version.\n */\n replaysOnErrorSampleRate?: number;\n\n /**\n * Experiment: A more reliable way to report unhandled C++ exceptions in iOS.\n *\n * This approach hooks into all instances of the `__cxa_throw` function, which provides a more comprehensive and consistent exception handling across an app’s runtime, regardless of the number of C++ modules or how they’re linked. It helps in obtaining accurate stack traces.\n *\n * - Note: The mechanism of hooking into `__cxa_throw` could cause issues with symbolication on iOS due to caching of symbol references.\n *\n * @default false\n */\n enableUnhandledCPPExceptionsV2?: boolean;\n };\n\n /**\n * This options changes the placement of the attached stacktrace of `captureMessage` in the event.\n *\n * @default false\n * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.\n */\n useThreadsForMessageStack?: boolean;\n}\n\nexport type SentryReplayQuality = 'low' | 'medium' | 'high';\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions\n extends Omit<Options<ReactNativeTransportOptions>, '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions\n extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel' | '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: Omit<ProfilerProps, 'updateProps' | 'children' | 'name'>;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n\n/**\n * If the user has not explicitly set `enableNativeNagger`\n * the function enables native nagging based on the current\n * environment.\n */\nexport function shouldEnableNativeNagger(userOptions: unknown): boolean {\n if (typeof userOptions === 'boolean') {\n // User can override the default behavior\n return userOptions;\n }\n\n if (Platform.OS === 'web' || Platform.OS === 'windows') {\n // We don't want to nag on known platforms that don't support native\n return false;\n }\n\n if (isExpoGo()) {\n // If the app is running in Expo Go, we don't want to nag\n return false;\n }\n\n return true;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAwV/C;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAAoB;IAC3D,IAAI,OAAO,WAAW,KAAK,SAAS,EAAE;QACpC,yCAAyC;QACzC,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE;QACtD,oEAAoE;QACpE,OAAO,KAAK,CAAC;KACd;IAED,IAAI,QAAQ,EAAE,EAAE;QACd,yDAAyD;QACzD,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { makeFetchTransport } from '@sentry/browser';\nimport type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/core';\nimport type { BrowserOptions, Profiler } from '@sentry/react';\nimport type * as React from 'react';\nimport { Platform } from 'react-native';\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { isExpoGo } from './utils/environment';\n\ntype ProfilerProps = React.ComponentProps<typeof Profiler>;\ntype BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];\n\ntype BrowserExperiments = NonNullable<BrowserOptions['_experiments']>;\ntype SharedExperimentsSubset = BrowserExperiments;\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable NDK on Android\n *\n * @default true\n * @platform android\n */\n enableNdk?: boolean;\n\n /** Enable scope sync from Java to NDK on Android\n * Only has an effect if `enableNdk` is `true`.\n *\n * @platform android\n */\n enableNdkScopeSync?: boolean;\n\n /**\n * When enabled, all the threads are automatically attached to all logged events on Android\n *\n * @platform android\n */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n * @platform ios\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n * @platform ios\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n * @platform ios\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n\n /**\n * If you use Spotlight by Sentry during development, use\n * this option to forward captured Sentry events to Spotlight.\n *\n * Either set it to true, or provide a specific Spotlight Sidecar URL.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n */\n spotlight?: boolean | string;\n\n /**\n * Sets a callback which is executed before capturing screenshots. Only\n * relevant if `attachScreenshot` is set to true. When false is returned\n * from the function, no screenshot will be attached.\n */\n beforeScreenshot?: (event: Event, hint: EventHint) => boolean;\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 * Requires performance monitoring to be enabled.\n *\n * @default true\n */\n enableAppStartTracking?: boolean;\n\n /**\n * Track the slow and frozen frames in the application. Enabling this options will add\n * slow and frozen frames measurements to all created root spans (transactions).\n *\n * @default true\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 * @default true\n */\n enableStallTracking?: boolean;\n\n /**\n * Trace User Interaction events like touch and gestures.\n *\n * @default false\n */\n enableUserInteractionTracing?: boolean;\n\n /**\n * The sample rate for profiling\n * 1.0 will profile all transactions and 0 will profile none.\n */\n profilesSampleRate?: number;\n\n /**\n * The sample rate for session-long replays.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * The sample rate for sessions that has had an error occur.\n * This is independent of `sessionSampleRate`.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysOnErrorSampleRate?: number;\n\n /**\n * Controls how many milliseconds to wait before shutting down. The default is 2 seconds. Setting this too low can cause\n * problems for sending events from command line applications. Setting it too\n * high can cause the application to block for users with network connectivity\n * problems.\n */\n shutdownTimeout?: number;\n\n /**\n * Defines the quality of the session replay. The higher the quality, the more accurate the replay\n * will be, but also more data to transfer and more CPU load.\n *\n * @default 'medium'\n */\n replaysSessionQuality?: SentryReplayQuality;\n\n /**\n * Options which are in beta, or otherwise not guaranteed to be stable.\n */\n _experiments?: SharedExperimentsSubset & {\n [key: string]: unknown;\n\n /**\n * @deprecated Use `replaysSessionSampleRate` in the options root instead.\n *\n * This will be removed in the next major version.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * @deprecated Use `replaysOnErrorSampleRate` in the options root instead.\n *\n * This will be removed in the next major version.\n */\n replaysOnErrorSampleRate?: number;\n\n /**\n * Experiment: A more reliable way to report unhandled C++ exceptions in iOS.\n *\n * This approach hooks into all instances of the `__cxa_throw` function, which provides a more comprehensive and consistent exception handling across an app’s runtime, regardless of the number of C++ modules or how they’re linked. It helps in obtaining accurate stack traces.\n *\n * - Note: The mechanism of hooking into `__cxa_throw` could cause issues with symbolication on iOS due to caching of symbol references.\n *\n * @default false\n * @platform ios\n */\n enableUnhandledCPPExceptionsV2?: boolean;\n };\n\n /**\n * This options changes the placement of the attached stacktrace of `captureMessage` in the event.\n *\n * @default false\n * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.\n */\n useThreadsForMessageStack?: boolean;\n\n /**\n * If set to `true`, the SDK propagates the W3C `traceparent` header to any outgoing requests,\n * in addition to the `sentry-trace` and `baggage` headers. Use the {@link CoreOptions.tracePropagationTargets}\n * option to control to which outgoing requests the header will be attached.\n *\n * **Important:** If you set this option to `true`, make sure that you configured your servers'\n * CORS settings to allow the `traceparent` header. Otherwise, requests might get blocked.\n *\n * @see https://www.w3.org/TR/trace-context/\n *\n * @default false\n */\n propagateTraceparent?: boolean;\n}\n\nexport type SentryReplayQuality = 'low' | 'medium' | 'high';\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions\n extends Omit<Options<ReactNativeTransportOptions>, '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions\n extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel' | '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: Omit<ProfilerProps, 'updateProps' | 'children' | 'name'>;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n\n/**\n * If the user has not explicitly set `enableNativeNagger`\n * the function enables native nagging based on the current\n * environment.\n */\nexport function shouldEnableNativeNagger(userOptions: unknown): boolean {\n if (typeof userOptions === 'boolean') {\n // User can override the default behavior\n return userOptions;\n }\n\n if (Platform.OS === 'web' || Platform.OS === 'windows') {\n // We don't want to nag on known platforms that don't support native\n return false;\n }\n\n if (isExpoGo()) {\n // If the app is running in Expo Go, we don't want to nag\n return false;\n }\n\n return true;\n}\n"]}
@@ -1,5 +1,12 @@
1
1
  import type { Integration } from '@sentry/core';
2
2
  export declare const MOBILE_REPLAY_INTEGRATION_NAME = "MobileReplay";
3
+ /**
4
+ * Screenshot strategy type for Android Session Replay.
5
+ *
6
+ * - `'canvas'`: Canvas-based screenshot strategy. This strategy does **not** support any masking options, it always masks text and images. Use this if your application has strict PII requirements.
7
+ * - `'pixelCopy'`: Pixel copy screenshot strategy (default). Supports all masking options.
8
+ */
9
+ export type ScreenshotStrategy = 'canvas' | 'pixelCopy';
3
10
  export interface MobileReplayOptions {
4
11
  /**
5
12
  * Mask all text in recordings
@@ -29,6 +36,7 @@ export interface MobileReplayOptions {
29
36
  * - Experiment: This is an experimental feature and is therefore disabled by default.
30
37
  *
31
38
  * @deprecated Use `enableViewRendererV2` instead.
39
+ * @platform ios
32
40
  */
33
41
  enableExperimentalViewRenderer?: boolean;
34
42
  /**
@@ -42,6 +50,7 @@ export interface MobileReplayOptions {
42
50
  * Eventually, we will remove this feature flag and use the new view renderer by default.
43
51
  *
44
52
  * @default true
53
+ * @platform ios
45
54
  */
46
55
  enableViewRendererV2?: boolean;
47
56
  /**
@@ -54,8 +63,21 @@ export interface MobileReplayOptions {
54
63
  * - Experiment: This is an experimental feature and is therefore disabled by default.
55
64
  *
56
65
  * @default false
66
+ * @platform ios
57
67
  */
58
68
  enableFastViewRendering?: boolean;
69
+ /**
70
+ * Sets the screenshot strategy used by the Session Replay integration on Android.
71
+ *
72
+ * If your application has strict PII requirements we recommend using `'canvas'`.
73
+ * This strategy does **not** support any masking options, it always masks text and images.
74
+ *
75
+ * - Experiment: In case you are noticing issues with the canvas screenshot strategy, please report the issue on [GitHub](https://github.com/getsentry/sentry-java).
76
+ *
77
+ * @default 'pixelCopy'
78
+ * @platform android
79
+ */
80
+ screenshotStrategy?: ScreenshotStrategy;
59
81
  }
60
82
  type MobileReplayIntegration = Integration & {
61
83
  options: Required<MobileReplayOptions>;
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,WAAW,EAAE,MAAM,cAAc,CAAC;AAQvF,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;OASG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;;;;;;OAUG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAwBD,KAAK,uBAAuB,GAAG,WAAW,GAAG;IAC3C,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,mBAAmB,KAAoB,uBA2E3F,CAAC"}
1
+ {"version":3,"file":"mobilereplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,WAAW,EAAE,MAAM,cAAc,CAAC;AAQvF,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;OAUG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAyBD,KAAK,uBAAuB,GAAG,WAAW,GAAG;IAC3C,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,mBAAmB,KAAoB,uBA2E3F,CAAC"}
@@ -21,6 +21,7 @@ const defaultOptions = {
21
21
  enableExperimentalViewRenderer: false,
22
22
  enableViewRendererV2: true,
23
23
  enableFastViewRendering: false,
24
+ screenshotStrategy: 'pixelCopy',
24
25
  };
25
26
  function mergeOptions(initOptions) {
26
27
  const merged = Object.assign(Object.assign({}, defaultOptions), initOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,cAAc,CAAC;AAiE7D,MAAM,cAAc,GAAkC;IACpD,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,8BAA8B,EAAE,KAAK;IACrC,oBAAoB,EAAE,IAAI;IAC1B,uBAAuB,EAAE,KAAK;CAC/B,CAAC;AAEF,SAAS,YAAY,CAAC,WAAyC;IAC7D,MAAM,MAAM,mCACP,cAAc,GACd,WAAW,CACf,CAAC;IAEF,IAAI,WAAW,CAAC,oBAAoB,KAAK,SAAS,IAAI,WAAW,CAAC,8BAA8B,KAAK,SAAS,EAAE;QAC9G,MAAM,CAAC,oBAAoB,GAAG,WAAW,CAAC,8BAA8B,CAAC;KAC1E;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAOD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,cAAmC,cAAc,EAA2B,EAAE;IACpH,IAAI,QAAQ,EAAE,EAAE;QACd,KAAK,CAAC,IAAI,CACR,YAAY,8BAA8B,gFAAgF,CAC3H,CAAC;KACH;IACD,IAAI,WAAW,EAAE,EAAE;QACjB,KAAK,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;YAED,6GAA6G;YAC7G,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACpD,IAAI,eAAe,EAAE;gBACnB,GAAG,CAAC,SAAS,GAAG,eAAe,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;IACxE,CAAC;IAED,SAAS,WAAW;QAClB,OAAO,MAAM,CAAC,kBAAkB,EAAE,CAAC;IACrC,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,uCAAuC;KACjE,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n\n /**\n * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @deprecated Use `enableViewRendererV2` instead.\n */\n enableExperimentalViewRenderer?: boolean;\n\n /**\n * Enables up to 5x faster new view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag. [Our benchmarks](https://github.com/getsentry/sentry-cocoa/pull/4940) have shown a significant improvement of\n * **up to 4-5x faster rendering** (reducing `~160ms` to `~36ms` per frame) on older devices.\n *\n * - Experiment: In case you are noticing issues with the new view renderer, please report the issue on [GitHub](https://github.com/getsentry/sentry-cocoa).\n * Eventually, we will remove this feature flag and use the new view renderer by default.\n *\n * @default true\n */\n enableViewRendererV2?: boolean;\n\n /**\n * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n */\n enableFastViewRendering?: boolean;\n}\n\nconst defaultOptions: Required<MobileReplayOptions> = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n enableExperimentalViewRenderer: false,\n enableViewRendererV2: true,\n enableFastViewRendering: false,\n};\n\nfunction mergeOptions(initOptions: Partial<MobileReplayOptions>): Required<MobileReplayOptions> {\n const merged = {\n ...defaultOptions,\n ...initOptions,\n };\n\n if (initOptions.enableViewRendererV2 === undefined && initOptions.enableExperimentalViewRenderer !== undefined) {\n merged.enableViewRendererV2 = initOptions.enableExperimentalViewRenderer;\n }\n\n return merged;\n}\n\ntype MobileReplayIntegration = Integration & {\n options: Required<MobileReplayOptions>;\n getReplayId: () => string | null;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n debug.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n debug.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = mergeOptions(initOptions);\n\n async function processEvent(event: Event): Promise<Event> {\n const hasException = event.exception?.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (!replayId) {\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n } else {\n debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n }\n } else {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Captured recording replay ${replayId} for event ${event.event_id}.`,\n );\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // TODO: For better performance, we should emit replayId changes on native, and hold the replayId value in JS\n const currentReplayId = NATIVE.getCurrentReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n }\n\n function getReplayId(): string | null {\n return NATIVE.getCurrentReplayId();\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setup,\n processEvent,\n options: options,\n getReplayId: getReplayId,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n options: defaultOptions,\n getReplayId: () => null, // Mock implementation for noop version\n };\n};\n"]}
1
+ {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,cAAc,CAAC;AAyF7D,MAAM,cAAc,GAAkC;IACpD,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,8BAA8B,EAAE,KAAK;IACrC,oBAAoB,EAAE,IAAI;IAC1B,uBAAuB,EAAE,KAAK;IAC9B,kBAAkB,EAAE,WAAW;CAChC,CAAC;AAEF,SAAS,YAAY,CAAC,WAAyC;IAC7D,MAAM,MAAM,mCACP,cAAc,GACd,WAAW,CACf,CAAC;IAEF,IAAI,WAAW,CAAC,oBAAoB,KAAK,SAAS,IAAI,WAAW,CAAC,8BAA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aACF;iBAAM;gBACL,KAAK,CAAC,GAAG,CACP,YAAY,8BAA8B,8BAA8B,QAAQ,cAAc,KAAK,CAAC,QAAQ,GAAG,CAChH,CAAC;aACH;YAED,OAAO,KAAK,CAAC;;KACd;IAED,SAAS,KAAK,CAAC,MAAc;QAC3B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACrB,OAAO;SACR;QAED,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,GAA2B,EAAE,EAAE;YACrD,IAAI,GAAG,CAAC,SAAS,EAAE;gBACjB,OAAO;aACR;YAED,6GAA6G;YAC7G,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACpD,IAAI,eAAe,EAAE;gBACnB,GAAG,CAAC,SAAS,GAAG,eAAe,CAAC;aACjC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;IACxE,CAAC;IAED,SAAS,WAAW;QAClB,OAAO,MAAM,CAAC,kBAAkB,EAAE,CAAC;IACrC,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,uCAAuC;KACjE,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, Event, Integration } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\n/**\n * Screenshot strategy type for Android Session Replay.\n *\n * - `'canvas'`: Canvas-based screenshot strategy. This strategy does **not** support any masking options, it always masks text and images. Use this if your application has strict PII requirements.\n * - `'pixelCopy'`: Pixel copy screenshot strategy (default). Supports all masking options.\n */\nexport type ScreenshotStrategy = 'canvas' | 'pixelCopy';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n\n /**\n * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @deprecated Use `enableViewRendererV2` instead.\n * @platform ios\n */\n enableExperimentalViewRenderer?: boolean;\n\n /**\n * Enables up to 5x faster new view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag. [Our benchmarks](https://github.com/getsentry/sentry-cocoa/pull/4940) have shown a significant improvement of\n * **up to 4-5x faster rendering** (reducing `~160ms` to `~36ms` per frame) on older devices.\n *\n * - Experiment: In case you are noticing issues with the new view renderer, please report the issue on [GitHub](https://github.com/getsentry/sentry-cocoa).\n * Eventually, we will remove this feature flag and use the new view renderer by default.\n *\n * @default true\n * @platform ios\n */\n enableViewRendererV2?: boolean;\n\n /**\n * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n * @platform ios\n */\n enableFastViewRendering?: boolean;\n\n /**\n * Sets the screenshot strategy used by the Session Replay integration on Android.\n *\n * If your application has strict PII requirements we recommend using `'canvas'`.\n * This strategy does **not** support any masking options, it always masks text and images.\n *\n * - Experiment: In case you are noticing issues with the canvas screenshot strategy, please report the issue on [GitHub](https://github.com/getsentry/sentry-java).\n *\n * @default 'pixelCopy'\n * @platform android\n */\n screenshotStrategy?: ScreenshotStrategy;\n}\n\nconst defaultOptions: Required<MobileReplayOptions> = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n enableExperimentalViewRenderer: false,\n enableViewRendererV2: true,\n enableFastViewRendering: false,\n screenshotStrategy: 'pixelCopy',\n};\n\nfunction mergeOptions(initOptions: Partial<MobileReplayOptions>): Required<MobileReplayOptions> {\n const merged = {\n ...defaultOptions,\n ...initOptions,\n };\n\n if (initOptions.enableViewRendererV2 === undefined && initOptions.enableExperimentalViewRenderer !== undefined) {\n merged.enableViewRendererV2 = initOptions.enableExperimentalViewRenderer;\n }\n\n return merged;\n}\n\ntype MobileReplayIntegration = Integration & {\n options: Required<MobileReplayOptions>;\n getReplayId: () => string | null;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n debug.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n debug.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = mergeOptions(initOptions);\n\n async function processEvent(event: Event): Promise<Event> {\n const hasException = event.exception?.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (!replayId) {\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n } else {\n debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n }\n } else {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Captured recording replay ${replayId} for event ${event.event_id}.`,\n );\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // TODO: For better performance, we should emit replayId changes on native, and hold the replayId value in JS\n const currentReplayId = NATIVE.getCurrentReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n }\n\n function getReplayId(): string | null {\n return NATIVE.getCurrentReplayId();\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setup,\n processEvent,\n options: options,\n getReplayId: getReplayId,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n options: defaultOptions,\n getReplayId: () => null, // Mock implementation for noop version\n };\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react-native" />
2
- /// <reference types="react" />
3
2
  /** Convert a Content-Length header to number/undefined. */
4
3
  export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
5
4
  export type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":";;AAEA,2DAA2D;AAC3D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtG,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAiCjE"}
1
+ {"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":";AAEA,2DAA2D;AAC3D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtG,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAiCjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/js/sdk.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA2C,KAAK,EAAE,MAAM,cAAc,CAAC;AAanF,OAAO,KAAK,KAAK,MAA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AE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACrC,OAAO,CAAC,EAAE,yBAAyB,GAClC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAsBxB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;GAGG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAe9C;AAED;;GAEG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAU3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAUzE;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAE9D"}
package/dist/js/sdk.js CHANGED
@@ -40,6 +40,7 @@ const DEFAULT_OPTIONS = {
40
40
  enableNativeFramesTracking: true,
41
41
  enableStallTracking: true,
42
42
  enableUserInteractionTracing: false,
43
+ propagateTraceparent: false,
43
44
  };
44
45
  /**
45
46
  * Inits the SDK and returns the final options.
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/js/sdk.tsx"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EACL,KAAK,EACL,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,iCAAiC,EACjC,SAAS,IAAI,aAAa,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,YAAY,E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AA6B;IACxD,MAAM,YAAY,GAAG,CAAC,KAAY,EAAiB,EAAE;QACnD,IAAI;YACF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxB;QAAC,OAAO,CAAC,EAAE;YACV,KAAK,CAAC,KAAK,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC;YACzD,OAAO,SAAS,CAAC;SAClB;IACH,CAAC,CAAC;IACF,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAgB,cAAc;;QAClC,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;CAAA","sourcesContent":["/* eslint-disable complexity */\nimport type { Breadcrumb, BreadcrumbHint, Integration, Scope } from '@sentry/core';\nimport {\n debug,\n getClient,\n getGlobalScope,\n getIntegrationsToSetup,\n getIsolationScope,\n initAndBind,\n makeDsn,\n stackParserFromStackParserOptions,\n withScope as coreWithScope,\n} from '@sentry/core';\nimport { defaultStackParser, makeFetchTransport, Profiler } from '@sentry/react';\nimport * as React from 'react';\nimport { ReactNativeClient } from './client';\nimport { FeedbackWidgetProvider } from './feedback/FeedbackWidgetProvider';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { getDefaultIntegrations } from './integrations/default';\nimport type { ReactNativeClientOptions, ReactNativeOptions, ReactNativeWrapperOptions } from './options';\nimport { shouldEnableNativeNagger } from './options';\nimport { enableSyncToNative } from './scopeSync';\nimport { TouchEventBoundary } from './touchevents';\nimport { ReactNativeProfiler } from './tracing';\nimport { useEncodePolyfill } from './transports/encodePolyfill';\nimport { DEFAULT_BUFFER_SIZE, makeNativeTransportFactory } from './transports/native';\nimport { getDefaultEnvironment, isExpoGo, isRunningInMetroDevServer, isWeb } from './utils/environment';\nimport { getDefaultRelease } from './utils/release';\nimport { safeFactory, safeTracesSampler } from './utils/safe';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_OPTIONS: ReactNativeOptions = {\n enableNativeCrashHandling: true,\n enableNativeNagger: true,\n autoInitializeNativeSdk: true,\n enableAutoPerformanceTracing: true,\n enableWatchdogTerminationTracking: true,\n patchGlobalPromise: true,\n sendClientReports: true,\n maxQueueSize: DEFAULT_BUFFER_SIZE,\n attachStacktrace: true,\n enableCaptureFailedRequests: false,\n enableNdk: true,\n enableAppStartTracking: true,\n enableNativeFramesTracking: true,\n enableStallTracking: true,\n enableUserInteractionTracing: false,\n};\n\n/**\n * Inits the SDK and returns the final options.\n */\nexport function init(passedOptions: ReactNativeOptions): void {\n if (isRunningInMetroDevServer()) {\n return;\n }\n\n const maxQueueSize = passedOptions.maxQueueSize\n // eslint-disable-next-line deprecation/deprecation\n ?? passedOptions.transportOptions?.bufferSize\n ?? DEFAULT_OPTIONS.maxQueueSize;\n\n const enableNative = passedOptions.enableNative === undefined || passedOptions.enableNative\n ? NATIVE.isNativeAvailable()\n : false;\n\n useEncodePolyfill();\n if (enableNative) {\n enableSyncToNative(getGlobalScope());\n enableSyncToNative(getIsolationScope());\n }\n\n const getURLFromDSN = (dsn: string | undefined): string | undefined => {\n if (!dsn) {\n return undefined;\n }\n const dsnComponents = makeDsn(dsn);\n if (!dsnComponents) {\n debug.error('Failed to extract url from DSN: ', dsn);\n return undefined;\n }\n const port = dsnComponents.port ? `:${dsnComponents.port}` : '';\n return `${dsnComponents.protocol}://${dsnComponents.host}${port}`;\n };\n\n const userBeforeBreadcrumb = safeFactory(passedOptions.beforeBreadcrumb, { loggerMessage: 'The beforeBreadcrumb threw an error' });\n\n // Exclude Dev Server and Sentry Dsn request from Breadcrumbs\n const devServerUrl = getDevServer()?.url;\n const dsn = getURLFromDSN(passedOptions.dsn);\n const defaultBeforeBreadcrumb = (breadcrumb: Breadcrumb, _hint?: BreadcrumbHint): Breadcrumb | null => {\n const type = breadcrumb.type || '';\n const url = typeof breadcrumb.data?.url === 'string' ? breadcrumb.data.url : '';\n if (type === 'http' && ((devServerUrl && url.startsWith(devServerUrl)) || (dsn && url.startsWith(dsn)))) {\n return null;\n }\n return breadcrumb;\n };\n\n const chainedBeforeBreadcrumb = (breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null => {\n let modifiedBreadcrumb = breadcrumb;\n if (userBeforeBreadcrumb) {\n const result = userBeforeBreadcrumb(breadcrumb, hint);\n if (result === null) {\n return null;\n }\n modifiedBreadcrumb = result;\n }\n return defaultBeforeBreadcrumb(modifiedBreadcrumb, hint);\n };\n\n const options: ReactNativeClientOptions = {\n ...DEFAULT_OPTIONS,\n ...passedOptions,\n release: passedOptions.release ?? getDefaultRelease(),\n enableNative,\n enableNativeNagger: shouldEnableNativeNagger(passedOptions.enableNativeNagger),\n // If custom transport factory fails the SDK won't initialize\n transport: passedOptions.transport\n || makeNativeTransportFactory({\n enableNative,\n })\n || makeFetchTransport,\n transportOptions: {\n ...DEFAULT_OPTIONS.transportOptions,\n ...(passedOptions.transportOptions ?? {}),\n bufferSize: maxQueueSize,\n },\n maxQueueSize,\n integrations: [],\n stackParser: stackParserFromStackParserOptions(passedOptions.stackParser || defaultStackParser),\n beforeBreadcrumb: chainedBeforeBreadcrumb,\n initialScope: safeFactory(passedOptions.initialScope, { loggerMessage: 'The initialScope threw an error' }),\n };\n if ('tracesSampler' in options) {\n options.tracesSampler = safeTracesSampler(options.tracesSampler);\n }\n\n if (!('environment' in options)) {\n options.environment = getDefaultEnvironment();\n }\n\n const defaultIntegrations: false | Integration[] = passedOptions.defaultIntegrations === undefined\n ? getDefaultIntegrations(options)\n : passedOptions.defaultIntegrations;\n\n options.integrations = getIntegrationsToSetup({\n integrations: safeFactory(passedOptions.integrations, { loggerMessage: 'The integrations threw an error' }),\n defaultIntegrations,\n });\n initAndBind(ReactNativeClient, options);\n\n if (isExpoGo()) {\n debug.log('Offline caching, native errors features are not available in Expo Go.');\n debug.log('Use EAS Build / Native Release Build to test these features.');\n }\n}\n\n/**\n * Inits the Sentry React Native SDK with automatic instrumentation and wrapped features.\n */\nexport function wrap<P extends Record<string, unknown>>(\n RootComponent: React.ComponentType<P>,\n options?: ReactNativeWrapperOptions\n): React.ComponentType<P> {\n const profilerProps = {\n ...(options?.profilerProps),\n name: RootComponent.displayName ?? 'Root',\n updateProps: {}\n };\n\n const ProfilerComponent = isWeb() ? Profiler : ReactNativeProfiler;\n\n const RootApp: React.FC<P> = appProps => {\n return (\n <TouchEventBoundary {...(options?.touchEventBoundaryProps ?? {})}>\n <ProfilerComponent {...profilerProps}>\n <FeedbackWidgetProvider>\n <RootComponent {...appProps} />\n </FeedbackWidgetProvider>\n </ProfilerComponent>\n </TouchEventBoundary>\n );\n };\n\n return RootApp;\n}\n\n/**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\nexport function nativeCrash(): void {\n NATIVE.nativeCrash();\n}\n\n/**\n * Flushes all pending events in the queue to disk.\n * Use this before applying any realtime updates such as code-push or expo updates.\n */\nexport async function flush(): Promise<boolean> {\n try {\n const client = getClient();\n\n if (client) {\n const result = await client.flush();\n\n return result;\n }\n // eslint-disable-next-line no-empty\n } catch (_) { }\n\n debug.error('Failed to flush the event queue.');\n\n return false;\n}\n\n/**\n * Closes the SDK, stops sending events.\n */\nexport async function close(): Promise<void> {\n try {\n const client = getClient();\n\n if (client) {\n await client.close();\n }\n } catch (e) {\n debug.error('Failed to close the SDK');\n }\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope<T>(callback: (scope: Scope) => T): T | undefined {\n const safeCallback = (scope: Scope): T | undefined => {\n try {\n return callback(scope);\n } catch (e) {\n debug.error('Error while running withScope callback', e);\n return undefined;\n }\n };\n return coreWithScope(safeCallback);\n}\n\n/**\n * Returns if the app crashed in the last run.\n */\nexport async function crashedLastRun(): Promise<boolean | null> {\n return NATIVE.crashedLastRun();\n}\n"]}
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":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O,MAAM,CAAC;aACf;YACD,oCAAoC;SACrC;QAAC,OAAO,CAAC,EAAE,GAAG;QAEf,KAAK,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAEhD,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAED;;GAEG;AACH,MAAM,UAAgB,KAAK;;QACzB,IAAI;YACF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAE3B,IAAI,MAAM,EAAE;gBACV,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;aACtB;SACF;QAAC,OAAO,CAAC,EAAE;YACV,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;SACxC;IACH,CAAC;CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAI,QAA6B;IACxD,MAAM,YAAY,GAAG,CAAC,KAAY,EAAiB,EAAE;QACnD,IAAI;YACF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxB;QAAC,OAAO,CAAC,EAAE;YACV,KAAK,CAAC,KAAK,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC;YACzD,OAAO,SAAS,CAAC;SAClB;IACH,CAAC,CAAC;IACF,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAgB,cAAc;;QAClC,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;CAAA","sourcesContent":["/* eslint-disable complexity */\nimport type { Breadcrumb, BreadcrumbHint, Integration, Scope } from '@sentry/core';\nimport {\n debug,\n getClient,\n getGlobalScope,\n getIntegrationsToSetup,\n getIsolationScope,\n initAndBind,\n makeDsn,\n stackParserFromStackParserOptions,\n withScope as coreWithScope,\n} from '@sentry/core';\nimport { defaultStackParser, makeFetchTransport, Profiler } from '@sentry/react';\nimport * as React from 'react';\nimport { ReactNativeClient } from './client';\nimport { FeedbackWidgetProvider } from './feedback/FeedbackWidgetProvider';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { getDefaultIntegrations } from './integrations/default';\nimport type { ReactNativeClientOptions, ReactNativeOptions, ReactNativeWrapperOptions } from './options';\nimport { shouldEnableNativeNagger } from './options';\nimport { enableSyncToNative } from './scopeSync';\nimport { TouchEventBoundary } from './touchevents';\nimport { ReactNativeProfiler } from './tracing';\nimport { useEncodePolyfill } from './transports/encodePolyfill';\nimport { DEFAULT_BUFFER_SIZE, makeNativeTransportFactory } from './transports/native';\nimport { getDefaultEnvironment, isExpoGo, isRunningInMetroDevServer, isWeb } from './utils/environment';\nimport { getDefaultRelease } from './utils/release';\nimport { safeFactory, safeTracesSampler } from './utils/safe';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_OPTIONS: ReactNativeOptions = {\n enableNativeCrashHandling: true,\n enableNativeNagger: true,\n autoInitializeNativeSdk: true,\n enableAutoPerformanceTracing: true,\n enableWatchdogTerminationTracking: true,\n patchGlobalPromise: true,\n sendClientReports: true,\n maxQueueSize: DEFAULT_BUFFER_SIZE,\n attachStacktrace: true,\n enableCaptureFailedRequests: false,\n enableNdk: true,\n enableAppStartTracking: true,\n enableNativeFramesTracking: true,\n enableStallTracking: true,\n enableUserInteractionTracing: false,\n propagateTraceparent: false,\n};\n\n/**\n * Inits the SDK and returns the final options.\n */\nexport function init(passedOptions: ReactNativeOptions): void {\n if (isRunningInMetroDevServer()) {\n return;\n }\n\n const maxQueueSize = passedOptions.maxQueueSize\n // eslint-disable-next-line deprecation/deprecation\n ?? passedOptions.transportOptions?.bufferSize\n ?? DEFAULT_OPTIONS.maxQueueSize;\n\n const enableNative = passedOptions.enableNative === undefined || passedOptions.enableNative\n ? NATIVE.isNativeAvailable()\n : false;\n\n useEncodePolyfill();\n if (enableNative) {\n enableSyncToNative(getGlobalScope());\n enableSyncToNative(getIsolationScope());\n }\n\n const getURLFromDSN = (dsn: string | undefined): string | undefined => {\n if (!dsn) {\n return undefined;\n }\n const dsnComponents = makeDsn(dsn);\n if (!dsnComponents) {\n debug.error('Failed to extract url from DSN: ', dsn);\n return undefined;\n }\n const port = dsnComponents.port ? `:${dsnComponents.port}` : '';\n return `${dsnComponents.protocol}://${dsnComponents.host}${port}`;\n };\n\n const userBeforeBreadcrumb = safeFactory(passedOptions.beforeBreadcrumb, { loggerMessage: 'The beforeBreadcrumb threw an error' });\n\n // Exclude Dev Server and Sentry Dsn request from Breadcrumbs\n const devServerUrl = getDevServer()?.url;\n const dsn = getURLFromDSN(passedOptions.dsn);\n const defaultBeforeBreadcrumb = (breadcrumb: Breadcrumb, _hint?: BreadcrumbHint): Breadcrumb | null => {\n const type = breadcrumb.type || '';\n const url = typeof breadcrumb.data?.url === 'string' ? breadcrumb.data.url : '';\n if (type === 'http' && ((devServerUrl && url.startsWith(devServerUrl)) || (dsn && url.startsWith(dsn)))) {\n return null;\n }\n return breadcrumb;\n };\n\n const chainedBeforeBreadcrumb = (breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null => {\n let modifiedBreadcrumb = breadcrumb;\n if (userBeforeBreadcrumb) {\n const result = userBeforeBreadcrumb(breadcrumb, hint);\n if (result === null) {\n return null;\n }\n modifiedBreadcrumb = result;\n }\n return defaultBeforeBreadcrumb(modifiedBreadcrumb, hint);\n };\n\n const options: ReactNativeClientOptions = {\n ...DEFAULT_OPTIONS,\n ...passedOptions,\n release: passedOptions.release ?? getDefaultRelease(),\n enableNative,\n enableNativeNagger: shouldEnableNativeNagger(passedOptions.enableNativeNagger),\n // If custom transport factory fails the SDK won't initialize\n transport: passedOptions.transport\n || makeNativeTransportFactory({\n enableNative,\n })\n || makeFetchTransport,\n transportOptions: {\n ...DEFAULT_OPTIONS.transportOptions,\n ...(passedOptions.transportOptions ?? {}),\n bufferSize: maxQueueSize,\n },\n maxQueueSize,\n integrations: [],\n stackParser: stackParserFromStackParserOptions(passedOptions.stackParser || defaultStackParser),\n beforeBreadcrumb: chainedBeforeBreadcrumb,\n initialScope: safeFactory(passedOptions.initialScope, { loggerMessage: 'The initialScope threw an error' }),\n };\n if ('tracesSampler' in options) {\n options.tracesSampler = safeTracesSampler(options.tracesSampler);\n }\n\n if (!('environment' in options)) {\n options.environment = getDefaultEnvironment();\n }\n\n const defaultIntegrations: false | Integration[] = passedOptions.defaultIntegrations === undefined\n ? getDefaultIntegrations(options)\n : passedOptions.defaultIntegrations;\n\n options.integrations = getIntegrationsToSetup({\n integrations: safeFactory(passedOptions.integrations, { loggerMessage: 'The integrations threw an error' }),\n defaultIntegrations,\n });\n initAndBind(ReactNativeClient, options);\n\n if (isExpoGo()) {\n debug.log('Offline caching, native errors features are not available in Expo Go.');\n debug.log('Use EAS Build / Native Release Build to test these features.');\n }\n}\n\n/**\n * Inits the Sentry React Native SDK with automatic instrumentation and wrapped features.\n */\nexport function wrap<P extends Record<string, unknown>>(\n RootComponent: React.ComponentType<P>,\n options?: ReactNativeWrapperOptions\n): React.ComponentType<P> {\n const profilerProps = {\n ...(options?.profilerProps),\n name: RootComponent.displayName ?? 'Root',\n updateProps: {}\n };\n\n const ProfilerComponent = isWeb() ? Profiler : ReactNativeProfiler;\n\n const RootApp: React.FC<P> = appProps => {\n return (\n <TouchEventBoundary {...(options?.touchEventBoundaryProps ?? {})}>\n <ProfilerComponent {...profilerProps}>\n <FeedbackWidgetProvider>\n <RootComponent {...appProps} />\n </FeedbackWidgetProvider>\n </ProfilerComponent>\n </TouchEventBoundary>\n );\n };\n\n return RootApp;\n}\n\n/**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\nexport function nativeCrash(): void {\n NATIVE.nativeCrash();\n}\n\n/**\n * Flushes all pending events in the queue to disk.\n * Use this before applying any realtime updates such as code-push or expo updates.\n */\nexport async function flush(): Promise<boolean> {\n try {\n const client = getClient();\n\n if (client) {\n const result = await client.flush();\n\n return result;\n }\n // eslint-disable-next-line no-empty\n } catch (_) { }\n\n debug.error('Failed to flush the event queue.');\n\n return false;\n}\n\n/**\n * Closes the SDK, stops sending events.\n */\nexport async function close(): Promise<void> {\n try {\n const client = getClient();\n\n if (client) {\n await client.close();\n }\n } catch (e) {\n debug.error('Failed to close the SDK');\n }\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope<T>(callback: (scope: Scope) => T): T | undefined {\n const safeCallback = (scope: Scope): T | undefined => {\n try {\n return callback(scope);\n } catch (e) {\n debug.error('Error while running withScope callback', e);\n return undefined;\n }\n };\n return coreWithScope(safeCallback);\n}\n\n/**\n * Returns if the app crashed in the last run.\n */\nexport async function crashedLastRun(): Promise<boolean | null> {\n return NATIVE.crashedLastRun();\n}\n"]}
@@ -92,7 +92,7 @@ Please check the version of Metro you are using and report the issue at http://w
92
92
  // Always generate source maps, can't use Sentry without source maps
93
93
  const map = sourceMapStringFunction([...preModules, ...(0, exports.getSortedModules)(graph, options)], {
94
94
  processModuleFilter: options.processModuleFilter,
95
- shouldAddToIgnoreList: options.shouldAddToIgnoreList,
95
+ shouldAddToIgnoreList: options.shouldAddToIgnoreList || (() => false),
96
96
  });
97
97
  return { code, map };
98
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/js/tools/vendor/metro/utils.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;;AAiC3C,IAAI,kBAAuB,CAAC;AAC5B,IAAI;IACF,kBAAkB,GAAG,OAAO,CAAC,qDAAqD,CAAC,CAAC;CACrF;AAAC,WAAM;IACN,kBAAkB,GAAG,OAAO,CAAC,iDAAiD,CAAC,CAAC;CACjF;AAED,MAAM,YAAY,GAChB,OAAO,kBAAkB,KAAK,UAAU;IACtC,CAAC,CAAC,kBAAkB;IACpB,CAAC,CAAC,sEAAsE;QACtE,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,YAAY,mCAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAA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ified from @facebook/metro\n\n// https://github.com/facebook/metro/commit/9b85f83c9cc837d8cd897aa7723be7da5b296067\n\n// 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// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { MixedOutput, Module, ReadOnlyGraph } from 'metro';\nimport type * as baseJSBundleType from 'metro/private/DeltaBundler/Serializers/baseJSBundle';\nimport type * as sourceMapStringType from 'metro/private/DeltaBundler/Serializers/sourceMapString';\nimport type * as bundleToStringType from 'metro/private/lib/bundleToString';\nimport type { MetroSerializer } from '../../utils';\n\nlet baseJSBundleModule: any;\ntry {\n baseJSBundleModule = require('metro/private/DeltaBundler/Serializers/baseJSBundle');\n} catch {\n baseJSBundleModule = require('metro/src/DeltaBundler/Serializers/baseJSBundle');\n}\n\nconst baseJSBundle: typeof baseJSBundleType =\n typeof baseJSBundleModule === 'function'\n ? baseJSBundleModule\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n baseJSBundleModule?.baseJSBundle ?? baseJSBundleModule?.default;\n\nlet sourceMapString: typeof sourceMapStringType;\ntry {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const sourceMapStringModule = require('metro/private/DeltaBundler/Serializers/sourceMapString');\n sourceMapString = (sourceMapStringModule as { sourceMapString: typeof sourceMapStringType }).sourceMapString;\n} catch (e) {\n sourceMapString = require('metro/src/DeltaBundler/Serializers/sourceMapString');\n if ('sourceMapString' in sourceMapString) {\n // Changed to named export in https://github.com/facebook/metro/commit/34148e61200a508923315fbe387b26d1da27bf4b\n // Metro 0.81.0 and 0.80.10 patch\n sourceMapString = (sourceMapString as { sourceMapString: typeof sourceMapStringType }).sourceMapString;\n }\n}\n\nlet bundleToStringModule: any;\ntry {\n bundleToStringModule = require('metro/private/lib/bundleToString');\n} catch {\n bundleToStringModule = require('metro/src/lib/bundleToString');\n}\n\nconst bundleToString: typeof bundleToStringType =\n typeof bundleToStringModule === 'function'\n ? bundleToStringModule\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n bundleToStringModule?.bundleToString ?? bundleToStringModule?.default;\n\ntype NewSourceMapStringExport = {\n // Since Metro v0.80.10 https://github.com/facebook/metro/compare/v0.80.9...v0.80.10#diff-1b836d1729e527a725305eef0cec22e44605af2700fa413f4c2489ea1a03aebcL28\n sourceMapString: typeof sourceMapString;\n};\n\n/**\n * This function ensures that modules in source maps are sorted in the same\n * order as in a plain JS bundle.\n *\n * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L984\n */\nexport const getSortedModules = (\n graph: ReadOnlyGraph,\n {\n createModuleId,\n }: {\n createModuleId: (file: string) => number;\n },\n): readonly Module[] => {\n const modules = [...graph.dependencies.values()];\n // Sort by IDs\n return modules.sort(\n (a: Module<MixedOutput>, b: Module<MixedOutput>) => createModuleId(a.path) - createModuleId(b.path),\n );\n};\n\n/**\n * Creates the default Metro plain bundle serializer.\n * Because Metro exports only the intermediate serializer functions, we need to\n * assemble the final serializer ourselves. We have to work with the modules the same as Metro does\n * to avoid unexpected changes in the final bundle.\n *\n * This is used when the user does not provide a custom serializer.\n *\n * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L244-L277\n */\nexport const createDefaultMetroSerializer = (): MetroSerializer => {\n return (entryPoint, preModules, graph, options) => {\n // baseJSBundle assigns IDs to modules in a consistent order\n let bundle = baseJSBundle(entryPoint, preModules, graph, options);\n if (options.sentryBundleCallback && !graph.transformOptions.hot) {\n bundle = options.sentryBundleCallback(bundle);\n }\n const { code } = bundleToString(bundle);\n if (graph.transformOptions.hot) {\n // Hot means running in dev server, sourcemaps are generated on demand\n return code;\n }\n\n let sourceMapStringFunction: typeof sourceMapString | undefined;\n if (typeof sourceMapString === 'function') {\n sourceMapStringFunction = sourceMapString;\n } else if (\n typeof sourceMapString === 'object' &&\n sourceMapString != null &&\n 'sourceMapString' in sourceMapString &&\n typeof sourceMapString['sourceMapString'] === 'function'\n ) {\n sourceMapStringFunction = (sourceMapString as NewSourceMapStringExport).sourceMapString;\n } else {\n throw new Error(`\n[@sentry/react-native/metro] Cannot find sourceMapString function in 'metro/src/DeltaBundler/Serializers/sourceMapString'.\nPlease check the version of Metro you are using and report the issue at http://www.github.com/getsentry/sentry-react-native/issues\n`);\n }\n\n // Always generate source maps, can't use Sentry without source maps\n const map = sourceMapStringFunction([...preModules, ...getSortedModules(graph, options)], {\n processModuleFilter: options.processModuleFilter,\n shouldAddToIgnoreList: options.shouldAddToIgnoreList,\n });\n return { code, map };\n };\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/js/tools/vendor/metro/utils.ts"],"names":[],"mappings":";AAAA,2CAA2C;;;;AAiC3C,IAAI,kBAAuB,CAAC;AAC5B,IAAI;IACF,kBAAkB,GAAG,OAAO,CAAC,qDAAqD,CAAC,CAAC;CACrF;AAAC,WAAM;IACN,kBAAkB,GAAG,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,CAAC,CAAC,EAAE;YACxF,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;SACtE,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,4BAA4B,gCAqCvC","sourcesContent":["// Vendored / modified from @facebook/metro\n\n// https://github.com/facebook/metro/commit/9b85f83c9cc837d8cd897aa7723be7da5b296067\n\n// 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// eslint-disable-next-line import/no-extraneous-dependencies\nimport type { MixedOutput, Module, ReadOnlyGraph } from 'metro';\nimport type * as baseJSBundleType from 'metro/private/DeltaBundler/Serializers/baseJSBundle';\nimport type * as sourceMapStringType from 'metro/private/DeltaBundler/Serializers/sourceMapString';\nimport type * as bundleToStringType from 'metro/private/lib/bundleToString';\nimport type { MetroSerializer } from '../../utils';\n\nlet baseJSBundleModule: any;\ntry {\n baseJSBundleModule = require('metro/private/DeltaBundler/Serializers/baseJSBundle');\n} catch {\n baseJSBundleModule = require('metro/src/DeltaBundler/Serializers/baseJSBundle');\n}\n\nconst baseJSBundle: typeof baseJSBundleType =\n typeof baseJSBundleModule === 'function'\n ? baseJSBundleModule\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n baseJSBundleModule?.baseJSBundle ?? baseJSBundleModule?.default;\n\nlet sourceMapString: typeof sourceMapStringType;\ntry {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const sourceMapStringModule = require('metro/private/DeltaBundler/Serializers/sourceMapString');\n sourceMapString = (sourceMapStringModule as { sourceMapString: typeof sourceMapStringType }).sourceMapString;\n} catch (e) {\n sourceMapString = require('metro/src/DeltaBundler/Serializers/sourceMapString');\n if ('sourceMapString' in sourceMapString) {\n // Changed to named export in https://github.com/facebook/metro/commit/34148e61200a508923315fbe387b26d1da27bf4b\n // Metro 0.81.0 and 0.80.10 patch\n sourceMapString = (sourceMapString as { sourceMapString: typeof sourceMapStringType }).sourceMapString;\n }\n}\n\nlet bundleToStringModule: any;\ntry {\n bundleToStringModule = require('metro/private/lib/bundleToString');\n} catch {\n bundleToStringModule = require('metro/src/lib/bundleToString');\n}\n\nconst bundleToString: typeof bundleToStringType =\n typeof bundleToStringModule === 'function'\n ? bundleToStringModule\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n bundleToStringModule?.bundleToString ?? bundleToStringModule?.default;\n\ntype NewSourceMapStringExport = {\n // Since Metro v0.80.10 https://github.com/facebook/metro/compare/v0.80.9...v0.80.10#diff-1b836d1729e527a725305eef0cec22e44605af2700fa413f4c2489ea1a03aebcL28\n sourceMapString: typeof sourceMapString;\n};\n\n/**\n * This function ensures that modules in source maps are sorted in the same\n * order as in a plain JS bundle.\n *\n * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L984\n */\nexport const getSortedModules = (\n graph: ReadOnlyGraph,\n {\n createModuleId,\n }: {\n createModuleId: (file: string) => number;\n },\n): readonly Module[] => {\n const modules = [...graph.dependencies.values()];\n // Sort by IDs\n return modules.sort(\n (a: Module<MixedOutput>, b: Module<MixedOutput>) => createModuleId(a.path) - createModuleId(b.path),\n );\n};\n\n/**\n * Creates the default Metro plain bundle serializer.\n * Because Metro exports only the intermediate serializer functions, we need to\n * assemble the final serializer ourselves. We have to work with the modules the same as Metro does\n * to avoid unexpected changes in the final bundle.\n *\n * This is used when the user does not provide a custom serializer.\n *\n * https://github.com/facebook/metro/blob/9b85f83c9cc837d8cd897aa7723be7da5b296067/packages/metro/src/Server.js#L244-L277\n */\nexport const createDefaultMetroSerializer = (): MetroSerializer => {\n return (entryPoint, preModules, graph, options) => {\n // baseJSBundle assigns IDs to modules in a consistent order\n let bundle = baseJSBundle(entryPoint, preModules, graph, options);\n if (options.sentryBundleCallback && !graph.transformOptions.hot) {\n bundle = options.sentryBundleCallback(bundle);\n }\n const { code } = bundleToString(bundle);\n if (graph.transformOptions.hot) {\n // Hot means running in dev server, sourcemaps are generated on demand\n return code;\n }\n\n let sourceMapStringFunction: typeof sourceMapString | undefined;\n if (typeof sourceMapString === 'function') {\n sourceMapStringFunction = sourceMapString;\n } else if (\n typeof sourceMapString === 'object' &&\n sourceMapString != null &&\n 'sourceMapString' in sourceMapString &&\n typeof sourceMapString['sourceMapString'] === 'function'\n ) {\n sourceMapStringFunction = (sourceMapString as NewSourceMapStringExport).sourceMapString;\n } else {\n throw new Error(`\n[@sentry/react-native/metro] Cannot find sourceMapString function in 'metro/src/DeltaBundler/Serializers/sourceMapString'.\nPlease check the version of Metro you are using and report the issue at http://www.github.com/getsentry/sentry-react-native/issues\n`);\n }\n\n // Always generate source maps, can't use Sentry without source maps\n const map = sourceMapStringFunction([...preModules, ...getSortedModules(graph, options)], {\n processModuleFilter: options.processModuleFilter,\n shouldAddToIgnoreList: options.shouldAddToIgnoreList || (() => false),\n });\n return { code, map };\n };\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface RNSentryOnDrawNextFrameEvent {
3
2
  newFrameTimestampInSeconds: number;
4
3
  type: 'initialDisplay' | 'fullDisplay';
@@ -1 +1 @@
1
- {"version":3,"file":"timetodisplaynative.types.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,4BAA4B;IAC3C,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"timetodisplaynative.types.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/timetodisplaynative.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,0BAA0B,EAAE,MAAM,CAAC;IACnC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAAC;CACxC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type StackFrame = {
3
2
  column?: number;
4
3
  file?: string;
@@ -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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SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "7.3.0";
3
+ export declare const SDK_VERSION = "7.5.0";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -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 = '7.3.0';
3
+ export const SDK_VERSION = '7.5.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,OAAO,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '7.3.0';\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,OAAO,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '7.5.0';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/js/wrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,SAAS,EACT,aAAa,EACb,IAAI,EACL,MAAM,cAAc,CA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BAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAE5E"}
@@ -269,14 +269,13 @@ export const NATIVE = {
269
269
  let userKeys = null;
270
270
  let userDataKeys = null;
271
271
  if (user) {
272
- const { id, ip_address, email, username, segment } = user, otherKeys = __rest(user, ["id", "ip_address", "email", "username", "segment"]);
273
- // TODO: Update native impl to use geo
272
+ const { id, ip_address, email, username, geo } = user, otherKeys = __rest(user, ["id", "ip_address", "email", "username", "geo"]);
274
273
  const requiredUser = {
275
274
  id,
276
275
  ip_address,
277
276
  email,
278
277
  username,
279
- segment,
278
+ geo,
280
279
  };
281
280
  userKeys = this._serializeObject(requiredUser);
282
281
  userDataKeys = this._serializeObject(otherKeys);