You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rate limiter replaces longer quotas with shorter limits from later headers #1409
Reproduced locally without a Sentry server, using the SDK's rate limiter.
Version
Current master (92580321), Rust 1.93.0, macOS arm64.
Steps to Reproduce
RateLimiter::update_from_sentry_header overwrites each stored deadline with the last group in the header. For example:
use sentry::transports::{RateLimiter,RateLimitingCategory};letmut limiter = RateLimiter::new();
limiter.update_from_sentry_header("3600:error:organization, 0:error:project");assert!(limiter.is_disabled(RateLimitingCategory::Error).is_some());
The assertion fails because the zero-second project limit replaces the still-active one-hour organization limit. Repeating this across separate header updates produces the same result. It also affects the implicit all-categories limit (3600::organization, 0::project).
The global deadline can also be shortened by a subsequent Retry-After or a headerless 429 response, since all three update methods assign instead of merging expiration times.
The SDK can resume sending an affected data category before the longer quota expires. This applies to every currently recognized category. Three regression tests fail on unchanged master (duplicate header groups, separate responses, and global updates).
Proposed Fix
Keep the maximum of the stored and incoming expiry in each update path, without changing parsing or header precedence.
Activity
linear-code commentedon Nov 14, 2026
RUST-323
ref(transport): Enforce the longest rate limit with a type
szokeasaurusrex commentedon Nov 16, 2026
Hey @itsrayeedscodespace, thank you for the issue and the PR. This indeed looks like a real bug!
ref(transport): Move rate limiter to `ratelimit/mod.rs`
fix(core): Keep the longest active rate limit for each category (#26410)
fix(transport): retain the longest active rate limit (getsentry#1410)