Repository navigation
feat(stats): Add a Seer usage tab to Stats & Usage - #131502
Merged
Merged
Conversation
Billing members of orgs on token-billed Seer can see what each Seer product costs: a stacked bar chart per interval and a table of totals for the selected date range. The page lives in gsApp because getsentry's LLM cost stats endpoint serves its data, so sentry gains a routes:stats hook for it. Refs CW-3105
vaind
marked this pull request as ready for review
November 17, 2026 20:19
knip flags exports that nothing imports.
…ost-stats-tab # Conflicts: # static/app/views/organizationStats/header.tsx
The tab is already titled Seer, so the product name needs no Seer prefix. Refs CW-3105
The LLM cost stats endpoint now returns Seer credits instead of US dollars, the unit customers are billed in.
The endpoint is now LLM usage stats and returns Seer credits, so the view, its API URL and the names around them say usage.
getsentry renamed llm-usage-stats/ to seer-usage-stats/, because it reports Seer credits. Refs CW-3105
The axis labels round to whole credits, so fractional ticks showed repeated labels for small values. Refs CW-3105
billyvg
approved these changes
Nov 19, 2026
Charts color series by position, so a product changed color when an earlier product had no usage in the range. Each product now keeps its palette slot. Usage below half a credit shows as <1 instead of 0, and the UTC rule comes from the Usage tab's isDisplayUtc. Refs CW-3105
Member
|
Screenshots of the Seer tab, taken on a local getsentry devserver. Posted by an AI agent (Claude Code) on behalf of Billy Vong. Local stack
14 days, hourly buckets 90 days, daily buckets. The total matches the seeded LLM cost at one credit per cent. A date range with no usage A member without billing access opening An org without |
billyvg
reviewed
Nov 19, 2026
The other Stats & Usage tabs don't need billing access, so the Seer tab now shows to every member of a token-billed Seer org. Refs CW-3105
…ost-stats-tab # Conflicts: # static/app/router/routes.tsx # static/app/views/organizationStats/header.tsx
The pre-commit autofix expanded them, and the format hook rejects that. The content matches master.
vaind
added a commit
that referenced
this pull request
Nov 20, 2026
On every frontend pull request, the `pre-commit lint` workflow runs `pnpm run lint:suppressions --prune` and the bot commits the result as "apply pre-commit fixes". Since #131758 set oxfmt's `objectWrap` to `collapse`, that commit expands every `{"count": N}` in the three `oxlint-suppressions.json` files onto three lines, with identical JSON content. The next run's `format` hook collapses them again and fails, and restoring the files only triggers the bot again (seen on #131502). The prune serialized budgets with `JSON.stringify(_, null, 2)`. We now pipe each written asset through the oxfmt CLI with `--stdin-filepath`, so it picks up the same `.oxfmtrc.json` and ignore patterns as the `format` hook. Pruning master now leaves the files byte-identical. Excluding the files from oxfmt would also stop the loop, but the next prune would re-expand them and they would become the only unformatted JSON in the repo. Budget comparisons and the temporary root asset still use the plain `JSON.stringify` output, because only committed files need the hook's format.
…ost-stats-tab # Conflicts: # static/app/oxlint-suppressions.json
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Orgs on token-billed Seer can't see which Seer features use their credits. The Seer wallet only shows a balance.
This adds a Seer tab to Stats & Usage. It shows a stacked bar chart of the Seer credits used per interval and a table of totals for the selected date range. The chart groups the billed feature tags into Autofix and Agent, and puts unknown tags under Other so new billed features still show up. The interval follows the same rules as the Usage tab. The tab rounds credits to whole numbers, because one credit bills one cent and the endpoint returns them unrounded.
token-billed-seer-enabledsees the tab, like the other Stats & Usage tabs. Other orgs are redirected to the Usage tab.routes:statshook so gsApp can register the route.Rollout: merge only after https://github.com/getsentry/getsentry/pull/23373 is deployed. Until then the tab would fail to load for flagged orgs.
Refs CW-3105