Skip to content

Conversation

@MikeGoldsmith
Copy link
Member

@MikeGoldsmith MikeGoldsmith commented Feb 6, 2026

Description

The next step of implementing configuration file support. This PR loads the generated files validates them. Using the model to configure the SDK will come in later PRs.

Based on the following PR which added model generation from the schema:

Contributes to:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

32 unit tests covering file loading, parsing (YAML/JSON), env substitution, and error handling.

  • Configuration Loading Tests (test_loader.py - 14 tests)
  • Environment Variable Substitution Tests (test_env_substitution.py - 18 tests)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

codeboten and others added 13 commits January 15, 2026 09:57
Proposing that the first step towards implementing OpenTelemetry Configuration is to
produce the model code from the json schema. I did a quick search for tools available
to do this and came across datamodel-codegen which seems to do what i expected.

Will open following pull requests (in draft) to use this model code, i just want
to keep these as clearly separated as possible to make reviewing them easier.

Signed-off-by: alex boten <[email protected]>
… into codeboten/generate-config-model-from-schema
…ate-config-model-from-schema

fix code-generation command and regenerate models
…ate-config-model-from-schema.2

Fix lint errors and update uv.lock file
Signed-off-by: alex boten <[email protected]>
… into codeboten/generate-config-model-from-schema
…com:codeboten/opentelemetry-python into mike/otel-config/1-loading-validation
datamodel-codegen section was inserted between [tool.pyright] and its
include/exclude config, causing pyright to check entire repo (599 files)
instead of just included paths. Moved datamodel-codegen section after
pyright config.
…com:codeboten/opentelemetry-python into mike/otel-config/1-loading-validation
- Fix re.sub callback return type (must return str, not str | None)
- Rename DOLLAR_PLACEHOLDER to dollar_placeholder (pylint naming)
- Rename f to temp_file/config_file (pylint naming)
- Update uv.lock
Fixes yaml import warning by installing PyYAML type stubs and the
file-configuration optional dependencies.
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.

2 participants