From 6e52e5aa1a304e74c8688a9ebbce124098fab7a2 Mon Sep 17 00:00:00 2001 From: Nico Epp Date: Wed, 10 Apr 2024 11:21:08 -0700 Subject: [PATCH] Reduce visual footprint of DAG Alerts in Slack (#4071) * Reduce footprint of DAG Alerts in Slack * Update to Slack's version of markdown * Correct tiny typo --- catalog/dags/common/slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/dags/common/slack.py b/catalog/dags/common/slack.py index a671b96bb8a..f0f4b4e4e83 100644 --- a/catalog/dags/common/slack.py +++ b/catalog/dags/common/slack.py @@ -396,15 +396,15 @@ def on_failure_callback(context: dict) -> None: log.info("Forgoing Slack alert due to upstream failures") return exception_message = f""" -*Exception*: {exception} *Exception Type*: `{exception.__class__.__module__}.{exception.__class__.__name__}` +*Exception*: {exception} """ message = f""" *DAG*: `{dag_id}` *Task*: `{task_id}` *Logical Date*: {logical_date.strftime('%Y-%m-%dT%H:%M:%SZ')} -*Log*: {ti.log_url} +*Log*: <{ti.log_url}|View Logs> {exception_message} """ send_alert(