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

Declarative configuration missing pieces #6677

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

jack-berg
Copy link
Member

@jack-berg jack-berg commented Aug 28, 2024

Resolves #6574.

Little things discovered implementing open-telemetry/opentelemetry-java-contrib#1440.

@jack-berg jack-berg requested a review from a team August 28, 2024 20:24
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.02%. Comparing base (d37c1c7) to head (24aa968).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...ension/incubator/fileconfig/FileConfiguration.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6677      +/-   ##
============================================
- Coverage     90.03%   90.02%   -0.02%     
- Complexity     6317     6355      +38     
============================================
  Files           703      703              
  Lines         19074    19140      +66     
  Branches       1869     1887      +18     
============================================
+ Hits          17174    17231      +57     
- Misses         1324     1334      +10     
+ Partials        576      575       -1     

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

@jack-berg jack-berg changed the title Update ComponentProvider javadoc Declarative configuration finishing touches Aug 29, 2024
@jack-berg jack-berg changed the title Declarative configuration finishing touches Declarative configuration missing pieces Aug 29, 2024
@@ -26,6 +26,7 @@ dependencies {

// io.opentelemetry.sdk.extension.incubator.fileconfig
implementation("com.fasterxml.jackson.core:jackson-databind")
api("com.fasterxml.jackson.core:jackson-annotations")
Copy link
Member Author

Choose a reason for hiding this comment

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

Without this, open-telemetry/opentelemetry-java-contrib#1440 is full of warnings like:

/Users/jberg/.m2/repository/io/opentelemetry/opentelemetry-sdk-extension-incubator/1.42.0-alpha-SNAPSHOT/opentelemetry-sdk-extension-incubator-1.42.0-alpha-SNAPSHOT.jar(/io/opentelemetry/sdk/extension/incubator/fileconfig/internal/model/OpenTelemetryConfiguration.class): warning: Cannot find annotation method 'value()' in type 'JsonProperty'

public static StructuredConfigProperties toConfigProperties(InputStream configuration) {
Object yamlObj = loadYaml(configuration, System.getenv());
return toConfigProperties(yamlObj);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is an essential test utility, allowing you to write chunks of YAML, convert them to StructuredConfigProperties, and call ComponentProvider, i.e. https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1440/files#diff-3d0118f231281243bf34a7e7beb3809e7a6523e8ece8a17b83f1784953389ceb

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

LGTM

@jack-berg jack-berg merged commit 00b0e9f into open-telemetry:main Sep 5, 2024
17 of 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.

Add file configuration ComponentProvider support for all SDK extension points
2 participants