Skip to content

Conversation

@robsunday
Copy link

@robsunday robsunday commented Dec 15, 2025

Fixes #4770

This PR introduces Declarative Configuration support for distribution specific configuration.
The .distribution node is now available in the root of Declarative Configuration YAML file, as agreed on SIG.

Changes

ConfigProvider is extended with new operation to provide access to the .distribution node

For non-trivial changes, follow the change proposal process.

@robsunday robsunday marked this pull request as ready for review December 16, 2025 16:33
@robsunday robsunday requested review from a team as code owners December 16, 2025 16:33
@carlosalberto
Copy link
Contributor

cc @jack-berg

Obtain configuration relevant to vendor specific distribution.

**Returns:** [`ConfigProperties`](#configproperties) representing
the [`.distribution`](https://github.com/open-telemetry/opentelemetry-configuration/blob/670901762dd5cce1eecee423b8660e69f71ef4be/examples/kitchen-sink.yaml#L438-L439)
Copy link
Member

Choose a reason for hiding this comment

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

the link points to the .instrumentation node

The `ConfigProvider` MUST provide the following functions:

* [Get instrumentation config](#get-instrumentation-config)
* [Get distribution config](#get-distribution-config)
Copy link
Member

Choose a reason for hiding this comment

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

All instrumentation will have access to this. The original design of ConfigProvider intentionally limited the scope to the .instrumentation/development node, so as to avoid the questions about whether its appropriate / safe for instrumentation to have access to the SDK config model, including any secrets that may be present on the exporter nodes.

If we want to broaden scope, we need to have that conversation since its very reasonable that .distribution node will have the types of secrets that are in the SDK config model.

On a related note, why is this necessary?

The declarative config has separate parse and create methods that allow a distribution to access the .distribution node. For example in java:

OpenTelemetryConfigurationModel model = parse(new File(System.getEnv("OTEL_EXPERIMENTAL_CONFIG_FILE")));
DistributionModel distribution = model.getDistribution();
OpenTelemetrySdk sdk = create(model);

If there's not a strong need for this, the safe answer is to continue the status quo and not grant instrumentation access to more config than they need.

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Requesting changes because I want to make sure we discuss this before merging.

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
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.

[declarative config] Support for distribution specific config

4 participants