OTel file exporter emits no terminal telemetry when streamed prompt mode is interrupted with SIGINT
还没有人认领这个 Issue。
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 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
- Enable the OTel file exporter and force content capture off.
- Run
copilot --prompt ... --stream on --model <available-model>with a synthetic prompt that produces a long response. - Wait until response deltas are actively streaming.
- Send SIGINT to the Copilot process.
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 OTel file exporter 重现被中断的流式 prompt,并检查 CLI 对 SIGINT 的处理以及 OpenTelemetry exporter 的关闭路径。跟踪活动推理的取消、span 完成、force-flush 和有界的 exporter 关闭;完成的标准是第一次 SIGINT 会留下一个包含已取消或以错误结束的 terminal spans 的 telemetry 文件,以及惯例的信号退出结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli, observability-sre
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100