sortega commented on code in PR #70517:
URL: https://github.com/apache/airflow/pull/70517#discussion_r3811859944


##########
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:
   Done



##########
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:
   Done



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