-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
improved maxBreadcrumbs description #4682
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not quite true. See:
sentry-javascript/packages/hub/src/scope.ts
Line 370 in 2cf6f94
100 is effectively a ceiling on the value, it’s a hard limit. Users can set a value <= 100, but all values over a 100 will become a 100.
I’d be fine to add the max payload note, but I’m open to just making the above more clear in the docs.
Uh oh!
There was an error while loading. Please reload this page.
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.
I am confusion, lol. And maybe this is a difference between SDKs. The user was setting up React Native, but in their IDE, this was the note that popped up above this option (maybe 'cause RN imports stuff from React which is JS?). But for RN I've been told this isn't limited. The linked issue has the full discussion.
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.
Tagging @marandaneto
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.
How about:
The payload stuff is true, but lots of things can make the payload too big, not just breadcrumbs.
I would think that if RN has a different max (or no max), they'd be able to just override the type with one of their own. (Left a comment to a similar effect on the issue.)
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.
Ok, looks like we have a different implementation across the SDKs, for all the Mobile SDKs, the
maxBreadcrumbs
is an open number, if it's given, it should be respected, it does not matter how big it is, e.g. you may have 1 breadcrumb with huge metadata which fills up the payload size, but you can also have a 1000 breadcrumbs, which wouldn't hurt the payload at all, it really depends on usage, so I was not aware of this absolutemaxBreadcrumbs
.Sorry for the confusion @imatwawana
I'll bring this up to my team and see if it makes sense to have such absolute
maxBreadcrumbs
and then we adjust our RN (source-code) docs.The product docs cannot reflect one way or the other since SDKs do differently, I'll clear this out first before going ahead with docs change.
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.
Shall I go ahead and close this PR then?
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.
I think we can leave the text as is, because it means what it says. The confusion was simply because this was showing up in the RN source code docs, but wasn't matching the behaviour or other source code documentation in a sample RN app.
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.
Great, then I will close this PR.