Skip to content

Commit

Permalink
change order of checks in should_call_seer_for_grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Aug 27, 2024
1 parent 6ccb9dc commit 9a7de8d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sentry/grouping/ingest/seer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ def should_call_seer_for_grouping(event: Event, primary_hashes: CalculatedHashes

project = event.project

if not _project_has_similarity_grouping_enabled(project):
return False
# Check both of these before returning based on either so we can gather metrics on their results
content_is_eligible = event_content_is_seer_eligible(event)
seer_enabled_for_project = _project_has_similarity_grouping_enabled(project)

if _has_customized_fingerprint(event, primary_hashes):
if not (content_is_eligible and seer_enabled_for_project):
return False

if not event_content_is_seer_eligible(event):
if _has_customized_fingerprint(event, primary_hashes):
return False

# **Do not add any new checks after this.** The rate limit check MUST remain the last of all the
Expand Down

0 comments on commit 9a7de8d

Please sign in to comment.