Skip to content

Promote DeclarativeConfigProperties, DeclarativeConfigException, ComponentProvider to stable - #8981

Open
rooks-ns wants to merge 3 commits into
open-telemetry:mainfrom
rooks-ns:fix/avoid-shared-internal-component-provider
Open

rooks-ns wants to merge 3 commits into
open-telemetry:mainfrom
rooks-ns:fix/avoid-shared-internal-component-provider

Conversation

@rooks-ns

@rooks-ns rooks-ns commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Resolves part of #6970

Description

  • Promotes API models to opentelemetry-api: Promotes DeclarativeConfigProperties and DeclarativeConfigException to io.opentelemetry.api.config.
  • Promotes SPI to opentelemetry-sdk-extension-autoconfigure-spi: Promotes ComponentProvider to io.opentelemetry.sdk.autoconfigure.spi.declarativeconfig.ComponentProvider.
  • Preserves standalone legacy deprecation path:
    • Retains io.opentelemetry.api.incubator.config.DeclarativeConfigProperties and DeclarativeConfigException marked @Deprecated (scheduled for removal after 1.68.0) as standalone classes with zero inheritance to prevent JVM bytecode descriptor mismatches for pre-compiled binaries.
    • Retains io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider marked @Deprecated (scheduled for removal after 1.68.0) as a standalone interface without inheritance.
  • Updates declarative configuration loader:
    • Updates DeclarativeConfigContext.loadComponent to discover both modern and legacy ComponentProvider implementations.
    • Enforces fail-fast duplicate provider checking when multiple providers match (type, name).
    • Adapts modern configuration to legacy providers via package-private LegacyYamlDeclarativeConfigProperties in sdk-extensions:declarative-config.
  • Package metadata & cleanup:
    • Adds package-info.java enforcing @ParametersAreNonnullByDefault to io.opentelemetry.api.config and io.opentelemetry.sdk.autoconfigure.spi.declarativeconfig.
    • Migrates all in-repo component providers, META-INF/services/ registrations, and OSGi manifests across exporters, extensions, and declarative config.
    • Unexempts opentelemetry-exporter-logging from NoSharedInternalCodeTest.

Notes

  • ConfigProvider and ExtendedOpenTelemetry in api:incubator are updated to return the graduated io.opentelemetry.api.config.DeclarativeConfigProperties.

@otelbot otelbot Bot added the api-change Changes to public API surface area label Oct 27, 2026
@otelbot

otelbot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ API changes detected — additional maintainer review required

@jack-berg @jkwatson

This PR modifies the public API surface area of the following module(s):

  • opentelemetry-api
  • opentelemetry-sdk-extension-autoconfigure-spi

Please review the changes in docs/apidiffs/current_vs_latest/ carefully before approving.

@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-11-04 05:18 UTC

Respond to 1 review item (e.g. link a commit, explain why not, ask a follow-up):

  • Top-level threads: 1
Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.56115% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.42%. Comparing base (d97e4af) to head (5f2c796).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...etry/api/config/DeclarativeConfigPropertyUtil.java 97.29% 1 Missing ⚠️
...re/declarativeconfig/DeclarativeConfigContext.java 96.87% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8981      +/-   ##
============================================
+ Coverage     90.35%   90.42%   +0.06%     
- Complexity    10984    11078      +94     
============================================
  Files          1019     1025       +6     
  Lines         30072    30224     +152     
  Branches       3927     3943      +16     
============================================
+ Hits          27173    27329     +156     
+ Misses         1939     1930       -9     
- Partials        960      965       +5     

☔ 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.

@rooks-ns
rooks-ns force-pushed the fix/avoid-shared-internal-component-provider branch 3 times, most recently from 8478c4d to 0f1785e Compare October 28, 2026 04:00
@rooks-ns
rooks-ns marked this pull request as ready for review October 28, 2026 04:35
@rooks-ns
rooks-ns requested a review from a team as a code owner October 28, 2026 04:35
@rooks-ns
rooks-ns force-pushed the fix/avoid-shared-internal-component-provider branch from 0f1785e to 83f655e Compare November 2, 2026 03:35
- Atomically promote DeclarativeConfigProperties and DeclarativeConfigException to io.opentelemetry.api.config in opentelemetry-api.
- Retain deprecated backward-compatibility shims for DeclarativeConfigProperties and DeclarativeConfigException in opentelemetry-api-incubator.
- Promote ComponentProvider interface to io.opentelemetry.sdk.autoconfigure.spi.declarativeconfig in opentelemetry-sdk-extension-autoconfigure-spi.
- Retain deprecated io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider extending the new interface with bidirectional default bridge methods for backward compatibility with external plugins.
- Update DeclarativeConfigContext to discover both modern and legacy providers with (type, name) deduplication.
- Migrate all repository providers, META-INF/services/ descriptors, and OSGi service loader manifests across exporters, extensions, and declarative config.
- Unexempt opentelemetry-exporter-logging from NoSharedInternalCodeTest.
- Update opentelemetry-api and autoconfigure-spi jApiCmp baseline diffs.
@rooks-ns
rooks-ns force-pushed the fix/avoid-shared-internal-component-provider branch from 83f655e to 6a9d67c Compare November 2, 2026 05:42
- Restore standalone io.opentelemetry.api.incubator.config.DeclarativeConfigProperties marked @deprecated (scheduled for removal after 1.68.0) to preserve bytecode compatibility without interface inheritance.
- Restore standalone io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider marked @deprecated without extending the new stable SPI.
- Introduce LegacyYamlDeclarativeConfigProperties in sdk-extensions:declarative-config adapting modern config for legacy component providers.
- Delete IncubatorDeclarativeConfigPropertiesAdapter and obsolete dynamic configuration TODO comment on declarativeconfig.ComponentProvider.
- Enforce fail-fast duplicate provider checking in DeclarativeConfigContext when multiple providers match (type, name).

@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.

Looking good, just two minor nits

Thanks!

FYI @open-telemetry/java-instrumentation-approvers - the package is changing for DeclarativeConfigProperties and DeclarativeConfigException, which will require migration on the instrumentation side. ComponentProvider is also being stabilized.

Since there are some opentelemetry-java-contrib components that implement ComponentProvider, we can't migrate all implementations at once, so this PR retains the old version of ComponentProvider, DeclarativeConfigProperties, DeclarativeConfigException as deprecated for a release cycle to allow migration.

@jack-berg jack-berg changed the title Avoid shared internal ComponentProvider (#6970) Promote DeclarativeConfigProperties, DeclarativeConfigException, ComponentProvider to stable Nov 3, 2026
…fig package

- Move DeclarativeConfigPropertyUtilTest and InstrumentationConfigUtilTest from io.opentelemetry.api.incubator.config to io.opentelemetry.api.config in api:incubator test source set.
@rooks-ns
rooks-ns force-pushed the fix/avoid-shared-internal-component-provider branch from 417e5e8 to 5f2c796 Compare November 3, 2026 16:57
@jack-berg

Copy link
Copy Markdown
Member

Also cc @jkwatson. This adds new public API surface area

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Hi @rooks-ns — just a friendly reminder that this pull request is waiting on you. The dashboard status comment has the open items and is kept current.

  • Replying is enough to hand it off — answer, explain why no change is needed, or ask a follow-up. The dashboard routes it onward once nothing on the list is waiting on you.
  • To hand it back for any other reason, including the dashboard getting this wrong, comment /dashboard route:reviewers.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to public API surface area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants