Skip to content

Commit

Permalink
feat(uptime): Rename "Allow {Tracing->Sampling}"
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Nov 22, 2024
1 parent 817f307 commit f594511
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions static/app/views/alerts/rules/uptime/uptimeAlertForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Uptime Alert Form', function () {
await userEvent.type(input('Name of header 1'), 'X-Something');
await userEvent.type(input('Value of X-Something'), 'Header Value');

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

const name = input('Uptime rule name');
await userEvent.clear(name);
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('Uptime Alert Form', function () {
expect(screen.getByRole('menuitemradio', {name: 'POST'})).toBeChecked();
await selectEvent.openMenu(input('Environment'));
expect(screen.getByRole('menuitemradio', {name: 'prod'})).toBeChecked();
expect(screen.getByRole('checkbox', {name: 'Allow Tracing'})).toBeChecked();
expect(screen.getByRole('checkbox', {name: 'Allow Sampling'})).toBeChecked();
});

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

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

const name = input('Uptime rule name');
await userEvent.clear(name);
Expand Down
16 changes: 11 additions & 5 deletions static/app/views/alerts/rules/uptime/uptimeAlertForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import TextareaField from 'sentry/components/forms/fields/textareaField';
import TextField from 'sentry/components/forms/fields/textField';
import Form from 'sentry/components/forms/form';
import FormModel from 'sentry/components/forms/model';
import ExternalLink from 'sentry/components/links/externalLink';
import List from 'sentry/components/list';
import ListItem from 'sentry/components/list/listItem';
import Panel from 'sentry/components/panels/panel';
import Text from 'sentry/components/text';
import {t} from 'sentry/locale';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Organization} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
Expand Down Expand Up @@ -220,10 +221,15 @@ export function UptimeAlertForm({project, handleDelete, rule}: Props) {
/>
<BooleanField
name="traceSampling"
label={t('Allow Tracing')}
showHelpInTooltip
help={t(
'Allows uptime checks to trigger traces if the checked service is configured with a Sentry SDK.'
label={t('Allow Sampling')}
showHelpInTooltip={{isHoverable: true}}
help={tct(
'Defer the sampling decision to a Sentry SDK configured in your application. Disable to prevent all span sampling. [link:Learn more].',
{
link: (
<ExternalLink href="https://docs.sentry.io/product/alerts/uptime-monitoring/uptime-tracing/" />
),
}
)}
flexibleControlStateSize
/>
Expand Down

0 comments on commit f594511

Please sign in to comment.