Skip to content

docs: explain OTLP log and trace export configuration - #56515

Closed
rudycelekli wants to merge 2 commits into
anomalyco:devfrom
rudycelekli:otlp-docs
Closed

rudycelekli wants to merge 2 commits into
anomalyco:devfrom
rudycelekli:otlp-docs

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 17, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #47195

Type of change

  • Documentation

What does this PR do?

Document the implemented OTLP/HTTP endpoint, collector headers, resource attributes, and separate CLI/server environments. Include foreground and managed-service examples, restart/persistence guidance, automatically appended signal paths, and the all-or-nothing handling of malformed custom resource attributes.

How did you verify your code works?

  • Checked the current observability implementation and CLI wiring. Locally: bun run check:generated and git diff --check pass.
  • Source-bound Linux qualification: website typecheck/generated checks/build pass before and after; existing real HTTP-collector span-export regression and root bun run check pass.
  • Review repair: exact-source Linux qualification passed website typecheck, generated checks, full website build and root check (34 tasks). The repair was validated in hosted CI, not rerun locally.
  • No production behavior changed.

Screenshots / recordings

Documentation-only; rendered troubleshooting page captured in qualification artifact.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #55004

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new section matches the current export code. I checked the appended /v1/logs and /v1/traces paths, header parsing, percent-decoding of resource attributes, the built-in resource attributes, and that export is off when no endpoint is set. Nothing to run, since this only changes docs.

Public API impact: none. This documents environment variables OpenCode already reads.

Worth fixing:

  • The background-server paragraph doesn't say how to pass the variables to the managed service (see the inline comment).
  • A short note for troubleshooting would help: if one OTEL_RESOURCE_ATTRIBUTES entry is malformed (for example a missing = or a bad % escape), OpenCode silently drops all custom attributes, not just that one.

Also, #55004 changes how OTEL_EXPORTER_OTLP_HEADERS values are decoded. Whichever of the two PRs merges second should update the headers row to match.

Related: #55004

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:Add documentation for environment variables related to OTEL support

1 participant