uranusjr commented on code in PR #70517:
URL: https://github.com/apache/airflow/pull/70517#discussion_r3774379822
##########
task-sdk/src/airflow/sdk/observability/metrics/statsd_logger.py:
##########
@@ -16,41 +16,22 @@
# under the License.
from __future__ import annotations
-import logging
from typing import TYPE_CHECKING
-from airflow.sdk._shared.configuration import AirflowConfigException
from airflow.sdk._shared.observability.metrics import statsd_logger
from airflow.sdk.configuration import conf
if TYPE_CHECKING:
from airflow.sdk._shared.observability.metrics.statsd_logger import
SafeStatsdLogger
-log = logging.getLogger(__name__)
-
def get_statsd_logger() -> SafeStatsdLogger:
- stats_class = conf.getimport("metrics", "statsd_custom_client_path",
fallback=None)
-
- # 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
-
- if stats_class:
- if not issubclass(stats_class, StatsClient):
- raise AirflowConfigException(
- "Your custom StatsD client must extend the statsd.StatsClient
in order to ensure "
- "backwards compatibility."
- )
- log.info("Successfully loaded custom StatsD client")
Review Comment:
We should still emit this log.
--
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]