xBis7 commented on code in PR #49180:
URL: https://github.com/apache/airflow/pull/49180#discussion_r2157487359
##########
airflow-core/src/airflow/traces/tracer.py:
##########
@@ -276,29 +283,45 @@ def __call__(cls, *args, **kwargs):
cls._initialize_instance()
return cls.instance
- @classmethod
def configure_factory(cls):
"""Configure the trace factory based on settings."""
- if conf.has_option("traces", "otel_on") and conf.getboolean("traces",
"otel_on"):
+ otel_on = conf.getboolean("traces", "otel_on")
+
+ if cls.check_debug_traces_flag:
+ debug_traces_on = conf.getboolean("traces", "otel_debug_traces_on")
+ else:
+ # Set to true so that it will be ignored during the evaluation for
the factory instance.
+ debug_traces_on = True
Review Comment:
`debug_traces_on` is only used in line 296
```python
if otel_on and debug_traces_on:
```
if we don't want to check that flag
```python
if cls.check_debug_traces_flag:
```
then by setting it to `True` it's always ignored in the next evaluation. The
condition will always evaluate to whatever value `otel_on` has.
* if `otel_on` is true and `debug_traces_on` is true, then it will be true
* if `otel_on` is false and `debug_traces_on` is true, then it will be false
--
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]