github / github/copilot-cli

OTel file exporter emits no terminal telemetry when streamed prompt mode is interrupted with SIGINT

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

Interrupting an actively streaming non-interactive prompt with SIGINT produces no OpenTelemetry file at all. There is therefore no cancelled/error terminal chat or invoke_agent span and no partial timing/token evidence.

Affected version

GitHub Copilot CLI 1.0.83 on macOS.

Steps to reproduce
  1. Enable the OTel file exporter and force content capture off.
  2. Run copilot --prompt ... --stream on --model <available-model> with a synthetic prompt that produces a long response.
  3. Wait until response deltas are actively streaming.
  4. Send SIGINT to the Copilot process.
  5. Inspect the configured file-export path.

This reproduced twice. In the second run, 153 assistant.message_delta JSON output records had arrived before SIGINT. The process exited by SIGINT and the configured telemetry file did not exist.

Expected behavior

On the first termination signal, Copilot should cancel the current inference, end active spans with a cancelled/error outcome, force-flush and shut down trace/metric exporters with a bounded timeout, and then preserve the conventional signal exit result. A second signal can remain a hard exit.

A downstream Collector cannot recover an active span that the producer never ended.

Privacy

The reproduction used only synthetic content and OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false. No credentials or user data are included.

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 unterbrochenen gestreamten Prompt mit dem OTel file exporter zu reproduzieren, und untersuche die SIGINT-Behandlung der CLI sowie den Shutdown-Pfad des OpenTelemetry exporters. Verfolge die Abbruchbehandlung der aktiven Inferenz, den Abschluss des Spans, den force-flush und den begrenzten Shutdown des exporters; fertig bedeutet, dass der erste SIGINT eine Telemetriedatei mit abgebrochenen oder mit Fehler beendeten terminal spans und dem herkömmlichen Signal-Exit-Ergebnis hinterlässt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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