Title: Rate limits from later headers shorten longer active limits · Issue #26409 · getsentry/sentry-javascript · GitHub
Open Graph Title: Rate limits from later headers shorten longer active limits · Issue #26409 · getsentry/sentry-javascript
X Title: Rate limits from later headers shorten longer active limits · Issue #26409 · getsentry/sentry-javascript
Description: 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. rateli...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/26409
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rate limits from later headers shorten longer active limits","articleBody":"`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.\n\n- [ratelimit.ts#L82-L104](https://github.com/getsentry/sentry-javascript/blob/89c33cdec910c9a221749603a88ff4928d04b6c6/packages/core/src/utils/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.\n- The same overwrite happens across responses, and for `all` from `Retry-After` and from a 429 with no headers.\n- SDKs that use the `@sentry/core` transports inherit this, for example getsentry/sentry-electron.\n- The [spec](https://develop.sentry.dev/sdk/foundations/transport/rate-limiting/#stage-2-determine-rate-limits) says: \"If a new rate limit is shorter than an already stored rate limit, then keep the longer one.\"\n\n@itsrayeedscodespace reported this bug in the Rust SDK in getsentry/sentry-rust#1409. A check of the other SDKs found the same behavior here.\n\n\u003c!-- junior-request-attribution:start -->\nvia @szokeasaurusrex.\n\u003c!-- junior-request-attribution:end -->\n\n\u003c!-- junior-session-footer:start -->\n\u003c!-- junior-conversation-id:local%3Aweb%3Ae6e7e2102496e621e7e0ade3 -->\n\n--\n\n[View Session](https://junior-prod.sentry.dev/conversations/local%3Aweb%3Ae6e7e2102496e621e7e0ade3) [[Sentry]](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ae6e7e2102496e621e7e0ade3/?project=4510944073809921)\n\n\u003c!-- junior-session-footer:end -->","author":{"url":"https://github.com/apps/sentry-junior","@type":"Person","name":"sentry-junior"},"datePublished":"2026-11-16T13:01:43Z","url":"https://github.com/getsentry/sentry-javascript/issues/26409"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:af1a0bde-a5bb-01bd-0652-eb6626541f8c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED74:10BC16:5F33CA:80DFCB:6B044159 |
| html-safe-nonce | f6b2a8c07e7ffe4bf3c5a42a8827c4074139c297c32747ffff3517637272289d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDc0OjEwQkMxNjo1RjMzQ0E6ODBERkNCOjZCMDQ0MTU5IiwidmlzaXRvcl9pZCI6IjI3NzMxNDA5NTAzNzIwNzM4MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f8ea84b8756ed9fff4f13e607c7831cdf0408532c9a0c242182593dc2031c8a9 |
| hovercard-subject-tag | issue:6421778912 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/26409/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b2d708c91b7ed929d11fa7261976ec4a658a8f49e3048adcc0c65914b3dd5af/getsentry/sentry-javascript/issues/26409 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b2d708c91b7ed929d11fa7261976ec4a658a8f49e3048adcc0c65914b3dd5af/getsentry/sentry-javascript/issues/26409 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sentry-junior[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width