sortega commented on code in PR #70517:
URL: https://github.com/apache/airflow/pull/70517#discussion_r3748797416
##########
task-sdk/src/airflow/sdk/observability/metrics/statsd_logger.py:
##########
@@ -34,23 +35,25 @@ def get_statsd_logger() -> SafeStatsdLogger:
# no need to check for the scheduler/statsd_on -> this method is only
called when it is set
# and previously it would crash with None is callable if it was called
without it.
- from statsd import StatsClient
+ from statsd import StatsClient, UnixSocketStatsClient
if stats_class:
- if not issubclass(stats_class, StatsClient):
+ if not (issubclass(stats_class, StatsClient) or
issubclass(stats_class, UnixSocketStatsClient)):
raise AirflowConfigException(
- "Your custom StatsD client must extend the statsd.StatsClient
in order to ensure "
- "backwards compatibility."
+ "Your custom StatsD client must extend the statsd.StatsClient
or "
+ "statsd.UnixSocketStatsClient in order to ensure backwards
compatibility."
)
log.info("Successfully loaded custom StatsD client")
else:
stats_class = StatsClient
Review Comment:
Absolutely
--
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]