schizophrenicmaniac commented on code in PR #73626:
URL: https://github.com/apache/airflow/pull/73626#discussion_r4152617991


##########
shared/observability/tests/observability/test_traces.py:
##########
@@ -360,3 +369,88 @@ def test_roundtrip_via_carrier(self):
 
         span = trace.get_current_span(ctx)
         assert get_task_span_detail_level(span) == 3
+
+
+_FORK_SCENARIO = textwrap.dedent(
+    """
+    import os
+    import signal
+    import time
+
+    from opentelemetry.sdk import resources as otel_resources
+
+    from airflow_shared.observability.traces import _ForkSafeTracerProvider
+
+    _ForkSafeTracerProvider()  # registers the after_in_child handler under 
test

Review Comment:
   Good catch. The stock `TracerProvider` passes that scenario too once nothing 
references it, so the test was only working because of the atexit reference. 
Applied your suggestion; with the `_handle_fork` override removed the test now 
fails, and it passes with it in place.



-- 
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]

Reply via email to