Skip to content

Allows API packages to specify file-based and env-based config #1621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Nevay
Copy link
Contributor

@Nevay Nevay commented Jun 4, 2025

Moves ComponentProvider and related classes to API and adds env-based loader to allow API packages (instrumentations and propagators) to specify their configuration options.

}
use function interface_exists;

interface_exists(ComponentPlugin::class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting 👀

Generally curious as I have not seen this before: does this differ in some way to extending OpenTelemetry\API\Configuration\Config\ComponentPlugin on this interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending would lead to BC breaks, for example we cannot narrow the type of ComponentProvider::getConfig() $registry from API ComponentProviderRegistry to SDK ComponentProviderRegistry.

@ChrisLightfootWild
Copy link
Contributor

Should I base #1523 on the back of this, given the environment changes here? 🤔 (I appreciate that my PR is a little stale, but I plan to pick it up again in future)

@Nevay
Copy link
Contributor Author

Nevay commented Jun 11, 2025

The two PRs should be mostly independent:
#1523 changes how OpenTelemetry\SDK\Common\Configuration\Configuration reads values
#1621 changes how values from OpenTelemetry\SDK\Common\Configuration\Configuration are read

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