Skip to content

docs: add declarative configuration guide and example#5309

Draft
MikeGoldsmith wants to merge 3 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/config-docs
Draft

docs: add declarative configuration guide and example#5309
MikeGoldsmith wants to merge 3 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/config-docs

Conversation

@MikeGoldsmith

Copy link
Copy Markdown
Member

Description

Adds user-facing documentation for declarative (file-based) configuration of the SDK:

  • New SDK guide page docs/sdk/configuration.rst covering:
    • enabling via OTEL_CONFIG_FILE
    • applying programmatically via the public opentelemetry.sdk.configuration API (load_config_file + configure_sdk)
    • the opentelemetry-sdk[file-configuration] install extra
    • environment variable substitution (${VAR}, ${VAR:-default}, $$)
  • A runnable example under docs/examples/declarative-config/ (a schema-1.0 otel-config.yaml, app.py, and 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

Dependencies

This PR documents API that is still in flight, so it should merge after:

Kept as a draft until those land. 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.
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: Ready for review

Development

Successfully merging this pull request may close these issues.

Document declarative (file-based) configuration

1 participant