-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Fix: Allow MaxBreadcrumb 0 / Expose MaxBreadcrumb metadata. #3836
Conversation
… maxbreadcrumbs sets to 0
sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt
Outdated
Show resolved
Hide resolved
sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
…estMetadataReaderTest.kt Co-authored-by: Stefano <[email protected]>
…estMetadataReaderTest.kt Co-authored-by: Stefano <[email protected]>
@stefanosiano just saying that I cannot merge PRs here, do we need to wait for more approvals before merging it? |
yeah, thanks for the reminder 😅 |
*/ | ||
@Override | ||
public boolean isEmpty() { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucas-zimerman @stefanosiano should this return true
instead? If no, can we document why?
📜 Description
Previously, when MaxBreadcrumbs was set to 0, the app would crash since the CircularQueue implementation must have a size higher than 0.
With that, I made a
disabledqueue
that behaves similarly likeCircularQueue
do, with the difference that any items inserted into it will be ignored.💡 Motivation and Context
I was also surprised to see that max breadcrumbs wasn't exposed on the metadata, so I also exposed it on this PR to make tests with the sample easier.
To fix
getsentry/sentry-react-native#3634
and
#3313
💚 How did you test it?
Unit tests and running the sample app with max breadcrumbs set to 0 and 100.
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps