ashb opened a new pull request, #66151: URL: https://github.com/apache/airflow/pull/66151
The supervisor makes HTTP calls (XCom pushes, RTIF writes, connection lookups) on behalf of the task process via a Unix socket IPC channel. Without explicit propagation, those calls either float under the supervisor's own span or are unparented entirely — the task's trace context never crosses the process boundary. This commit wires the full chain: IPC leg (task process → supervisor): - Add traceparent: str | None = None field to _RequestFrame - _make_frame() injects the task runner's active W3C traceparent into every outgoing IPC frame via TraceContextTextMapPropagator.inject() - handle_requests() extracts the traceparent and calls otel_context.attach() before dispatching each request, restoring the task's trace context in the supervisor process for that request's lifetime - TriggerCommsDecoder.asend() now calls _make_frame() instead of constructing _RequestFrame directly, so trigger IPC frames carry the active span's traceparent too HTTP leg (supervisor → execution API): - inject_trace_context event hook on the httpx Client propagates the currently-active span's traceparent header on every outgoing request, linking server-side spans to the correct task span - _log_and_trace_retry records http.retry events on the active span alongside the existing log warning Dependency cleanup: - Move opentelemetry-api>=1.27.0 from [otel] optional extras to base [dependencies] in shared/observability — it flows unconditionally into task-sdk via shared_distributions, the same way [airflow-core already has it unconditionally](https://github.com/apache/airflow/blob/3.2.0/airflow-core/pyproject.toml#L115) - Replace try/except ImportError guards and _NoOpTracer fallbacks in comms.py, supervisor.py, and client.py with direct imports; inject() and get_current_span() are no-ops when no TracerProvider is configured, so the guards were only testing "is OTel installed?" not "is it enabled?" - Remove mistaken pgtrie dep from observability -- it was copy-pastad from shared logging module. -- 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]
