diff --git a/exporter/awsxrayexporter/internal/translator/http.go b/exporter/awsxrayexporter/internal/translator/http.go index f1f135dafe62..7aa31f83b777 100644 --- a/exporter/awsxrayexporter/internal/translator/http.go +++ b/exporter/awsxrayexporter/internal/translator/http.go @@ -92,6 +92,7 @@ func makeHTTP(span ptrace.Span) (map[string]pcommon.Value, *awsxray.HTTPData) { hasHTTPRequestURLAttributes = true case conventions.AttributeNetPeerName: urlParts[key] = value.Str() + hasHTTPRequestURLAttributes = true case conventions.AttributeNetPeerPort: urlParts[key] = value.Str() if len(urlParts[key]) == 0 { diff --git a/exporter/awsxrayexporter/internal/translator/http_test.go b/exporter/awsxrayexporter/internal/translator/http_test.go index 0c5ff1b9983f..a5fd43109ac8 100644 --- a/exporter/awsxrayexporter/internal/translator/http_test.go +++ b/exporter/awsxrayexporter/internal/translator/http_test.go @@ -88,6 +88,7 @@ func TestClientSpanWithPeerAttributes(t *testing.T) { assert.NotNil(t, httpData) assert.NotNil(t, filtered) + assert.NotNil(t, httpData.Request.URL) assert.Equal(t, "10.8.17.36", *httpData.Request.ClientIP)