Skip to content

[CONFIGURATION] Support environment variable substitution for attributes - #4474

Merged
marcalff merged 4 commits into
open-telemetry:mainfrom
dbarker:config_support_env_and_null_values
Aug 24, 2026
Merged

[CONFIGURATION] Support environment variable substitution for attributes#4474
marcalff merged 4 commits into
open-telemetry:mainfrom
dbarker:config_support_env_and_null_values

Conversation

@dbarker

@dbarker dbarker commented Aug 23, 2026

Copy link
Copy Markdown
Member

Fixes #4473

Changes

  • Add null value detection to the ryml document
  • Add env var substitution to all attribute value type parsing methods
  • Add unit tests and a programmatic test for the use case in the linked issue

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.06%. Comparing base (1c2b007) to head (828de82).

Files with missing lines Patch % Lines
sdk/src/configuration/configuration_parser.cc 73.34% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4474      +/-   ##
==========================================
+ Coverage   82.67%   83.06%   +0.40%     
==========================================
  Files         516      516              
  Lines       20197    20224      +27     
==========================================
+ Hits        16696    16798     +102     
+ Misses       3501     3426      -75     
Files with missing lines Coverage Δ
...de/opentelemetry/sdk/configuration/document_node.h 100.00% <ø> (ø)
...entelemetry/sdk/configuration/ryml_document_node.h 100.00% <ø> (ø)
sdk/src/configuration/ryml_document_node.cc 83.59% <100.00%> (+3.19%) ⬆️
sdk/src/configuration/sdk_builder.cc 61.21% <100.00%> (+0.04%) ⬆️
sdk/src/configuration/configuration_parser.cc 84.86% <73.34%> (+4.97%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker
dbarker marked this pull request as ready for review August 24, 2026 03:02
@dbarker
dbarker requested a review from a team as a code owner August 24, 2026 03:02
@dbarker dbarker changed the title [CONFIGURATION] Support env var substitution for attribute values [CONFIGURATION] Support environment variable substitution for attributes Aug 24, 2026

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, good work.

@marcalff
marcalff merged commit 1b2ecca into open-telemetry:main Aug 24, 2026
77 checks passed
@dbarker
dbarker deleted the config_support_env_and_null_values branch August 24, 2026 20:59
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.

[CONFIGURATION] Support setting attributes from environment variable

2 participants