diff --git a/CHANGELOG.md b/CHANGELOG.md index 165ff1f..0b8abad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.4.6] - 2024-10-12 + +### Changed + +- Updated HTTP span attributes to comply with updated OpenTelemetry semantic conventions. [#182](https://github.com/microsoft/kiota-http-go/issues/182) + ## [1.4.5] - 2024-09-03 ### Changed diff --git a/nethttp_request_adapter.go b/nethttp_request_adapter.go index 1eb345d..23a025f 100644 --- a/nethttp_request_adapter.go +++ b/nethttp_request_adapter.go @@ -178,7 +178,7 @@ func (a *NetHttpRequestAdapter) retryCAEResponseIfRequired(ctx context.Context, authenticateHeaderVal := response.Header.Get("WWW-Authenticate") if authenticateHeaderVal != "" && reBearer.Match([]byte(authenticateHeaderVal)) { span.AddEvent(AuthenticateChallengedEventKey) - spanForAttributes.SetAttributes(attribute.Int("http.retry_count", 1)) + spanForAttributes.SetAttributes(semconv.HTTPRequestResendCount(1)) responseClaims := "" parametersRaw := string(reBearer.ReplaceAll([]byte(authenticateHeaderVal), []byte(""))) parameters := strings.Split(parametersRaw, ",") diff --git a/user_agent_handler.go b/user_agent_handler.go index 3f94bf2..51af61b 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.5", + ProductVersion: "1.4.6", } }