Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read normalized otel.config.file property #6105

Merged

Conversation

jack-berg
Copy link
Member

@jack-berg jack-berg commented Jan 2, 2024

Right now its impossible to trigger file configuration in autoconfigure.

Whether you set an environment variable OTEL_CONFIG_FILE or system property otel.config.file, we're reading the OTEL_CONFIG_FILE, which never matches the normalized environment variable or system property 🤦. This fixes the bug.

@jack-berg jack-berg requested a review from a team as a code owner January 2, 2024 23:23
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (60ae0af) 91.12% compared to head (087dbd0) 91.12%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6105   +/-   ##
=========================================
  Coverage     91.12%   91.12%           
  Complexity     5742     5742           
=========================================
  Files           630      630           
  Lines         16844    16845    +1     
  Branches       1664     1664           
=========================================
+ Hits          15349    15350    +1     
  Misses         1029     1029           
  Partials        466      466           

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

@@ -479,10 +479,11 @@ public AutoConfiguredOpenTelemetrySdk build() {

@Nullable
private static AutoConfiguredOpenTelemetrySdk maybeConfigureFromFile(ConfigProperties config) {
String configurationFile = config.getString("OTEL_CONFIG_FILE");
String configurationFile = config.getString("otel.config.file");
Copy link
Member

Choose a reason for hiding this comment

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

😄

jack-berg and others added 2 commits January 2, 2024 17:52
…k/autoconfigure/AutoConfiguredOpenTelemetrySdkBuilder.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
@jack-berg jack-berg merged commit 17b8f43 into open-telemetry:main Jan 3, 2024
18 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.

None yet

2 participants