fix(billing): rename 'Total ingested' to 'Total billed' in usage UI - #117475
fix(billing): rename 'Total ingested' to 'Total billed' in usage UI#117475maxkosty wants to merge 3 commits into
Conversation
The billed total can be lower than actual ingestion volume during trials (billing stops when a trial begins), so 'Total ingested' is misleading. 'Total billed' more accurately reflects what the number represents. Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
|
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
| <Flex direction="column" gap="md"> | ||
| <Heading as="h4">{t('Total billed')}</Heading> | ||
| <Stack gap="md"> | ||
| <Heading as="h4">{t('Total ingested')}</Heading> | ||
| <Heading as="h4">{t('Total billed')}</Heading> |
There was a problem hiding this comment.
Bug: The IngestionSummary component renders two identical headings with the text 'Total billed', which will cause tests using getByRole to fail due to multiple matches.
Severity: HIGH
Suggested Fix
Remove the new <Flex> wrapper and the duplicate heading it contains. The intended change was likely just to rename the original heading inside the <Stack> from 'Total ingested' to 'Total billed'. Ensure all JSX tags are properly closed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/gsApp/views/subscriptionPage/usageTotalsTable.tsx#L193-L196
Potential issue: In the `IngestionSummary` component, a new `<Flex>` wrapper was added
which includes a `<Heading as="h4">{t('Total billed')}</Heading>`. However, the original
heading inside the `<Stack>` component was also renamed to have the same text. This
results in two identical headings being rendered on the page. This duplication will
cause tests that use `screen.getByRole('heading', {name: 'Total billed'})` to fail, as
React Testing Library's `getByRole` function throws an error when it finds multiple
matching elements. The code also introduces a syntax error with an unclosed `<Flex>`
tag.
Also affects:
static/gsApp/views/subscriptionPage/usageOverview/components/charts.spec.tsx:68~68
Did we get this right? 👍 / 👎 to inform future reviews.
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Important
This was authered entirely by @jr and I'm a not in billing or even SWE, please review carefully
Summary
Renames the "Total ingested" heading in the subscription usage chart to "Total billed".
The value displayed is sourced from the billing side, not the events-accepted side. During a trial, Sentry stops billing for consumed events — so the number shown can be significantly lower than actual ingestion volume. Calling it "Total ingested" is misleading; "Total billed" accurately reflects what the metric represents.
Context from #discuss-billing: a customer saw 1.2B accepted spans vs 300M shown here, because their trial began mid-period and billing only counted pre-trial consumption.
Changes
static/gsApp/views/subscriptionPage/usageTotalsTable.tsx— updated heading labelstatic/gsApp/views/subscriptionPage/usageOverview/components/charts.spec.tsx— updated matching test assertionVerification
Test assertion updated to match new label. No logic changes.
View Session in Sentry