Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Feb 22, 2025

Resolves #7119

The published poms for the related modules, e.g. for io.opentelemetry:opentelemetry-sdk-trace, would now include:

    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-api-incubator</artifactId>
      <version>1.48.0-alpha</version>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>

@codecov
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.85%. Comparing base (56941a5) to head (d1ba7c4).
⚠️ Report is 346 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7137   +/-   ##
=========================================
  Coverage     89.85%   89.85%           
  Complexity     6610     6610           
=========================================
  Files           740      740           
  Lines         19986    19986           
  Branches       1964     1964           
=========================================
  Hits          17958    17958           
  Misses         1439     1439           
  Partials        589      589           

☔ View full report in Codecov by Sentry.
📢 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.

@trask trask marked this pull request as ready for review February 22, 2025 19:22
@trask trask requested a review from a team as a code owner February 22, 2025 19:22
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Nice idea. Found more documentation about this capability here: https://docs.gradle.org/current/userguide/feature_variants.html

Its kind of strange. The syntax for instructing gradle to automatically include the dependencies required by the "incubating" feature would look something like:

 implementation("io.opentelemetry:opentelemetry-sdk-trace")) {
     capabilities {
         requireCapability("io.opentelemetry:opentelemetry-sdk-trace-incubating")
     }
 }

With gradle able to resolve the dependencies of the -incubating feature based on contents from the *.module file (e.g. opentelemetry-sdk-trace-1.47.0.module).

Its not a syntax I expect most gradle users would be familiar with, so I wonder if we would be better off telling users to add the required opentelemetry-api-incubator instead of using the requireCapability syntax.

If we go in this direction, here are some other places we would want this:

Seems like it could get complicated quickly.

I wonder if there's any lightweight way to instruct gradle to include the "optional" metadata in pom.xml without leveraging this gradle feature capability.

<scope>compile</scope>
      <optional>true</optional>

@jack-berg
Copy link
Member

See #7157 for a possible alternative

@jkwatson
Copy link
Contributor

what's the status on this, @trask ? Let's get it merged or closed in favor of the other one.

@trask
Copy link
Member Author

trask commented Sep 11, 2025

closing in favor of the less invasive #7157

@trask trask closed this Sep 11, 2025
@trask trask deleted the incubating branch October 20, 2025 17:29
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.

v1.47.0 Introduces a missing link on dependencies

3 participants