Skip to content

Java.Lang.IllegalArgumentException when setting MaxBreadcrumbs to 0 #3255

@tipa

Description

@tipa

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.2

OS

Android

SDK Version

4.2.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

Sentry.SentrySdk.Init(o =>
{
    ....
    o.MaxBreadcrumbs = 0;
}

According to the docs:

This variable controls the total amount of breadcrumbs that should be captured. This defaults to 100, but you can set this to any number.

Expected Result

no crash and collection of breadcrumbs is disabled

Actual Result

java.lang.IllegalArgumentException: The size must be greater than 0
  at io.sentry.CircularFifoQueue.< init > (CircularFifoQueue.java:91)
  at io.sentry.Scope.createBreadcrumbsList(Scope.java:738)
  at io.sentry.Scope.< init > (Scope.java:90)
  at io.sentry.Hub.createRootStackItem(Hub.java:77)
  at io.sentry.Hub.< init > (Hub.java:43)
  at io.sentry.Sentry.init(Sentry.java:238)
  at io.sentry.Sentry.init(Sentry.java:167)
  at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:87)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions