Summary
Add Grafana support for Codex review usage and cost tracking comparable to the existing Claude usage dashboard, with clear behavior when the Codex CLI does not emit dollar cost data.
Context
The self-host stack already tracks Claude usage through the OTEL/Grafana path. Codex needs comparable visibility for token usage, review counts, provider/model/effort selection, and any available cost fields. If the Codex CLI only emits token usage, the dashboard should say that plainly rather than inventing cost.
Requirements
- Capture Codex CLI usage fields from review runs.
- Emit Prometheus metrics for request counts and token usage labeled by provider/model/effort where practical.
- Store or display Codex usage events in the existing review usage data path if available.
- Add Grafana panels for Codex requests, input/output/total tokens, usage over time, recent review events, and cost when available.
- Make absence of cost data explicit.
- Keep dashboard provisioning working in the self-host compose stack.
Deliverables
- Metrics extraction and tests for Codex CLI JSONL usage output.
- Grafana dashboard for Codex usage.
- Datasource/provisioning updates if needed.
- Docs explaining Codex dashboard semantics and cost limitations.
Acceptance criteria
- A successful Codex review increments request and token metrics.
- The dashboard loads from a fresh compose stack.
- Cost panels do not imply dollar accuracy unless the runtime emits a cost field.
Summary
Add Grafana support for Codex review usage and cost tracking comparable to the existing Claude usage dashboard, with clear behavior when the Codex CLI does not emit dollar cost data.
Context
The self-host stack already tracks Claude usage through the OTEL/Grafana path. Codex needs comparable visibility for token usage, review counts, provider/model/effort selection, and any available cost fields. If the Codex CLI only emits token usage, the dashboard should say that plainly rather than inventing cost.
Requirements
Deliverables
Acceptance criteria