-
Notifications
You must be signed in to change notification settings - Fork 1k
Declarative config for logback appender installer #15813
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
base: main
Are you sure you want to change the base?
Declarative config for logback appender installer #15813
Conversation
...entation/spring/autoconfigure/internal/instrumentation/logging/LogbackAppenderInstaller.java
Outdated
Show resolved
Hide resolved
...entation/spring/autoconfigure/internal/instrumentation/logging/LogbackAppenderInstaller.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| private static Boolean evaluateBooleanProperty( | ||
| private static Boolean evaluateBooleanPropertyDeclarativeConfigOrLegacy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the "or legacy" part of this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inlined it right into the method for clarity
String key = property;
if (EarlyConfig.isDeclarativeConfig(environment)) {
if (property.startsWith("otel.instrumentation.")) {
key =
String.format(
"otel.instrumentation/development.java.%s",
property.substring("otel.instrumentation.".length()))
.replace('-', '_');
} else {
throw new IllegalStateException(
"No mapping found for property name: " + property + ". Please report this bug.");
}
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also do the translation the other way round - but it's still a flat string
fixes #15812