Skip to content

feat(sentry): add a period filter and scope requests by project - #290

Draft
tsan88 wants to merge 1 commit into
buggregator:masterfrom
tsan88:feat/sentry-period-filter
Draft

tsan88 wants to merge 1 commit into
buggregator:masterfrom
tsan88:feat/sentry-period-filter

Conversation

@tsan88

@tsan88 tsan88 commented Sep 4, 2026

Copy link
Copy Markdown

Two related gaps made a busy instance hard to use.

Nothing was scoped by project. The sentry requests sent no parameters at all, so the project picked in the sidebar had no effect on the exceptions list: the grouped view — the view that makes a shared instance usable — always showed every project mixed together. The server has had project and environment filters all along; nothing was sending them.

Nothing could be narrowed by time. /api/events/preview returned the whole project (25.8 MB in a single response on our instance) and the sentry lists paged through all of history, so reaching an error from a particular hour meant scrolling.

Changes

  • PeriodSelect in the header: 1h / 3h / 6h / 12h / 24h / 7d / 30d / All time, stored in localStorage (a chosen window is a user habit, not tab state), 24h by default.
  • The period is sent as ?window= and the active project as ?project= on every sentry request (withScope in use-sentry-requests) and on /api/events/preview.
  • The feed and the sentry lists refetch when the project or the period changes. The layout-base watcher compares by value instead of by reference, so re-setting the same project no longer refetches the whole feed.

Server-side support for window/project is buggregator/server#351 and #352. An older server simply ignores the extra parameters, so this is safe to ship independently — it just does nothing until the server side lands.

Testing

vue-tsc --build --force clean, eslint clean on the touched files (only the pre-existing v-html warning in value-dump.vue remains), vite build --minify succeeds. Running in production on our instance, ≈40k events/day across 6 projects.

Two related gaps made a busy instance hard to use.

The sentry requests carried no scope at all: the project picked in the sidebar
had no effect on the exceptions list, so the grouped view — the view that makes
a shared instance usable — always showed every project mixed together. The
backend has had project and environment filters all along, nothing was sending
them.

And nothing could be narrowed by time. /api/events/preview returned the whole
project (tens of megabytes of JSON on our instance) and the sentry lists paged
through all of history, so reaching an error from a particular hour meant
scrolling.

Adds a period selector to the header (1h … 30d, All time; stored in
localStorage, 24h by default) whose value is sent as ?window= alongside the
project, and refetches the feed and the sentry lists when either changes.

Server-side support for window/project is in buggregator/server; an older server
simply ignores the extra parameters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant