Skip to content

Commit 1e6bd89

Browse files
priscilawebdevandrewshie-sentry
authored andcommitted
ref(quick-start): Remove 'METRIC_ALERT' from onboarding task (#83487)
1 parent c2d2ffe commit 1e6bd89

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: src/sentry/models/organizationonboardingtask.py

-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class OnboardingTask:
3333
ISSUE_TRACKER = 9
3434
ALERT_RULE = 10
3535
FIRST_TRANSACTION = 11
36-
METRIC_ALERT = 12
3736
INTEGRATIONS = 13
3837
SESSION_REPLAY = 14
3938
REAL_TIME_NOTIFICATIONS = 15
@@ -134,7 +133,6 @@ class OrganizationOnboardingTask(AbstractOnboardingTask):
134133
(OnboardingTask.ISSUE_TRACKER, "setup_issue_tracker"),
135134
(OnboardingTask.ALERT_RULE, "setup_alert_rules"),
136135
(OnboardingTask.FIRST_TRANSACTION, "setup_transactions"),
137-
(OnboardingTask.METRIC_ALERT, "setup_metric_alert_rules"),
138136
(OnboardingTask.INTEGRATIONS, "setup_integrations"),
139137
(OnboardingTask.SESSION_REPLAY, "setup_session_replay"),
140138
(OnboardingTask.REAL_TIME_NOTIFICATIONS, "setup_real_time_notifications"),

Diff for: src/sentry/receivers/onboarding.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,13 @@ def record_plugin_enabled(plugin, project, user, **kwargs):
654654

655655
@alert_rule_created.connect(weak=False)
656656
def record_alert_rule_created(user, project: Project, rule_type: str, **kwargs):
657-
task = OnboardingTask.METRIC_ALERT if rule_type == "metric" else OnboardingTask.ALERT_RULE
657+
# The quick start now only has a task for issue alert rules.
658+
# Please see https://github.com/getsentry/sentry/blob/c06a3aa5fb104406f2a44994d32983e99bc2a479/static/app/components/onboardingWizard/taskConfig.tsx#L351-L352
659+
if rule_type == "metric":
660+
return
658661
rows_affected, created = OrganizationOnboardingTask.objects.create_or_update(
659662
organization_id=project.organization_id,
660-
task=task,
663+
task=OnboardingTask.ALERT_RULE,
661664
values={
662665
"status": OnboardingTaskStatus.COMPLETE,
663666
"user_id": user.id if user else None,

0 commit comments

Comments
 (0)