Describe the bug
When OTEL is enabled and copilot uses the task tool to start a subagent, an invoke_agent span is created which contains all the execute_tool spans, but a single chat span at the very beginning. All other chat spans do not have the appropriate parent set to the invoke_agent span.
This is especially confusing when copilot starts multiple subagents, because then the chat spans are all mixed together, and the github.copilot.turn_id do not make sense.
Affected version
No response
Steps to reproduce the behavior
- Enable OTEL
- Ask copilot to use the task tool multiple times, e.g. "Using the task tool, ask three sub-agents to summarize the last five commits of this project, then compare their summaries."
- Inspect the OTEL trace
Expected behavior
No response
Additional context
No response
Describe the bug
When OTEL is enabled and copilot uses the task tool to start a subagent, an
invoke_agentspan is created which contains all theexecute_toolspans, but a singlechatspan at the very beginning. All otherchatspans do not have the appropriate parent set to theinvoke_agentspan.This is especially confusing when copilot starts multiple subagents, because then the
chatspans are all mixed together, and thegithub.copilot.turn_iddo not make sense.Affected version
No response
Steps to reproduce the behavior
Expected behavior
No response
Additional context
No response