@sentry/react-native 7.2.0 → 7.4.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 (51) hide show
  1. package/RNSentry.podspec +1 -1
  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/RNSentryVersion.java +1 -1
  6. package/dist/js/client.d.ts.map +1 -1
  7. package/dist/js/client.js +4 -7
  8. package/dist/js/client.js.map +1 -1
  9. package/dist/js/integrations/default.d.ts.map +1 -1
  10. package/dist/js/integrations/default.js +2 -1
  11. package/dist/js/integrations/default.js.map +1 -1
  12. package/dist/js/options.d.ts +13 -0
  13. package/dist/js/options.d.ts.map +1 -1
  14. package/dist/js/options.js.map +1 -1
  15. package/dist/js/playground/modal.d.ts.map +1 -1
  16. package/dist/js/playground/modal.js +2 -2
  17. package/dist/js/playground/modal.js.map +1 -1
  18. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  19. package/dist/js/replay/mobilereplay.js +10 -7
  20. package/dist/js/replay/mobilereplay.js.map +1 -1
  21. package/dist/js/sdk.d.ts.map +1 -1
  22. package/dist/js/sdk.js +1 -0
  23. package/dist/js/sdk.js.map +1 -1
  24. package/dist/js/tools/metroconfig.d.ts +1 -1
  25. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  26. package/dist/js/tools/metroconfig.js.map +1 -1
  27. package/dist/js/tools/vendor/metro/utils.js +1 -1
  28. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  29. package/dist/js/touchevents.js.map +1 -1
  30. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  31. package/dist/js/tracing/reactnavigation.js.map +1 -1
  32. package/dist/js/version.d.ts +1 -1
  33. package/dist/js/version.js +1 -1
  34. package/dist/js/version.js.map +1 -1
  35. package/dist/js/wrapper.d.ts.map +1 -1
  36. package/dist/js/wrapper.js +1 -0
  37. package/dist/js/wrapper.js.map +1 -1
  38. package/ios/RNSentry.mm +9 -1
  39. package/ios/RNSentryExperimentalOptions.h +9 -0
  40. package/ios/RNSentryExperimentalOptions.m +9 -0
  41. package/ios/RNSentryReplay.h +5 -1
  42. package/ios/RNSentryReplay.mm +10 -6
  43. package/ios/RNSentryVersion.m +1 -1
  44. package/package.json +11 -11
  45. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -1
  46. package/plugin/build/withSentryAndroidGradlePlugin.js +1 -1
  47. package/scripts/expo-upload-sourcemaps.js +1 -1
  48. package/scripts/sentry-xcode.sh +2 -1
  49. package/sentry.gradle +274 -276
  50. package/ts3.8/dist/js/options.d.ts +13 -0
  51. package/ts3.8/dist/js/version.d.ts +1 -1
package/RNSentry.podspec CHANGED
@@ -46,7 +46,7 @@ Pod::Spec.new do |s|
46
46
 
47
47
  s.compiler_flags = other_cflags
48
48
 
49
- s.dependency 'Sentry/HybridSDK', '8.56.1'
49
+ s.dependency 'Sentry/HybridSDK', '8.57.0'
50
50
 
51
51
  if defined? install_modules_dependencies
52
52
  # Default React Native dependencies for 0.71 and above (new and legacy architecture)
@@ -55,5 +55,5 @@ android {
55
55
  dependencies {
56
56
  compileOnly files('libs/replay-stubs.jar')
57
57
  implementation 'com.facebook.react:react-native:+'
58
- api 'io.sentry:sentry-android:8.21.1'
58
+ api 'io.sentry:sentry-android:8.23.0'
59
59
  }
Binary file
@@ -18,5 +18,5 @@ tasks.named('jar', Jar) {
18
18
  }
19
19
 
20
20
  dependencies {
21
- compileOnly 'io.sentry:sentry:8.21.1'
21
+ compileOnly 'io.sentry:sentry:8.23.0'
22
22
  }
@@ -2,7 +2,7 @@ package io.sentry.react;
2
2
 
3
3
  class RNSentryVersion {
4
4
  static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5
- static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.2.0";
5
+ static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "7.4.0";
6
6
  static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
7
7
  static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
8
8
  static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,QAAQ,EACR,KAAK,EACL,SAAS,EAET,aAAa,EACb,4BAA4B,EAC5B,YAAY,EACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,MAAM,EAIP,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAW1D;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,MAAM,CAAC,wBAAwB,CAAC;IACrE,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,oBAAoB,CAA4C;IAExE;;;OAGG;gBACgB,OAAO,EAAE,wBAAwB;IAyCpD;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,GAAE,SAAc,GAAG,WAAW,CAAC,KAAK,CAAC;IAIvF;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAIrG;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;IAOpC;;;OAGG;IACI,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAUxD;;OAEG;IACI,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC,4BAA4B,CAAC;IAiClF;;OAEG;IACI,IAAI,IAAI,IAAI;IAKnB;;;;OAIG;IACI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,IAAI;IA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IG;IACI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,IAAI;IAKtD;;;;OAIG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAKnD;;OAEG;IACH,OAAO,CAAC,cAAc;IA6BtB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAa9B"}
package/dist/js/client.js CHANGED
@@ -23,14 +23,11 @@ export class ReactNativeClient extends Client {
23
23
  * @param options Configuration options for this SDK.
24
24
  */
25
25
  constructor(options) {
26
- var _a, _b;
26
+ var _a, _b, _c, _d;
27
27
  ignoreRequireCycleLogs((_a = ReactNativeLibraries.ReactNativeVersion) === null || _a === void 0 ? void 0 : _a.version);
28
- options._metadata = options._metadata || {};
29
- options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;
30
- // Only allow IP inferral by Relay if sendDefaultPii is true
31
- if ((_b = options._metadata) === null || _b === void 0 ? void 0 : _b.sdk) {
32
- options._metadata.sdk.settings = Object.assign({ infer_ip: options.sendDefaultPii ? 'auto' : 'never' }, options._metadata.sdk.settings);
33
- }
28
+ options._metadata = Object.assign(Object.assign({}, options._metadata), { sdk: Object.assign(Object.assign({}, (((_b = options._metadata) === null || _b === void 0 ? void 0 : _b.sdk) || defaultSdkInfo)), { settings: Object.assign({
29
+ // Only allow IP inferral by Relay if sendDefaultPii is true
30
+ infer_ip: options.sendDefaultPii ? 'auto' : 'never' }, (_d = (_c = options._metadata) === null || _c === void 0 ? void 0 : _c.sdk) === null || _d === void 0 ? void 0 : _d.settings) }) });
34
31
  // We default this to true, as it is the safer scenario
35
32
  options.parentSpanIsAlwaysRootSpan =
36
33
  options.parentSpanIsAlwaysRootSpan === undefined ? true : options.parentSpanIsAlwaysRootSpan;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"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ACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Outcome,\n SeverityLevel,\n TransportMakeRequestResponse,\n UserFeedback,\n} from '@sentry/core';\nimport {\n _INTERNAL_flushLogsBuffer,\n addAutoIpAddressToSession,\n Client,\n dateTimestampInSeconds,\n debug,\n SentryError,\n} from '@sentry/core';\nimport { Alert } from 'react-native';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport { getDefaultSidecarUrl } from './integrations/spotlight';\nimport type { ReactNativeClientOptions } from './options';\nimport type { mobileReplayIntegration } from './replay/mobilereplay';\nimport { MOBILE_REPLAY_INTEGRATION_NAME } from './replay/mobilereplay';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { ReactNativeLibraries } from './utils/rnlibraries';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends Client<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n private _logFlushIdleTimeout: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs(ReactNativeLibraries.ReactNativeVersion?.version);\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;\n\n // Only allow IP inferral by Relay if sendDefaultPii is true\n if (options._metadata?.sdk) {\n options._metadata.sdk.settings = {\n infer_ip: options.sendDefaultPii ? 'auto' : 'never',\n ...options._metadata.sdk.settings,\n };\n }\n\n // We default this to true, as it is the safer scenario\n options.parentSpanIsAlwaysRootSpan =\n options.parentSpanIsAlwaysRootSpan === undefined ? true : options.parentSpanIsAlwaysRootSpan;\n super(options);\n\n this._outcomesBuffer = [];\n\n if (options.sendDefaultPii === true) {\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n\n if (options.enableLogs) {\n this.on('flush', () => {\n _INTERNAL_flushLogsBuffer(this);\n });\n\n this.on('afterCaptureLog', () => {\n if (this._logFlushIdleTimeout) {\n clearTimeout(this._logFlushIdleTimeout);\n }\n\n this._logFlushIdleTimeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(this);\n }, DEFAULT_FLUSH_INTERVAL);\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n * @deprecated Use `Sentry.captureFeedback` instead.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: undefined,\n });\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritdoc\n */\n public sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n debug.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n debug.error('Error while sending event:', reason);\n }\n });\n } else {\n debug.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n\n return Promise.resolve({});\n }\n\n /**\n * @inheritDoc\n */\n public init(): void {\n super.init();\n this._initNativeSdk();\n }\n\n /**\n * Register a hook on this client.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public on(hook: string, callback: unknown): () => void {\n // @ts-expect-error on from the base class doesn't support generic types\n return super.on(hook, callback);\n }\n\n /**\n * Emit a hook that was previously registered via `on()`.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public emit(hook: string, ...rest: unknown[]): void {\n // @ts-expect-error emit from the base class doesn't support generic types\n super.emit(hook, ...rest);\n }\n\n /**\n * Starts native client with dsn and options\n */\n private _initNativeSdk(): void {\n NATIVE.initNativeSdk({\n ...this._options,\n defaultSidecarUrl: getDefaultSidecarUrl(),\n devServerUrl: getDevServer()?.url || '',\n mobileReplayOptions:\n this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&\n 'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]\n ? (this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] as ReturnType<typeof mobileReplayIntegration>).options\n : undefined,\n })\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n this.emit('afterInit');\n })\n .then(undefined, error => {\n debug.error('The OnReady callback threw an error: ', error);\n });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/ for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAYvE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,MAAM,EACN,sBAAsB,EACtB,KAAK,EACL,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,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CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,6NAA6N,CAC9N,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Outcome,\n SeverityLevel,\n TransportMakeRequestResponse,\n UserFeedback,\n} from '@sentry/core';\nimport {\n _INTERNAL_flushLogsBuffer,\n addAutoIpAddressToSession,\n Client,\n dateTimestampInSeconds,\n debug,\n SentryError,\n} from '@sentry/core';\nimport { Alert } from 'react-native';\nimport { getDevServer } from './integrations/debugsymbolicatorutils';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport { getDefaultSidecarUrl } from './integrations/spotlight';\nimport type { ReactNativeClientOptions } from './options';\nimport type { mobileReplayIntegration } from './replay/mobilereplay';\nimport { MOBILE_REPLAY_INTEGRATION_NAME } from './replay/mobilereplay';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { ReactNativeLibraries } from './utils/rnlibraries';\nimport { NATIVE } from './wrapper';\n\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends Client<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n private _logFlushIdleTimeout: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs(ReactNativeLibraries.ReactNativeVersion?.version);\n options._metadata = {\n ...options._metadata,\n sdk: {\n ...(options._metadata?.sdk || defaultSdkInfo),\n settings: {\n // Only allow IP inferral by Relay if sendDefaultPii is true\n infer_ip: options.sendDefaultPii ? 'auto' : 'never',\n ...options._metadata?.sdk?.settings,\n },\n },\n };\n\n // We default this to true, as it is the safer scenario\n options.parentSpanIsAlwaysRootSpan =\n options.parentSpanIsAlwaysRootSpan === undefined ? true : options.parentSpanIsAlwaysRootSpan;\n super(options);\n\n this._outcomesBuffer = [];\n\n if (options.sendDefaultPii === true) {\n this.on('beforeSendSession', addAutoIpAddressToSession);\n }\n\n if (options.enableLogs) {\n this.on('flush', () => {\n _INTERNAL_flushLogsBuffer(this);\n });\n\n this.on('afterCaptureLog', () => {\n if (this._logFlushIdleTimeout) {\n clearTimeout(this._logFlushIdleTimeout);\n }\n\n this._logFlushIdleTimeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(this);\n }, DEFAULT_FLUSH_INTERVAL);\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result);\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n * @deprecated Use `Sentry.captureFeedback` instead.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: undefined,\n });\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n }\n\n /**\n * @inheritdoc\n */\n public sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse> {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n debug.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n debug.error('Error while sending event:', reason);\n }\n });\n } else {\n debug.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n\n return Promise.resolve({});\n }\n\n /**\n * @inheritDoc\n */\n public init(): void {\n super.init();\n this._initNativeSdk();\n }\n\n /**\n * Register a hook on this client.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public on(hook: string, callback: unknown): () => void {\n // @ts-expect-error on from the base class doesn't support generic types\n return super.on(hook, callback);\n }\n\n /**\n * Emit a hook that was previously registered via `on()`.\n *\n * (Generic method signature to allow for custom React Native Client events.)\n */\n public emit(hook: string, ...rest: unknown[]): void {\n // @ts-expect-error emit from the base class doesn't support generic types\n super.emit(hook, ...rest);\n }\n\n /**\n * Starts native client with dsn and options\n */\n private _initNativeSdk(): void {\n NATIVE.initNativeSdk({\n ...this._options,\n defaultSidecarUrl: getDefaultSidecarUrl(),\n devServerUrl: getDevServer()?.url || '',\n mobileReplayOptions:\n this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&\n 'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]\n ? (this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] as ReturnType<typeof mobileReplayIntegration>).options\n : undefined,\n })\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n this.emit('afterInit');\n })\n .then(undefined, error => {\n debug.error('The OnReady callback threw an error: ', error);\n });\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/ for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAuC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CAkHvF"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAuC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CAmHvF"}
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable complexity */
2
- import { browserSessionIntegration } from '@sentry/browser';
2
+ import { browserSessionIntegration, consoleLoggingIntegration } from '@sentry/browser';
3
3
  import { reactNativeTracingIntegration } from '../tracing';
4
4
  import { notWeb } from '../utils/environment';
5
5
  import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, logEnricherIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, primitiveTagIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
@@ -44,6 +44,7 @@ export function getDefaultIntegrations(options) {
44
44
  integrations.push(modulesLoaderIntegration());
45
45
  if (options.enableLogs) {
46
46
  integrations.push(logEnricherIntegration());
47
+ integrations.push(consoleLoggingIntegration());
47
48
  }
48
49
  if (options.attachScreenshot) {
49
50
  integrations.push(screenshotIntegration());
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAiC;;IACtE,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAAI,MAAM,EAAE,EAAE;QACZ,YAAY,CAAC,IAAI,CACf,mCAAmC,CAAC;YAClC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SAC/C,CAAC,CACH,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC,CAAC;KACpD;SAAM;QACL,YAAY,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,CAAC;QACjD,YAAY,CAAC,I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sourcesContent":["/* eslint-disable complexity */\nimport { browserSessionIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n logEnricherIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n primitiveTagIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n\n if (options.enableAutoSessionTracking) {\n integrations.push(browserSessionIntegration());\n }\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.enableLogs) {\n integrations.push(logEnricherIntegration());\n }\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking && options.enableNative) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking && options.enableNative,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments?.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments?.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n integrations.push(primitiveTagIntegration());\n\n return integrations;\n}\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAGvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,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,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;QAClF,OAAO,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;KACnF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAE7C,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport { browserSessionIntegration, consoleLoggingIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n logEnricherIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n primitiveTagIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n\n if (options.enableAutoSessionTracking) {\n integrations.push(browserSessionIntegration());\n }\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.enableLogs) {\n integrations.push(logEnricherIntegration());\n integrations.push(consoleLoggingIntegration());\n }\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking && options.enableNative) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking && options.enableNative,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments?.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments?.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n integrations.push(primitiveTagIntegration());\n\n return integrations;\n}\n"]}
@@ -249,6 +249,19 @@ export interface BaseReactNativeOptions {
249
249
  * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.
250
250
  */
251
251
  useThreadsForMessageStack?: boolean;
252
+ /**
253
+ * If set to `true`, the SDK propagates the W3C `traceparent` header to any outgoing requests,
254
+ * in addition to the `sentry-trace` and `baggage` headers. Use the {@link CoreOptions.tracePropagationTargets}
255
+ * option to control to which outgoing requests the header will be attached.
256
+ *
257
+ * **Important:** If you set this option to `true`, make sure that you configured your servers'
258
+ * CORS settings to allow the `traceparent` header. Otherwise, requests might get blocked.
259
+ *
260
+ * @see https://www.w3.org/TR/trace-context/
261
+ *
262
+ * @default false
263
+ */
264
+ propagateTraceparent?: boolean;
252
265
  }
253
266
  export type SentryReplayQuality = 'low' | 'medium' | 'high';
254
267
  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,CAAC;AAExE,KAAK,kBAAkB,GAAG,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;AACtE,KAAK,uBAAuB,GAAG,kBAAkB,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;;;;OAUG;IACH,uBA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MAAM,WAAW,wBACf,SAAQ,IAAI,CAAC,aAAa,CAAC,2BAA2B,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC,EACjF,sBAAsB;CAAG;AAE7B,MAAM,WAAW,yBAAyB;IACxC,wCAAwC;IACxC,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;IAEzE,8CAA8C;IAC9C,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAiBtE"}
@@ -1 +1 @@
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;AA+T/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 */\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;AA6U/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 */\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 /**\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 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/js/playground/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,kEAEtB;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,2BAa3D,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;MAMzB,MAAM,YA+HT,CAAC"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/js/playground/modal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,kEAEtB;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,2BAa3D,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;MAMzB,MAAM,YA+HT,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable max-lines */
2
2
  import { debug } from '@sentry/core';
3
3
  import * as React from 'react';
4
- import { Animated, Image, Modal, Platform, Pressable, SafeAreaView, StyleSheet, Text, useColorScheme, View, } from 'react-native';
4
+ import { Animated, Image, Modal, Platform, Pressable, StyleSheet, Text, useColorScheme, View, } from 'react-native';
5
5
  import { getDevServer } from '../integrations/debugsymbolicatorutils';
6
6
  import { isExpo, isExpoGo, isWeb } from '../utils/environment';
7
7
  import { bug as bugAnimation, hi as hiAnimation, thumbsup as thumbsupAnimation } from './animations';
@@ -76,7 +76,7 @@ export const SentryPlayground = ({ projectId, organizationSlug, }) => {
76
76
  return (React.createElement(Modal, { presentationStyle: "formSheet", visible: show, animationType: "slide", onRequestClose: () => {
77
77
  setShow(false);
78
78
  } },
79
- React.createElement(SafeAreaView, { style: styles.background },
79
+ React.createElement(View, { style: styles.background },
80
80
  React.createElement(View, { style: styles.container },
81
81
  React.createElement(Text, { style: styles.welcomeText }, "Welcome to Sentry Playground!"),
82
82
  React.createElement(Animated.View, { style: {
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/js/playground/modal.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,cAAc,EACd,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,GAAG,IAAI,YAAY,EAAE,EAAE,IAAI,WAAW,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,EAAE,IAAI,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAErF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAAiC,EACjC,UAA6D,E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AK,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;KAC7C;AACH,CAAC","sourcesContent":["/* eslint-disable max-lines */\nimport { debug } from '@sentry/core';\nimport * as React from 'react';\nimport {\n Animated,\n Image,\n Modal,\n Platform,\n Pressable,\n SafeAreaView,\n StyleSheet,\n Text,\n useColorScheme,\n View,\n} from 'react-native';\nimport { getDevServer } from '../integrations/debugsymbolicatorutils';\nimport { isExpo, isExpoGo, isWeb } from '../utils/environment';\nimport { bug as bugAnimation, hi as hiAnimation, thumbsup as thumbsupAnimation } from './animations';\nimport { nativeCrashExample, tryCatchExample, uncaughtErrorExample } from './examples';\nimport { bug as bugImage, hi as hiImage, thumbsup as thumbsupImage } from './images';\n\n/**\n * Wrapper to add Sentry Playground to your application\n * to test your Sentry React Native SDK setup.\n *\n * @example\n * ```tsx\n * import * as Sentry from '@sentry/react-native';\n * import { withSentryPlayground } from '@sentry/react-native/playground';\n *\n * function App() {\n * return <View>...</View>;\n * }\n *\n * export default withSentryPlayground(Sentry.wrap(App), {\n * projectId: '123456',\n * organizationSlug: 'my-org'\n * });\n * ```\n */\nexport const withSentryPlayground = <P extends object>(\n Component: React.ComponentType<P>,\n options: { projectId?: string; organizationSlug?: string } = {},\n): React.ComponentType<P> => {\n const Wrapper = (props: P): React.ReactElement => {\n return (\n <>\n <SentryPlayground projectId={options.projectId} organizationSlug={options.organizationSlug} />\n <Component {...props} />\n </>\n );\n };\n\n Wrapper.displayName = 'withSentryPlayground()';\n return Wrapper;\n};\n\nexport const SentryPlayground = ({\n projectId,\n organizationSlug,\n}: {\n projectId?: string;\n organizationSlug?: string;\n}): React.ReactElement => {\n const issuesStreamUrl =\n projectId && organizationSlug\n ? `https://${organizationSlug}.sentry.io/issues/?project=${projectId}&statsPeriod=1h`\n : 'https://sentry.io/';\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n const [show, setShow] = React.useState(true);\n const [animation, setAnimation] = React.useState('hi');\n\n const onAnimationPress = (): void => {\n switch (animation) {\n case 'hi':\n setAnimation('thumbsup');\n break;\n default:\n setAnimation('hi');\n }\n };\n\n const showOpenSentryButton = !isExpo();\n const isNativeCrashDisabled = isWeb() || isExpoGo() || __DEV__;\n\n const animationContainerYPosition = React.useRef(new Animated.Value(0)).current;\n\n const springAnimation = Animated.sequence([\n Animated.timing(animationContainerYPosition, {\n toValue: -50,\n duration: 300,\n useNativeDriver: true,\n }),\n Animated.spring(animationContainerYPosition, {\n toValue: 0,\n friction: 4,\n tension: 40,\n useNativeDriver: true,\n }),\n ]);\n\n const changeAnimationToBug = (func: () => void): void => {\n setAnimation('bug');\n springAnimation.start(() => {\n func();\n });\n };\n\n return (\n <Modal\n presentationStyle=\"formSheet\"\n visible={show}\n animationType=\"slide\"\n onRequestClose={() => {\n setShow(false);\n }}\n >\n <SafeAreaView style={styles.background}>\n <View style={styles.container}>\n <Text style={styles.welcomeText}>Welcome to Sentry Playground!</Text>\n <Animated.View\n style={{\n width: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n transform: [{ translateY: animationContainerYPosition }],\n }}\n onTouchEnd={() => {\n springAnimation.start();\n }}\n >\n <Pressable onPress={onAnimationPress}>\n <Animation id={animation} />\n </Pressable>\n </Animated.View>\n <View style={styles.listContainer}>\n <Row\n title={'captureException()'}\n description={'In a try-catch scenario, errors can be reported using manual APIs.'}\n actionDescription={'Try'}\n action={tryCatchExample}\n />\n <Row\n title={'throw new Error()'}\n description={'Uncaught errors are automatically reported by the React Native Global Handler.'}\n actionDescription={'Throw'}\n action={() => changeAnimationToBug(uncaughtErrorExample)}\n />\n <Row\n title={'throw RuntimeException()'}\n description={\n isNativeCrashDisabled\n ? 'For testing native crashes, build the mobile application in release mode.'\n : 'Unhandled errors in native layers such as Java, Objective-C, C, Swift, or Kotlin are automatically reported.'\n }\n actionDescription={'Crash'}\n action={nativeCrashExample}\n last\n disabled={isNativeCrashDisabled}\n />\n </View>\n <View style={{ marginTop: 40 }} />\n <View\n style={{\n width: '100%',\n flexDirection: 'row', // Arrange buttons horizontally\n justifyContent: 'space-evenly', // Space between buttons\n }}\n >\n {showOpenSentryButton && (\n <Button\n secondary\n title={'Open Sentry'}\n onPress={() => {\n openURLInBrowser(issuesStreamUrl);\n }}\n />\n )}\n <Button\n title={'Go to my App'}\n onPress={() => {\n setShow(false);\n }}\n />\n </View>\n </View>\n </SafeAreaView>\n </Modal>\n );\n};\n\nconst Animation = ({ id }: { id: string }): React.ReactElement | null => {\n const shouldFallbackToImage = Platform.OS === 'android';\n\n switch (id) {\n case 'hi':\n return (\n <Image source={{ uri: shouldFallbackToImage ? hiImage : hiAnimation }} style={{ width: 100, height: 100 }} />\n );\n case 'bug':\n return (\n <Image source={{ uri: shouldFallbackToImage ? bugImage : bugAnimation }} style={{ width: 100, height: 100 }} />\n );\n case 'thumbsup':\n return (\n <Image\n source={{ uri: shouldFallbackToImage ? thumbsupImage : thumbsupAnimation }}\n style={{ width: 100, height: 100 }}\n />\n );\n default:\n return null;\n }\n};\n\nconst Row = ({\n last = false,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n action = () => {},\n actionDescription = '',\n title,\n description,\n disabled = false,\n}: {\n last?: boolean;\n action?: () => void;\n actionDescription?: string;\n title: string;\n description: string;\n disabled?: boolean;\n}): React.ReactElement => {\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n return (\n <View style={[styles.rowContainer, last && styles.lastRowContainer]}>\n <View style={{ flexShrink: 1, paddingRight: 12 }}>\n <Text style={styles.rowTitle}>{title}</Text>\n <Text style={{ color: 'rgb(146, 130, 170)', fontSize: 12 }}>{description}</Text>\n </View>\n <View>\n <Button disabled={disabled} secondary onPress={action} title={actionDescription} />\n </View>\n </View>\n );\n};\n\nconst Button = ({\n onPress,\n title,\n secondary,\n disabled = false,\n}: {\n onPress: () => void;\n title: string;\n secondary?: boolean;\n disabled?: boolean;\n}): React.ReactElement => {\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n return (\n <View style={[styles.buttonBottomLayer, styles.buttonCommon, secondary && styles.buttonSecondaryBottomLayer]}>\n <Pressable\n style={({ pressed }) => [\n styles.buttonMainContainer,\n pressed && styles.buttonMainContainerPressed,\n styles.buttonCommon,\n secondary && styles.buttonSecondaryContainer,\n disabled && styles.buttonDisabledContainer,\n ]}\n onPress={onPress}\n disabled={disabled}\n >\n <Text\n style={[styles.buttonText, secondary && styles.buttonSecondaryText, disabled && styles.buttonDisabledText]}\n >\n {title}\n </Text>\n </Pressable>\n </View>\n );\n};\n\nconst defaultDarkStyles = StyleSheet.create({\n welcomeText: { color: 'rgb(246, 245, 250)', fontSize: 24, fontWeight: 'bold' },\n background: {\n flex: 1,\n backgroundColor: 'rgb(26, 20, 31)',\n width: '100%',\n minHeight: '100%',\n alignItems: 'center', // Center content horizontally\n justifyContent: 'center', // Center content vertically\n },\n container: {\n flex: 1,\n flexDirection: 'column',\n padding: 12,\n marginTop: 20,\n width: '100%',\n alignItems: 'center', // Center image and button container\n justifyContent: 'space-evenly', // Center image and button container\n },\n buttonContainer: {\n flexDirection: 'row', // Arrange buttons horizontally\n marginTop: 20, // Add some space above the buttons\n },\n listContainer: {\n backgroundColor: 'rgb(39, 36, 51)',\n width: '100%',\n flexDirection: 'column',\n marginTop: 20, // Add some space above the buttons\n borderColor: 'rgb(7, 5, 15)',\n borderWidth: 1,\n borderRadius: 8,\n },\n rowTitle: {\n color: 'rgb(246, 245, 250)',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'left',\n fontFamily: 'Menlo',\n },\n rowContainer: {\n overflow: 'hidden',\n flexDirection: 'row',\n justifyContent: 'space-between', // Space between buttons\n paddingTop: 16,\n paddingBottom: 10,\n paddingHorizontal: 10,\n borderColor: 'rgb(7, 5, 15)',\n borderBottomWidth: 1,\n },\n lastRowContainer: {\n borderBottomWidth: 0, // Remove border for the last row\n },\n buttonCommon: {\n borderRadius: 8,\n },\n buttonBottomLayer: {\n backgroundColor: 'rgb(7, 5, 15)',\n },\n buttonMainContainer: {\n paddingVertical: 8,\n paddingHorizontal: 13,\n backgroundColor: 'rgb(117, 83, 255)',\n transform: [{ translateY: -4 }],\n borderWidth: 1,\n borderColor: 'rgb(7, 5, 15)',\n },\n buttonSecondaryContainer: {\n backgroundColor: 'rgb(39, 36, 51)',\n },\n buttonSecondaryBottomLayer: {},\n buttonSecondaryText: {},\n buttonMainContainerPressed: {\n transform: [{ translateY: 0 }],\n },\n buttonText: {\n color: 'rgb(246, 245, 250)',\n fontSize: 16,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n buttonDisabledText: {\n color: 'rgb(146, 130, 170)',\n },\n buttonDisabledContainer: {\n transform: [{ translateY: -2 }],\n backgroundColor: 'rgb(39, 36, 51)',\n },\n});\n\nconst lightStyles: typeof defaultDarkStyles = StyleSheet.create({\n ...defaultDarkStyles,\n welcomeText: {\n ...defaultDarkStyles.welcomeText,\n color: 'rgb(24, 20, 35)',\n },\n background: {\n ...defaultDarkStyles.background,\n backgroundColor: 'rgb(251, 250, 255)',\n },\n buttonMainContainer: {\n ...defaultDarkStyles.buttonMainContainer,\n backgroundColor: 'rgb(117, 83, 255)',\n borderColor: 'rgb(85, 61, 184)',\n },\n buttonBottomLayer: {\n backgroundColor: 'rgb(85, 61, 184)',\n },\n buttonSecondaryContainer: {\n backgroundColor: 'rgb(255, 255, 255)',\n borderColor: 'rgb(218, 215, 229)',\n },\n buttonSecondaryBottomLayer: {\n backgroundColor: 'rgb(218, 215, 229)',\n },\n buttonText: {\n ...defaultDarkStyles.buttonText,\n },\n buttonSecondaryText: {\n ...defaultDarkStyles.buttonText,\n color: 'rgb(24, 20, 35)',\n },\n rowTitle: {\n ...defaultDarkStyles.rowTitle,\n color: 'rgb(24, 20, 35)',\n },\n rowContainer: {\n ...defaultDarkStyles.rowContainer,\n borderColor: 'rgb(218, 215, 229)',\n },\n listContainer: {\n ...defaultDarkStyles.listContainer,\n borderColor: 'rgb(218, 215, 229)',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n buttonDisabledContainer: {\n ...defaultDarkStyles.buttonDisabledContainer,\n backgroundColor: 'rgb(238, 235, 249)',\n },\n});\n\nfunction openURLInBrowser(url: string): void {\n const devServer = getDevServer();\n if (devServer?.url) {\n // This doesn't work for Expo project with Web enabled\n // disable-next-line @typescript-eslint/no-floating-promises\n fetch(`${devServer.url}open-url`, {\n method: 'POST',\n body: JSON.stringify({ url }),\n }).catch(e => {\n debug.error('Error opening URL:', e);\n });\n } else {\n debug.error('Dev server URL not available');\n }\n}\n"]}
1
+ {"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/js/playground/modal.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,IAAI,EACJ,cAAc,EACd,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,GAAG,IAAI,YAAY,EAAE,EAAE,IAAI,WAAW,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,EAAE,IAAI,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAErF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAAiC,EACjC,UAA6D,EAAE,EACvC,EAAE;IAC1B,MAAM,OAAO,GAAG,CAAC,KAAQ,EAAsB,E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cesContent":["/* eslint-disable max-lines */\nimport { debug } from '@sentry/core';\nimport * as React from 'react';\nimport {\n Animated,\n Image,\n Modal,\n Platform,\n Pressable,\n StyleSheet,\n Text,\n useColorScheme,\n View,\n} from 'react-native';\nimport { getDevServer } from '../integrations/debugsymbolicatorutils';\nimport { isExpo, isExpoGo, isWeb } from '../utils/environment';\nimport { bug as bugAnimation, hi as hiAnimation, thumbsup as thumbsupAnimation } from './animations';\nimport { nativeCrashExample, tryCatchExample, uncaughtErrorExample } from './examples';\nimport { bug as bugImage, hi as hiImage, thumbsup as thumbsupImage } from './images';\n\n/**\n * Wrapper to add Sentry Playground to your application\n * to test your Sentry React Native SDK setup.\n *\n * @example\n * ```tsx\n * import * as Sentry from '@sentry/react-native';\n * import { withSentryPlayground } from '@sentry/react-native/playground';\n *\n * function App() {\n * return <View>...</View>;\n * }\n *\n * export default withSentryPlayground(Sentry.wrap(App), {\n * projectId: '123456',\n * organizationSlug: 'my-org'\n * });\n * ```\n */\nexport const withSentryPlayground = <P extends object>(\n Component: React.ComponentType<P>,\n options: { projectId?: string; organizationSlug?: string } = {},\n): React.ComponentType<P> => {\n const Wrapper = (props: P): React.ReactElement => {\n return (\n <>\n <SentryPlayground projectId={options.projectId} organizationSlug={options.organizationSlug} />\n <Component {...props} />\n </>\n );\n };\n\n Wrapper.displayName = 'withSentryPlayground()';\n return Wrapper;\n};\n\nexport const SentryPlayground = ({\n projectId,\n organizationSlug,\n}: {\n projectId?: string;\n organizationSlug?: string;\n}): React.ReactElement => {\n const issuesStreamUrl =\n projectId && organizationSlug\n ? `https://${organizationSlug}.sentry.io/issues/?project=${projectId}&statsPeriod=1h`\n : 'https://sentry.io/';\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n const [show, setShow] = React.useState(true);\n const [animation, setAnimation] = React.useState('hi');\n\n const onAnimationPress = (): void => {\n switch (animation) {\n case 'hi':\n setAnimation('thumbsup');\n break;\n default:\n setAnimation('hi');\n }\n };\n\n const showOpenSentryButton = !isExpo();\n const isNativeCrashDisabled = isWeb() || isExpoGo() || __DEV__;\n\n const animationContainerYPosition = React.useRef(new Animated.Value(0)).current;\n\n const springAnimation = Animated.sequence([\n Animated.timing(animationContainerYPosition, {\n toValue: -50,\n duration: 300,\n useNativeDriver: true,\n }),\n Animated.spring(animationContainerYPosition, {\n toValue: 0,\n friction: 4,\n tension: 40,\n useNativeDriver: true,\n }),\n ]);\n\n const changeAnimationToBug = (func: () => void): void => {\n setAnimation('bug');\n springAnimation.start(() => {\n func();\n });\n };\n\n return (\n <Modal\n presentationStyle=\"formSheet\"\n visible={show}\n animationType=\"slide\"\n onRequestClose={() => {\n setShow(false);\n }}\n >\n <View style={styles.background}>\n <View style={styles.container}>\n <Text style={styles.welcomeText}>Welcome to Sentry Playground!</Text>\n <Animated.View\n style={{\n width: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n transform: [{ translateY: animationContainerYPosition }],\n }}\n onTouchEnd={() => {\n springAnimation.start();\n }}\n >\n <Pressable onPress={onAnimationPress}>\n <Animation id={animation} />\n </Pressable>\n </Animated.View>\n <View style={styles.listContainer}>\n <Row\n title={'captureException()'}\n description={'In a try-catch scenario, errors can be reported using manual APIs.'}\n actionDescription={'Try'}\n action={tryCatchExample}\n />\n <Row\n title={'throw new Error()'}\n description={'Uncaught errors are automatically reported by the React Native Global Handler.'}\n actionDescription={'Throw'}\n action={() => changeAnimationToBug(uncaughtErrorExample)}\n />\n <Row\n title={'throw RuntimeException()'}\n description={\n isNativeCrashDisabled\n ? 'For testing native crashes, build the mobile application in release mode.'\n : 'Unhandled errors in native layers such as Java, Objective-C, C, Swift, or Kotlin are automatically reported.'\n }\n actionDescription={'Crash'}\n action={nativeCrashExample}\n last\n disabled={isNativeCrashDisabled}\n />\n </View>\n <View style={{ marginTop: 40 }} />\n <View\n style={{\n width: '100%',\n flexDirection: 'row', // Arrange buttons horizontally\n justifyContent: 'space-evenly', // Space between buttons\n }}\n >\n {showOpenSentryButton && (\n <Button\n secondary\n title={'Open Sentry'}\n onPress={() => {\n openURLInBrowser(issuesStreamUrl);\n }}\n />\n )}\n <Button\n title={'Go to my App'}\n onPress={() => {\n setShow(false);\n }}\n />\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst Animation = ({ id }: { id: string }): React.ReactElement | null => {\n const shouldFallbackToImage = Platform.OS === 'android';\n\n switch (id) {\n case 'hi':\n return (\n <Image source={{ uri: shouldFallbackToImage ? hiImage : hiAnimation }} style={{ width: 100, height: 100 }} />\n );\n case 'bug':\n return (\n <Image source={{ uri: shouldFallbackToImage ? bugImage : bugAnimation }} style={{ width: 100, height: 100 }} />\n );\n case 'thumbsup':\n return (\n <Image\n source={{ uri: shouldFallbackToImage ? thumbsupImage : thumbsupAnimation }}\n style={{ width: 100, height: 100 }}\n />\n );\n default:\n return null;\n }\n};\n\nconst Row = ({\n last = false,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n action = () => {},\n actionDescription = '',\n title,\n description,\n disabled = false,\n}: {\n last?: boolean;\n action?: () => void;\n actionDescription?: string;\n title: string;\n description: string;\n disabled?: boolean;\n}): React.ReactElement => {\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n return (\n <View style={[styles.rowContainer, last && styles.lastRowContainer]}>\n <View style={{ flexShrink: 1, paddingRight: 12 }}>\n <Text style={styles.rowTitle}>{title}</Text>\n <Text style={{ color: 'rgb(146, 130, 170)', fontSize: 12 }}>{description}</Text>\n </View>\n <View>\n <Button disabled={disabled} secondary onPress={action} title={actionDescription} />\n </View>\n </View>\n );\n};\n\nconst Button = ({\n onPress,\n title,\n secondary,\n disabled = false,\n}: {\n onPress: () => void;\n title: string;\n secondary?: boolean;\n disabled?: boolean;\n}): React.ReactElement => {\n const styles = useColorScheme() === 'dark' ? defaultDarkStyles : lightStyles;\n\n return (\n <View style={[styles.buttonBottomLayer, styles.buttonCommon, secondary && styles.buttonSecondaryBottomLayer]}>\n <Pressable\n style={({ pressed }) => [\n styles.buttonMainContainer,\n pressed && styles.buttonMainContainerPressed,\n styles.buttonCommon,\n secondary && styles.buttonSecondaryContainer,\n disabled && styles.buttonDisabledContainer,\n ]}\n onPress={onPress}\n disabled={disabled}\n >\n <Text\n style={[styles.buttonText, secondary && styles.buttonSecondaryText, disabled && styles.buttonDisabledText]}\n >\n {title}\n </Text>\n </Pressable>\n </View>\n );\n};\n\nconst defaultDarkStyles = StyleSheet.create({\n welcomeText: { color: 'rgb(246, 245, 250)', fontSize: 24, fontWeight: 'bold' },\n background: {\n flex: 1,\n backgroundColor: 'rgb(26, 20, 31)',\n width: '100%',\n minHeight: '100%',\n alignItems: 'center', // Center content horizontally\n justifyContent: 'center', // Center content vertically\n },\n container: {\n flex: 1,\n flexDirection: 'column',\n padding: 12,\n marginTop: 20,\n width: '100%',\n alignItems: 'center', // Center image and button container\n justifyContent: 'space-evenly', // Center image and button container\n },\n buttonContainer: {\n flexDirection: 'row', // Arrange buttons horizontally\n marginTop: 20, // Add some space above the buttons\n },\n listContainer: {\n backgroundColor: 'rgb(39, 36, 51)',\n width: '100%',\n flexDirection: 'column',\n marginTop: 20, // Add some space above the buttons\n borderColor: 'rgb(7, 5, 15)',\n borderWidth: 1,\n borderRadius: 8,\n },\n rowTitle: {\n color: 'rgb(246, 245, 250)',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'left',\n fontFamily: 'Menlo',\n },\n rowContainer: {\n overflow: 'hidden',\n flexDirection: 'row',\n justifyContent: 'space-between', // Space between buttons\n paddingTop: 16,\n paddingBottom: 10,\n paddingHorizontal: 10,\n borderColor: 'rgb(7, 5, 15)',\n borderBottomWidth: 1,\n },\n lastRowContainer: {\n borderBottomWidth: 0, // Remove border for the last row\n },\n buttonCommon: {\n borderRadius: 8,\n },\n buttonBottomLayer: {\n backgroundColor: 'rgb(7, 5, 15)',\n },\n buttonMainContainer: {\n paddingVertical: 8,\n paddingHorizontal: 13,\n backgroundColor: 'rgb(117, 83, 255)',\n transform: [{ translateY: -4 }],\n borderWidth: 1,\n borderColor: 'rgb(7, 5, 15)',\n },\n buttonSecondaryContainer: {\n backgroundColor: 'rgb(39, 36, 51)',\n },\n buttonSecondaryBottomLayer: {},\n buttonSecondaryText: {},\n buttonMainContainerPressed: {\n transform: [{ translateY: 0 }],\n },\n buttonText: {\n color: 'rgb(246, 245, 250)',\n fontSize: 16,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n buttonDisabledText: {\n color: 'rgb(146, 130, 170)',\n },\n buttonDisabledContainer: {\n transform: [{ translateY: -2 }],\n backgroundColor: 'rgb(39, 36, 51)',\n },\n});\n\nconst lightStyles: typeof defaultDarkStyles = StyleSheet.create({\n ...defaultDarkStyles,\n welcomeText: {\n ...defaultDarkStyles.welcomeText,\n color: 'rgb(24, 20, 35)',\n },\n background: {\n ...defaultDarkStyles.background,\n backgroundColor: 'rgb(251, 250, 255)',\n },\n buttonMainContainer: {\n ...defaultDarkStyles.buttonMainContainer,\n backgroundColor: 'rgb(117, 83, 255)',\n borderColor: 'rgb(85, 61, 184)',\n },\n buttonBottomLayer: {\n backgroundColor: 'rgb(85, 61, 184)',\n },\n buttonSecondaryContainer: {\n backgroundColor: 'rgb(255, 255, 255)',\n borderColor: 'rgb(218, 215, 229)',\n },\n buttonSecondaryBottomLayer: {\n backgroundColor: 'rgb(218, 215, 229)',\n },\n buttonText: {\n ...defaultDarkStyles.buttonText,\n },\n buttonSecondaryText: {\n ...defaultDarkStyles.buttonText,\n color: 'rgb(24, 20, 35)',\n },\n rowTitle: {\n ...defaultDarkStyles.rowTitle,\n color: 'rgb(24, 20, 35)',\n },\n rowContainer: {\n ...defaultDarkStyles.rowContainer,\n borderColor: 'rgb(218, 215, 229)',\n },\n listContainer: {\n ...defaultDarkStyles.listContainer,\n borderColor: 'rgb(218, 215, 229)',\n backgroundColor: 'rgb(255, 255, 255)',\n },\n buttonDisabledContainer: {\n ...defaultDarkStyles.buttonDisabledContainer,\n backgroundColor: 'rgb(238, 235, 249)',\n },\n});\n\nfunction openURLInBrowser(url: string): void {\n const devServer = getDevServer();\n if (devServer?.url) {\n // This doesn't work for Expo project with Web enabled\n // disable-next-line @typescript-eslint/no-floating-promises\n fetch(`${devServer.url}open-url`, {\n method: 'POST',\n body: JSON.stringify({ url }),\n }).catch(e => {\n debug.error('Error opening URL:', e);\n });\n } else {\n debug.error('Dev server URL not available');\n }\n}\n"]}
@@ -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,uBAyE3F,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,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"}
@@ -64,15 +64,18 @@ export const mobileReplayIntegration = (initOptions = defaultOptions) => {
64
64
  // Event is not an error, will not capture replay
65
65
  return event;
66
66
  }
67
- const recordingReplayId = NATIVE.getCurrentReplayId();
68
- if (recordingReplayId) {
69
- debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`);
70
- return event;
71
- }
72
67
  const replayId = yield NATIVE.captureReplay(isHardCrash(event));
73
68
  if (!replayId) {
74
- debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);
75
- return event;
69
+ const recordingReplayId = NATIVE.getCurrentReplayId();
70
+ if (recordingReplayId) {
71
+ debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`);
72
+ }
73
+ else {
74
+ debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);
75
+ }
76
+ }
77
+ else {
78
+ debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Captured recording replay ${replayId} for event ${event.event_id}.`);
76
79
  }
77
80
  return event;
78
81
  });
@@ -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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;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\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 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 return event;\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (!replayId) {\n debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n return event;\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;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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ChH,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\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 +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,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAA4B,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AA8BzG;;GAEG;AACH,wBAAgB,IAAI,CAAC,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAwG5D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpD,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACrC,OAAO,CAAC,EAAE,yBAAyB,GAClC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAsBxB;AAED;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,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.