uranusjr commented on code in PR #70517:
URL: https://github.com/apache/airflow/pull/70517#discussion_r3810912595
##########
airflow-core/docs/administration-and-deployment/logging-monitoring/metrics.rst:
##########
@@ -42,6 +42,36 @@ then add the following lines to your configuration file e.g.
``airflow.cfg``
statsd_port = 8125
statsd_prefix = airflow
+Sending metrics over a Unix Domain Socket
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Metrics can be sent over a Unix Domain Socket instead of UDP by setting
+``statsd_socket_path``:
+
+.. code-block:: ini
+
+ [metrics]
+ statsd_on = True
+ statsd_socket_path = /var/run/statsd/statsd.sock
+ statsd_prefix = airflow
+
+When ``statsd_socket_path`` is set, ``statsd_host``, ``statsd_port``, and
+``statsd_ipv6`` are ignored.
+
+The standard StatsD backend uses a stream Unix socket. When the DataDog backend
+is enabled, both stream and datagram Unix sockets are supported:
+
+.. code-block:: ini
+
+ [metrics]
+ statsd_datadog_enabled = True
+ statsd_socket_path = /var/run/datadog/dsd.socket
+ statsd_prefix = airflow
+
+For maximum compatibility, configure a plain filesystem path. The DataDog
Review Comment:
We currently use “DataDog” and “Datadog” in different parts of the
documentation. Worth unifying.
##########
shared/observability/src/airflow_shared/observability/metrics/statsd_logger.py:
##########
@@ -31,11 +31,12 @@
)
if TYPE_CHECKING:
- from statsd import StatsClient
+ from statsd import StatsClient, UnixSocketStatsClient
from .protocols import DeltaType
from .validators import ListValidator
+
Review Comment:
```suggestion
```
##########
airflow-core/docs/administration-and-deployment/logging-monitoring/metrics.rst:
##########
@@ -42,6 +42,36 @@ then add the following lines to your configuration file e.g.
``airflow.cfg``
statsd_port = 8125
statsd_prefix = airflow
+Sending metrics over a Unix Domain Socket
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Metrics can be sent over a Unix Domain Socket instead of UDP by setting
+``statsd_socket_path``:
+
+.. code-block:: ini
+
+ [metrics]
+ statsd_on = True
+ statsd_socket_path = /var/run/statsd/statsd.sock
+ statsd_prefix = airflow
+
+When ``statsd_socket_path`` is set, ``statsd_host``, ``statsd_port``, and
+``statsd_ipv6`` are ignored.
+
+The standard StatsD backend uses a stream Unix socket. When the DataDog backend
+is enabled, both stream and datagram Unix sockets are supported:
Review Comment:
This “datagram” is probably being caught as a spelling error and failing CI.
Add it to `spelling_wordlist.txt` to fix the error.
--
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]