Skip to content

Add detailed task spans#63568

Draft
dstandish wants to merge 3 commits intoapache:mainfrom
astronomer:add-detailed-task-spans
Draft

Add detailed task spans#63568
dstandish wants to merge 3 commits intoapache:mainfrom
astronomer:add-detailed-task-spans

Conversation

@dstandish
Copy link
Contributor

Add spans for detailed debugging info during the task execution process

We were treating the span context manager as the span but we need to get the span from the return value from enter_context.
The @tracer.start_as_current_span decorator changes the code object of
decorated functions to (*args, **kwds), which breaks kgb's signature
compatibility check in the mocked_parse fixture. Update the call_fake
lambda to use *args/**kwargs to match the wrapped signature.

The renamed log messages ("error calling on_task_instance_success listener"
etc.) cause test_listener_suppresses_exceptions to fail. Update the
assertion to match the new message.

The OTel integration test asserts exact span equality, but the new detail
spans (parse, startup, get_template_context, etc.) now appear in the trace.
Update the assertion to check key parent-child relationships rather than
exact span set equality.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant