github / github/copilot-cli

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

Open
#4,861 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the interrupted streamed prompt with the OTel file exporter and inspect the CLI's SIGINT handling and OpenTelemetry exporter shutdown path. Trace cancellation of the active inference, span completion, force-flush, and bounded exporter shutdown; done means the first SIGINT leaves a telemetry file with cancelled or error terminal spans and the conventional signal exit result.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.