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
render_sentry_chart top-N groups pick low-sample series #2451
When render_sentry_chart gets a groupBy, it asks events-timeseries for the top 5 groups sorted by the y-axis itself (sort=-${yAxis}, excludeOther=1). With a percentile y-axis and a high-cardinality group like release, that picks the groups with the most extreme value, and those are usually the ones with almost no data. The chart then comes out as mostly zero buckets with single spikes, and it hides the releases that carry the real traffic.
Code: getEventsTimeSeries in packages/mcp-core/src/api-client/client.ts sets the sort, and packages/mcp-core/src/tools/catalog/render-sentry-chart.ts passes topEvents: { groupBy, limit: MAX_CHART_SERIES }.
Example (sentry/docs, last 7 days, is_transaction:true span.op:[pageload,navigation], p95(span.duration) by release):
The project has about 100.9k matching transactions across 245 releases. Overall p95 is 7.85s.
The busiest release has 17.7k transactions with a p95 of 6.2s.
The chart showed 5 releases with 1, 3, 7, 23 and 57 transactions. Every one of them had a p95 of exactly 30,000ms, which looks like the browser SDK's pageload timeout cap. Every hourly bucket was 0 except for a few lone 30s spikes.
One of those 5 series came from vercel-production, not production. Because no environment filter was applied, low-volume preview and legacy environments competed with production for the 5 slots.
The MCP call itself finished fine (948ms). Only the series selection is wrong.
Open question (from the requester): should charts grouped by release also take environment into account, for example by defaulting to production when the query has no environment: filter?
Activity
linear-code commentedon Nov 20, 2026
MCP-1268
fix(mcp): Chart the busiest groups and keep empty buckets empty (#2453)