Skip to content

Refine declarative config public contract for stabilization - #9038

Open
rooks-ns wants to merge 3 commits into
open-telemetry:mainfrom
rooks-ns:feat/stabilize-declarative-config
Open

rooks-ns wants to merge 3 commits into
open-telemetry:mainfrom
rooks-ns:feat/stabilize-declarative-config

Conversation

@rooks-ns

@rooks-ns rooks-ns commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Related to #8402.

Refines the public contract and dependency boundaries of opentelemetry-sdk-extension-declarative-config in preparation for stabilization:

  • Seal compile-scope dependency leak: Demote api(project(":api:incubator")) to implementation in build.gradle.kts, preventing opentelemetry-api-incubator from leaking onto downstream consumers' compile classpaths via Maven POM metadata.
  • Eliminate cross-artifact internal return type: Change DeclarativeConfigResult.getSdk() from internal ExtendedOpenTelemetrySdk to the canonical stable OpenTelemetrySdk. This removes cross-artifact .internal leakage and prevents runtime classloader failure when api:incubator is absent.
  • External consumer validation: Add PublicApiUsageTest proving end-to-end configuration parsing, model mutation, and SDK initialization using strictly public APIs without incubator dependencies.
  • Test alignment: Update existing create/factory test call sites to OpenTelemetrySdk.

Testing

  • Ran ./gradlew :sdk-extensions:declarative-config:check (passes all unit tests, animalsnifferMain, checkstyleMain, and spotlessCheck).

- Demote api:incubator from api to implementation dependency to prevent transitive compile-scope leakage in published POM metadata
- Update DeclarativeConfigResult.getSdk() to return public stable OpenTelemetrySdk instead of internal ExtendedOpenTelemetrySdk
- Add PublicApiUsageTest to validate end-to-end consumer usage using only public APIs
- Update create and factory tests to match OpenTelemetrySdk
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-14 17:34 UTC

Review the latest changes.

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.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (b11bb9c) to head (02b8412).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9038      +/-   ##
============================================
- Coverage     90.44%   90.43%   -0.01%     
- Complexity    11171    11177       +6     
============================================
  Files          1032     1032              
  Lines         30451    30500      +49     
  Branches       3974     3991      +17     
============================================
+ Hits          27540    27583      +43     
- Misses         1935     1939       +4     
- Partials        976      978       +2     

☔ 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 marked this pull request as ready for review November 14, 2026 17:16
@rooks-ns
rooks-ns requested a review from a team as a code owner November 14, 2026 17:16

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant