New claude-code-otlp adapter: an OpenTelemetry receiver, over gRPC and HTTP on one port, that Claude Code’s own exporter can point at. Metrics can be enabled on only one of the two adapters, so tokens are never counted twice.
This is interesting - I've been wanting to get this type of control and was messing with attaching json trace captures and then analyzing them with bespoke node scipts, but that felt like automation poverty. Hanging it into OTel is pretty convenient. Maybe it's time to bake a fresh Claude Code image with this configured.
Unfortunately, it doesn't work as a pure opentelemetry capture. It needs access to the workspace and the homedir, or everything will just get ignored. Going to be interesting to make this work with single-use containers, single use workspaces!
This is interesting - I've been wanting to get this type of control and was messing with attaching json trace captures and then analyzing them with bespoke node scipts, but that felt like automation poverty. Hanging it into OTel is pretty convenient. Maybe it's time to bake a fresh Claude Code image with this configured.
Unfortunately, it doesn't work as a pure opentelemetry capture. It needs access to the workspace and the homedir, or everything will just get ignored. Going to be interesting to make this work with single-use containers, single use workspaces!
Agreed. The local adapters make this closer to a workspace-aware co
The useful bit here is that this is the first PMC-voted A