Support a Unix Domain Socket for the Datadog metrics client - #70517
Draft
sortega wants to merge 3 commits into
Draft
Support a Unix Domain Socket for the Datadog metrics client#70517sortega wants to merge 3 commits into
sortega wants to merge 3 commits into
Conversation
The Datadog StatsD logger could only be pointed at a host and port, so deployments that expose DogStatsD over a Unix Domain Socket (for example the Datadog Kubernetes operator, which mounts a socket and sets DD_DOGSTATSD_URL) had no way to use it from Airflow. Add a ``[metrics] statsd_socket_path`` option that is passed to the DogStatsd client. When set it takes precedence over ``statsd_host`` / ``statsd_port``, which are then left unset so the socket is used.
The rst-backticks check requires double backticks for inline code in RST.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
[metrics] statsd_socket_pathoption so Airflow's Datadog StatsD client can submit metrics over a Unix Domain Socket instead of host/port.Today
get_dogstatsd_loggeronly passesstatsd_host/statsd_porttoDogStatsd, so deployments that expose DogStatsD over a UDS — e.g. the Datadog Kubernetes operator, which mounts a socket and setsDD_DOGSTATSD_URL=unix:///var/run/datadog/dsd.socket— have no way to use it from Airflow.datadogsupports a socket path; this exposes it through Airflow config.When
statsd_socket_pathis set it takes precedence over host/port (matchingDogStatsd'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 (statsd_datadog_enabled = True); the plain StatsD is unchanged.[metrics] statsd_socket_pathconfig key.get_dogstatsd_logger(shared) gains asocket_pathkwarg passed through toDogStatsd.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8 1M) following the guidelines