Skip to content

Avoid shared internal ComponentProvider (#6970) - #8981

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

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

Conversation

@rooks-ns

Copy link
Copy Markdown
Contributor

Resolves part of #6970

Description

  • Promotes ComponentProvider to io.opentelemetry.sdk.autoconfigure.spi.impl.
  • Retains deprecated io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider extending the new interface to ensure backward compatibility for external components.
  • Updates DeclarativeConfigContext to discover both modern and legacy providers with deduplication.
  • Migrates all repository providers, META-INF/services/ entries, and OSGi manifests across exporters, extensions, and declarative config.
  • Unexempts opentelemetry-exporter-logging from NoSharedInternalCodeTest.

@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-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-10-29 22:20 UTC

Two things need attention:

  • Required checks are failing — investigate the failures.
  • 1 review item — respond to each (e.g. link a commit, explain why not, ask a follow-up):
    • Inline 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (d97e4af) to head (0f1785e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8981      +/-   ##
============================================
- Coverage     90.35%   90.33%   -0.03%     
- Complexity    10984    10987       +3     
============================================
  Files          1019     1019              
  Lines         30072    30081       +9     
  Branches       3927     3930       +3     
============================================
+ Hits          27173    27175       +2     
- Misses         1939     1943       +4     
- Partials        960      963       +3     

☔ 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 2 times, most recently from b266e93 to 8478c4d Compare October 28, 2026 02:27
- Promote ComponentProvider interface to io.opentelemetry.sdk.autoconfigure.spi.impl.
- Retain deprecated io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider extending the new interface for backward compatibility with external plugins.
- Update DeclarativeConfigContext to discover both modern and legacy providers with deduplication.
- Migrate all repository providers, META-INF/services/ files, and OSGi service loader manifests across exporters, extensions, and declarative config.
- Unexempt opentelemetry-exporter-logging from NoSharedInternalCodeTest.
- Update autoconfigure-spi jApiCmp baseline diff.
@rooks-ns
rooks-ns force-pushed the fix/avoid-shared-internal-component-provider branch 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
* LogRecordExporter}, {@link SpanProcessor}, {@link LogRecordProcessor}, {@link TextMapPropagator},
* {@link Sampler}, {@link Resource}.
*/
public interface ComponentProvider {

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.

ComponentProvider is intended for use by application developers. It a key interface in declarative config, which we're currently trying to stabilize.

Happy to have help working towards that, and can do it in pieces. One key piece is promoting ComponentProvider to the stable API (i.e. not .impl.). I think it belongs in io.opentelemetry.sdk.autoconfigure.spi.declarativeconfig.

Since ComponentProvider depends on DeclarativeConfigProperties, which dependso n DeclarativeConfigException, a few other classes get dragged into public with it. Which is fine, they need to be public. But our hand is forced and we have to promote them as an atomic unit. These classes belong in io.opentelemetry.api.config.

Oh and since there are implementations of ComponentProvider in opentelemetry-java-instrumentation and opentelemetry-java-contrib, we need to have backwards compatibility for a release cycle, which means retaining deprecated versions of the current locations of ComponentProvider, DeclarativeConfigProperties, DeclarativeConfigException.

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