Skip to content

[Bug]: opencode run "xyz" fails to load plugin due to 'OTLPLogExporter' not found error #35

Closed

Description

@bendtherules

Description

  • opencode run "xyz" fails to load plugin. It throws 'OTLPLogExporter' not found error from exporter-logs-otlp-grpc.
  • The exact sample plugin with same config works in opencode TUI mode correctly. Logs are sent.
  • Might be some issue/difference in how opencode actually loads/resolves plugins in CLI mode?

Steps to reproduce

  1. Set 'OPENCODE_ENABLE_TELEMETRY' to '1'
  2. Run OPENCODE_LOG_LEVEL="debug" opencode run
  3. Check logs. Plugin failed to load.

Expected behavior

Plugin loads

Actual behavior

Plugin fails to load

Plugin version

latest

Configuration

OPENCODE_ENABLE_TELEMETRY=1

Relevant log output

ERROR 2026-04-25T08:33:26 +31ms service=plugin path=@devtheops/opencode-plugin-otel target=file:///Users/<user>/.cache/opencode/packages/@devtheops/opencode-plugin-otel@latest/node_modules/@devtheops/opencode-plugin-otel/src/index.ts error=Export named 'OTLPLogExporter' not found in module '/Users/<user>/.cache/opencode/packages/@devtheops/opencode-plugin-otel@latest/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/index.js'. failed to load plugin

Checklist

  • I have searched existing issues to ensure this hasn't been reported
  • I have redacted any sensitive information (API keys, tokens, etc.)

Activity

  1. bendtherules commented on Apr 25, 2026

    @bendtherules
    ContributorAuthor

    This also happens in server mode. Run OPENCODE_LOG_LEVEL="debug" opencode serve and the same issue shows up.

    So, it essentially happens in both non-TUI modes. Clearly the plugin install process is somehow slightly different there.

  2. bendtherules commented on Apr 25, 2026

    @bendtherules
    ContributorAuthor

    Raised a AI-guided PR fix. I have verified that it works manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions