Skip to content

maxBreadcrumbs limit unclear #4496

Closed

Description

@liamjones

Core or SDK?

Platform/SDK

Which part? Which one?

React Native

Description

There seems to be some inconsistency on documentation of maxBreadcrumbs and what a potential max limit is.

https://docs.sentry.io/platforms/react-native/configuration/options/#max-breadcrumbs states that 100 is the default but says nothing about a maximum.

The sample app seems to think it can be increased to at least 150: https://github.com/getsentry/sentry-react-native/blob/4fd13137fe71984d1166c33198076da9db28f158/sample/src/App.tsx#L39

The documentation popup I get in my IDE says 100 is the upper limit as well as the default:
Screenshot 2021-12-15 at 11 06 15

Suggested Solution

Resolve inconsistency where it's incorrect and document max limit in the config documentation page as well.

Activity

  1. getsentry-release commented on Dec 15, 2021

    @getsentry-release
    Contributor

    Routing to @getsentry/team-mobile for triage. ⏲️

  2. marandaneto commented on Mar 3, 2022

    @marandaneto
    Contributor

    @imatwawana Can you help us out with the wording here?
    https://docs.sentry.io/platforms/react-native/configuration/options/#max-breadcrumbs

    This variable controls the total amount of breadcrumbs that should be captured. This defaults to 100

    You can set as much as you want, the default is 100, but it can be customized, the problem is that if you set too much, your event may be dropped because the payload is too big since sentry has a max payload size of 1MB

    It's clear enough for me tho.

    On the JS SDK, we have this: https://github.com/getsentry/sentry-javascript/blob/38278210118576d041117e11e2bd6507677625f6/packages/types/src/options.ts#L78-L82
    But it's just explaining if the default is used, which is 100.

  3. imatwawana commented on Mar 3, 2022

    @imatwawana
    Contributor

    https://github.com/getsentry/sentry-javascript/blob/38278210118576d041117e11e2bd6507677625f6/packages/types/src/options.ts#L78-L82

    I think the combination of the docs + the text in the SDK (especially in JS) is what makes this confusing. To remove some of the confusion, we can make the docs content a bit more robust. Something like:

    This variable controls the total amount of breadcrumbs that should be captured. The default is 100, but you can set this to any number. However, you should be aware that Sentry has a maximum payload size of 1MB and any events exceeding that payload size will be dropped.

    In the JS SDK text, the part "values over 100 will be ignored" makes it sound like even if you update the maxBreadcrumbs value, that value will be ignored, not that breadcrumbs beyond 100 will be ignored. This text should probably be updated. But in the meantime, I'll update the docs.

  4. lobsterkatie commented on Mar 4, 2022

    @lobsterkatie
    Member

    In the JS SDK text, the part "values over 100 will be ignored" makes it sound like even if you update the maxBreadcrumbs value, that value will be ignored,

    Yes, exactly. That is true.

    If that behavior is overridden in RN, I'd think they could just make a type where that property has a different description, no, @marandaneto?

  5. marandaneto commented on Mar 4, 2022

    @marandaneto
    Contributor

    In the JS SDK text, the part "values over 100 will be ignored" makes it sound like even if you update the maxBreadcrumbs value, that value will be ignored,

    Yes, exactly. That is true.

    If that behavior is overridden in RN, I'd think they could just make a type where that property has a different description, no, @marandaneto?

    No, it should use the JS behavior then, but I was unaware of this absolute number, See getsentry/sentry-javascript#4682 (comment)
    The Mobile SDKs tho, don't have such an absolute number, so even more confusing, I'm currently asking around how this feature was designed and which SDKs should adapt to it.

  6. marandaneto commented on Mar 8, 2022

    @marandaneto
    Contributor

    We've decided to fix it on the JS SDK first and later adjust the docs.
    Thanks for raising the confusion @liamjones

  7. locked and limited conversation to collaborators on Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions