Skip to content

Commit 1fd0d48

Browse files
committed
feat(uptime): Rename "Allow {Tracing->Sampling}"
1 parent f577af7 commit 1fd0d48

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

static/app/views/alerts/rules/uptime/uptimeAlertForm.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Uptime Alert Form', function () {
5454
await userEvent.type(input('Name of header 1'), 'X-Something');
5555
await userEvent.type(input('Value of X-Something'), 'Header Value');
5656

57-
await userEvent.click(screen.getByRole('checkbox', {name: 'Allow Tracing'}));
57+
await userEvent.click(screen.getByRole('checkbox', {name: 'Allow Sampling'}));
5858

5959
const name = input('Uptime rule name');
6060
await userEvent.clear(name);
@@ -119,7 +119,7 @@ describe('Uptime Alert Form', function () {
119119
expect(screen.getByRole('menuitemradio', {name: 'POST'})).toBeChecked();
120120
await selectEvent.openMenu(input('Environment'));
121121
expect(screen.getByRole('menuitemradio', {name: 'prod'})).toBeChecked();
122-
expect(screen.getByRole('checkbox', {name: 'Allow Tracing'})).toBeChecked();
122+
expect(screen.getByRole('checkbox', {name: 'Allow Sampling'})).toBeChecked();
123123
});
124124

125125
it('handles simple edits', async function () {
@@ -194,7 +194,7 @@ describe('Uptime Alert Form', function () {
194194
await userEvent.type(input('Name of header 2'), 'X-Another');
195195
await userEvent.type(input('Value of X-Another'), 'Second Value');
196196

197-
await userEvent.click(screen.getByRole('checkbox', {name: 'Allow Tracing'}));
197+
await userEvent.click(screen.getByRole('checkbox', {name: 'Allow Sampling'}));
198198

199199
const name = input('Uptime rule name');
200200
await userEvent.clear(name);

static/app/views/alerts/rules/uptime/uptimeAlertForm.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ import TextareaField from 'sentry/components/forms/fields/textareaField';
1515
import TextField from 'sentry/components/forms/fields/textField';
1616
import Form from 'sentry/components/forms/form';
1717
import FormModel from 'sentry/components/forms/model';
18+
import ExternalLink from 'sentry/components/links/externalLink';
1819
import List from 'sentry/components/list';
1920
import ListItem from 'sentry/components/list/listItem';
2021
import Panel from 'sentry/components/panels/panel';
2122
import Text from 'sentry/components/text';
22-
import {t} from 'sentry/locale';
23+
import {t, tct} from 'sentry/locale';
2324
import {space} from 'sentry/styles/space';
2425
import type {Organization} from 'sentry/types/organization';
2526
import type {Project} from 'sentry/types/project';
@@ -220,10 +221,15 @@ export function UptimeAlertForm({project, handleDelete, rule}: Props) {
220221
/>
221222
<BooleanField
222223
name="traceSampling"
223-
label={t('Allow Tracing')}
224-
showHelpInTooltip
225-
help={t(
226-
'Allows uptime checks to trigger traces if the checked service is configured with a Sentry SDK.'
224+
label={t('Allow Sampling')}
225+
showHelpInTooltip={{isHoverable: true}}
226+
help={tct(
227+
'Defer the sampling decision to a Sentry SDK configured in your application. Disable to prevent all span sampling. [link:Learn more].',
228+
{
229+
link: (
230+
<ExternalLink href="https://docs.sentry.io/product/alerts/uptime-monitoring/" />
231+
),
232+
}
227233
)}
228234
flexibleControlStateSize
229235
/>

0 commit comments

Comments
 (0)