github / github/copilot-cli

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

オープン
#4,861 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

triage
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、OTel file exporter を使って中断されたストリーミング prompt を再現し、CLI の SIGINT 処理と OpenTelemetry exporter のシャットダウン経路を調べます。アクティブな推論のキャンセル、span の完了、force-flush、制限時間付きの exporter シャットダウンを追跡します。完了の条件は、最初の SIGINT によって、キャンセルされたかエラーで終了した terminal spans を含むテレメトリファイルと、従来のシグナル終了結果が残ることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli, observability-sre
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。