Skip to content

Commit

Permalink
integrations: Update Newrelic integrations.
Browse files Browse the repository at this point in the history
This will allow users to be notified of the
updated Newrelic alertConditionNames payload.

Fixes zulip#29729

Co-authored-by: Giovanni Silva <no-reply@gsilva.pro>
  • Loading branch information
Giovanni Silva authored and PieterCK committed Apr 13, 2024
1 parent e7a19ac commit 0c638b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zerver/webhooks/newrelic/view.py
Expand Up @@ -112,8 +112,13 @@ def api_newrelic_webhook(

# Handle new format
else:
condition_names_list = payload.get("alertConditionNames").tame(check_list(check_string))
if condition_names_list:
condition_name_str = ",".join(condition_names_list)
else:
condition_name_str = "Unknown condition"
info = {
"condition_name": payload.get("condition_name", "Unknown condition").tame(check_string),
"condition_name": condition_name_str,
"details": payload.get("details", "No details.").tame(check_string),
"incident_url": payload.get("issueUrl", "https://alerts.newrelic.com").tame(
check_string
Expand Down

0 comments on commit 0c638b8

Please sign in to comment.