Skip to content

Sentry tagging not working on Composer #27493

@nirajdewani

Description

@nirajdewani

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

Composer version: 2.0.10
Airflow version: 2.2.3

Airflow comes with Sentry integration, as documented here.
With SENTRY_DSN configured as an environment variable, we generated a (run-time) error in a DAG. The corresponding exception showed up as a Sentry error (as expected). Though the error was missing tags listed here.

What you think should happen instead

In addition to the tags in the screenshot below, we expect to see the tags listed here.
Screen Shot 2022-11-03 at 4 29 42 PM

How to reproduce

  1. Create a Sentry project (using either Sentry's self-hosted option or Sentry's SaaS–here's a free trial)
  2. Create a 2.0.10 versioned Composer instance with Airflow version 2.2.3, configured with SENTRY_DSN from the above project
  3. Create a DAG that results in a runtime error
  4. Run the DAG
  5. Check Sentry for the corresponding error–check tags on the error

Operating System

Whatever Composer comes with.

Versions of Apache Airflow Providers

apache-airflow==2.2.3+composer

Deployment

Composer

Deployment details

Composer version: 2.0.10
Airflow version: 2.2.3

Anything else

All the errors we see in Sentry do not have the necessary tags. The right tags would make it easier to browse errors, and understand their source.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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