Skip to content

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

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

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

This branch has not been deployed

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

Labels

None yet

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