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

Retry ConnectException, add retry logging #6614

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

jack-berg
Copy link
Member

Fixes #6587.

I figured out how to reliably reproduce the java.net.ConnectException from the issue by connecting an unused port on localhost. JdkHttpSender was already retrying on these, but OkHttpSender and OkGrpcSender were not.

Also added some overdue debug logging for the intermediate retry requests so users have a way of determining what is going on.

@jack-berg jack-berg requested a review from a team August 1, 2024 20:53
Copy link

codecov bot commented Aug 1, 2024

Codecov Report

Attention: Patch coverage is 46.15385% with 28 lines in your changes missing coverage. Please review.

Project coverage is 90.08%. Comparing base (0ffe15c) to head (eeb77a7).
Report is 10 commits behind head on main.

Files Patch % Lines
...ry/exporter/sender/jdk/internal/JdkHttpSender.java 39.13% 12 Missing and 2 partials ⚠️
...orter/sender/okhttp/internal/RetryInterceptor.java 51.72% 12 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6614      +/-   ##
============================================
- Coverage     90.19%   90.08%   -0.12%     
+ Complexity     6281     6277       -4     
============================================
  Files           697      697              
  Lines         18903    18944      +41     
  Branches       1852     1858       +6     
============================================
+ Hits          17050    17065      +15     
- Misses         1281     1305      +24     
- Partials        572      574       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jack-berg
Copy link
Member Author

@open-telemetry/java-approvers would be great to get this approved and merged before this week's release.

@jack-berg jack-berg mentioned this pull request Aug 8, 2024
.isTrue());

verify(mockHttpClient, times(2)).send(any(), any());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

😎 solid test!

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jack-berg jack-berg merged commit 910c7cc into open-telemetry:main Aug 9, 2024
17 of 18 checks passed
breedx-splk pushed a commit to breedx-splk/opentelemetry-java that referenced this pull request Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants