Skip to content
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

Add experimental option to disable autoconfigured opentelemetry SDK #4489

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

jack-berg
Copy link
Member

Resolves #4483.

@jack-berg jack-berg requested a review from a user May 23, 2022 15:54
@jack-berg jack-berg requested a review from Oberon00 as a code owner May 23, 2022 15:54
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #4489 (6526d67) into main (3ed74b6) will decrease coverage by 0.13%.
The diff coverage is 97.29%.

@@             Coverage Diff              @@
##               main    #4489      +/-   ##
============================================
- Coverage     90.18%   90.05%   -0.14%     
- Complexity     5010     5052      +42     
============================================
  Files           569      580      +11     
  Lines         15440    15562     +122     
  Branches       1488     1494       +6     
============================================
+ Hits          13925    14014      +89     
- Misses         1056     1087      +31     
- Partials        459      461       +2     
Impacted Files Coverage Δ
.../autoconfigure/AutoConfiguredOpenTelemetrySdk.java 100.00% <ø> (ø)
...nfigure/AutoConfiguredOpenTelemetrySdkBuilder.java 92.08% <97.29%> (+0.23%) ⬆️
...ava/io/opentelemetry/api/metrics/DefaultMeter.java 89.71% <0.00%> (-10.29%) ⬇️
...metry/exporter/internal/okhttp/OkHttpExporter.java 85.71% <0.00%> (-9.53%) ⬇️
...autoconfigure/LogEmitterProviderConfiguration.java 91.66% <0.00%> (-8.34%) ⬇️
...metry/sdk/metrics/export/PeriodicMetricReader.java 86.95% <0.00%> (-2.90%) ⬇️
...entelemetry/sdk/logs/export/BatchLogProcessor.java 88.72% <0.00%> (-0.76%) ⬇️
...y/sdk/metrics/internal/state/MeterSharedState.java 97.46% <0.00%> (-0.34%) ⬇️
...c/main/java/io/opentelemetry/sdk/metrics/View.java 100.00% <0.00%> (ø)
...in/java/io/opentelemetry/sdk/metrics/SdkMeter.java 100.00% <0.00%> (ø)
... and 86 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ed74b6...6526d67. Read the comment docs.

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

Seems reasonable. Thanks!

Comment on lines +47 to 51
/**
* Returns the {@link OpenTelemetrySdk} that was auto-configured, or {@code null} if the SDK has
* been disabled.
*/
public abstract OpenTelemetrySdk getOpenTelemetrySdk();

Choose a reason for hiding this comment

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

This PR does not appear to have or add a code path that can return null, and after several hours of poking at the current code, that fact does not seem to have changed since. Is this a bug? or did the design get changed after the doc was written?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. The response of this method was originally nullable but per this conversation, we went in a different direction. Looks like the javadoc never got updated - sorry about the confusion.

I've opened #6109 to fix the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants