Skip to content

Commit 9d1a996

Browse files
authored
feat(discover): Rename metrics baseline toggle feature (getsentry#40971)
Remove references to processed and indexed events. Renamed "Processed events" -> "Total Transactions" Renamed "Total Events" -> "Event Count" Renamed "processed events" label -> "total transactions" Updated the tooltip message ![Screen Shot 2022-11-03 at 1 57 39 PM](https://user-images.githubusercontent.com/63818634/199798868-c187262c-ae21-431b-9559-7692b59e4691.png) ![Screen Shot 2022-11-03 at 2 02 48 PM](https://user-images.githubusercontent.com/63818634/199799975-a0c12051-94f9-4135-81de-aa7da6b478e0.png)
1 parent bb1d875 commit 9d1a996

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

static/app/views/eventsV2/chartFooter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function ChartFooter({
6666
}: Props) {
6767
const elements: React.ReactNode[] = [];
6868

69-
elements.push(<SectionHeading key="total-label">{t('Total Events')}</SectionHeading>);
69+
elements.push(<SectionHeading key="total-label">{t('Event Count')}</SectionHeading>);
7070
elements.push(
7171
total === null || loadingProcessedTotals === true ? (
7272
<SectionValue data-test-id="loading-placeholder" key="total-value">
@@ -94,7 +94,7 @@ export default function ChartFooter({
9494
<InlineContainer>
9595
<Feature organization={organization} features={['discover-metrics-baseline']}>
9696
<Fragment>
97-
<SwitchLabel>{t('Processed events')}</SwitchLabel>
97+
<SwitchLabel>{t('Total Transactions')}</SwitchLabel>
9898
<Switch
9999
data-test-id="processed-events-toggle"
100100
isActive={showBaseline}
@@ -121,7 +121,7 @@ export default function ChartFooter({
121121
position="top"
122122
size="sm"
123123
title={tct(
124-
'Show a baseline of client-side [processedEventsLink: processed events].[break]Available on the Total Period display for y-axes scoped to [transactionEventsLink: transaction events].',
124+
'The baseline is only available for [transactionEventsLink: transaction events] when displaying the Top Period.[break]The baseline shows the [processedEventsLink: total transactions] matching your query, compared to the sampled transactions.',
125125
{
126126
transactionEventsLink: (
127127
<ExternalLink href="https://docs.sentry.io/product/sentry-basics/tracing/event-detail/" />

static/app/views/eventsV2/metricsBaselineContainer.spec.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('MetricsBaselineContainer', function () {
149149
})
150150
);
151151

152-
expect(screen.getByText(/Processed events/i)).toBeInTheDocument();
152+
expect(screen.getByText(/Total Transactions/i)).toBeInTheDocument();
153153
expect(screen.getByText(/19m/i)).toBeInTheDocument();
154154
expect(screen.getByTestId('processed-events-toggle')).toBeEnabled();
155155
});
@@ -179,7 +179,7 @@ describe('MetricsBaselineContainer', function () {
179179
);
180180
});
181181

182-
expect(screen.getByText(/Processed events/i)).toBeInTheDocument();
182+
expect(screen.getByText(/Total Transactions/i)).toBeInTheDocument();
183183
expect(screen.getByTestId('processed-events-toggle')).toBeEnabled();
184184

185185
await waitFor(() => {
@@ -188,7 +188,7 @@ describe('MetricsBaselineContainer', function () {
188188
option: expect.objectContaining({
189189
legend: expect.objectContaining({
190190
data: expect.arrayContaining([
191-
'processed events: p50(transaction.duration)',
191+
'total transactions: p50(transaction.duration)',
192192
]),
193193
}),
194194
}),
@@ -207,7 +207,7 @@ describe('MetricsBaselineContainer', function () {
207207

208208
renderMetricsBaselineContainer(organization, project, eventView, yAxis);
209209

210-
expect(screen.getByText(/Processed events/i)).toBeInTheDocument();
210+
expect(screen.getByText(/Total Transactions/i)).toBeInTheDocument();
211211
expect(screen.getByTestId('processed-events-toggle')).toBeDisabled();
212212
});
213213

@@ -225,7 +225,7 @@ describe('MetricsBaselineContainer', function () {
225225

226226
renderMetricsBaselineContainer(organization, project, eventView, yAxis);
227227

228-
expect(screen.getByText(/Processed events/i)).toBeInTheDocument();
228+
expect(screen.getByText(/Total Transactions/i)).toBeInTheDocument();
229229
expect(screen.getByTestId('processed-events-toggle')).toBeDisabled();
230230
});
231231

static/app/views/eventsV2/metricsBaselineContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function MetricsBaselineContainer({
182182
let seriesWithOrdering: SeriesWithOrdering[] = [];
183183

184184
seriesWithOrdering = Object.keys(response).map((seriesName: string) => {
185-
const prefixedName = `processed events: ${seriesName}`;
185+
const prefixedName = `total transactions: ${seriesName}`;
186186
const seriesData: EventsStats = response[seriesName];
187187
return [
188188
seriesData.order || 0,
@@ -217,7 +217,7 @@ export function MetricsBaselineContainer({
217217
);
218218
} else {
219219
const field = yAxis[0];
220-
const prefixedName = `processed events: ${field}`;
220+
const prefixedName = `total transactions: ${field}`;
221221
const transformed = transformSeries(response, prefixedName, field);
222222
additionalSeries.push(
223223
LineSeries({

0 commit comments

Comments
 (0)