Rate limits from later headers shorten longer active limits
维护者通常 1 天内回复
@sentry-junior 已经在做这个了。
开始于 2026年11月16日。
评估
调研方向
从 _parse_rate_limits 和 sentry_sdk/transport.py 中对 self._disabled_until 的更新开始,然后阅读链接的速率限制规范。检查同一标头中的限制、后续响应和 429 响应如何相互影响。为较长限制仍然有效时收到较短限制的情况添加或更新 transport 测试;完成标准是该类别一直处于禁用状态,直到较长限制到期。
由索引模型根据 Issue 内容生成。
描述
HttpTransportCore 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.
_parse_rate_limitsyields one entry per group, andself._disabled_until.update(...)keeps the last one. With3600:error:organization, 0:error:project, errors are not limited.- The same overwrite happens across separate responses. A 429 also overwrites the all-categories limit (L359).
- 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.
--
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 713
- 平均合并
- 1 天 16 分钟
- 30 天内合并 PR
- 113
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-python 的其他 Issue
-
perf: Source context re-reads the whole file via loader.get_source() for every frame可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Improvement Python Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 72/100
getsentry/sentry-python#8089 · 2 条评论 ·
维护者通常 1 天内回复
-
Improvement Integration: Boto3 Python Traces
难度 2/5 1-3 小时 新手友好度 67/100
getsentry/sentry-python#8074 · 1 条评论 ·
维护者通常 1 天内回复
-
`litellm`: Set request parameters可能重新可做 关联的 PR 已关闭且未合并。 未关闭Improvement Python Spans
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry-python#7994 · 1 条评论 ·
维护者通常 1 天内回复
-
`cohere`: Set request parameters可能重新可做 @mohanprasath-dev 于 44 天前认领,目前没有进行中的 PR。 未关闭Improvement Python Spans Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 65/100
getsentry/sentry-python#7992 · 2 条评论 ·
维护者通常 1 天内回复
-
`openai`: Set request parameters可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Improvement Python Spans
难度 2/5 1-3 小时 新手友好度 62/100
getsentry/sentry-python#7990 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/sentry-python 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
521xueweihan/HelloGitHub#4599 ·
-
Bug Needs Triage
难度 2/5 1-3 小时 新手友好度 88/100
pandas-dev/pandas#72413 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
compiler-explorer/compiler-explorer#9710 ·
维护者通常 1 天内回复
-
bug harness
难度 2/5 1-3 小时 新手友好度 72/100
mruangutai/harness#2687 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
modal-labs/modal-client#4158 ·