github / github/copilot-cli

OTEL `chat` spans do not have the proper parent span for subagents

Offen
#4,858 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

triage
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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
  1. Enable OTEL
  2. 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."
  3. Inspect the OTEL trace
Expected behavior

No response

Additional context

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den Trace mit aktiviertem OTEL unter Verwendung mehrerer task-tool-Subagenten und untersuche anschließend die resultierenden invoke_agent-, execute_tool- und chat-Spans. Verfolge den Span-Parenting-Pfad und überprüfe, dass jeder Chat-Span unter dem entsprechenden invoke_agent-Span gruppiert ist und dass github.copilot.turn_id-Werte nicht mehr zwischen Subagenten vermischt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
observability
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.