Skip to content

Commit

Permalink
Fix datadog alert dest: Add aggregation_key
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel committed Sep 24, 2023
1 parent 1ecc4ef commit ae1c6f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions redash/destinations/datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def notify(self, alert, query, user, new_state, app, host, metadata, options):
"alert_type": alert_type,
"priority": options.get("priority"),
"source_type_name": options.get("source_type_name"),
"aggregation_key": f"redash:{alert_url}",
"tags": [],
}

Expand Down
1 change: 1 addition & 0 deletions tests/handlers/test_destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def test_datadog_notify_calls_requests_post():
"alert_type": "error",
"priority": "normal",
"source_type_name": "postgres",
"aggregation_key": "redash:https://localhost:5000/alerts/1",
"tags": [
"foo:bar",
"zoo:baz",
Expand Down

0 comments on commit ae1c6f6

Please sign in to comment.