Skip to content

Commit b59ff88

Browse files
authored
feat(seer): Kick off seer automation for performance issues as well (#92403)
We already trigger seer automation in `post_process` for errors, so this is just adding it to the generic pipeline to handle other supported issue types as well. Also adding a check within `kick_off_seer_automation` for supported issue types (all errors, all performance issues; no crons, no uptime, no rage clicks, no metric alerts, no endpoint/function regressions).
1 parent f0929f8 commit b59ff88

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/sentry/tasks/post_process.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,20 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
15681568
event = job["event"]
15691569
group = event.group
15701570

1571+
# check currently supported issue categories for Seer
1572+
if group.issue_category not in [
1573+
GroupCategory.ERROR,
1574+
GroupCategory.PERFORMANCE,
1575+
GroupCategory.MOBILE,
1576+
GroupCategory.FRONTEND,
1577+
GroupCategory.DB_QUERY,
1578+
GroupCategory.HTTP_CLIENT,
1579+
] or group.issue_category in [
1580+
GroupCategory.REPLAY,
1581+
GroupCategory.FEEDBACK,
1582+
]:
1583+
return
1584+
15711585
if not features.has("organizations:gen-ai-features", group.organization) or not features.has(
15721586
"organizations:trigger-autofix-on-issue-summary", group.organization
15731587
):
@@ -1619,5 +1633,6 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
16191633
GENERIC_POST_PROCESS_PIPELINE = [
16201634
process_snoozes,
16211635
process_inbox_adds,
1636+
kick_off_seer_automation,
16221637
process_rules,
16231638
]

tests/sentry/tasks/test_post_process.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,6 +2665,7 @@ class PostProcessGroupPerformanceTest(
26652665
SnoozeTestMixin,
26662666
SnoozeTestSkipSnoozeMixin,
26672667
PerformanceIssueTestCase,
2668+
KickOffSeerAutomationTestMixin,
26682669
):
26692670
def create_event(self, data, project_id, assert_no_errors=True):
26702671
fingerprint = data["fingerprint"][0] if data.get("fingerprint") else "some_group"
@@ -2783,6 +2784,7 @@ class PostProcessGroupGenericTest(
27832784
InboxTestMixin,
27842785
RuleProcessorTestMixin,
27852786
SnoozeTestMixin,
2787+
KickOffSeerAutomationTestMixin,
27862788
):
27872789
def create_event(self, data, project_id, assert_no_errors=True):
27882790
data["type"] = "generic"

0 commit comments

Comments
 (0)