Skip to content

Conversation

@AlphaOne1
Copy link

In the current implementation the environment variable substitution does not follow the specification found in https://opentelemetry.io/docs/specs/otel/configuration/data-model/. Specifically it does not obey the rule that substitution can only occur in YAML values. Further, according to the published specification examples, injected YAML-structured content leads to errors rather than correctly escaped/formatted strings.
This pull request solves these issues by using the yaml.Node structure of the yaml library to operate on already parsed YAML content. Further the redacted examples of the specification are included as further tests.

…rsing:

- Adjust `envVarRegexp` to handle multiple dollar signs more effectively.
- Improve node retyping logic for better YAML type detection.
- Remove `checkRawConfType` function and related references.
- Treat injected or invalid YAML types as strings rather than causing errors.
- Update tests to reflect adjusted behavior for YAML injection and substitution handling.

Signed-off-by: Alexander Adam <[email protected]>
@AlphaOne1 AlphaOne1 requested review from a team and pellared as code owners December 31, 2025 10:47
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 31, 2025

CLA Signed
The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot requested a review from codeboten December 31, 2025 10:47
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.

1 participant