Summary
opencode run does not produce any trace spans in a local OTEL collector, even when experimental.openTelemetry is enabled and OTEL exporter env vars are set.
In the same environment, manual OTLP trace ingestion works, so collector/backend path is healthy.
Environment
- OpenCode version:
1.1.65
- OS: macOS (darwin)
- Local stack: OpenTelemetry Collector (
otel/opentelemetry-collector-contrib:0.123.0) + Jaeger (jaegertracing/jaeger:2.4.0)
Reproduction
- Enable OpenTelemetry feature in config:
{
"$schema": "https://opencode.ai/config.json",
"experimental": {
"openTelemetry": true
}
}
- Start local collector + jaeger (OTLP HTTP on
:4318, gRPC on :4317).
- Send a manual OTLP trace to collector (
POST /v1/traces) as control.
- Run opencode with OTEL env:
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=none
OTEL_LOGS_EXPORTER=none
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
OTEL_SERVICE_NAME=opencode-local-smoke
- Compare collector trace count and logs before/after.
Observed Result
- Baseline trace count:
1
- After manual OTLP control trace:
2 (as expected)
- After
opencode run: still 2 (no new trace)
- Collector debug logs only show manual services (
manual-curl-test, manual-control), no opencode service.
- Jaeger
/api/services also shows only manual test services.
Expected Result
With experimental.openTelemetry=true + OTEL exporter env vars, opencode run should emit spans to OTLP collector.
Additional Notes
Potentially related issues:
This report is specifically about runtime emission behavior: collector path is verified healthy, but opencode spans are not emitted.
Summary
opencode rundoes not produce any trace spans in a local OTEL collector, even whenexperimental.openTelemetryis enabled and OTEL exporter env vars are set.In the same environment, manual OTLP trace ingestion works, so collector/backend path is healthy.
Environment
1.1.65otel/opentelemetry-collector-contrib:0.123.0) + Jaeger (jaegertracing/jaeger:2.4.0)Reproduction
{ "$schema": "https://opencode.ai/config.json", "experimental": { "openTelemetry": true } }:4318, gRPC on:4317).POST /v1/traces) as control.OTEL_TRACES_EXPORTER=otlpOTEL_METRICS_EXPORTER=noneOTEL_LOGS_EXPORTER=noneOTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufOTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobufOTEL_SERVICE_NAME=opencode-local-smokeObserved Result
12(as expected)opencode run: still2(no new trace)manual-curl-test,manual-control), no opencode service./api/servicesalso shows only manual test services.Expected Result
With
experimental.openTelemetry=true+ OTEL exporter env vars,opencode runshould emit spans to OTLP collector.Additional Notes
Potentially related issues:
This report is specifically about runtime emission behavior: collector path is verified healthy, but opencode spans are not emitted.