-
Notifications
You must be signed in to change notification settings - Fork 773
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 Retries to gRPC version of OTLP Exporter #3883
Conversation
This is not needed since the mock server will automatically respond with OK if all the provided codes list have been exhausted
src/OpenTelemetry.Exporter.OpenTelemetryProtocol/OtlpExporterOptions.cs
Outdated
Show resolved
Hide resolved
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3883 +/- ##
==========================================
- Coverage 87.40% 87.40% -0.01%
==========================================
Files 278 278
Lines 10757 10786 +29
==========================================
+ Hits 9402 9427 +25
- Misses 1355 1359 +4
|
{ | ||
StatusCode.Cancelled, | ||
StatusCode.DeadlineExceeded, | ||
StatusCode.ResourceExhausted, // TODO: Investigate this one. |
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.
looks like we need to follow https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlpgrpc-throttling for this one.
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.
My initial assumption is that the gRPC client handles this. Can probably validate the behavior conforms with the specs requirements with the mock server.
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.
looks like it does https://github.com/grpc/grpc-dotnet/blob/23047e0d498501dc95bb58b010ed3c11f8cb3cf8/src/Grpc.Net.Client/Internal/Retry/RetryCall.cs#L190
if I am looking at right place 😄
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Towards #1779
Changes
Enables retry for
OTLP Exporter gRPC
by default.The default values used to initialize
Grpc.Net.Client.Configuration.RetryPolicy
were taken from the Java SIG's implementation.RetryMaxAttempts = 5
RetryInitialBackoff = 1 second
RetryMaxBackoff = 5 seconds
RetryBackoffMultiplier = 1.5x
RetryableStatusCodes
taken from specification of which are retryableAdded several unit tests with new mock OTLP collector thanks to @alanwest for creating it, letting me know and helping me onboard to it.
CHANGELOG.md
updated for non-trivial changes