Skip to content

Commit 5338e91

Browse files
shruthilayajandrewshie-sentry
authored andcommitted
chore(alerts-comparison): Optionally get confidence (#90891)
1 parent 21a72f5 commit 5338e91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sentry/discover/compare_timeseries.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def get_mismatch_type(mismatches: dict[int, dict[str, float]], total_buckets: in
167167
snql_value = values["snql_value"]
168168
rpc_value = values["rpc_value"]
169169
diff = values["mismatch_percentage"]
170-
confidence = values["confidence"]
170+
confidence = values.get("confidence")
171171
sampling_rate = values.get("sampling_rate")
172172

173173
if snql_value > 0:
@@ -304,7 +304,7 @@ def assert_timeseries_close(aligned_timeseries, alert_rule):
304304
"snql_value": snql_value,
305305
"mismatch_percentage": diff,
306306
"sampling_rate": values.get("sampling_rate"),
307-
"confidence": values["confidence"],
307+
"confidence": values.get("confidence"),
308308
}
309309

310310
sentry_sdk.set_tag("false_positive_misfires", false_positive_misfire)
@@ -344,7 +344,7 @@ def compare_timeseries_for_alert_rule(alert_rule: AlertRule):
344344
if not project:
345345
return {"is_close": False, "skipped": True, "mismatches": {}}
346346

347-
if "apdex" in snuba_query.aggregate:
347+
if "apdex" in snuba_query.aggregate or "percentile" in snuba_query.aggregate:
348348
logger.info(
349349
"Skipping alert %s, %s aggregate not yet supported by RPC",
350350
alert_rule.id,

0 commit comments

Comments
 (0)