Skip to content

Remove reverse declarative config bridge compatibility - #20771

Merged
laurit merged 7 commits into
mainfrom
copilot/update-api-support-example
Oct 21, 2026
Merged

laurit merged 7 commits into
mainfrom
copilot/update-api-support-example

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Remove the deprecated declarative-to-flat bridge and declarative Spring Boot ConfigProperties compatibility bean. The supported flat-to-declarative bridge and flat-property Spring configuration remain available.

  • Declarative configuration: Read settings through ConfigProvider and DeclarativeConfigProperties:
    DeclarativeConfigProperties javaConfig =
        configProvider.getInstrumentationConfig().getStructured("java");
  • Flat-property configuration: Continue using the Spring ConfigProperties bean.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-21 08:49 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement updated support for API example as per issue #18903 Remove reverse declarative config bridge compatibility Oct 20, 2026
Copilot AI requested a review from trask October 20, 2026 18:51
@trask
trask requested a balanced review from Copilot October 20, 2026 18:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The fallback still exposes flat/default configuration through otelProperties in an enabled declarative context.

1 open issue
What changed in this PR

Removes deprecated declarative-to-flat configuration compatibility while preserving the flat-to-declarative bridge and flat-property Spring configuration.

Changes:

  • Removes the reverse bridge, its tests, and unused dependencies.
  • Removes the declarative Spring compatibility bean and updates configuration tests.
  • Updates documentation and breaking-change notes.
File Description
instrumentation/​spring/​spring-boot-autoconfigure/​src/​testDeclarativeConfig/​java/​io/​opentelemetry/​instrumentation/​spring/​autoconfigure/​DeclarativeConfigTest.java Reads configuration through ConfigProvider.
instrumentation/​spring/​spring-boot-autoconfigure/​src/​main/​java/​io/​opentelemetry/​instrumentation/​spring/​autoconfigure/​OpenTelemetryAutoConfiguration.java Removes declarative compatibility bean.
declarative-config-bridge/​src/​test/​java/​io/​opentelemetry/​instrumentation/​config/​bridge/​DeclarativeConfigPropertiesBridgeTest.java Deletes reverse-bridge tests.
declarative-config-bridge/​src/​test/​java/​io/​opentelemetry/​instrumentation/​config/​bridge/​DeclarativeConfigPropertiesBridgeBuilderTest.java Deletes builder tests.
declarative-config-bridge/​src/​main/​java/​io/​opentelemetry/​instrumentation/​config/​bridge/​DeclarativeConfigPropertiesBridgeBuilder.java Deletes deprecated builder.
declarative-config-bridge/​src/​main/​java/​io/​opentelemetry/​instrumentation/​config/​bridge/​DeclarativeConfigPropertiesBridge.java Deletes reverse-bridge implementation.
declarative-config-bridge/​README.md Describes the remaining bridge.
declarative-config-bridge/​build.gradle.kts Removes unused dependencies.
CHANGELOG.md Records removals and migration guidance.

Review effort: Balanced

Gate FallbackConfigProperties on DeclarativeConfigDisabled so a custom OpenTelemetry bean cannot reintroduce flat configuration in declarative mode. Cover custom and auto-configured SDK contexts while retaining flat configuration support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved findings remain, and the fallback correction preserves the separation between declarative and flat configuration.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI requested a review from trask October 20, 2026 21:54
Comment thread CHANGELOG.md Outdated
@trask
trask marked this pull request as ready for review October 20, 2026 22:05
@trask
trask requested a review from a team as a code owner October 20, 2026 22:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The removal is isolated, flat-mode support remains intact, and regression coverage addresses the previously reported fallback issue.

No open issues 🎉

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved issues remain; the fallback correction and regression assertions preserve the separation between declarative and flat configuration.

No open issues 🎉

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The scoped removals preserve flat configuration, address the previous fallback issue, and include relevant regression coverage.

No open issues 🎉

Review effort: Balanced

@laurit
laurit merged commit 8783ffa into main Oct 21, 2026
70 checks passed
@laurit
laurit deleted the copilot/update-api-support-example branch October 21, 2026 08:48
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.

4 participants