GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: opencode run does not emit OTLP traces even with experimental.openTelemetry enabled · Issue #13438 · anomalyco/opencode

fix: opencode run does not emit OTLP traces even with experimental.openTelemetry enabled #13438

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
fix: opencode run does not emit OTLP traces even with experimental.openTelemetry enabled#13438
Copy link
Assignees
rekram1-node

Description

@bestend
bestend
opened on Feb 13, 2026
Issue body actions

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

  1. Enable OpenTelemetry feature in config:
    {
      "$schema": "https://opencode.ai/config.json",
      "experimental": {
        "openTelemetry": true
      }
    }
  2. Start local collector + jaeger (OTLP HTTP on :4318, gRPC on :4317).
  3. Send a manual OTLP trace to collector (POST /v1/traces) as control.
  4. 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
  5. 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:

  • Add OTEL export capabilities for observability and monitoring #12142 (OTEL export capabilities)
  • experimental_telemetry metadata removed during LLM refactor #8193 (experimental_telemetry metadata regression)
  • [FEATURE]: add OTEL integration #13171 (OTEL integration discussion)

This report is specifically about runtime emission behavior: collector path is verified healthy, but opencode spans are not emitted.

Reacted by Artem Vozhdayenko and eberkut

Activity

  1. github-actions
    assigned
    rekram1-node
    on Feb 13, 2026
  2. strangemonad commented on Mar 23, 2026

    @strangemonad
    strangemonad
    on Mar 23, 2026
    More actions

    Related:

    • feat: integrate OpenTelemetry #5245
    • feat(telemetry): add OpenTelemetry instrumentation with Aspire Dashboard support #6629 (@Hona)
    • feat(telemetry): add OpenTelemetry integration for AI SDK monitoring #10652
    • ...

    and many others https://github.com/anomalyco/opencode/pulls?q=is%3Apr+otel

  3. maxkomarychev commented on May 4, 2026

    @maxkomarychev
    maxkomarychev
    on May 4, 2026
    More actions

    Not exactly the what is reported but I noticed that spans from opencode are always emitted as "opencode" - it appears OTEL_SERVICE_NAME has no effect. At least I could not find those traces while they were indeed working.

    Trying to fix it here: #25739

  4. astefanutti commented on May 31, 2026

    @astefanutti
    astefanutti
    on May 31, 2026
    More actions

    Root cause identified: process.exit() in the finally block of index.ts kills the process before the BatchSpanProcessor can flush buffered spans. AppRuntime.dispose() is never called, so the OTel SDK's shutdown/flush chain never runs.

    Fix: #30089

  5. github-actions commented on Jul 31, 2026

    @github-actions
    github-actionsBot
    on Jul 31, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  6. github-actions
    closed this as not plannedon Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.