Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Biret <[email protected]>
  • Loading branch information
ohad83 and baywet authored Aug 13, 2024
1 parent fada156 commit 4e73166
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions retry_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ func (middleware RetryHandler) retryRequest(ctx context.Context, pipeline Pipeli
}
if observabilityName != "" {
ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept - attempt "+fmt.Sprint(executionCount))
span.SetAttributes(attribute.Int("http.retry_count", executionCount),
span.SetAttributes(attribute.Int("http.request.resend_count", executionCount),

attribute.Int("http.status_code", resp.StatusCode),
attribute.Float64("http.retry_delay", delay.Seconds()),
attribute.Float64("http.request.resend_delay", delay.Seconds()),

)
defer span.End()
req = req.WithContext(ctx)
Expand Down

0 comments on commit 4e73166

Please sign in to comment.