OpenTelemetry Python Declarative Configuration (experimental)
Project Links
Meta
Author: OpenTelemetry Authors
Requires Python: >=3.10
Classifiers
Development Status
- 3 - Alpha
Framework
- OpenTelemetry
Intended Audience
- Developers
Programming Language
- Python
- Python :: 3
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Typing
- Typed
This package implements the OpenTelemetry declarative configuration specification for the Python SDK. It parses a YAML or JSON configuration file (or programmatically-constructed configuration model) into typed dataclasses and applies the result to the global SDK providers.
The standard activation path is the OTEL_CONFIG_FILE environment variable, which the SDK’s configurator picks up automatically. Set the variable and run your app under opentelemetry-instrument; no code change is required.
For programmatic use:
from opentelemetry.configuration import configure_sdk, load_config_file
config = load_config_file("otel-config.yaml")
configure_sdk(config)
Installation
pip install opentelemetry-configuration
References
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
jsonschema
(>=4.0)
opentelemetry-api
(==1.44.0)
opentelemetry-sdk
(==1.44.0)
pyyaml
(>=5.4)