hussein-awala commented on issue #39400:
URL: https://github.com/apache/airflow/issues/39400#issuecomment-5686639944

   I had a look at this on main and I don't think it's still valid.
   
   `metrics_use_pattern_match` was removed in Airflow 3 — pattern matching is 
the only
   mode now, so the config in the repro doesn't exist anymore. And the allow 
list itself
   is applied on every emit path in the Datadog logger (incr, decr, gauge, 
timing, timer),
   including for legacy metric names, so nothing is slipping past the filter.
   
   What was really happening is that `ti.start`, `ti.finish` and 
`task.duration` don't have
   the dag_id in the metric *name* — it's in the tags. So a pattern like
   `.*get_astronauts.*` was never going to match them. It only matches the 
legacy names
   (`dag.{dag_id}.{task_id}.duration` and friends), which are behind 
`legacy_names_on`. The
   `datadog.*` ones are the DogStatsd client's own telemetry and were always 
outside our
   allow list.
   
   So this isn't a filtering bug — it's that allow/block lists match on names 
and aren't
   tag-aware. That's a reasonable thing to want, but it's a different change 
from what's
   described here, so I'd rather see it as its own feature request. Closing 
this one.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @hussein-awala before posting


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to