sortega commented on code in PR #70517:
URL: https://github.com/apache/airflow/pull/70517#discussion_r3812927948
##########
shared/observability/src/airflow_shared/observability/metrics/statsd_logger.py:
##########
@@ -170,21 +191,47 @@ def get_statsd_logger(
stat_name_handler: Callable[[str], str] | None = None,
statsd_influxdb_enabled: bool = False,
) -> SafeStatsdLogger:
- """Return logger for StatsD."""
- statsd = stats_class(
- host=host,
- port=port,
- prefix=prefix,
- ipv6=ipv6,
+ """Return a UDP StatsD logger."""
+ # Local import to avoid requiring statsd when other backends are used
(e.g. Datadog)
+ from statsd import StatsClient as _StatsClient
Review Comment:
No, because it's used it line 198.
Repro:
```python
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import os
module = os
```
--
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]