Skip to content

Commit cc04bde

Browse files
ceorourkecmanallen
authored andcommitted
chore(alerts): Add info log when sending subscription update data to Seer (#79049)
Add some temporary logging to help debug why some alerts are missing streaming data in Seer.
1 parent feac448 commit cc04bde

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/sentry/incidents/subscription_processor.py

+10
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,16 @@ def process_update(self, subscription_update: QuerySubscriptionUpdate) -> None:
405405
aggregation_value=aggregation_value,
406406
)
407407
if potential_anomalies is None:
408+
logger.info(
409+
"No potential anomalies found",
410+
extra={
411+
"subscription_id": self.subscription.id,
412+
"dataset": self.alert_rule.snuba_query.dataset,
413+
"organization_id": self.subscription.project.organization.id,
414+
"project_id": self.subscription.project_id,
415+
"alert_rule_id": self.alert_rule.id,
416+
},
417+
)
408418
return []
409419

410420
# Trigger callbacks for any AlertRules that may need to know about the subscription update

src/sentry/seer/anomaly_detection/get_anomaly_data.py

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def get_anomaly_data_from_seer(
7070
"alert_rule_id": alert_rule.id,
7171
}
7272
try:
73+
logger.info("Sending subscription update data to Seer", extra=extra_data)
7374
response = make_signed_seer_api_request(
7475
SEER_ANOMALY_DETECTION_CONNECTION_POOL,
7576
SEER_ANOMALY_DETECTION_ENDPOINT_URL,

0 commit comments

Comments
 (0)