Skip to content

Conversation

@zeitlinger
Copy link
Member

fixes #15812

@zeitlinger zeitlinger self-assigned this Jan 9, 2026
@zeitlinger zeitlinger requested a review from a team as a code owner January 9, 2026 14:15
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jan 9, 2026
}

private static Boolean evaluateBooleanProperty(
private static Boolean evaluateBooleanPropertyDeclarativeConfigOrLegacy(
Copy link
Member

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?

Copy link
Member Author

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.");
      }
    }

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to avoid using the word legacy

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed it back but added a comment

@zeitlinger zeitlinger added this to the v2.24.0 milestone Jan 9, 2026
@zeitlinger zeitlinger moved this to Awaiting Review in Declarative Configuration: Java Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

spring starter's LogbackAppenderInstaller still needs to be updated to use declarative config somehow

3 participants