Java.Lang.IllegalArgumentException when setting MaxBreadcrumbs to 0
Description
Originally raised in the sentry-dotnet repository (as the SDK users is building for Android using MAUI):
- https://github.com/getsentry/sentry-dotnet/issues/3255
The exception is being thrown by the sentry-java SDK however.
@jamescrosswell there's BeforeBreadcrumbCallback on SentryOptions in the Java SDK, not sure if that can help create a workaround for this user by always returning null and thus dropping all breadcrumbs.
@jamescrosswell there's
BeforeBreadcrumbCallbackonSentryOptionsin the Java SDK, not sure if that can help create a workaround for this user by always returningnulland thus dropping all breadcrumbs.
Thanks @adinauer, yes that's what I've suggested as a workaround for the time being... well technically I suggested using the SetBeforeBreadcrumb callback on the .NET options, but this gets hooked up the the Java SDK BeforeBreadcrumbCallback under the hood.
I think the customer has correctly identified a discrepancy between the docs and the SDK behaviour though so we should probably adress one or the other of those things eventually.
decision: when maxBreadcrumbs is set to 0 we should disable breadcrumbs