potiuk commented on code in PR #56187:
URL: https://github.com/apache/airflow/pull/56187#discussion_r2569467000


##########
shared/observability/src/airflow_shared/observability/metrics/otel_logger.py:
##########
@@ -28,24 +28,22 @@
 from opentelemetry.exporter.otlp.proto.http.metric_exporter import 
OTLPMetricExporter
 from opentelemetry.sdk.metrics import MeterProvider
 from opentelemetry.sdk.metrics._internal.export import ConsoleMetricExporter, 
PeriodicExportingMetricReader
-from opentelemetry.sdk.resources import HOST_NAME, SERVICE_NAME, Resource
+from opentelemetry.sdk.resources import SERVICE_NAME, Resource
 
-from airflow.configuration import conf
-from airflow.metrics.protocols import Timer
-from airflow.metrics.validators import (
+from airflow._shared.observability.metrics.protocols import Timer

Review Comment:
   Those imports here should be in the form of relative imports `from 
.observability` - this is the way how you are able to import something 
relatively and reuse it in different places.



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