Skip to content

Commit

Permalink
Add alert_id tag to cleanup transaction (#1341)
Browse files Browse the repository at this point in the history
- Add `alert_id` as a tag to the `cleanup_timeseries` transaction on
Sentry
  • Loading branch information
aayush-se authored Oct 25, 2024
1 parent 48f5e36 commit cbf9e54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/seer/anomaly_detection/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit cbf9e54

Please sign in to comment.