Skip to content

Commit

Permalink
grouping.ingest.seer
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Aug 5, 2024
1 parent 98ccac6 commit 70645fb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/sentry/grouping/ingest/seer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _has_customized_fingerprint(event: Event, primary_hashes: CalculatedHashes)
else:
metrics.incr(
"grouping.similarity.did_call_seer",
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": False, "blocker": "hybrid-fingerprint"},
)
return True
Expand All @@ -102,7 +102,7 @@ def _has_customized_fingerprint(event: Event, primary_hashes: CalculatedHashes)
if fingerprint_variant:
metrics.incr(
"grouping.similarity.did_call_seer",
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": False, "blocker": fingerprint_variant.type},
)
return True
Expand All @@ -129,7 +129,7 @@ def _ratelimiting_enabled(event: Event, project: Project) -> bool:

metrics.incr(
"grouping.similarity.did_call_seer",
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": False, "blocker": "global-rate-limit"},
)

Expand All @@ -143,7 +143,7 @@ def _ratelimiting_enabled(event: Event, project: Project) -> bool:

metrics.incr(
"grouping.similarity.did_call_seer",
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": False, "blocker": "project-rate-limit"},
)

Expand All @@ -168,7 +168,7 @@ def _circuit_breaker_broken(event: Event, project: Project) -> bool:
)
metrics.incr(
"grouping.similarity.did_call_seer",
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": False, "blocker": "circuit-breaker"},
)

Expand Down Expand Up @@ -240,9 +240,7 @@ def maybe_check_seer_for_matching_grouphash(
if should_call_seer_for_grouping(event, primary_hashes):
metrics.incr(
"grouping.similarity.did_call_seer",
# TODO: Consider lowering this (in all the spots this metric is
# collected) once we roll Seer grouping out more widely
sample_rate=1.0,
sample_rate=options.get("seer.similarity.metrics_sample_rate"),
tags={"call_made": True, "blocker": "none"},
)
try:
Expand Down

0 comments on commit 70645fb

Please sign in to comment.