sortega opened a new pull request, #70517:
URL: https://github.com/apache/airflow/pull/70517

   Adds a `[metrics] statsd_socket_path` option so Airflow's Datadog StatsD 
client can submit metrics over a Unix Domain Socket instead of host/port.
   
   Today `get_dogstatsd_logger` only passes `statsd_host` / `statsd_port` to 
`DogStatsd`, so deployments that expose DogStatsD over a UDS — e.g. the Datadog 
Kubernetes operator, which mounts a socket and sets 
`DD_DOGSTATSD_URL=unix:///var/run/datadog/dsd.socket` — have no way to use it 
from Airflow. `datadog>=0.53.0` supports a socket path (and the standard 
`DD_DOGSTATSD_URL` env var); this exposes it through Airflow config.
   
   When `statsd_socket_path` is set it takes precedence over host/port 
(matching `DogStatsd`'s own precedence), and the wrapper leaves host/port unset 
so the socket is used. The option is nullable and only affects the Datadog 
client path (`statsd_datadog_enabled = True`); the plain StatsD path is 
unchanged.
   
   - New nullable `[metrics] statsd_socket_path` config key.
   - `get_dogstatsd_logger` (shared) gains a `socket_path` kwarg passed through 
to `DogStatsd`.
   - airflow-core and task-sdk wrappers read the new key and omit host/port 
when it is set.
   - Unit test covering socket_path passthrough / host/port omission.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8 1M)
   
   Generated-by: Claude Code (Opus 4.8 1M) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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