find_dropped_events doesn't say that buckets snap to whole intervals
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- documentation, tooling
Direzione di ricerca
Inizia in packages/mcp-core/src/tools/catalog/find-dropped-events.ts: il testo del suggerimento di interval si trova intorno alle righe 83-84 e 128-137, e la mappatura della risposta che omette meta.start/meta.end è alle righe 212-217. Traccia come lo strumento costruisce il suo risultato in modo che una nota condizionale possa essere aggiunta quando start/end cadono fuori dai confini dell'intervallo, poi esegui i test dello strumento per confermare che compaiano il nuovo suggerimento e la nota.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
--
- Lingua principale
- TypeScript
- Stelle
- 961
- Fork
- 179
- Merge medio
- 15h 33m
- PR unite (30g)
- 476
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/toolkit
-
CLI enhancement MCP
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
getsentry/toolkit#1908 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getsentry/toolkit#1471 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
get_sentry_resource gives no guidance for Explore > Errors list URLsForse già presa @sentry-junior l’ha presa oggi. ApertaMCP mcp-feedback-pattern
Difficoltà 2/5 1-3 ore Idoneità per principianti 32/100
getsentry/toolkit#2278 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
getsentry/toolkit#2275 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
MCP mcp-feedback-pattern
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
getsentry/toolkit#2273 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/toolkit
Issue simili
-
Add: BOM CineApertaapproved check:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug platform-android
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Termix-SSH/Mobile#146 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
devswha/herdr-web-ui#3875 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100