Description
When running the opencode via SDK with OTEL enabled I am unable to control some fundamental properties of spans. More specifically service name and environment name.
The name seems to be forced to "opencode" and "deployment.environment.name" is forced to "installation channel".
I want to be able to control these via OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES
Plugins
No response
OpenCode version
latest
Steps to reproduce
- enable otel via
config.experimental.openTelemetry = true
- run jaeger:
docker run --rm --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 14250:14250 \
-p 14268:14268 \
-p 14269:14269 \
-p 9411:9411 \
jaegertracing/all-in-one:1.76.0
- run opencode:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_SERVICE_NAME='my-name' OTEL_RESOURCE_ATTRIBUTES='deployment.environment.name=my-env' bun dev
Expected:
- service name "my-name"
- env "my-env"
Actual:
- service name: "opencode"
- env: "local"
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
When running the opencode via SDK with OTEL enabled I am unable to control some fundamental properties of spans. More specifically service name and environment name.
The name seems to be forced to "opencode" and "deployment.environment.name" is forced to "installation channel".
I want to be able to control these via
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESPlugins
No response
OpenCode version
latest
Steps to reproduce
config.experimental.openTelemetry = trueOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_SERVICE_NAME='my-name' OTEL_RESOURCE_ATTRIBUTES='deployment.environment.name=my-env' bun devExpected:
Actual:
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response