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 http/protobuf retry #3983

Merged
merged 3 commits into from
Dec 17, 2021
Merged

Conversation

jack-berg
Copy link
Member

@jack-berg jack-berg commented Dec 11, 2021

  • Add experimental retry support for http/protobuf exporters
  • Create new io.opentelemetry.exporter.otlp.internal.retry package relocate retry related classes
  • Rename addRetryPolicy to setRetryPolicy for consistency with other setters
  • Wire up retry to autoconfigure for http/protobuf

It wasn't entirely clear which http status codes were retryable, so I opened an issue with the spec. Assumed the following are retryable: 429, 502, 503, 504.

@codecov
Copy link

codecov bot commented Dec 11, 2021

Codecov Report

Merging #3983 (8359a82) into main (bbbde5d) will increase coverage by 0.13%.
The diff coverage is 88.57%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3983      +/-   ##
============================================
+ Coverage     89.73%   89.86%   +0.13%     
- Complexity     4271     4282      +11     
============================================
  Files           512      513       +1     
  Lines         12941    12960      +19     
  Branches       1249     1251       +2     
============================================
+ Hits          11612    11646      +34     
+ Misses          925      912      -13     
+ Partials        404      402       -2     
Impacted Files Coverage Δ
...otlp/internal/grpc/DefaultGrpcExporterBuilder.java 93.75% <ø> (ø)
...ry/exporter/otlp/internal/grpc/GrpcStatusUtil.java 100.00% <ø> (ø)
.../otlp/internal/grpc/OkHttpGrpcExporterBuilder.java 88.67% <ø> (ø)
...exporter/otlp/internal/retry/RetryInterceptor.java 100.00% <ø> (ø)
...etry/exporter/otlp/internal/retry/RetryPolicy.java 100.00% <ø> (ø)
...porter/otlp/internal/retry/RetryPolicyBuilder.java 100.00% <ø> (ø)
...pentelemetry/sdk/autoconfigure/OtlpConfigUtil.java 91.86% <ø> (ø)
...er/otlp/internal/okhttp/OkHttpExporterBuilder.java 87.03% <66.66%> (-5.83%) ⬇️
...xporter/otlp/internal/grpc/ManagedChannelUtil.java 86.27% <100.00%> (ø)
...xporter/otlp/internal/grpc/OkHttpGrpcExporter.java 82.47% <100.00%> (ø)
... and 11 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 bbbde5d...8359a82. Read the comment docs.

@@ -10,8 +10,7 @@ otelJava.moduleName.set("io.opentelemetry.exporter.otlp.http.logs")

dependencies {
api(project(":sdk:logs"))

implementation(project(":exporters:otlp:common"))
api(project(":exporters:otlp:common"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think sticking with implementation is better, even if it means duplicating into some build files

Copy link
Member Author

Choose a reason for hiding this comment

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

We talked about this back here, but I've tested it and confirmed that we can get away with implementation.

Best to keep it as implementation until we actually promote something in common out of internal. Will update the grpc modules as well.

}
}

private final HeldCertificate heldCertificate;
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're extracting this, you could consider switching back to SelfSignedCertificate from armeria as the incompatibility with okhttp was fixed

@anuraaga anuraaga merged commit 6f755cc into open-telemetry:main Dec 17, 2021
This was referenced Dec 19, 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.

2 participants