xBis7 commented on code in PR #56150:
URL: https://github.com/apache/airflow/pull/56150#discussion_r2813244126
##########
shared/observability/src/airflow_shared/observability/metrics/otel_logger.py:
##########
@@ -387,28 +390,32 @@ def get_otel_logger(
stat_name_handler: Callable[[str], str] | None = None,
statsd_influxdb_enabled: bool = False,
) -> SafeOtelLogger:
- effective_service_name: str = service_name or "airflow"
+ otel_env_config = load_metrics_env_config()
+
+ effective_service_name: str = otel_env_config.service_name or service_name
Review Comment:
For the `interval` it's ok because the SDK defaults to 60.000. From the SDK
code
```python
export_interval_millis = float(
environ.get(OTEL_METRIC_EXPORT_INTERVAL, 60000)
)
```
For the service name, it's going to print something like `unknown_service`.
I'll add a fallback.
--
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]