Skip to content

docs: add declarative configuration guide and example#5309

Merged
xrmx merged 6 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/config-docs
Jun 19, 2026
Merged

docs: add declarative configuration guide and example#5309
xrmx merged 6 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/config-docs

Conversation

@MikeGoldsmith

@MikeGoldsmith MikeGoldsmith commented Jun 16, 2026

Copy link
Copy Markdown
Member

Description

Adds user-facing documentation for declarative (file-based) configuration of the SDK, scoped to the env-var path for now. Programmatic configuration via the opentelemetry.sdk.configuration namespace is held until #5276 lands and will be documented in a follow-up.

  • New SDK guide page docs/sdk/configuration.rst covering:
    • enabling via OTEL_CONFIG_FILE + opentelemetry-instrument
    • the opentelemetry-sdk[file-configuration] install extra
    • environment variable substitution (${VAR}, ${VAR:-default}, $$)
    • interaction with other OTEL_* variables
  • A runnable example under docs/examples/declarative-config/: a schema-1.0 otel-config.yaml, a plain app.py driven by opentelemetry-instrument, and a README.rst.

The example YAML was validated against the bundled configuration schema via the loader, and the new pages build with no Sphinx warnings.

Fixes #5308

Part of #3631.

Type of change

  • Documentation

Add an SDK documentation page covering declarative (file-based) configuration
via OTEL_CONFIG_FILE and the public configuration API, plus a runnable example
under docs/examples/declarative-config with a schema-1.0 YAML config.
@MikeGoldsmith MikeGoldsmith added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 16, 2026
Replace the Honeycomb-specific endpoint and headers in the declarative config
guide with a generic OTLP endpoint and api-key header.
The check-links CI resolves new URLs; otlp.example.com is not covered by the
existing ignore patterns. Use the apex example.com placeholder, which the
check_links_config.json ignore list already matches.
@MikeGoldsmith MikeGoldsmith marked this pull request as ready for review June 19, 2026 11:34
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner June 19, 2026 11:34
Comment thread docs/sdk/configuration.rst
Comment thread docs/examples/declarative-config/README.rst
@github-project-automation github-project-automation Bot moved this from Ready for review to Approved PRs in Python PR digest Jun 19, 2026
@xrmx xrmx moved this from Approved PRs to Ready for merge in Python PR digest Jun 19, 2026
@xrmx xrmx added this pull request to the merge queue Jun 19, 2026
Merged via the queue into open-telemetry:main with commit 6ac6895 Jun 19, 2026
520 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for merge to Done in Python PR digest Jun 19, 2026
@MikeGoldsmith MikeGoldsmith deleted the mike/config-docs branch June 19, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Document declarative (file-based) configuration

3 participants