apache / apache/airflow

Propagate DAG tags to Sentry for alert routing

Open
#37,901 6 comments 1 reaction 0 assignees View on GitHub
area:monitoring kind:feature
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 7h
Merged PRs (30d)
484

Description

### Description

It would be great to include the DAG tags in the error reports in the form of [Sentry tags](https://docs.sentry.io/product/issues/issue-details/), as these are both indexable and searchable.

The obvious problem is that Sentry tags are the key-value pairs, while Airflow DAG tags are just strings, so it is not clear to me right now how they can be directly mapped to each other. I'm willing to create the PR as soon as we find a solution for it.

### Use case/motivation

* Multi-tenant Airflow setups can benefit from routing alerts to the corresponding code owners
* [Automatic issue ownership](https://docs.sentry.io/product/issues/ownership-rules/) can also be implemented based on the DAG tags

### Related issues

_No response_

### Are you willing to submit a PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start with the linked Sentry issue-details and ownership-rules documentation, then inspect Airflow's existing error-reporting path. Resolve how string DAG tags map to Sentry key-value tags; done means they support indexing, search, alert routing, and ownership rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.