Skip to content

Propagate DAG tags to Sentry for alert routing #37901

Open

Description

@svartalf

Description

It would be great to include the DAG tags in the error reports in the form of Sentry tags, 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 can also be implemented based on the DAG tags

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on Mar 5, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. added and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Mar 5, 2024
  3. potiuk commented on Mar 6, 2024

    @potiuk
    Member

    Added you - though it looks like we are close to adding Open-Telemetry traces to Airflow (cc: @howardyoo and @ferruzzi ) - so I'd say such changes should be added as part of the OTEL metrics an traces and mapped from OTEL to sentry. We will eventually deprecate sentry as integration of metrics/traces/logging in favour of heads-on OTEL integration - possibly including logging via OTEL.

  4. svartalf commented on Mar 18, 2024

    @svartalf
    Author

    Thanks for the response, @potiuk!

    In this case, should we close this issue and wait for the OTEL integration?
    I'm also curious how OTEL will solve the trickier cases, for example, when the DAG loading fails (e.g. due to a misconfigured DAG definition and a DuplicateTaskIdFound exception being raised). Should it also be tracked as OpenTelemetry transactions then, so we can capture the error details?

  5. potiuk commented on Mar 25, 2024

    @potiuk
    Member

    You should review and comment on #37948 that introduces traces

  6. andreahlert commented on Feb 8, 2026

    @andreahlert
    Contributor

    Since OpenTelemetry Traces have been integrated into Airflow (#37948) and the direction is to deprecate Sentry in favor of OTEL (as mentioned by @potiuk above), should we close this issue as superseded?

  7. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @svartalf We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions