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

Reduce volatile reads in GlobalOpenTelemetry.get #4009

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

anuraaga
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #4009 (cd04ae2) into main (6f755cc) will increase coverage by 0.04%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #4009      +/-   ##
============================================
+ Coverage     89.87%   89.91%   +0.04%     
- Complexity     4275     4277       +2     
============================================
  Files           512      512              
  Lines         12942    12944       +2     
  Branches       1250     1251       +1     
============================================
+ Hits          11632    11639       +7     
+ Misses          906      903       -3     
+ Partials        404      402       -2     
Impacted Files Coverage Δ
...java/io/opentelemetry/api/GlobalOpenTelemetry.java 92.15% <80.00%> (+0.32%) ⬆️
...entelemetry/exporter/jaeger/PostSpansResponse.java 0.00% <0.00%> (-100.00%) ⬇️
...exporter/jaeger/MarshalerCollectorServiceGrpc.java 85.71% <0.00%> (-4.77%) ⬇️
...telemetry/sdk/trace/export/BatchSpanProcessor.java 87.76% <0.00%> (-0.72%) ⬇️
...ntelemetry/sdk/extension/resources/OsResource.java 90.69% <0.00%> (+4.65%) ⬆️
...ava/io/opentelemetry/sdk/internal/RateLimiter.java 100.00% <0.00%> (+5.88%) ⬆️
...metry/sdk/extension/resources/ProcessResource.java 87.50% <0.00%> (+6.25%) ⬆️
...elemetry/sdk/extension/resources/HostResource.java 92.30% <0.00%> (+15.38%) ⬆️
...dk/extension/resources/ProcessRuntimeResource.java 100.00% <0.00%> (+16.66%) ⬆️

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 6f755cc...cd04ae2. Read the comment docs.

synchronized (mutex) {
if (globalOpenTelemetry == null) {
openTelemetry = globalOpenTelemetry;
if (openTelemetry == null) {

OpenTelemetry autoConfigured = maybeAutoConfigure();
Copy link
Member

Choose a reason for hiding this comment

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

not related to your change (probably in a separate PR), if maybeAutoConfigure can be renamed would be good to have it as makeAutoConfigureAndSet because it is confusing that you don't set on that path.

@anuraaga anuraaga merged commit d88b09c into open-telemetry:main Dec 21, 2021
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.

6 participants