kaxil commented on a change in pull request #7227: [AIRFLOW-6530] Allow Custom
Statsd Client
URL: https://github.com/apache/airflow/pull/7227#discussion_r392709252
##########
File path: airflow/stats.py
##########
@@ -200,10 +200,35 @@ def __init__(self, *args, **kwargs):
self.__class__.instance = DummyStatsLogger()
except (socket.gaierror, ImportError) as e:
log.warning("Could not configure StatsClient: %s, using
DummyStatsLogger instead.", e)
+ self.__class__.instance = DummyStatsLogger()
def get_statsd_logger(self):
- from statsd import StatsClient
- statsd = StatsClient(
+ if conf.getboolean('scheduler', 'statsd_on'):
+
+ from statsd import StatsClient
+
+ if conf.has_option('scheduler', 'statsd_custom_client_path'):
+
Review comment:
```suggestion
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services