xBis7 commented on code in PR #56150:
URL: https://github.com/apache/airflow/pull/56150#discussion_r2391007494
##########
airflow-core/tests/unit/core/test_otel_tracer.py:
##########
@@ -42,61 +41,67 @@ def name():
class TestOtelTrace:
def test_get_otel_tracer_from_trace_metaclass(self):
"""Test that `Trace.some_method()`, uses an `OtelTrace` instance when
otel is configured."""
- conf.set("traces", "otel_on", "True")
- conf.set("traces", "otel_debugging_on", "True")
-
- tracer = otel_tracer.get_otel_tracer(Trace)
- assert tracer.use_simple_processor is False
+ with env_vars(
+ {
+ "AIRFLOW__TRACES__OTEL_ON": "True",
+ "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4318",
+ "OTEL_TRACES_EXPORTER": "console",
+ }
+ ):
Review Comment:
I changed it to the annotation but I used `@env_vars` instead of
`@conf_vars` because these are environment variables.
--
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]