You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenTelemetry (OTEL) support similar to ClaudeCode? #14246
I’ve been experimenting with OpenCode and was wondering whether there are plans to support OpenTelemetry (OTEL) natively, similar to how ClaudeCode handles it.
In ClaudeCode, telemetry can be enabled and configured entirely via standard OTEL environment variables, for example:
With this setup, metrics are exported directly to an OTLP endpoint without any additional integration work in the client.
It seems like OpenCode doesn’t currently support OTEL in this way (at least not documented).
A few questions:
Is OTEL support on the roadmap?
Would you consider supporting the standard OTEL_* environment variables so telemetry can be wired up without code changes?
Is there a recommended way to plug in custom telemetry exporters today?
Having first-class OTEL support would make it much easier to integrate OpenCode into existing observability stacks (Prometheus, Grafana, etc.) and align with common instrumentation standards.
Thanks for the great work on the project. :)
Reacted by Dinesh Pandiyan, Che-Wei Lin, Jérôme Tama, Ebert, Florian Mair, Bob Langley, Thomas Boulbes, Troy Gaines and Punk Dev Robot
Reacted by Marco, Em Jones, Haris Pasha Dipto, Che-Wei Lin, Florian Mair and Punk Dev Robot
I like looking at beautiful dashboards and drawing conclusions on how I am using the tools at my disposal. It helps me understand my model and provider preference over time. Would love it if OpenCode would support exporting OTEL metrics. I use Zen for Moonshot and Z.AI models and would love to see how my usage trends with those models.
Here's an example dashboard I use to observe my codex usage.
Activity
github-actions commentedon Feb 19, 2026
This issue might be a duplicate of existing issues. Please check:
experimental.openTelemetryis enabled (also reveals partial OTEL support already exists)You may want to add your input to those existing threads rather than opening a new one.
flexdinesh commentedon Mar 13, 2026
I like looking at beautiful dashboards and drawing conclusions on how I am using the tools at my disposal. It helps me understand my model and provider preference over time. Would love it if OpenCode would support exporting OTEL metrics. I use Zen for Moonshot and Z.AI models and would love to see how my usage trends with those models.
Here's an example dashboard I use to observe my codex usage.
rekram1-node commentedon May 22, 2026
We have OTEL support now:
export OTEL_EXPORTER_OTLP_HEADERS=".........."
export OTEL_EXPORTER_OTLP_ENDPOINT="................"
export OTEL_RESOURCE_ATTRIBUTES="user.name=$(whoami)"
feat(opencode): OpenTelemetry via @devtheops/opencode-plugin-otel (#2186