find_dropped_events doesn't say that buckets snap to whole intervals
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- documentation, tooling
调研方向
从 packages/mcp-core/src/tools/catalog/find-dropped-events.ts 开始:interval 的提示文本位于第 83-84 行和第 128-137 行附近,而省略 meta.start/meta.end 的响应映射位于第 212-217 行。追踪该工具如何构建其结果,以便在 start/end 超出 interval 边界时添加条件注释,然后运行该工具的测试,确认新的提示和注释会出现。
由索引模型根据 Issue 内容生成。
描述
Pattern: find_dropped_events with start/end and a coarse interval returns full-interval volumes for the first and last buckets, not volumes for the requested window. Nothing in the tool output or the description says so. Callers that sum the buckets for a fixed window overcount.
Reports: 1 (Sentry MCP user feedback MCP-SERVER-GQD, python caller, server 0.42.0). The caller worked around it with interval=1h and told its user about the alignment limit.
What happens
- The caller passes
start=<…T18:01Z>,end=<…T06:01Z>,interval=1d. The tool forwards them unchanged toGET /organizations/{org}/events-dropped/(sampled span for this caller's call). - Sentry builds the outcomes query through
QueryDefinition→get_constrained_date_range(getsentry/sentrysrc/sentry/snuba/sessions_v2.py:451-487), which callsto_intervals(src/sentry/snuba/metrics/utils.py:414-449). That floorsstartto the interval and roundsendup to the next boundary. With1d, the range becomes<day>T00:00Zto<last day + 1>T00:00Z. So the first and last buckets hold whole-day totals. - The endpoint's
meta.start/meta.endreport the requested range, not the aligned one (src/sentry/api/endpoints/organization_events_dropped.py:233-234). The MCP tool doesn't returnmeta.start/meta.endat all (packages/mcp-core/src/tools/catalog/find-dropped-events.ts:212-217). Only each bucket's ownstart/endgives this away. - The description (
find-dropped-events.ts:83-84,:128-137) tells callers to "use '1d' and sum the buckets" for longer ranges, without saying that the first and last buckets can cover time outside the window.
Suggested fix (MCP side)
- When
start/enddon't fall on interval boundaries, add a note that gives the aligned range that was counted and says the edge buckets are whole intervals. Suggest a finer interval (for example1h) for exact windows. - Add one line to the
intervalhint saying buckets align to whole intervals in UTC.
Possible Sentry API follow-up (not filed): meta.start/meta.end could report the aligned range that was actually queried. Owner: whoever owns organization_events_dropped.py. The MCP note above doesn't depend on that change.
Not this issue: the same report's search_errors time-range problem is getsentry/toolkit#2146, and its explanation mismatch is getsentry/toolkit#2147.
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_ebd17b42670133526c625ae4ebab5254.
--
- 主要语言
- TypeScript
- 星标
- 961
- 派生
- 179
- 平均合并
- 15 小时 33 分钟
- 30 天内合并 PR
- 476
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/toolkit 的其他 Issue
-
CLI enhancement MCP
难度 2/5 1-3 小时 新手友好度 63/100
getsentry/toolkit#1908 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
getsentry/toolkit#1471 · 1 条评论 ·
维护者通常 1 天内回复
-
get_sentry_resource gives no guidance for Explore > Errors list URLs可能已有人在做 @sentry-junior 今天认领。 未关闭MCP mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 32/100
getsentry/toolkit#2278 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
getsentry/toolkit#2275 · 1 条评论 ·
维护者通常 1 天内回复
-
MCP mcp-feedback-pattern
难度 3/5 1-2 天 新手友好度 68/100
getsentry/toolkit#2273 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/toolkit 的全部 Issue
相似的 Issue
-
Add: BOM Cine未关闭approved check:passed streams:add
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug platform-android
难度 2/5 1-3 小时 新手友好度 68/100
Termix-SSH/Mobile#146 · 1 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
devswha/herdr-web-ui#3875 ·
-
难度 1/5 1 小时以内 新手友好度 88/100