Skip to content

Conversation

@MikeGoldsmith
Copy link
Member

Fixes a TODO left by @jack-berg in the configuration file to check for valid schema version and log a warning when it does not match.

Logs warning when file_format doesn't exactly match expected version (1.0.0-rc.3).

- Add EXPECTED_FILE_FORMAT constant
- Update regex to support 1.0.0-rc.N format
- Add tests for warning behavior
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner February 11, 2026 13:47
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.20%. Comparing base (fff95e0) to head (73849ec).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8069   +/-   ##
=========================================
  Coverage     90.20%   90.20%           
- Complexity     7592     7595    +3     
=========================================
  Files           841      841           
  Lines         22911    22919    +8     
  Branches       2288     2291    +3     
=========================================
+ Hits          20666    20674    +8     
  Misses         1529     1529           
  Partials        716      716           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Logger.getLogger(OpenTelemetryConfigurationFactory.class.getName());
private static final Pattern SUPPORTED_FILE_FORMATS =
Pattern.compile("^(0.4)|(1.0(-rc.\\d*)?)|(1.0.0-rc.\\d*)$");
private static final String EXPECTED_FILE_FORMAT = "1.0.0-rc.3";
Copy link
Member

Choose a reason for hiding this comment

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

The file format is supposed to omit the patch version. See docs here: https://github.com/open-telemetry/opentelemetry-configuration/blob/main/schema-docs.md#opentelemetryconfiguration-

The idea is that since patches will only be for bug fixes, there should never be something actionable on the part of an implementation, and so forcing or even allowing the user to specify the patch version adds possible confusion by implying that it matters.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @jack-berg - I've updated the regex to not use the patch number in 2289467

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.

Thanks!

@jack-berg jack-berg merged commit 7ce6c5c into open-telemetry:main Feb 12, 2026
27 checks passed
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