E543 feat(opentelemetry-configuration): creation of basic FileConfigProvider by maryliag · Pull Request #5863 · open-telemetry/opentelemetry-js · GitHub
[go: up one dir, main page]

Skip to content

Conversation

maryliag
Copy link
Contributor

Solves #5814

This PR creates the structure for a FileConfigProvider. In this PR it only checks if the file exists and is a YAML, returning an error otherwise.
Parse of the file will be done on a following PR

10BC0

@maryliag maryliag requested a review from a team as a code owner August 19, 2025 23:56
Copy link
codecov bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (dccb9c4) to head (87844ad).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5863      +/-   ##
==========================================
+ Coverage   95.03%   95.04%   +0.01%     
==========================================
  Files         306      307       +1     
  Lines        7969     7987      +18     
  Branches     1611     1614       +3     
==========================================
+ Hits         7573     7591      +18     
  Misses        396      396              
Files with missing lines Coverage Δ
.../opentelemetry-configuration/src/ConfigProvider.ts 100.00% <100.00%> (ø)
...ntelemetry-configuration/src/FileConfigProvider.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member
@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

looks good 🙌

createConfigProvider();
});
});
});
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think it could be beneficial to also add some tests for OTEL_EXPERIMENTAL_CONFIG_FILE

  • unset
  • empty string
  • all whitespace

(should all not throw, looking at the code all cases are handled correctly right now already 🙂)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the unset case is already tested, since it what the cases the use env variables do, but good point on adding for the other two, let me do that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@maryliag maryliag added this pull request to the merge queue Aug 20, 2025
Merged via the queue into open-telemetry:main with commit 8ffc70d Aug 20, 2025
24 checks passed
@maryliag maryliag deleted the config-file-read branch August 20, 2025 12:46
Joozty pushed a commit to Joozty/opentelemetry-js that referenced this pull request Sep 9, 2025
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
0