Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet authored Dec 13, 2024
1 parent f94251c commit 4b14514
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nethttp_request_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (a *NetHttpRequestAdapter) startTracingSpan(ctx context.Context, requestInf
decodedUriTemplate := decodeUriEncodedString(requestInfo.UrlTemplate, []byte{'-', '.', '~', '$'})
telemetryPathValue := queryParametersCleanupRegex.ReplaceAll([]byte(decodedUriTemplate), []byte(""))
ctx, span := otel.GetTracerProvider().Tracer(a.observabilityOptions.GetTracerInstrumentationName()).Start(ctx, methodName+" - "+string(telemetryPathValue))
span.SetAttributes(UrlUriSchemeAttribute.String(decodedUriTemplate))
span.SetAttributes(UrlUriTemplateAttribute.String(decodedUriTemplate))
return ctx, span
}

Expand Down
4 changes: 2 additions & 2 deletions span_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
// HTTP Response attributes
const (
HttpResponseBodySizeAttribute = attribute.Key("http.response.body.size")
HttpResponseHeaderContentTypeAttribute = attribute.Key("http.response.header.content_type")
HttpResponseHeaderContentTypeAttribute = attribute.Key("http.response.header.content-type")
HttpResponseStatusCodeAttribute = attribute.Key("http.response.status_code")
)

Expand All @@ -30,5 +30,5 @@ const (
const (
UrlFullAttribute = attribute.Key("url.full")
UrlSchemeAttribute = attribute.Key("url.scheme")
UrlUriSchemeAttribute = attribute.Key("url.uri_scheme")
UrlUriTemplateAttribute = attribute.Key("url.uri_template")
)

0 comments on commit 4b14514

Please sign in to comment.