Skip to content

Make declarative config parsing and mapping pluggable - #8983

Merged
jack-berg merged 15 commits into
open-telemetry:mainfrom
ash-thakur-rh:features/fe-config-spi
Nov 13, 2026
Merged

jack-berg merged 15 commits into
open-telemetry:mainfrom
ash-thakur-rh:features/fe-config-spi

Conversation

@ash-thakur-rh

@ash-thakur-rh ash-thakur-rh commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description:

  • Added a dedicated declarative-config-spi module for the mapper and YAML parser interfaces.
  • Added the Jackson 2 mapper as a runtime dependency so it is available by default.
  • Added the SnakeYAML engine 2 parser as a runtime dependency so it is available by default.
  • Documented how to exclude the Jackson 2 mapper and register a custom mapper, such as one using Jackson 3, likewise with SnakeYAML engine 2 parser.
  • Updated OSGi metadata and integration coverage for declarative configuration.
  • Updated the declarative configuration README and changelog.
  • Verified the affected declarative config, autoconfigure, API incubator, Graal, and OSGi test suites. Will fix other if there are other test failures.
  • Did a manual end-to-end check in a local consumer project, excluded the Jackson 2 adapter, registered a Jackson 3 mapper through ServiceLoader, and verified configuration parsing and mapping.

Closes #8820

Add parser and mapper SPIs, and move the Jackson 2 mapper into an
optional adapter module.

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-11-13 01:38 UTC

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

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.78947% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.43%. Comparing base (95f25dd) to head (f283bcd).

Files with missing lines Patch % Lines
...g/internal/DeclarativeConfigurationMapperUtil.java 40.00% 6 Missing ⚠️
...re/declarativeconfig/DeclarativeConfiguration.java 77.77% 4 Missing ⚠️
...nfig/internal/DeclarativeConfigProviderLoader.java 91.17% 1 Missing and 2 partials ⚠️
...veconfig/model/internal/ExtensionPropertyUtil.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8983      +/-   ##
============================================
- Coverage     90.46%   90.43%   -0.04%     
- Complexity    11152    11170      +18     
============================================
  Files          1028     1032       +4     
  Lines         30382    30451      +69     
  Branches       3966     3974       +8     
============================================
+ Hits          27486    27537      +51     
- Misses         1922     1936      +14     
- Partials        974      978       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@ash-thakur-rh

ash-thakur-rh commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

CLA Signed
The committers listed above are authorized under a signed CLA.

@ash-thakur-rh
ash-thakur-rh marked this pull request as ready for review October 29, 2026 05:26
@ash-thakur-rh
ash-thakur-rh requested a review from a team as a code owner October 29, 2026 05:26

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is pretty close to the shape I imagined. Couple of things to think through tho.

Comment thread CHANGELOG.md Resolved
@ash-thakur-rh

ash-thakur-rh commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

This is pretty close to the shape I imagined. Couple of things to think through tho.

Thanks @jack-berg , will take care of the things suggested.

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@otelbot otelbot Bot added the api-change Changes to public API surface area label Nov 5, 2026
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@otelbot otelbot Bot removed the api-change Changes to public API surface area label Nov 5, 2026
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@opentelemetry-pr-dashboard

This comment has been minimized.

@ash-thakur-rh

Copy link
Copy Markdown
Contributor Author

/dashboard route:reviewers

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

@ash-thakur-rh, this pull request was routed to reviewers. The handoff remains active across pushes until newer actionable human feedback arrives. Top-level feedback through this request will not return; unresolved review threads remain open.

Logger.getLogger(DeclarativeConfigProviderLoader.class.getName());

private static final ComponentLoader COMPONENT_LOADER =
ComponentLoader.forClassLoader(DeclarativeConfigProperties.class.getClassLoader());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to find a way for ComponentLoader to be a part of the contract and passed through from the caller. Every time we've loaded SPIs previously using a convenient class loader available to us, we eventually get an issue opened where someone needs that class loader to be configurable. That's why you see setComponentLoader style methods everywhere.

This is going to be disruptive for ExtensionPropertyUtil, which calls DeclarativeConfigurationMapper, and maybe the contracts in DeclarativeConfiguration itself since the parse operation currently doesn't have any overload which includes a ComponentLoader. If it proves too disruptive, let's skip and open an issue to followup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agree, I will open a followup issue after this PR is merged

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
@ash-thakur-rh

ash-thakur-rh commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @jack-berg , took care of all the review comments. Pls have a look. Thanks!

@ash-thakur-rh

Copy link
Copy Markdown
Contributor Author

/dashboard route:reviewers

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

@ash-thakur-rh, this pull request was routed to reviewers. The handoff remains active across pushes until newer actionable human feedback arrives. Top-level feedback through this request will not return; unresolved review threads remain open.

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pushed a72d54f with some final bits of review feedback.

Thanks!

@jack-berg
jack-berg enabled auto-merge (squash) November 12, 2026 22:49
@jack-berg
jack-berg disabled auto-merge November 12, 2026 22:49
@jack-berg
jack-berg enabled auto-merge (squash) November 13, 2026 00:01
@jack-berg
jack-berg merged commit b11bb9c into open-telemetry:main Nov 13, 2026
73 of 78 checks passed
@otelbot

otelbot Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @ash-thakur-rh! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

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.

Make declarative config YAML parsing and object mapping requirements pluggable via SPI

2 participants