Repository navigation
Releases
Releases · s3onghyun/agent-otel-kit
v0.2.0
Two main additions since v0.1.0: Qwen Code as a fourth agent, and honest cost for Claude Code on third-party Anthropic-compatible endpoints.
Qwen Code support (#7)
agent-otel-kit setup qwenwrites thetelemetryblock of~/.qwen/settings.json(enabled,target: "local",otlpEndpoint,otlpProtocol,logPrompts: false) and removesoutfileand the per-signal endpoint overrides. It uses OTLP/gRPC on port 4317 by default (an open Qwen Code report says its OTLP/HTTP exporter can send empty bodies);--protocol http|grpc|autochooses explicitly, and an endpoint not on port 4318 gets OTLP/HTTP with a notice.setup all,setup --undo qwenanddoctorcover Qwen Code too.- Collector:
service.nameqwen-codemaps toagent_name="qwen-code";qwen-code.tool_callevents feed the shared tool-duration histogram (function_namebecomestool.name). - Redaction fix: with
logPrompts: false, Qwen Code still sends the final answer of its background subagents asresultandexecution_summary; the collector now deletes both. - Dashboards: Qwen Code tokens (without double-counting
cacheinsideinputandthoughtinsideoutput), sessions,qwen-code.interactiontraces, permission decisions and model request duration, in Grafana and Perses. make test-collectorruns against OTLP payloads recorded from Qwen Code 0.27.4.
Claude Code on third-party Anthropic-compatible endpoints (#6)
- When Claude Code talks to DeepSeek, GLM, Kimi, MiniMax, Alibaba or another endpoint through
ANTHROPIC_BASE_URL, the tokens are exact but the cost is not (unknown model IDs are priced at the default model's rate). The collector now labels Claude Code cost metrics andapi_requestevents withcost_basis:estimatedwhenanthropic.custom_base_urlis true, otherwiselist; acost.basisset on the agent is kept. - A
[1m]-style suffix is stripped frommodelon Claude Code metrics, events and spans, soclaude-sonnet-5-5[1m]andclaude-sonnet-5-5are one model. - Dashboards: Cost and Estimated cost are separate stats and separate session columns, every cost series names its basis, and a Cost basis selector filters by it.
- README (EN, KO, zh-CN): what the kit shows for these endpoints, the managed-settings
modelPricingsnippet for exact cost (the kit never writes it),llm.providertagging, and the subscription-plan caveat.
Smaller changes
- The Cost panel description names Qwen Code with Codex and Gemini CLI as agents that export no cost (#8).
- The dashboard screenshots in the README are new, from a real local run of Claude Code, Codex, Gemini CLI and Qwen Code, and show the five-stat cost row (#8).
- README in Simplified Chinese (
README.zh-CN.md) (#5). - CI starts the collector and fails on deprecated or unknown config warnings (#4).
What was verified, and how
- Qwen Code 0.27.4 was run (
qwen -p,setup qwenwith gRPC and with--protocol http) on a live local stack against a local OpenAI-compatible mock server with a dummy key. No Alibaba Cloud Model Studio (DashScope) or DeepSeek key was used, so the model names, token counts (cached and reasoning tokens) and latencies those providers really report are not verified. - The third-party Claude Code path was verified with Claude Code 2.1.325 against a mock Anthropic-compatible endpoint. No DeepSeek, GLM, Kimi, MiniMax or Alibaba key was used.
- The screenshots come from a real local run: Claude Code (haiku and sonnet) on Anthropic, Codex 0.169.0 (
codex exec), Gemini CLI 0.68.0 (gemini -p, AI Studio key) and Qwen Code 0.27.4 against the same mock. The Estimated cost stat shows $0 because no session in that run used a third-party endpoint. - CI:
go test ./..., lint, dashboard regeneration check, collector config validation andmake test-collectoragainst recorded payloads.
Install
brew install s3onghyun/tap/agent-otel-kit(orbrew upgrade agent-otel-kit)- Archives for Linux and macOS (amd64, arm64) and
checksums.txtbelow go install github.com/s3onghyun/agent-otel-kit/cmd/agent-otel-kit@v0.2.0
Changelog
- 0f0a12e: ci(collector): fail on deprecated or unknown config warnings at start-up (#4) (@s3onghyun)
- 07411c6: feat(collector): honest Claude Code cost on third-party Anthropic-compatible endpoints (#6) (@s3onghyun)
- 4c9c3b6: feat: add Qwen Code support (setup qwen, collector rules, dashboards) (#7) (@s3onghyun)
- d133ab4: fix(dashboards): name Qwen Code in the cost panel and refresh screenshots (#8) (@s3onghyun)
v0.1.0
Changelog
- 7db4f4e: Initial commit (SEONGHYUN HONG s3onghyun.hong@gmail.com)
- f629c20: agent-otel-kit MVP: compose stack, collector config, setup/doctor CLI, Grafana and Perses dashboards (#1) (SEONGHYUN HONG s3onghyun.hong@gmail.com)
- 4298e6f: feat: release builds with GoReleaser, version with commit and date, README demo GIF (#3) (SEONGHYUN HONG s3onghyun.hong@gmail.com)
- 10bc72a: fix(collector): normalize Codex and Gemini CLI telemetry for the dashboards (#2) (SEONGHYUN HONG s3onghyun.hong@gmail.com)