github / github/copilot-cli

OTel: parallel task dispatch emits successful chat spans without response identity or usage

Offen
#4,860 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

With metadata-only OpenTelemetry file export enabled, a prompt-mode run that dispatches two named subagents emits two chat spans that have successful status and a stop finish reason but omit all of:

  • gen_ai.response.id
  • gen_ai.response.model
  • gen_ai.usage.input_tokens
  • gen_ai.usage.output_tokens

This also occurs when the parent model is explicitly pinned, so it is not limited to --model auto.

The remaining parent and subagent chat spans in the same trace contain complete request/response model and usage fields.

Affected version

GitHub Copilot CLI 1.0.83 on macOS.

Steps to reproduce
  1. Enable the file exporter and force content capture off.
  2. Run prompt mode with streaming enabled and an explicitly pinned parent model.
  3. In one synthetic prompt, use the task tool twice with two named agent types and explicit models.
  4. Parse the resulting JSONL.

A representative trace contained one root invoke_agent, two execute_tool task spans, two nested named invoke_agent spans, and seven chat spans. Every completed-response chat had the expected provider, request model, response model, response ID, and usage. Two root-level chats had request model, streaming=true, status code 0, and finish reason stop, but no response identity or usage.

Expected behavior

Each logical completed inference should contain independently reported response identity and usage when available. An abandoned, cancelled, routing, or retry attempt should not look like a successful completed chat: it should carry an explicit attempt/outcome classification or a non-success terminal status. Consumers must not have to synthesize gen_ai.response.model from the requested model.

Privacy

The reproduction used synthetic prompts with OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false. No prompt, response, repository, or credential content is included here.

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

Beginne damit, den Trace für den Prompt-Modus mit ausschließlich Metadaten exportierendem OpenTelemetry, Streaming, einem explizit festgelegten übergeordneten Modell und zwei benannten Task-Agenten zu reproduzieren. Parse das resultierende JSONL und vergleiche die beiden unvollständigen Chat-Spans auf Root-Ebene mit den vollständigen Chat-Spans. Als abgeschlossen gilt dies, wenn jede abgeschlossene Inferenz, sofern verfügbar, die Response-Identität und die Nutzung meldet, während abgebrochene oder nicht abgeschlossene Versuche nicht als erfolgreich markiert werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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