Skip to content

Commit

Permalink
Reduce visual footprint of DAG Alerts in Slack (#4071)
Browse files Browse the repository at this point in the history
* Reduce footprint of DAG Alerts in Slack

* Update to Slack's version of markdown

* Correct tiny typo
  • Loading branch information
nicoepp authored Apr 10, 2024
1 parent 162d3e8 commit 6e52e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catalog/dags/common/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6e52e5a

Please sign in to comment.