Skip to content

Commit

Permalink
add platform tag to event_content_seer_eligible metric
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Dec 20, 2024
1 parent 3b03261 commit cfab024
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sentry/grouping/ingest/seer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,28 @@ def _event_content_is_seer_eligible(event: Event) -> bool:
"""
Determine if an event's contents makes it fit for using with Seer's similar issues model.
"""
platform = event.platform

if not event_content_has_stacktrace(event):
metrics.incr(
"grouping.similarity.event_content_seer_eligible",
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"eligible": False, "blocker": "no-stacktrace"},
tags={"platform": platform, "eligible": False, "blocker": "no-stacktrace"},
)
return False

if event.platform in SEER_INELIGIBLE_EVENT_PLATFORMS:
metrics.incr(
"grouping.similarity.event_content_seer_eligible",
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"eligible": False, "blocker": "unsupported-platform"},
tags={"platform": platform, "eligible": False, "blocker": "unsupported-platform"},
)
return False

metrics.incr(
"grouping.similarity.event_content_seer_eligible",
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"eligible": True, "blocker": "none"},
tags={"platform": platform, "eligible": True, "blocker": "none"},
)
return True

Expand Down

0 comments on commit cfab024

Please sign in to comment.