diff --git a/CHANGELOG.md b/CHANGELOG.md index 422e94f..b2ef7e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +## [1.4.4] - 2024-08-13 + +### Changed + +- Added `http.request.resend_delay` as a span attribute for the retry handler +- Changed the `http.retry_count` span attribute to `http.request.resend_count` to conform to OpenTelemetry specs. + ## [1.4.3] - 2024-07-22 ### Changed diff --git a/retry_handler.go b/retry_handler.go index 141a8c0..f366396 100644 --- a/retry_handler.go +++ b/retry_handler.go @@ -142,8 +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.request.resend_delay", delay.Seconds()), + ) defer span.End() req = req.WithContext(ctx) diff --git a/user_agent_handler.go b/user_agent_handler.go index 2b11cd4..a310851 100644 --- a/user_agent_handler.go +++ b/user_agent_handler.go @@ -42,7 +42,7 @@ func NewUserAgentHandlerOptions() *UserAgentHandlerOptions { return &UserAgentHandlerOptions{ Enabled: true, ProductName: "kiota-go", - ProductVersion: "1.4.3", + ProductVersion: "1.4.4", } }