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
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 opencode: OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_SERVICE_NAME='my-name' OTEL_RESOURCE_ATTRIBUTES='deployment.environment.name=my-env' bun dev
This should probably be tested as resource-attribute precedence.
A useful fixture would set OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES, then assert the exported resource keeps user-supplied service.name and deployment.environment.name, with OpenCode-specific values under separate attributes like opencode.channel or opencode.version. That avoids overwriting operator routing fields that collectors rely on.
Activity
Necmttn commentedon Jun 22, 2026
This should probably be tested as resource-attribute precedence.
A useful fixture would set
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTES, then assert the exported resource keeps user-suppliedservice.nameanddeployment.environment.name, with OpenCode-specific values under separate attributes likeopencode.channeloropencode.version. That avoids overwriting operator routing fields that collectors rely on.Generated with ax - https://github.com/Necmttn/ax
feat: add OpenCode agent profile (#124)
github-actions commentedon Aug 22, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.