opencode
opencode copied to clipboard
feat(telemetry): add OpenTelemetry instrumentation with Aspire Dashboard support
Adds experimental OpenTelemetry support for debugging and observability.
What
- Full OTEL instrumentation: all tools, MCP, sessions, LLM, LSP, plugins
- Aspire Dashboard integration via
bun run dev:otel - Service differentiation:
opencode-clivsopencode-server - Structured logs with full
key=valuecontext + exception stack traces - AI SDK telemetry with GenAI message content capture
Enabling OpenTelemetry
- Add to your global config (
~/.config/opencode/opencode.json:
{
"experimental": {
"openTelemetry": true
}
}
- Run with Aspire Dashboard:
cd packages/opencode
bun run dev:otel
- Open dashboard at http://localhost:18888
The OTEL_EXPORTER_OTLP_ENDPOINT env var controls the endpoint (defaults to http://localhost:4317).