Skip to content

Commit 642fc96

Browse files
authored
feat(explore): Update confidence footer copy (#92219)
Closes EXP-299
1 parent 2d818ac commit 642fc96

File tree

2 files changed

+30
-17
lines changed

2 files changed

+30
-17
lines changed

static/app/views/explore/charts/confidenceFooter.spec.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ describe('ConfidenceFooter', () => {
1919
{wrapper: Wrapper}
2020
);
2121

22-
expect(screen.getByTestId('wrapper')).toHaveTextContent('Based on 100 samples');
22+
expect(screen.getByTestId('wrapper')).toHaveTextContent(
23+
'Extrapolated based on 100 span samples'
24+
);
2325
await userEvent.hover(screen.getByText('100'));
2426
expect(
25-
await screen.findByText(/You may not have enough samples for high accuracy./)
27+
await screen.findByText(
28+
/You may not have enough span samples for a high accuracy extrapolation of your query./
29+
)
2630
).toBeInTheDocument();
2731
});
2832
it('renders for full scan with grouping', async () => {
@@ -37,11 +41,13 @@ describe('ConfidenceFooter', () => {
3741
);
3842

3943
expect(screen.getByTestId('wrapper')).toHaveTextContent(
40-
'Top 5 groups based on 100 samples'
44+
'Top 5 groups extrapolated based on 100 span samples'
4145
);
4246
await userEvent.hover(screen.getByText('100'));
4347
expect(
44-
await screen.findByText(/You may not have enough samples for high accuracy./)
48+
await screen.findByText(
49+
/You may not have enough span samples for a high accuracy extrapolation of your query./
50+
)
4551
).toBeInTheDocument();
4652
});
4753
});
@@ -58,7 +64,9 @@ describe('ConfidenceFooter', () => {
5864
{wrapper: Wrapper}
5965
);
6066

61-
expect(screen.getByTestId('wrapper')).toHaveTextContent('Based on 100 samples');
67+
expect(screen.getByTestId('wrapper')).toHaveTextContent(
68+
'Extrapolated based on 100 span samples'
69+
);
6270
});
6371
it('renders for full scan with grouping', () => {
6472
render(
@@ -72,7 +80,7 @@ describe('ConfidenceFooter', () => {
7280
);
7381

7482
expect(screen.getByTestId('wrapper')).toHaveTextContent(
75-
'Top 5 groups based on 100 samples'
83+
'Top 5 groups extrapolated based on 100 span samples'
7684
);
7785
});
7886
});

static/app/views/explore/charts/confidenceFooter.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function confidenceMessage({sampleCount, confidence, topEvents, isSampled}: Prop
2222
const isTopN = defined(topEvents) && topEvents > 1;
2323
if (!defined(sampleCount)) {
2424
return isTopN
25-
? t('* Chart for top %s groups extrapolated from \u2026', topEvents)
26-
: t('* Chart extrapolated from \u2026');
25+
? t('* Top %s groups extrapolated based on \u2026', topEvents)
26+
: t('* Extrapolated based on \u2026');
2727
}
2828

2929
const noSampling = defined(isSampled) && !isSampled;
@@ -33,7 +33,7 @@ function confidenceMessage({sampleCount, confidence, topEvents, isSampled}: Prop
3333
if (confidence === 'low') {
3434
if (isTopN) {
3535
return tct(
36-
'Top [topEvents] groups based on [tooltip:[sampleCountComponent] samples]',
36+
'Top [topEvents] groups extrapolated based on [tooltip:[sampleCountComponent] span samples]',
3737
{
3838
topEvents,
3939
tooltip: lowAccuracyFullSampleCount,
@@ -42,20 +42,23 @@ function confidenceMessage({sampleCount, confidence, topEvents, isSampled}: Prop
4242
);
4343
}
4444

45-
return tct('Based on [tooltip:[sampleCountComponent] samples]', {
45+
return tct('Extrapolated based on [tooltip:[sampleCountComponent] span samples]', {
4646
tooltip: lowAccuracyFullSampleCount,
4747
sampleCountComponent,
4848
});
4949
}
5050

5151
if (isTopN) {
52-
return tct('Top [topEvents] groups based on [sampleCountComponent] samples', {
53-
topEvents,
54-
sampleCountComponent,
55-
});
52+
return tct(
53+
'Top [topEvents] groups extrapolated based on [sampleCountComponent] span samples',
54+
{
55+
topEvents,
56+
sampleCountComponent,
57+
}
58+
);
5659
}
5760

58-
return tct('Based on [sampleCountComponent] samples', {
61+
return tct('Extrapolated based on [sampleCountComponent] span samples', {
5962
sampleCountComponent,
6063
});
6164
}
@@ -71,11 +74,13 @@ function _LowAccuracyFullTooltip({
7174
<Tooltip
7275
title={
7376
<div>
74-
{t('You may not have enough samples for high accuracy.')}
77+
{t(
78+
'You may not have enough span samples for a high accuracy extrapolation of your query.'
79+
)}
7580
<br />
7681
<br />
7782
{t(
78-
'You can try adjusting your query by removing filters or increasing the time interval.'
83+
"You can try adjusting your query by narrowing the date range, removing filters or increasing the chart's time interval."
7984
)}
8085
<br />
8186
<br />

0 commit comments

Comments
 (0)