Prototype file config extensions#5873
Closed
jack-berg wants to merge 8 commits intoopen-telemetry:mainfrom
Closed
Conversation
…y-java into autoconfigure-file-configuration
…/jack-berg/opentelemetry-java into prototype-file-config-extensions
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@open-telemetry/java-instrumentation-maintainers in the 9/21 Java SIG meeting I brought up bringing the file configuration prototype into the java agent, and received feedback that it will be important to specify other java agent properties besides the SDK in a configuration. Examples include accessing jmx configuration, and other standard properties like
otel.javaagent.debug=true.Please check out this proposal for extending file configuration tooling to include and access configuration not part of the configuration schema. Summary:
OTEL_CONFIG_FILEto the file pathOTEL_CONFIG_FILEis set and thatopentelemetry-sdk-extension-incubatoris on the classpath, and:OpenTelemetryConfigurationmodel to a genericExtendedConfigPropertiesrepresentation accessible viaAutoConfiguredOpenTelemetrySdk#getConfig()ExtendedConfigPropertiesimplementsConfigPropertiesand adds some additional methods for accessing nested complex configuration types (nested maps, and lists of maps)ExtendedConfigPropertiesand uses it for configurationSuppose you have a configuration file with contents like:
In java, you use the file to configure the SDK, as well as access the extended "javaagent" portion of the schema as follows: