Skip to content

Commit 9e9cb0a

Browse files
committed
Fix #103 - Add disableNativeIntegration option
1 parent 1b07fa7 commit 9e9cb0a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/config.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ These are functions you can call in your javascript code:
1515
Sentry.config("___DSN___", {
1616
deactivateStacktraceMerging: true, // default: false | Deactivates the stacktrace merging feature
1717
logLevel: SentryLog.Debug, // default SentryLog.None | Possible values: .None, .Error, .Debug, .Verbose
18+
disableNativeIntegration: false // default: false | Deactivates the native integration and only uses raven-js
1819
// These two options will only be considered if stacktrace merging is active
1920
// Here you can add modules that should be ignored or exclude modules
2021
// that should no longer be ignored from stacktrace merging

lib/Sentry.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ export const SentryLog = {
5757

5858
export class Sentry {
5959
static install() {
60-
if (RNSentry && RNSentry.nativeClientAvailable) {
60+
if (
61+
RNSentry &&
62+
RNSentry.nativeClientAvailable &&
63+
Sentry.options.disableNativeIntegration === false
64+
) {
6165
Sentry._nativeClient = new NativeClient(Sentry._dsn, Sentry.options);
6266
Sentry.eventEmitter = new NativeEventEmitter(RNSentryEventEmitter);
6367
Sentry.eventEmitter.addListener(
@@ -78,7 +82,8 @@ export class Sentry {
7882
Sentry._dsn = dsn;
7983
Sentry.options = {
8084
logLevel: SentryLog.None,
81-
instrument: false
85+
instrument: false,
86+
disableNativeIntegration: false
8287
};
8388
Object.assign(Sentry.options, options);
8489
return Sentry;

0 commit comments

Comments
 (0)