Skip to content
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

Merged
merged 8 commits into from
Nov 4, 2024

Conversation

lucas-zimerman
Copy link
Contributor

@lucas-zimerman lucas-zimerman commented Oct 30, 2024

📜 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 like CircularQueue 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

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Member

@stefanosiano stefanosiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@lucas-zimerman
Copy link
Contributor Author

@stefanosiano just saying that I cannot merge PRs here, do we need to wait for more approvals before merging it?

@stefanosiano stefanosiano merged commit 2af8d1a into getsentry:main Nov 4, 2024
31 of 32 checks passed
@stefanosiano
Copy link
Member

yeah, thanks for the reminder 😅

*/
@Override
public boolean isEmpty() {
return false;
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants