Skip to content

Commit

Permalink
feat: Add retry delay as span attribute in retry handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad83 committed Aug 12, 2024
1 parent 9bf80c7 commit fada156
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions retry_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func (middleware RetryHandler) retryRequest(ctx context.Context, pipeline Pipeli
ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept - attempt "+fmt.Sprint(executionCount))
span.SetAttributes(attribute.Int("http.retry_count", executionCount),
attribute.Int("http.status_code", resp.StatusCode),
attribute.Float64("http.retry_delay", delay.Seconds()),
)
defer span.End()
req = req.WithContext(ctx)
Expand Down

0 comments on commit fada156

Please sign in to comment.