diff --git a/src/sentry/integrations/metric_alerts.py b/src/sentry/integrations/metric_alerts.py index e311869ea9e08..fb544a6bd9b95 100644 --- a/src/sentry/integrations/metric_alerts.py +++ b/src/sentry/integrations/metric_alerts.py @@ -26,7 +26,6 @@ "percentage(sessions_crashed, sessions)": "% sessions crash free rate", "percentage(users_crashed, users)": "% users crash free rate", } -LOGO_URL = absolute_uri(get_asset_url("sentry", "images/sentry-email-avatar.png")) # These should be the same as the options in the frontend # COMPARISON_DELTA_OPTIONS TEXT_COMPARISON_DELTA = { @@ -39,6 +38,10 @@ } +def logo_url() -> str: + return absolute_uri(get_asset_url("sentry", "images/sentry-email-avatar.png")) + + def get_metric_count_from_incident(incident: Incident) -> str: """Returns the current or last count of an incident aggregate.""" incident_trigger = ( @@ -144,7 +147,7 @@ def incident_attachment_info( return { "title": title, "text": text, - "logo_url": LOGO_URL, + "logo_url": logo_url(), "status": status, "ts": incident.date_started, "title_link": title_link, @@ -232,7 +235,7 @@ def metric_alert_attachment_info( return { "title": title, "text": text, - "logo_url": LOGO_URL, + "logo_url": logo_url(), "status": status, "date_started": date_started, "last_triggered_date": last_triggered_date,