Skip to content

[Bug] Sentry spam from dbt + Cosmos + Airflow due to debug logs being sent as errors #351

Description

@KochankovID

Is this a new bug in dbt-common?

  • I believe this is a new bug in dbt-common
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When Sentry integration is enabled in Airflow, it sends events for all exceptions and logs with level ERROR.

In a default Cosmos setup where dbt is run using Local + Programmatic invocation, Sentry gets flooded with errors that aren’t actually errors — just debug info.

This happens because of this piece of logic in dbt-common:

# We send PrintEvent to logger as error so it goes to stdout
# when --quiet flag is set.
# --quiet flag will filter out all events lower than ERROR.

Not sure if this is a bug or intentional, but it's definitely not obvious and was a pain to debug.

Leaving this here for future generations — hope it shows up on Google.

If I find a way to filter this out, I’ll drop it in the comments.

Expected Behavior

.

Steps To Reproduce

.

Relevant log output

Additional Context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions