manish1337 commented on code in PR #69809:
URL: https://github.com/apache/airflow/pull/69809#discussion_r4104580621
##########
shared/observability/src/airflow_shared/observability/traces/__init__.py:
##########
@@ -248,11 +267,21 @@ def _load_exporter_from_env() -> SpanExporter:
return ep.load()()
+def set_debug_traces_enabled(enabled: bool) -> None:
+ """Set the debug-traces flag on this module instance."""
+ global _otel_debug_traces_on
+ _otel_debug_traces_on = enabled
+
+
def configure_otel(conf: ConfigParser):
+ global _otel_debug_traces_on
+
otel_on = conf.getboolean("traces", "otel_on", fallback=False)
if not otel_on:
return
+ _otel_debug_traces_on = conf.getboolean("traces", "otel_debug_traces_on",
fallback=False)
Review Comment:
yea it covers `configure_otel`, but not the sync itself. The test only
checks the `scheduler.*` spans, which come from the core copy, so it still
passes if you delete L846-850.
I tried it locally: set up the same scenario as
`test_scheduler_debug_traces` (Jaeger + Postgres, LocalExecutor, triggered
demo_dag twice) and ran the same assertions with and without those lines. Both
pass. Without the sync, the sdk copy's flag just stays False after
`initialize()`.
A small unit test checking that `initialize()` sets the sdk copy's flag
would catch this.
--
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]