Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(uptime): Rename "Allow {Tracing->Sampling}" #81137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 @@
/>
<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}}

Check failure on line 225 in static/app/views/alerts/rules/uptime/uptimeAlertForm.tsx

View workflow job for this annotation

GitHub Actions / self-hosted

No overload matches this call.
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/" />
),
}
)}
flexibleControlStateSize
/>
Expand Down
Loading