dstandish opened a new pull request, #67347:
URL: https://github.com/apache/airflow/pull/67347

   Pushes span creation down into `ListenerManager` so every pluggy hook call 
automatically gets a `listener.<hook_name>` span (gated on task span detail 
level > 1). Callers no longer need to wrap individual `lm.hook.foo(...)` 
invocations.
   
   Done via pluggy's `add_hookcall_monitoring` before/after pair, paired with a 
per-thread span stack so concurrent and nested calls stay isolated.
   
   Also fixes a latent bug in the existing `_after_hookcall`: it called 
`outcome.get_result()` unconditionally, which re-raises on listener exceptions 
and would have skipped span teardown. It now checks `outcome.excinfo` first and 
records the exception on the span before exiting the context.
   
   The detail-level threshold constants are inlined (with a comment) rather 
than imported from `airflow_shared.observability.traces`, to avoid adding a 
cross-shared-library dependency that destabilised the deps-propagation prek 
hook.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7)
   
   Generated-by: Claude Code (Opus 4.7) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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