-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove -alpha artifacts from runtime classpath of stable components #6944
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6944 +/- ##
============================================
- Coverage 90.09% 90.01% -0.09%
- Complexity 6601 6630 +29
============================================
Files 730 746 +16
Lines 19843 19982 +139
Branches 1955 1955
============================================
+ Hits 17877 17986 +109
- Misses 1371 1401 +30
Partials 595 595 ☔ View full report in Codecov by Sentry. |
"-Xlint:-options", | ||
// Fail build on any warning | ||
"-Werror", | ||
"-Xlint:-options" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
@@ -16,7 +16,6 @@ dependencies { | |||
protoSource("io.opentelemetry.proto:opentelemetry-proto:${versions["io.opentelemetry.proto"]}") | |||
|
|||
api(project(":exporters:common")) | |||
implementation(project(":api:incubator")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused now that Value
is stable.
return NOOP_METER.counterBuilder(NOOP_INSTRUMENT_NAME); | ||
} | ||
try { | ||
Class.forName("io.opentelemetry.api.incubator.metrics.ExtendedLongCounter"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was fast and loose with this. Before considering merging, would refactor to call this once and cache the result.
try { | ||
Class.forName("io.opentelemetry.api.incubator.trace.ExtendedTracer"); | ||
return IncubatingUtil.createIncubatingTracer( | ||
sharedState, instrumentationScopeInfo, tracerConfig); | ||
} catch (Exception e) { | ||
return new SdkTracer(sharedState, instrumentationScopeInfo, tracerConfig); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe?
try { | |
Class.forName("io.opentelemetry.api.incubator.trace.ExtendedTracer"); | |
return IncubatingUtil.createIncubatingTracer( | |
sharedState, instrumentationScopeInfo, tracerConfig); | |
} catch (Exception e) { | |
return new SdkTracer(sharedState, instrumentationScopeInfo, tracerConfig); | |
} | |
if (IncubatingUtil.isPresent()) { | |
return IncubatingUtil.createIncubatingTracer( | |
sharedState, instrumentationScopeInfo, tracerConfig); | |
} else { | |
return new SdkTracer(sharedState, instrumentationScopeInfo, tracerConfig); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup yup that's my plan
Sketch out what it looks like to remove
-alpha
artifacts (especiallyopentelemetry-api-incubator
) from the runtime classpath of stable components.Approach is:
implementation
tocompileOnly
dependencies-alpha
artifact is present on classpath (i.e. provided by the user) and toggle behavior based on whether it is or isnt-alpha
artifacts are not provided by user, make sure main test suite runs without-alpha
artifacts.-alpha
artifacts are present, introduce new test suite including the-alpha
artifacts, and test the impacted behaviorThis is related to a possible adjustment of our versioning guidelines. If we went in this direction, a user adding only stable dependencies could always run
./gradlew dependencies
and will not see any-alpha
artifacts on the runtime classpath.