xBis7 commented on code in PR #69809:
URL: https://github.com/apache/airflow/pull/69809#discussion_r4103458476
##########
airflow-core/src/airflow/settings.py:
##########
@@ -841,6 +841,13 @@ def initialize():
import_local_settings()
configure_logging()
configure_otel(conf)
+ # configure_otel configures only the airflow-core copy of the symlinked
shared traces
+ # module. Set the resolved flag in the task-sdk copy that providers import.
+ from airflow._shared.observability import traces as _core_traces
+ from airflow.sdk._shared.observability.traces import
set_debug_traces_enabled
+
+ debug_traces_on = _core_traces._otel_debug_traces_on
+ set_debug_traces_enabled(debug_traces_on)
Review Comment:
It's not that simple. I think it's better to read it here once and pass it
to the sdk than end up with 5+ lazy imports and reads.
> which would also dedupe the 5 fallbacks in the executors.
If I understand correctly what you mean, you can't avoid it because the
annotation is new and didn't exist in older versions. You need a fallback for
the decorator function.
`common.compat` is for imports. You add an import there which is supposed to
exist in all supported version but somewhere along the way, the package was
moved and now you have many possible import paths.
--
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]