Skip to content

Commit ce7cd1e

Browse files
committed
docs: add GitHub Copilot CLI sections to translated READMEs
Copilot was supported but never documented in the Korean, Japanese, and Simplified Chinese READMEs. Sync the three translations with the English version: client table row, multi-platform support feature bullet, frontend source filter list, Windows data locations table, and the `### Copilot CLI` Data Sources section with OTEL setup instructions.
1 parent 574093f commit ce7cd1e

3 files changed

Lines changed: 111 additions & 6 deletions

File tree

README.ja.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
| <img width="48px" src=".github/assets/client-claude.jpg" alt="Claude" /> | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `~/.claude/projects/` | ✅ 対応 |
5959
| <img width="48px" src=".github/assets/client-openclaw.jpg" alt="OpenClaw" /> | [OpenClaw](https://openclaw.ai/) | `~/.openclaw/agents/` (+ レガシー: `.clawdbot`, `.moltbot`, `.moldbot`) | ✅ 対応 |
6060
| <img width="48px" src=".github/assets/client-openai.jpg" alt="Codex" /> | [Codex CLI](https://github.com/openai/codex) | `~/.codex/sessions/` | ✅ 対応 |
61+
| <img width="48px" src=".github/assets/client-copilot.jpg" alt="Copilot" /> | [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-the-github-copilot-coding-agent-in-cli) | `~/.copilot/otel/*.jsonl` (+ `COPILOT_OTEL_FILE_EXPORTER_PATH`) | ✅ 対応 |
6162
| <img width="48px" src=".github/assets/client-hermes.png" alt="Hermes Agent" /> | [Hermes Agent](https://github.com/NousResearch/hermes-agent) | `$HERMES_HOME/state.db`(フォールバック: `~/.hermes/state.db`| ✅ 対応 |
6263
| <img width="48px" src=".github/assets/client-gemini.png" alt="Gemini" /> | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `~/.gemini/tmp/*/chats/*.json` | ✅ 対応 |
6364
| <img width="48px" src=".github/assets/client-cursor.jpg" alt="Cursor" /> | [Cursor IDE](https://cursor.com/) | `~/.config/tokscale/cursor-cache/`経由でAPI同期 | ✅ 対応 |
@@ -140,7 +141,7 @@ AI支援開発の時代において、**トークンは新しいエネルギー*
140141
- 9色テーマのGitHubスタイル貢献グラフ
141142
- リアルタイムフィルタリングとソート
142143
- ゼロフリッカーレンダリング
143-
- **マルチプラットフォームサポート** - OpenCode、Claude Code、Codex CLI、Cursor IDE、Gemini CLI、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi CLI、Qwen CLI、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic全体の使用量追跡
144+
- **マルチプラットフォームサポート** - OpenCode、Claude Code、Codex CLI、Copilot CLI、Cursor IDE、Gemini CLI、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi CLI、Qwen CLI、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic全体の使用量追跡
144145
- **リアルタイム価格** - 1時間ディスクキャッシュ付きでLiteLLMから現在の価格を取得;OpenRouter自動フォールバックと新規モデル向けCursor価格サポート
145146
- **詳細な内訳** - 入力、出力、キャッシュ読み書き、推論トークン追跡
146147
- **ネイティブRustコア** - 10倍高速な処理のため、すべての解析と集計をRustで実行
@@ -580,7 +581,7 @@ tokscale sources --json
580581
- **インタラクティブツールチップ**: ホバーで詳細な日別内訳を表示
581582
- **日別内訳パネル**: クリックでソース別、モデル別の詳細を確認
582583
- **年別フィルタリング**: 年間を移動
583-
- **ソースフィルタリング**: プラットフォーム別フィルター(OpenCode、Claude、Codex、Cursor、Gemini、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi、Qwen、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic)
584+
- **ソースフィルタリング**: プラットフォーム別フィルター(OpenCode、Claude、Codex、Copilot、Cursor、Gemini、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi、Qwen、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic)
584585
- **統計パネル**: 総コスト、トークン、活動日数、連続記録
585586
- **FOUC防止**: Reactハイドレーション前にテーマを適用(フラッシュなし)
586587

@@ -873,6 +874,7 @@ AIコーディングツールはクロスプラットフォームの場所にセ
873874
| Claude Code | `~/.claude/` | `%USERPROFILE%\.claude\` | すべてのプラットフォームで同じパス |
874875
| OpenClaw | `~/.openclaw/` (+ レガシー: `.clawdbot`, `.moltbot`, `.moldbot`) | `%USERPROFILE%\.openclaw\` (+ レガシーパス) | すべてのプラットフォームで同じパス |
875876
| Codex CLI | `~/.codex/` | `%USERPROFILE%\.codex\` | `CODEX_HOME`環境変数で設定可能([ソース](https://github.com/openai/codex)|
877+
| Copilot CLI | `~/.copilot/otel/` | `%USERPROFILE%\.copilot\otel\` | OTELファイル書き出しが必要; `COPILOT_OTEL_FILE_EXPORTER_PATH`も自動取り込み |
876878
| Hermes Agent | `~/.hermes/` | `%USERPROFILE%\.hermes\` | `HERMES_HOME`環境変数で設定可能([ソース](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/developer-guide/session-storage.md)|
877879
| Gemini CLI | `~/.gemini/` | `%USERPROFILE%\.gemini\` | すべてのプラットフォームで同じパス |
878880
| Amp | `~/.local/share/amp/` | `%USERPROFILE%\.local\share\amp\` | OpenCodeと同様に`xdg-basedir`を使用 |
@@ -1014,6 +1016,39 @@ OpenCodeはビルド時のリリースチャンネルに応じてDBファイル
10141016
{"type": "event_msg", "payload": {"type": "token_count", "info": {"last_token_usage": {"input_tokens": 1234, "output_tokens": 567}}}}
10151017
```
10161018

1019+
### Copilot CLI
1020+
1021+
場所: `~/.copilot/otel/*.jsonl` または `COPILOT_OTEL_FILE_EXPORTER_PATH` に明示されたパス
1022+
1023+
Copilot対応はファイル書き出しされたOpenTelemetry JSONLを読み取ります。Copilotを実行する前に有効化してください:
1024+
1025+
```bash
1026+
export COPILOT_OTEL_ENABLED=true
1027+
export COPILOT_OTEL_EXPORTER_TYPE=file
1028+
mkdir -p "$HOME/.copilot/otel"
1029+
export COPILOT_OTEL_FILE_EXPORTER_PATH="$HOME/.copilot/otel/copilot-otel-$(date +%Y%m%d-%H%M%S).jsonl"
1030+
```
1031+
1032+
PowerShell:
1033+
1034+
```powershell
1035+
$otelDir = "$HOME/.copilot/otel"
1036+
New-Item -ItemType Directory -Force -Path $otelDir | Out-Null
1037+
$env:COPILOT_OTEL_ENABLED = "true"
1038+
$env:COPILOT_OTEL_EXPORTER_TYPE = "file"
1039+
$env:COPILOT_OTEL_FILE_EXPORTER_PATH = Join-Path $otelDir ("copilot-otel-{0}.jsonl" -f (Get-Date -Format "yyyyMMdd-HHmmss"))
1040+
```
1041+
1042+
タイムスタンプ付きのファイル名を使用することを推奨します。これにより、各Copilotセッションが1つの巨大なOTELログに蓄積されるのではなく、新しいファイルに書き込まれます。
1043+
1044+
Tokscaleは `chat` spanをトークン集計の信頼源として扱い、ツールspanおよび累積メトリクスはフェーズ1で無視します:
1045+
1046+
```json
1047+
{"type":"span","name":"chat gpt-5.4-mini","attributes":{"gen_ai.operation.name":"chat","gen_ai.response.model":"gpt-5.4-mini","gen_ai.conversation.id":"session-id","gen_ai.usage.input_tokens":1234,"gen_ai.usage.output_tokens":567,"gen_ai.usage.cache_read.input_tokens":890,"gen_ai.usage.reasoning.output_tokens":123}}
1048+
```
1049+
1050+
> CopilotのOTELペイロードは現在、安定したワークスペースメタデータを公開していないため、Copilotの行はワークスペース属性なしで表示される場合があります。Tokscaleは可能な限り報告されたモデルからこれらの行を価格計算し、`github.copilot.cost` を直接信頼しません。
1051+
10171052
### Gemini CLI
10181053

10191054
場所: `~/.gemini/tmp/{projectHash}/chats/*.json`

README.ko.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
| <img width="48px" src=".github/assets/client-claude.jpg" alt="Claude" /> | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `~/.claude/projects/` | ✅ 지원 |
5959
| <img width="48px" src=".github/assets/client-openclaw.jpg" alt="OpenClaw" /> | [OpenClaw](https://openclaw.ai/) | `~/.openclaw/agents/` (+ 레거시: `.clawdbot`, `.moltbot`, `.moldbot`) | ✅ 지원 |
6060
| <img width="48px" src=".github/assets/client-openai.jpg" alt="Codex" /> | [Codex CLI](https://github.com/openai/codex) | `~/.codex/sessions/` | ✅ 지원 |
61+
| <img width="48px" src=".github/assets/client-copilot.jpg" alt="Copilot" /> | [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-the-github-copilot-coding-agent-in-cli) | `~/.copilot/otel/*.jsonl` (+ `COPILOT_OTEL_FILE_EXPORTER_PATH`) | ✅ 지원 |
6162
| <img width="48px" src=".github/assets/client-hermes.png" alt="Hermes Agent" /> | [Hermes Agent](https://github.com/NousResearch/hermes-agent) | `$HERMES_HOME/state.db` (폴백: `~/.hermes/state.db`) | ✅ 지원 |
6263
| <img width="48px" src=".github/assets/client-gemini.png" alt="Gemini" /> | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `~/.gemini/tmp/*/chats/*.json` | ✅ 지원 |
6364
| <img width="48px" src=".github/assets/client-cursor.jpg" alt="Cursor" /> | [Cursor IDE](https://cursor.com/) | `~/.config/tokscale/cursor-cache/`를 통한 API 동기화 | ✅ 지원 |
@@ -140,7 +141,7 @@ AI 지원 개발 시대에 **토큰은 새로운 에너지**입니다. 토큰은
140141
- 9가지 테마의 GitHub 스타일 기여 그래프
141142
- 실시간 필터링 및 정렬
142143
- 깜빡임 없는 렌더링
143-
- **멀티 플랫폼 지원** - OpenCode, Claude Code, Codex CLI, Cursor IDE, Gemini CLI, Amp, Codebuff, Droid, OpenClaw, Hermes Agent, Pi, Kimi CLI, Qwen CLI, Roo Code, Kilo, Mux, Kilo CLI, Crush, Goose, Antigravity, Synthetic 사용량 통합 추적
144+
- **멀티 플랫폼 지원** - OpenCode, Claude Code, Codex CLI, Copilot CLI, Cursor IDE, Gemini CLI, Amp, Codebuff, Droid, OpenClaw, Hermes Agent, Pi, Kimi CLI, Qwen CLI, Roo Code, Kilo, Mux, Kilo CLI, Crush, Goose, Antigravity, Synthetic 사용량 통합 추적
144145
- **실시간 가격 반영** - LiteLLM에서 최신 가격을 가져와(디스크 캐시 1시간) 비용 계산; OpenRouter 자동 폴백 및 신규 모델용 Cursor 가격 지원
145146
- **상세 분석** - 입력, 출력, 캐시 읽기/쓰기, 추론 토큰까지 추적
146147
- **네이티브 Rust 코어** - 모든 파싱과 집계를 Rust로 처리해 최대 10배 빠른 성능
@@ -579,7 +580,7 @@ tokscale sources --json
579580
- **인터랙티브 툴팁**: 호버 시 상세 일별 분석 표시
580581
- **일별 분석 패널**: 클릭하여 소스별, 모델별 세부사항 확인
581582
- **연도 필터링**: 연도 간 탐색
582-
- **소스 필터링**: 플랫폼별 필터 (OpenCode, Claude, Codex, Cursor, Gemini, Amp, Codebuff, Droid, OpenClaw, Hermes Agent, Pi, Kimi, Qwen, Roo Code, Kilo, Mux, Kilo CLI, Crush, Goose, Antigravity, Synthetic)
583+
- **소스 필터링**: 플랫폼별 필터 (OpenCode, Claude, Codex, Copilot, Cursor, Gemini, Amp, Codebuff, Droid, OpenClaw, Hermes Agent, Pi, Kimi, Qwen, Roo Code, Kilo, Mux, Kilo CLI, Crush, Goose, Antigravity, Synthetic)
583584
- **통계 패널**: 총 비용, 토큰, 활동 일수, 연속 기록
584585
- **FOUC 방지**: React 하이드레이션 전 테마 적용 (깜빡임 없음)
585586

@@ -872,6 +873,7 @@ AI 코딩 도구들은 크로스 플랫폼 위치에 세션 데이터를 저장
872873
| Claude Code | `~/.claude/` | `%USERPROFILE%\.claude\` | 모든 플랫폼에서 동일한 경로 |
873874
| OpenClaw | `~/.openclaw/` (+ 레거시: `.clawdbot`, `.moltbot`, `.moldbot`) | `%USERPROFILE%\.openclaw\` (+ 레거시 경로) | 모든 플랫폼에서 동일한 경로 |
874875
| Codex CLI | `~/.codex/` | `%USERPROFILE%\.codex\` | `CODEX_HOME` 환경변수로 설정 가능 ([소스](https://github.com/openai/codex)) |
876+
| Copilot CLI | `~/.copilot/otel/ ` | `%USERPROFILE%\.copilot\otel\` | OTEL 파일 내보내기 필요; `COPILOT_OTEL_FILE_EXPORTER_PATH`도 자동 수집 |
875877
| Hermes Agent | `~/.hermes/` | `%USERPROFILE%\.hermes\` | `HERMES_HOME` 환경변수로 설정 가능 ([소스](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/developer-guide/session-storage.md)) |
876878
| Gemini CLI | `~/.gemini/` | `%USERPROFILE%\.gemini\` | 모든 플랫폼에서 동일한 경로 |
877879
| Amp | `~/.local/share/amp/` | `%USERPROFILE%\.local\share\amp\` | OpenCode와 동일하게 `xdg-basedir` 사용 |
@@ -1013,6 +1015,39 @@ OpenCode는 빌드된 릴리스 채널에 따라 DB 파일명을 결정합니다
10131015
{"type": "event_msg", "payload": {"type": "token_count", "info": {"last_token_usage": {"input_tokens": 1234, "output_tokens": 567}}}}
10141016
```
10151017

1018+
### Copilot CLI
1019+
1020+
위치: `~/.copilot/otel/*.jsonl` 또는 `COPILOT_OTEL_FILE_EXPORTER_PATH`에 명시된 경로
1021+
1022+
Copilot 지원은 파일로 내보낸 OpenTelemetry JSONL을 읽습니다. Copilot을 실행하기 전에 활성화하세요:
1023+
1024+
```bash
1025+
export COPILOT_OTEL_ENABLED=true
1026+
export COPILOT_OTEL_EXPORTER_TYPE=file
1027+
mkdir -p "$HOME/.copilot/otel"
1028+
export COPILOT_OTEL_FILE_EXPORTER_PATH="$HOME/.copilot/otel/copilot-otel-$(date +%Y%m%d-%H%M%S).jsonl"
1029+
```
1030+
1031+
PowerShell:
1032+
1033+
```powershell
1034+
$otelDir = "$HOME/.copilot/otel"
1035+
New-Item -ItemType Directory -Force -Path $otelDir | Out-Null
1036+
$env:COPILOT_OTEL_ENABLED = "true"
1037+
$env:COPILOT_OTEL_EXPORTER_TYPE = "file"
1038+
$env:COPILOT_OTEL_FILE_EXPORTER_PATH = Join-Path $otelDir ("copilot-otel-{0}.jsonl" -f (Get-Date -Format "yyyyMMdd-HHmmss"))
1039+
```
1040+
1041+
타임스탬프가 포함된 파일명을 사용하면 각 Copilot 세션이 하나의 거대한 OTEL 로그에 누적되지 않고 새 파일에 기록됩니다.
1042+
1043+
Tokscale은 `chat` span을 토큰 집계의 출처로 취급하고, 도구 span과 누적 메트릭은 1단계에서 무시합니다:
1044+
1045+
```json
1046+
{"type":"span","name":"chat gpt-5.4-mini","attributes":{"gen_ai.operation.name":"chat","gen_ai.response.model":"gpt-5.4-mini","gen_ai.conversation.id":"session-id","gen_ai.usage.input_tokens":1234,"gen_ai.usage.output_tokens":567,"gen_ai.usage.cache_read.input_tokens":890,"gen_ai.usage.reasoning.output_tokens":123}}
1047+
```
1048+
1049+
> Copilot의 OTEL 페이로드는 현재 안정적인 워크스페이스 메타데이터를 노출하지 않으므로, Copilot 행은 워크스페이스 속성 없이 표시될 수 있습니다. Tokscale은 가능한 경우 보고된 모델로부터 해당 행의 가격을 책정하며, `github.copilot.cost`를 직접 신뢰하지 않습니다.
1050+
10161051
### Gemini CLI
10171052

10181053
위치: `~/.gemini/tmp/{projectHash}/chats/*.json`

README.zh-cn.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
| <img width="48px" src=".github/assets/client-claude.jpg" alt="Claude" /> | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `~/.claude/projects/` | ✅ 支持 |
5959
| <img width="48px" src=".github/assets/client-openclaw.jpg" alt="OpenClaw" /> | [OpenClaw](https://openclaw.ai/) | `~/.openclaw/agents/` (+ 旧版: `.clawdbot`, `.moltbot`, `.moldbot`) | ✅ 支持 |
6060
| <img width="48px" src=".github/assets/client-openai.jpg" alt="Codex" /> | [Codex CLI](https://github.com/openai/codex) | `~/.codex/sessions/` | ✅ 支持 |
61+
| <img width="48px" src=".github/assets/client-copilot.jpg" alt="Copilot" /> | [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-the-github-copilot-coding-agent-in-cli) | `~/.copilot/otel/*.jsonl` (+ `COPILOT_OTEL_FILE_EXPORTER_PATH`) | ✅ 支持 |
6162
| <img width="48px" src=".github/assets/client-hermes.png" alt="Hermes Agent" /> | [Hermes Agent](https://github.com/NousResearch/hermes-agent) | `$HERMES_HOME/state.db`(回退:`~/.hermes/state.db`| ✅ 支持 |
6263
| <img width="48px" src=".github/assets/client-gemini.png" alt="Gemini" /> | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `~/.gemini/tmp/*/chats/*.json` | ✅ 支持 |
6364
| <img width="48px" src=".github/assets/client-cursor.jpg" alt="Cursor" /> | [Cursor IDE](https://cursor.com/) | 通过 `~/.config/tokscale/cursor-cache/` API 同步 | ✅ 支持 |
@@ -140,7 +141,7 @@
140141
- 9 种颜色主题的 GitHub 风格贡献图
141142
- 实时筛选和排序
142143
- 零闪烁渲染
143-
- **多平台支持** - 跟踪 OpenCode、Claude Code、Codex CLI、Cursor IDE、Gemini CLI、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi CLI、Qwen CLI、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity 和 Synthetic 的使用情况
144+
- **多平台支持** - 跟踪 OpenCode、Claude Code、Codex CLI、Copilot CLI、Cursor IDE、Gemini CLI、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi CLI、Qwen CLI、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity 和 Synthetic 的使用情况
144145
- **实时定价** - 从 LiteLLM 获取当前价格,带 1 小时磁盘缓存;OpenRouter 自动回退和新模型的 Cursor 定价支持
145146
- **详细分解** - 输入、输出、缓存读写和推理 Token 跟踪
146147
- **原生 Rust 核心** - 所有解析和聚合在 Rust 中完成,处理速度提升 10 倍
@@ -580,7 +581,7 @@ tokscale sources --json
580581
- **交互式提示**:悬停查看详细的每日分解
581582
- **每日分解面板**:点击查看每个来源和模型的详情
582583
- **年份筛选**:在年份之间导航
583-
- **来源筛选**:按平台筛选(OpenCode、Claude、Codex、Cursor、Gemini、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi、Qwen、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic)
584+
- **来源筛选**:按平台筛选(OpenCode、Claude、Codex、Copilot、Cursor、Gemini、Amp、Codebuff、Droid、OpenClaw、Hermes Agent、Pi、Kimi、Qwen、Roo Code、Kilo、Mux、Kilo CLI、Crush、Goose、Antigravity、Synthetic)
584585
- **统计面板**:总成本、Token、活跃天数、连续记录
585586
- **FOUC 防护**:在 React 水合前应用主题(无闪烁)
586587

@@ -873,6 +874,7 @@ AI 编程工具将会话数据存储在跨平台位置。大多数工具在所
873874
| Claude Code | `~/.claude/` | `%USERPROFILE%\.claude\` | 所有平台使用相同路径 |
874875
| OpenClaw | `~/.openclaw/` (+ 旧版: `.clawdbot`, `.moltbot`, `.moldbot`) | `%USERPROFILE%\.openclaw\` (+ 旧版路径) | 所有平台使用相同路径 |
875876
| Codex CLI | `~/.codex/` | `%USERPROFILE%\.codex\` | 可通过 `CODEX_HOME` 环境变量配置([源码](https://github.com/openai/codex)|
877+
| Copilot CLI | `~/.copilot/otel/` | `%USERPROFILE%\.copilot\otel\` | 需要 OTEL 文件导出;同时自动采集 `COPILOT_OTEL_FILE_EXPORTER_PATH` |
876878
| Hermes Agent | `~/.hermes/` | `%USERPROFILE%\.hermes\` | 可通过 `HERMES_HOME` 环境变量配置([源码](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/developer-guide/session-storage.md)|
877879
| Gemini CLI | `~/.gemini/` | `%USERPROFILE%\.gemini\` | 所有平台使用相同路径 |
878880
| Amp | `~/.local/share/amp/` | `%USERPROFILE%\.local\share\amp\` | 与 OpenCode 一样使用 `xdg-basedir` |
@@ -1014,6 +1016,39 @@ OpenCode 根据构建时的发布渠道决定数据库文件名:`latest`/`beta
10141016
{"type": "event_msg", "payload": {"type": "token_count", "info": {"last_token_usage": {"input_tokens": 1234, "output_tokens": 567}}}}
10151017
```
10161018

1019+
### Copilot CLI
1020+
1021+
位置:`~/.copilot/otel/*.jsonl``COPILOT_OTEL_FILE_EXPORTER_PATH` 中指定的显式路径
1022+
1023+
Copilot 支持读取文件导出的 OpenTelemetry JSONL。在运行 Copilot 之前启用它:
1024+
1025+
```bash
1026+
export COPILOT_OTEL_ENABLED=true
1027+
export COPILOT_OTEL_EXPORTER_TYPE=file
1028+
mkdir -p "$HOME/.copilot/otel"
1029+
export COPILOT_OTEL_FILE_EXPORTER_PATH="$HOME/.copilot/otel/copilot-otel-$(date +%Y%m%d-%H%M%S).jsonl"
1030+
```
1031+
1032+
PowerShell:
1033+
1034+
```powershell
1035+
$otelDir = "$HOME/.copilot/otel"
1036+
New-Item -ItemType Directory -Force -Path $otelDir | Out-Null
1037+
$env:COPILOT_OTEL_ENABLED = "true"
1038+
$env:COPILOT_OTEL_EXPORTER_TYPE = "file"
1039+
$env:COPILOT_OTEL_FILE_EXPORTER_PATH = Join-Path $otelDir ("copilot-otel-{0}.jsonl" -f (Get-Date -Format "yyyyMMdd-HHmmss"))
1040+
```
1041+
1042+
建议使用带时间戳的文件名,这样每个 Copilot 会话都会写入新文件,而不是累积到一个巨大的 OTEL 日志中。
1043+
1044+
Tokscale 将 `chat` span 作为 Token 统计的真实来源,并在第一阶段忽略工具 span 和累积指标:
1045+
1046+
```json
1047+
{"type":"span","name":"chat gpt-5.4-mini","attributes":{"gen_ai.operation.name":"chat","gen_ai.response.model":"gpt-5.4-mini","gen_ai.conversation.id":"session-id","gen_ai.usage.input_tokens":1234,"gen_ai.usage.output_tokens":567,"gen_ai.usage.cache_read.input_tokens":890,"gen_ai.usage.reasoning.output_tokens":123}}
1048+
```
1049+
1050+
> Copilot 的 OTEL 负载目前不暴露稳定的工作区元数据,因此 Copilot 行可能不会显示工作区属性。Tokscale 尽可能根据报告的模型为这些行定价,不会直接信任 `github.copilot.cost`
1051+
10171052
### Gemini CLI
10181053

10191054
位置:`~/.gemini/tmp/{projectHash}/chats/*.json`

0 commit comments

Comments
 (0)