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_FILE
to the file pathOTEL_CONFIG_FILE
is set and thatopentelemetry-sdk-extension-incubator
is on the classpath, and:OpenTelemetryConfiguration
model to a genericExtendedConfigProperties
representation accessible viaAutoConfiguredOpenTelemetrySdk#getConfig()
ExtendedConfigProperties
implementsConfigProperties
and adds some additional methods for accessing nested complex configuration types (nested maps, and lists of maps)ExtendedConfigProperties
and 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: