diff --git a/src/seer/anomaly_detection/tasks.py b/src/seer/anomaly_detection/tasks.py index 083d40b9..8a3cbdab 100644 --- a/src/seer/anomaly_detection/tasks.py +++ b/src/seer/anomaly_detection/tasks.py @@ -15,6 +15,11 @@ @celery_app.task @sentry_sdk.trace def cleanup_timeseries(alert_id: int, date_threshold: float): + span = sentry_sdk.get_current_span() + + if span is not None: + span.set_tag("alert_id", alert_id) + logger.info("Deleting timeseries points over 28 days old and updating matrix profiles") toggle_data_purge_flag(alert_id)