Skip to content

Rate limits from later headers shorten longer active limits #26409

Open

Description

@sentry-junior

updateRateLimits in @sentry/core stores the last rate limit it sees for each category. A shorter limit therefore replaces a longer one that is still active, and the SDK starts sending that category before the longer quota expires.

  • ratelimit.ts#L82-L104 assigns now + delay without comparing it to the stored value. With 3600:error:organization, 0:error:project, errors are not limited.
  • The same overwrite happens across responses, and for all from Retry-After and from a 429 with no headers.
  • SDKs that use the @sentry/core transports inherit this, for example getsentry/sentry-electron.
  • The spec says: "If a new rate limit is shorter than an already stored rate limit, then keep the longer one."

@itsrayeedscodespace reported this bug in the Rust SDK in getsentry/sentry-rust#1409. A check of the other SDKs found the same behavior here.

via @szokeasaurusrex.

--

View Session [Sentry]

Activity

  1. linear-code commented on Nov 16, 2026

    @linear-code
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