-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow native SDK options to be specified by user without needing to re-initialize native SDK. #1263
Comments
The issue is presented only on Native errors, on JS errors everything works as expected |
Should I do this manually in Native code?
|
No you shouldn't do this as it will initialize the SDK twice and cause both to not be synced. Currently you're not able to disable just Native breadcrumbs, but there is a way to do it with
reject(@"SentryReactNative", error.localizedDescription, error);
return;
}
+
+ NSMutableArray *integrations = [SentryOptions defaultIntegrations].mutableCopy;
+ [integrations removeObject:@"SentryAutoBreadcrumbTrackingIntegration"];
+ sentryOptions.integrations = integrations;
+
[SentrySDK startWithOptionsObject:sentryOptions];
resolve(@YES);
Now every time you run |
Actually, now that we just merged #1259, when we release that you can just re-initialize the SDK in Swift/Objective-C and that won't break the SDK. However, for now you can use that patch-package workaround. Let's close this. |
Thanks! It works. It took me some time to test it in all environments. Now all native breadcrumbs are disabled. Still, I have one issue with breadcrumbs. JS-exceptions attach breadcrumbs from previous session (Android only) Native exceptions don't as expected @jennmueng can you help with it? It's a minor issue and I can create a separate bug report for it, if you want to. |
It seems like it only happens on Android |
@jennmueng is there a way to do the same in Android native code? |
Yes you can do something similar in |
Final patch
|
That looks about right, yep. |
Hi @jennmueng ! Can you please help me? We have upgraded our
|
|
Great! Thank you for answers @jennmueng ! |
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 2.1.0
react-native
version: 0.63.4Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
https://sentry.io/organizations/stroller-ab/issues/2118758655/?environment=development&project=246038&query=is%3Aunresolved&statsPeriod=14d
Configuration:
(
@sentry/react-native
)I have following issue:
I can see default breadcrumbs for native errors even after disabling
Breadcrumbs
integration during initing SDKSteps to reproduce:
Actual result:
You can see default native breadcrumbs
Expected result:
You should see only exception in breadcrumbs
The text was updated successfully, but these errors were encountered: