-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Use different options for native SDK #1877
Comments
Hey any specific reason why you want to disable it on native? does it cause duplicate error reports? |
Some native plugins occasionally generate failed network calls, that get reported as issues. I can't do anything to fix or prevent these errors. They are not a problem, but having them in the dashboard adds noise and is inefficient |
Got it. the first solution would be to disable native init and init the sdks yourselves. That way you have flexibility to disable options to your needs. Although I do have to say that this method might be overkill for this use case unless you think it is good enough for you. so I'll get back to you and see what else can be done. |
What we can do is being able to configure the // disable in general
options.captureFailedRequest = false;
// and then enable for each integration directly
dio.addSentry(captureFailedRequests: true);
// or
SentryHttpClient(captureFailedRequests: true); @Maatteogekko wdyt? |
@buenaflor something like that would work for my use case. A couple of observations:
|
not quite, the dio integration also features breadcrumbs and performance monitoring. I'd rather not overcomplicate this and keep it with the added |
Sure, then your proposal works for me. Thanks! |
@denrase assigning you here, also lmk what you think |
@buenaflor I created a small sample with a |
So for this particular case the setup would look like: options.captureFailedRequests = true;
options.beforeInitNativeSdk = (arguments) {
arguments['captureFailedRequests'] = false;
return arguments;
}; WDYT? |
@Maatteogekko We have added additional parameters like suggested by @buenaflor in #1931. It will be part of one of the next releases. Thank you for your feedback! |
Problem Statement
I want to disable
captureFailedRequests
for the native iOS SDK, but I want to keep it active to make use of thesentry_dio
integration. Today the same options are used for the dart SDK as well as the native SDKs, with no easy way to specify different behaviour.Solution Brainstorm
Allow an optional parameter in
Sentry.init
to specify options override for a specificintegration
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: