Repository navigation
feat(opencode): OpenTelemetry via @devtheops/opencode-plugin-otel - #2186
Merged
Merged
Conversation
OpenCode has no native OTEL support (verified against opencode.ai/docs and anomalyco/opencode#14246, #14697 -- both open feature requests). Wires the one existing telemetry surface (userConfig.telemetry) through the third-party plugin instead, sharing the same otlpEndpoint Claude Code and Codex already use. The plugin exposes exactly one OTLP endpoint for all three signals, so metrics/traces are validated against otlpEndpoint rather than routed independently: a metricsEndpoint that disagrees refuses the whole plugin (no per-signal metrics disable exists), a tracesEndpoint that disagrees just turns traces off (the plugin does support a whole-signal trace disable). tracesEndpoint always carries the full /v1/traces path (maintainer-profile.nix), so 'agrees with otlpEndpoint' means equal to otlpEndpoint + '/v1/traces', not string-equal to otlpEndpoint itself -- the regression test caught this before it shipped wrong. New otelPluginEntries introspection option mirrors codex's otelExporterKinds; it's readOnly with no default, since a readOnly option can only take its value from exactly one definition site (mirrors lspEnabled/mcpServerNames, not otel-plugin's own [] default which collided with default.nix's assignment). Assisted-by: Claude:claude-sonnet-5 Claude-Session: https://claude.ai/code/session_014VKod2GevZsQJ7Z3HYez9a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode has no native OTEL support (verified against opencode.ai/docs and
open feature requests anomalyco/opencode#14246, #14697). This wires it
through the third-party plugin
@devtheops/opencode-plugin-otelinstead,sharing the one existing telemetry surface (
userConfig.telemetry) thatClaude Code and Codex already use.
The plugin exposes exactly one OTLP endpoint for all three signals
(metrics/logs/traces together), so this consumer targets
otlpEndpointonly and validates the signal-specific endpoints against it:
metricsEndpointdisagreeing withotlpEndpointrefuses the wholeplugin (the plugin has no per-signal metrics disable).
tracesEndpointdisagreeing just turns traces off (the plugin doessupport a whole-signal trace disable).
New
otelPluginEntriesintrospection option mirrors Codex'sotelExporterKinds, for the regression checks inopencode-otel-wiring.Verification:
nix flake check --accept-flake-config(native aarch64-darwin)passes clean.
--all-systemsevaluates every x86_64-linux check includingthe new one; building them requires a remote Linux builder this Mac doesn't
have configured -- a pre-existing environment limitation affecting every
x86_64-linux check in the flake, not introduced by this change (confirmed:
autonomous-profile-render, an unrelated pre-existing check, fails the sameway on unmodified
develop).🤖 Generated with Claude Code
https://claude.ai/code/session_014VKod2GevZsQJ7Z3HYez9a