OTel file not written for BYOK -p runs without GitHub sign-in (regression in 1.0.115)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
The report names no repository source files or tests. Start by tracing the OTel setup and session tracker creation in the CLI, then compare the unauthenticated BYOK path with the authenticated path and the 1.0.114 behavior. Reproduce with the supplied stub server and environment variables; done means the configured OTel file is written for a successful BYOK run without GitHub sign-in.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Since 1.0.115, copilot -p with a BYOK provider and no GitHub sign-in doesn't write the OTel file. The run succeeds and exits 0, but the file at COPILOT_OTEL_FILE_EXPORTER_PATH is never created, and there's no warning or error.
The log shows OTel being configured (OpenTelemetry enabled: exporter=file), but OTel session policy applied and OpenTelemetry tracker created for session never show up. On 1.0.114 both lines appear and the file is written. 1.0.116 also writes the file once a GitHub account is available (e.g. after gh auth login).
Affected version
1.0.115 and 1.0.116 (1.0.114 works), Linux x64, installed via npm
Steps to reproduce the behavior
- Save a minimal OpenAI-compatible stub as
server.py:
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
class Handler(BaseHTTPRequestHandler):
def do_GET(self): # model list
self.send_response(200)
self.end_headers()
self.wfile.write(b'{"data": []}')
def do_POST(self): # one streamed chat completion with usage
self.rfile.read(int(self.headers["Content-Length"]))
self.send_response(200)
self.send_header("Content-Type", "text/event-stream")
self.end_headers()
base = {"id": "1", "object": "chat.completion.chunk", "created": 0, "model": "gpt-4o"}
for extra in (
{"choices": [{"index": 0, "delta": {"role": "assistant", "content": "Done"}}]},
{"choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}],
"usage": {"prompt_tokens": 10, "completion_tokens": 1, "total_tokens": 11}},
):
self.wfile.write(f"data: {json.dumps({**base, **extra})}\n\n".encode())
self.wfile.write(b"data: [DONE]\n\n")
def log_message(self, *args):
pass
HTTPServer(("127.0.0.1", 18080), Handler).serve_forever()
- Run this from the same directory, without any GitHub credentials:
d=$(mktemp -d); mkdir -p "$d/gh" "$d/home"
python3 server.py & sleep 1
cd "$d" && env -u GH_TOKEN -u GITHUB_TOKEN -u COPILOT_GITHUB_TOKEN \
GH_CONFIG_DIR="$d/gh" COPILOT_HOME="$d/home" \
COPILOT_PROVIDER_TYPE=openai COPILOT_PROVIDER_BASE_URL=http://127.0.0.1:18080/v1 \
COPILOT_PROVIDER_API_KEY=test COPILOT_MODEL=gpt-4o \
COPILOT_OTEL_ENABLED=true COPILOT_OTEL_EXPORTER_TYPE=file \
COPILOT_OTEL_FILE_EXPORTER_PATH="$d/otel.jsonl" \
copilot -p "Reply with just: Done" --no-auto-update --log-level all --log-dir "$d/logs"
echo "exit: $?"; ls -l "$d/otel.jsonl"
grep -h "rust:otel" "$d"/logs/*.log
kill $!
- On 1.0.115 and 1.0.116,
otel.jsonldoesn't exist and the log only has:
[INFO] [rust:otel] OpenTelemetry enabled: exporter=file, source=github.copilot ...
[INFO] [rust:otel] OpenTelemetry configured from managed settings: exporter=file, source=github.copilot ...
[DEBUG] [rust:otel] Stopping OpenTelemetry session
On 1.0.114 the file is written, and the log also has OTel session policy applied and OpenTelemetry tracker created for session <id>.
Expected behavior
The OTel file is written whether or not a GitHub account is signed in, as in 1.0.114.
Additional context
Possibly the same cause as #5376 (no session tracker in ACP mode).
- 主要言語
- Python
- スター
- 11.5k
- フォーク
- 2k
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-cli のほかの issue
-
area:plugins
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
github/copilot-cli#5567 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationオープンarea:tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/copilot-cli#5476 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
github/copilot-cli#5340 ·
github/copilot-cli の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
Status: Triage Suggestion
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
collabnix/awesome-mcp-lists#515 ·
メンテナーはふだん 1 日以内に返信
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
documentation good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信