airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Extra metrics are being sent to DataDog when using Allow list with pattern matching enabled

Open rawwar opened this issue 1 year ago • 0 comments

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

with AIRFLOW__METRICS__METRICS_USE_PATTERN_MATCH set to true and AIRFLOW__METRICS__METRICS_ALLOW_LIST set to .*get_astronauts.* , I notice several other metrics being sent to datadog that don't match the pattern: image

What you think should happen instead?

Following metrics shouldn't be showing up on datadog when the allow list is .*get_astronauts.*:

  1. airflow.dag.task.duration.*
  2. airflow.ti.*
  3. datadog.* (Not sure if we have any control to block these)

How to reproduce

env variables:

AIRFLOW__METRICS__STATSD_DATADOG_ENABLED true
AIRFLOW__METRICS__STATSD_DATADOG_TAGS testNo:C2
DATADOG_API_KEY ● ● ● ● ● ● ●
AIRFLOW__METRICS__METRICS_USE_PATTERN_MATCH true
AIRFLOW__METRICS__METRICS_ALLOW_LIST .*print_astronaut_craft.*

Once you update your datadog key here, you will start seeing metrics in datadog-->metrics-->summary . use the tag testNo:C2 to filter

Operating System

Debian GNU/Linux 11 (bullseye)

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

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

Code of Conduct

rawwar avatar May 04 '24 00:05 rawwar