@sentry/react-native 6.18.0 → 6.19.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.
@@ -45,6 +45,7 @@ import io.sentry.SentryExecutorService;
45
45
  import io.sentry.SentryLevel;
46
46
  import io.sentry.SentryOptions;
47
47
  import io.sentry.SentryReplayOptions;
48
+ import io.sentry.SentryReplayOptions.SentryReplayQuality;
48
49
  import io.sentry.UncaughtExceptionHandlerIntegration;
49
50
  import io.sentry.android.core.AndroidLogger;
50
51
  import io.sentry.android.core.AndroidProfiler;
@@ -86,6 +87,7 @@ import java.nio.charset.Charset;
86
87
  import java.util.HashMap;
87
88
  import java.util.Iterator;
88
89
  import java.util.List;
90
+ import java.util.Locale;
89
91
  import java.util.Map;
90
92
  import java.util.Properties;
91
93
  import java.util.concurrent.CountDownLatch;
@@ -370,6 +372,12 @@ public class RNSentryModuleImpl {
370
372
  ? rnOptions.getDouble("replaysOnErrorSampleRate")
371
373
  : null);
372
374
 
375
+ if (rnOptions.hasKey("replaysSessionQuality")) {
376
+ final String qualityString = rnOptions.getString("replaysSessionQuality");
377
+ final SentryReplayQuality quality = parseReplayQuality(qualityString);
378
+ androidReplayOptions.setQuality(quality);
379
+ }
380
+
373
381
  if (!rnOptions.hasKey("mobileReplayOptions")) {
374
382
  return androidReplayOptions;
375
383
  }
@@ -398,6 +406,27 @@ public class RNSentryModuleImpl {
398
406
  return androidReplayOptions;
399
407
  }
400
408
 
409
+ private SentryReplayQuality parseReplayQuality(@Nullable String qualityString) {
410
+ if (qualityString == null) {
411
+ return SentryReplayQuality.MEDIUM;
412
+ }
413
+
414
+ try {
415
+ switch (qualityString.toLowerCase(Locale.ROOT)) {
416
+ case "low":
417
+ return SentryReplayQuality.LOW;
418
+ case "medium":
419
+ return SentryReplayQuality.MEDIUM;
420
+ case "high":
421
+ return SentryReplayQuality.HIGH;
422
+ default:
423
+ return SentryReplayQuality.MEDIUM;
424
+ }
425
+ } catch (Exception e) {
426
+ return SentryReplayQuality.MEDIUM;
427
+ }
428
+ }
429
+
401
430
  public void crash() {
402
431
  throw new RuntimeException("TEST - Sentry Client Crash (only works in release mode)");
403
432
  }
@@ -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 = "6.18.0";
5
+ static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.19.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,5 +1,5 @@
1
1
  export type { Breadcrumb, Request, SdkInfo, Event, Exception, SendFeedbackParams, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, UserFeedback, ErrorEvent, TransactionEvent, } from '@sentry/core';
2
- export { addBreadcrumb, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
2
+ export { addBreadcrumb, addIntegration, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
3
3
  export { ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
4
4
  export * from './integrations/exports';
5
5
  export { SDK_NAME, SDK_VERSION } from './version';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,IAAI,OAAO,EACzB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,EACvC,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,mCAAmC,EACnC,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AAEnB,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc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eedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
1
+ export { addBreadcrumb, addIntegration, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
2
2
  export { ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
3
3
  export * from './integrations/exports';
4
4
  export { SDK_NAME, SDK_VERSION } from './version';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,IAAI,OAAO,EACzB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,6BAA6B,EAC7B,uCAAuC,EACvC,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,EAC1B,uBAAuB,EACvB,aAAa,EACb,mCAAmC,EACnC,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE9G,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n SendFeedbackParams,\n SeverityLevel,\n Span,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n ErrorEvent,\n TransactionEvent,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metricsDefault as metrics,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n createTimeToFullDisplay,\n createTimeToInitialDisplay,\n} from './tracing';\n\nexport type { TimeToDisplayProps } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackButton } from './feedback/FeedbackButton';\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget, showFeedbackButton, hideFeedbackButton } from './feedback/FeedbackWidgetManager';\n\nexport { getDataFromUri } from './wrapper';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,E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fo,\n Event,\n Exception,\n SendFeedbackParams,\n SeverityLevel,\n Span,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n ErrorEvent,\n TransactionEvent,\n} from '@sentry/core';\n\nexport {\n addBreadcrumb,\n addIntegration,\n captureException,\n captureEvent,\n captureFeedback,\n captureMessage,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n getRootSpan,\n withActiveSpan,\n suppressTracing,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metricsDefault as metrics,\n lastEventId,\n} from '@sentry/core';\n\nexport {\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport { init, wrap, nativeCrash, flush, close, captureUserFeedback, withScope, crashedLastRun } from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n reactNativeTracingIntegration,\n getCurrentReactNativeTracingIntegration,\n getReactNativeTracingIntegration,\n reactNavigationIntegration,\n reactNativeNavigationIntegration,\n sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n startIdleNavigationSpan,\n startIdleSpan,\n getDefaultIdleNavigationSpanOptions,\n createTimeToFullDisplay,\n createTimeToInitialDisplay,\n} from './tracing';\n\nexport type { TimeToDisplayProps } from './tracing';\n\nexport { Mask, Unmask } from './replay/CustomMask';\n\nexport { FeedbackButton } from './feedback/FeedbackButton';\nexport { FeedbackWidget } from './feedback/FeedbackWidget';\nexport { showFeedbackWidget, showFeedbackButton, hideFeedbackButton } from './feedback/FeedbackWidgetManager';\n\nexport { getDataFromUri } from './wrapper';\n"]}
@@ -198,6 +198,13 @@ export interface BaseReactNativeOptions {
198
198
  * 1.0 will record all sessions and 0 will record none.
199
199
  */
200
200
  replaysOnErrorSampleRate?: number;
201
+ /**
202
+ * Defines the quality of the session replay. The higher the quality, the more accurate the replay
203
+ * will be, but also more data to transfer and more CPU load.
204
+ *
205
+ * @default 'medium'
206
+ */
207
+ replaysSessionQuality?: SentryReplayQuality;
201
208
  /**
202
209
  * Options which are in beta, or otherwise not guaranteed to be stable.
203
210
  */
@@ -234,6 +241,7 @@ export interface BaseReactNativeOptions {
234
241
  */
235
242
  useThreadsForMessageStack?: boolean;
236
243
  }
244
+ export type SentryReplayQuality = 'low' | 'medium' | 'high';
237
245
  export interface ReactNativeTransportOptions extends BrowserTransportOptions {
238
246
  /**
239
247
  * @deprecated use `maxQueueSize` in the root of the SDK options.
@@ -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,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,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,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,yB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E,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA0SvD;;;;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,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAI,aAAa,IAAI,aAAa,CAAC,YAAY,KAAK,MAAM,EAAE;QAC1D,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 { Profiler } from '@sentry/react';\nimport type * as React from 'react';\nimport { Platform } from 'react-native';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { getExpoConstants } from './utils/expomodules';\n\ntype ProfilerProps = React.ComponentProps<typeof Profiler>;\ntype BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];\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 * Options which are in beta, or otherwise not guaranteed to be stable.\n */\n _experiments?: {\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 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?: ProfilerProps;\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 const expoConstants = getExpoConstants();\n if (expoConstants && expoConstants.appOwnership === 'expo') {\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;AAGxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAoTvD;;;;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,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAI,aAAa,IAAI,aAAa,CAAC,YAAY,KAAK,MAAM,EAAE;QAC1D,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 { Profiler } from '@sentry/react';\nimport type * as React from 'react';\nimport { Platform } from 'react-native';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { getExpoConstants } from './utils/expomodules';\n\ntype ProfilerProps = React.ComponentProps<typeof Profiler>;\ntype BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];\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 * 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?: {\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?: ProfilerProps;\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 const expoConstants = getExpoConstants();\n if (expoConstants && expoConstants.appOwnership === 'expo') {\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,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "6.18.0";
3
+ export declare const SDK_VERSION = "6.19.0";
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
2
2
  export const SDK_NAME = 'sentry.javascript.react-native';
3
- export const SDK_VERSION = '6.18.0';
3
+ export const SDK_VERSION = '6.19.0';
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.18.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '6.19.0';\n"]}
package/ios/RNSentry.h CHANGED
@@ -9,12 +9,18 @@
9
9
 
10
10
  #import <Sentry/Sentry.h>
11
11
  #import <Sentry/SentryDebugImageProvider.h>
12
- #import <Sentry/SentryOptions.h>
13
12
 
14
13
  typedef int (*SymbolicateCallbackType)(const void *, Dl_info *);
15
14
 
15
+ @class SentryOptions;
16
+ @class SentryEvent;
17
+
18
+ #if CROSS_PLATFORM_TEST
19
+ @interface SentrySDKInternal : NSObject
20
+ #else
16
21
  @interface
17
22
  SentrySDK (Private)
23
+ #endif
18
24
  @property (nonatomic, nullable, readonly, class) SentryOptions *options;
19
25
  @end
20
26
 
package/ios/RNSentry.mm CHANGED
@@ -21,10 +21,22 @@
21
21
  #import <Sentry/PrivateSentrySDKOnly.h>
22
22
  #import <Sentry/SentryAppStartMeasurement.h>
23
23
  #import <Sentry/SentryBinaryImageCache.h>
24
+ #import <Sentry/SentryBreadcrumb.h>
24
25
  #import <Sentry/SentryDebugImageProvider+HybridSDKs.h>
26
+ #import <Sentry/SentryDebugMeta.h>
25
27
  #import <Sentry/SentryDependencyContainer.h>
28
+ #import <Sentry/SentryEvent.h>
29
+ #import <Sentry/SentryException.h>
26
30
  #import <Sentry/SentryFormatter.h>
27
- #import <Sentry/SentryOptions+HybridSDKs.h>
31
+ #import <Sentry/SentryOptions.h>
32
+ #import <Sentry/SentryUser.h>
33
+ #if __has_include(<Sentry/SentryOptions+HybridSDKs.h>)
34
+ # define USE_SENTRY_OPTIONS 1
35
+ # import <Sentry/SentryOptions+HybridSDKs.h>
36
+ #else
37
+ # define USE_SENTRY_OPTIONS 0
38
+ # import <Sentry/SentryOptionsInternal.h>
39
+ #endif
28
40
  #import <Sentry/SentryScreenFrames.h>
29
41
 
30
42
  // This guard prevents importing Hermes in JSC apps
@@ -51,15 +63,7 @@
51
63
 
52
64
  #import "RNSentryExperimentalOptions.h"
53
65
  #import "RNSentryVersion.h"
54
-
55
- @interface
56
- SentrySDK (RNSentry)
57
-
58
- + (void)captureEnvelope:(SentryEnvelope *)envelope;
59
-
60
- + (void)storeEnvelope:(SentryEnvelope *)envelope;
61
-
62
- @end
66
+ #import "SentrySDKWrapper.h"
63
67
 
64
68
  static bool hasFetchedAppStart;
65
69
 
@@ -106,7 +110,7 @@ RCT_EXPORT_METHOD(initNativeSdk
106
110
  [PrivateSentrySDKOnly addSdkPackage:REACT_NATIVE_SDK_PACKAGE_NAME
107
111
  version:REACT_NATIVE_SDK_PACKAGE_VERSION];
108
112
 
109
- [SentrySDK startWithOptions:sentryOptions];
113
+ [SentrySDKWrapper startWithOptions:sentryOptions];
110
114
 
111
115
  #if TARGET_OS_IPHONE || TARGET_OS_MACCATALYST
112
116
  BOOL appIsActive =
@@ -165,8 +169,13 @@ RCT_EXPORT_METHOD(initNativeSdk
165
169
  [RNSentryReplay updateOptions:mutableOptions];
166
170
  #endif
167
171
 
172
+ #if USE_SENTRY_OPTIONS
168
173
  SentryOptions *sentryOptions = [[SentryOptions alloc] initWithDict:mutableOptions
169
174
  didFailWithError:errorPointer];
175
+ #else
176
+ SentryOptions *sentryOptions = [SentryOptionsInternal initWithDict:mutableOptions
177
+ didFailWithError:errorPointer];
178
+ #endif
170
179
  if (*errorPointer != nil) {
171
180
  return nil;
172
181
  }
@@ -352,7 +361,11 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, fetchNativePackageName)
352
361
  - (NSDictionary *)fetchNativeStackFramesBy:(NSArray<NSNumber *> *)instructionsAddr
353
362
  symbolicate:(SymbolicateCallbackType)symbolicate
354
363
  {
364
+ #if CROSS_PLATFORM_TEST
365
+ BOOL shouldSymbolicateLocally = [SentrySDKInternal.options debug];
366
+ #else
355
367
  BOOL shouldSymbolicateLocally = [SentrySDK.options debug];
368
+ #endif
356
369
  NSString *appPackageName = [[NSBundle mainBundle] executablePath];
357
370
 
358
371
  NSMutableSet<NSString *> *_Nonnull imagesAddrToRetrieveDebugMetaImages =
@@ -440,7 +453,7 @@ RCT_EXPORT_METHOD(fetchNativeDeviceContexts
440
453
  __block NSMutableDictionary<NSString *, id> *serializedScope;
441
454
  // Temp work around until sorted out this API in sentry-cocoa.
442
455
  // TODO: If the callback isnt' executed the promise wouldn't be resolved.
443
- [SentrySDK configureScope:^(SentryScope *_Nonnull scope) {
456
+ [SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) {
444
457
  serializedScope = [[scope serialize] mutableCopy];
445
458
 
446
459
  NSDictionary<NSString *, id> *user = [serializedScope valueForKey:@"user"];
@@ -644,7 +657,7 @@ RCT_EXPORT_METHOD(fetchViewHierarchy
644
657
 
645
658
  RCT_EXPORT_METHOD(setUser : (NSDictionary *)userKeys otherUserKeys : (NSDictionary *)userDataKeys)
646
659
  {
647
- [SentrySDK configureScope:^(SentryScope *_Nonnull scope) {
660
+ [SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) {
648
661
  [scope setUser:[RNSentry userFrom:userKeys otherUserKeys:userDataKeys]];
649
662
  }];
650
663
  }
@@ -693,7 +706,7 @@ RCT_EXPORT_METHOD(setUser : (NSDictionary *)userKeys otherUserKeys : (NSDictiona
693
706
 
694
707
  RCT_EXPORT_METHOD(addBreadcrumb : (NSDictionary *)breadcrumb)
695
708
  {
696
- [SentrySDK configureScope:^(SentryScope *_Nonnull scope) {
709
+ [SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) {
697
710
  [scope addBreadcrumb:[RNSentryBreadcrumb from:breadcrumb]];
698
711
  }];
699
712
 
@@ -707,12 +720,12 @@ RCT_EXPORT_METHOD(addBreadcrumb : (NSDictionary *)breadcrumb)
707
720
 
708
721
  RCT_EXPORT_METHOD(clearBreadcrumbs)
709
722
  {
710
- [SentrySDK configureScope:^(SentryScope *_Nonnull scope) { [scope clearBreadcrumbs]; }];
723
+ [SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) { [scope clearBreadcrumbs]; }];
711
724
  }
712
725
 
713
726
  RCT_EXPORT_METHOD(setExtra : (NSString *)key extra : (NSString *)extra)
714
727
  {
715
- [SentrySDK
728
+ [SentrySDKWrapper
716
729
  configureScope:^(SentryScope *_Nonnull scope) { [scope setExtraValue:extra forKey:key]; }];
717
730
  }
718
731
 
@@ -722,7 +735,7 @@ RCT_EXPORT_METHOD(setContext : (NSString *)key context : (NSDictionary *)context
722
735
  return;
723
736
  }
724
737
 
725
- [SentrySDK configureScope:^(SentryScope *_Nonnull scope) {
738
+ [SentrySDKWrapper configureScope:^(SentryScope *_Nonnull scope) {
726
739
  if (context == nil) {
727
740
  [scope removeContextForKey:key];
728
741
  } else {
@@ -733,17 +746,17 @@ RCT_EXPORT_METHOD(setContext : (NSString *)key context : (NSDictionary *)context
733
746
 
734
747
  RCT_EXPORT_METHOD(setTag : (NSString *)key value : (NSString *)value)
735
748
  {
736
- [SentrySDK
749
+ [SentrySDKWrapper
737
750
  configureScope:^(SentryScope *_Nonnull scope) { [scope setTagValue:value forKey:key]; }];
738
751
  }
739
752
 
740
- RCT_EXPORT_METHOD(crash) { [SentrySDK crash]; }
753
+ RCT_EXPORT_METHOD(crash) { [SentrySDKWrapper crash]; }
741
754
 
742
755
  RCT_EXPORT_METHOD(closeNativeSdk
743
756
  : (RCTPromiseResolveBlock)resolve rejecter
744
757
  : (RCTPromiseRejectBlock)reject)
745
758
  {
746
- [SentrySDK close];
759
+ [SentrySDKWrapper close];
747
760
  resolve(@YES);
748
761
  }
749
762
 
@@ -946,7 +959,7 @@ RCT_EXPORT_METHOD(crashedLastRun
946
959
  : (RCTPromiseResolveBlock)resolve rejecter
947
960
  : (RCTPromiseRejectBlock)reject)
948
961
  {
949
- resolve(@([SentrySDK crashedLastRun]));
962
+ resolve(@([SentrySDKWrapper crashedLastRun]));
950
963
  }
951
964
 
952
965
  // Thanks to this guard, we won't compile this code when we build for the old architecture.
@@ -1,5 +1,6 @@
1
1
  #import "RNSentryReplay.h"
2
2
  #import "RNSentryReplayBreadcrumbConverterHelper.h"
3
+ #import "RNSentryReplayQuality.h"
3
4
  #import "RNSentryVersion.h"
4
5
  #import "React/RCTTextView.h"
5
6
  #import "Replay/RNSentryReplayMask.h"
@@ -22,9 +23,12 @@
22
23
  NSLog(@"Setting up session replay");
23
24
  NSDictionary *replayOptions = options[@"mobileReplayOptions"] ?: @{};
24
25
 
26
+ NSString *qualityString = options[@"replaysSessionQuality"];
27
+
25
28
  [options setValue:@{
26
29
  @"sessionSampleRate" : options[@"replaysSessionSampleRate"] ?: [NSNull null],
27
30
  @"errorSampleRate" : options[@"replaysOnErrorSampleRate"] ?: [NSNull null],
31
+ @"quality" : @([RNSentryReplayQuality parseReplayQuality:qualityString]),
28
32
  @"maskAllImages" : replayOptions[@"maskAllImages"] ?: [NSNull null],
29
33
  @"maskAllText" : replayOptions[@"maskAllText"] ?: [NSNull null],
30
34
  @"enableViewRendererV2" : replayOptions[@"enableViewRendererV2"] ?: [NSNull null],
@@ -1,7 +1,7 @@
1
1
  @import Sentry;
2
2
 
3
3
  #if SENTRY_TARGET_REPLAY_SUPPORTED
4
- @class SentryRRWebEvent;
4
+ @protocol SentryRRWebEvent;
5
5
 
6
6
  @interface RNSentryReplayBreadcrumbConverter : NSObject <SentryReplayBreadcrumbConverter>
7
7
 
@@ -0,0 +1,13 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ NS_ASSUME_NONNULL_BEGIN
4
+
5
+ typedef NS_ENUM(NSInteger, SentryReplayQuality);
6
+
7
+ @interface RNSentryReplayQuality : NSObject
8
+
9
+ + (SentryReplayQuality)parseReplayQuality:(NSString *_Nullable)qualityString;
10
+
11
+ @end
12
+
13
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,25 @@
1
+ #import "RNSentryReplayQuality.h"
2
+ @import Sentry;
3
+
4
+ @implementation RNSentryReplayQuality
5
+
6
+ + (SentryReplayQuality)parseReplayQuality:(NSString *_Nullable)qualityString
7
+ {
8
+ if (qualityString == nil) {
9
+ return SentryReplayQualityMedium;
10
+ }
11
+
12
+ NSString *lowercaseQuality = [qualityString lowercaseString];
13
+
14
+ if ([lowercaseQuality isEqualToString:@"low"]) {
15
+ return SentryReplayQualityLow;
16
+ } else if ([lowercaseQuality isEqualToString:@"medium"]) {
17
+ return SentryReplayQualityMedium;
18
+ } else if ([lowercaseQuality isEqualToString:@"high"]) {
19
+ return SentryReplayQualityHigh;
20
+ } else {
21
+ return SentryReplayQualityMedium;
22
+ }
23
+ }
24
+
25
+ @end
@@ -3,4 +3,4 @@
3
3
  NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
4
4
  NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
5
5
  NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
6
- NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.18.0";
6
+ NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.19.0";
@@ -0,0 +1,18 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @class SentryOptions;
4
+ @class SentryScope;
5
+
6
+ @interface SentrySDKWrapper : NSObject
7
+
8
+ + (void)configureScope:(void (^)(SentryScope *scope))callback;
9
+
10
+ + (void)crash;
11
+
12
+ + (void)close;
13
+
14
+ + (BOOL)crashedLastRun;
15
+
16
+ + (void)startWithOptions:(SentryOptions *)options;
17
+
18
+ @end
@@ -0,0 +1,31 @@
1
+ #import "SentrySDKWrapper.h"
2
+ @import Sentry;
3
+
4
+ @implementation SentrySDKWrapper
5
+
6
+ + (void)startWithOptions:(SentryOptions *)options
7
+ {
8
+ [SentrySDK startWithOptions:options];
9
+ }
10
+
11
+ + (void)crash
12
+ {
13
+ [SentrySDK crash];
14
+ }
15
+
16
+ + (void)close
17
+ {
18
+ [SentrySDK close];
19
+ }
20
+
21
+ + (BOOL)crashedLastRun
22
+ {
23
+ return [SentrySDK crashedLastRun];
24
+ }
25
+
26
+ + (void)configureScope:(void (^)(SentryScope *scope))callback
27
+ {
28
+ [SentrySDK configureScope:callback];
29
+ }
30
+
31
+ @end
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentry/react-native",
3
3
  "homepage": "https://github.com/getsentry/sentry-react-native",
4
4
  "repository": "https://github.com/getsentry/sentry-react-native",
5
- "version": "6.18.0",
5
+ "version": "6.19.0",
6
6
  "description": "Official Sentry SDK for react-native",
7
7
  "typings": "dist/js/index.d.ts",
8
8
  "types": "dist/js/index.d.ts",
@@ -65,9 +65,9 @@
65
65
  "react-native": ">=0.65.0"
66
66
  },
67
67
  "dependencies": {
68
- "@sentry/babel-plugin-component-annotate": "3.6.1",
68
+ "@sentry/babel-plugin-component-annotate": "4.0.2",
69
69
  "@sentry/browser": "8.55.0",
70
- "@sentry/cli": "2.50.0",
70
+ "@sentry/cli": "2.50.2",
71
71
  "@sentry/core": "8.55.0",
72
72
  "@sentry/react": "8.55.0",
73
73
  "@sentry/types": "8.55.0",
@@ -81,7 +81,7 @@
81
81
  "@sentry-internal/eslint-config-sdk": "8.55.0",
82
82
  "@sentry-internal/eslint-plugin-sdk": "8.55.0",
83
83
  "@sentry-internal/typescript": "8.55.0",
84
- "@sentry/wizard": "5.4.0",
84
+ "@sentry/wizard": "6.1.0",
85
85
  "@testing-library/react-native": "^12.7.2",
86
86
  "@types/jest": "^29.5.13",
87
87
  "@types/node": "^20.9.3",
@@ -129,7 +129,10 @@ try {
129
129
  console.warn(error);
130
130
  }
131
131
 
132
- loadDotenv(path.join(projectRoot, '.env.sentry-build-plugin'));
132
+ const sentryBuildPluginPath = path.join(projectRoot, '.env.sentry-build-plugin');
133
+ if (fs.existsSync(sentryBuildPluginPath)) {
134
+ loadDotenv();
135
+ }
133
136
 
134
137
  let sentryOrg = getEnvVar(SENTRY_ORG);
135
138
  let sentryUrl = getEnvVar(SENTRY_URL);
@@ -24,7 +24,7 @@ LOCAL_NODE_BINARY=${NODE_BINARY:-node}
24
24
  RN_PROJECT_ROOT="${PROJECT_DIR}/.."
25
25
 
26
26
  [ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties
27
- [ -z "$SENTRY_DOTENV_PATH" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
27
+ [ -z "$SENTRY_DOTENV_PATH" ] && [ -f "$RN_PROJECT_ROOT/.env.sentry-build-plugin" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
28
28
 
29
29
  [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_PACKAGE_PATH=$("$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))")
30
30
  [ -z "$SOURCEMAP_FILE" ] && export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"
@@ -35,7 +35,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
35
35
  "$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
36
36
  ) || true
37
37
  if [ -n "$RESOLVED_PATH" ]; then
38
- SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH"
38
+ SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
39
39
  else
40
40
  # Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
41
41
  PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
@@ -50,6 +50,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
50
50
  fi
51
51
  fi
52
52
  fi
53
+ [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
53
54
 
54
55
  [[ $SENTRY_INCLUDE_NATIVE_SOURCES == "true" ]] && INCLUDE_SOURCES_FLAG="--include-sources" || INCLUDE_SOURCES_FLAG=""
55
56
 
@@ -13,7 +13,7 @@ LOCAL_NODE_BINARY=${NODE_BINARY:-node}
13
13
  RN_PROJECT_ROOT="${PROJECT_DIR}/.."
14
14
 
15
15
  [ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties
16
- [ -z "$SENTRY_DOTENV_PATH" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
16
+ [ -z "$SENTRY_DOTENV_PATH" ] && [ -f "$RN_PROJECT_ROOT/.env.sentry-build-plugin" ] && export SENTRY_DOTENV_PATH="$RN_PROJECT_ROOT/.env.sentry-build-plugin"
17
17
  [ -z "$SOURCEMAP_FILE" ] && export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"
18
18
 
19
19
  if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
@@ -22,7 +22,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
22
22
  "$LOCAL_NODE_BINARY" --print "require('path').dirname(require.resolve('@sentry/cli/package.json'))" 2>/dev/null
23
23
  ) || true
24
24
  if [ -n "$RESOLVED_PATH" ]; then
25
- SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH"
25
+ SENTRY_CLI_PACKAGE_PATH="$RESOLVED_PATH/bin/sentry-cli"
26
26
  else
27
27
  # Fallback: parse NODE_PATH from the .bin/sentry-cli shim (file generated by PNPM)
28
28
  PNPM_BIN_PATH="$PWD/../node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
@@ -37,7 +37,7 @@ if [ -z "$SENTRY_CLI_EXECUTABLE" ]; then
37
37
  fi
38
38
  fi
39
39
  fi
40
- [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="${SENTRY_CLI_PACKAGE_PATH}/bin/sentry-cli"
40
+ [ -z "$SENTRY_CLI_EXECUTABLE" ] && SENTRY_CLI_EXECUTABLE="$SENTRY_CLI_PACKAGE_PATH"
41
41
 
42
42
  REACT_NATIVE_XCODE=$1
43
43
 
package/sentry.gradle CHANGED
@@ -201,7 +201,7 @@ project.afterEvaluate {
201
201
 
202
202
  project.logger.lifecycle("Sentry-CLI arguments: ${args}")
203
203
  def osCompatibility = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'node'] : []
204
- if (!System.getenv('SENTRY_DOTENV_PATH')) {
204
+ if (!System.getenv('SENTRY_DOTENV_PATH') && file("$reactRoot/.env.sentry-build-plugin").exists()) {
205
205
  environment('SENTRY_DOTENV_PATH', "$reactRoot/.env.sentry-build-plugin")
206
206
  }
207
207
  commandLine(*osCompatibility, *args)
@@ -305,8 +305,7 @@ def resolveSentryReactNativeSDKPath(reactRoot) {
305
305
  def resolveSentryCliPackagePath(reactRoot) {
306
306
  def resolvedCliPath = null
307
307
  try {
308
- def file = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir))
309
- resolvedCliPath = file.text.trim().getParentFile();
308
+ resolvedCliPath = new File(["node", "--print", "require.resolve('@sentry/cli/package.json')"].execute(null, rootDir).text.trim()).getParentFile();
310
309
  } catch (Throwable ignored) { // Check if it's located in .pnpm
311
310
  try {
312
311
  def pnpmRefPath = reactRoot.toString() + "/node_modules/@sentry/react-native/node_modules/.bin/sentry-cli"
@@ -1,5 +1,5 @@
1
1
  export type { Breadcrumb, Request, SdkInfo, Event, Exception, SendFeedbackParams, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, UserFeedback, ErrorEvent, TransactionEvent, } from '@sentry/core';
2
- export { addBreadcrumb, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
2
+ export { addBreadcrumb, addIntegration, captureException, captureEvent, captureFeedback, captureMessage, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startInactiveSpan, startSpan, startSpanManual, getActiveSpan, getRootSpan, withActiveSpan, suppressTracing, spanToJSON, spanIsSampled, setMeasurement, getCurrentScope, getGlobalScope, getIsolationScope, getClient, setCurrentClient, addEventProcessor, metricsDefault as metrics, lastEventId, } from '@sentry/core';
3
3
  export { ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
4
4
  export * from './integrations/exports';
5
5
  export { SDK_NAME, SDK_VERSION } from './version';
@@ -198,6 +198,13 @@ export interface BaseReactNativeOptions {
198
198
  * 1.0 will record all sessions and 0 will record none.
199
199
  */
200
200
  replaysOnErrorSampleRate?: number;
201
+ /**
202
+ * Defines the quality of the session replay. The higher the quality, the more accurate the replay
203
+ * will be, but also more data to transfer and more CPU load.
204
+ *
205
+ * @default 'medium'
206
+ */
207
+ replaysSessionQuality?: SentryReplayQuality;
201
208
  /**
202
209
  * Options which are in beta, or otherwise not guaranteed to be stable.
203
210
  */
@@ -234,6 +241,7 @@ export interface BaseReactNativeOptions {
234
241
  */
235
242
  useThreadsForMessageStack?: boolean;
236
243
  }
244
+ export type SentryReplayQuality = 'low' | 'medium' | 'high';
237
245
  export interface ReactNativeTransportOptions extends BrowserTransportOptions {
238
246
  /**
239
247
  * @deprecated use `maxQueueSize` in the root of the SDK options.
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "6.18.0";
3
+ export declare const SDK_VERSION = "6.19.0";
4
4
  //# sourceMappingURL=version.d.ts.map