anomalyco / anomalyco/opencode
[FEATURE]: Support enforced OTLP settings in managed configuration
@neriousy is already working on this.
Since Sep 4, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
OpenCode supports system-managed configuration and macOS managed preferences, but its OTLP exporter is configured only through inherited environment variables:
OTEL_EXPORTER_OTLP_ENDPOINTOTEL_EXPORTER_OTLP_HEADERSOTEL_RESOURCE_ATTRIBUTES
This means an administrator cannot enforce an OTLP destination through /etc/opencode, %ProgramData%\opencode, or an ai.opencode.managed MDM profile. A user can unset or replace the environment variables when launching OpenCode.
Add dedicated managed OTLP settings:
{
"telemetry": {
"otlp": {
"endpoint": "https://otel.example.com",
"headers": "Authorization=Bearer token",
"resourceAttributes": "deployment.environment.name=production"
}
},
"experimental": {
"openTelemetry": true
}
}
Values present in the macOS ai.opencode.managed profile should have the highest precedence and should not be overridable by system-managed files, inherited environment variables, user configuration, or project configuration. For values omitted from the profile, the system-managed file should take precedence over inherited OTEL_* variables. Precedence should be evaluated per setting.
A dedicated OTLP block is preferable to a general managed env dictionary because it limits the capability to exporter settings OpenCode already supports.
Related: #12142, #25839
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.