File tree Expand file tree Collapse file tree 2 files changed +0
-25
lines changed
exporter/awsxrayexporter/translator Expand file tree Collapse file tree 2 files changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import (
20
20
"github.com/aws/aws-sdk-go/aws"
21
21
"go.opentelemetry.io/collector/consumer/pdata"
22
22
semconventions "go.opentelemetry.io/collector/translator/conventions"
23
- tracetranslator "go.opentelemetry.io/collector/translator/trace"
24
23
25
24
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/awsxray"
26
25
)
@@ -119,11 +118,6 @@ func makeHTTP(span pdata.Span) (map[string]string, *awsxray.HTTPData) {
119
118
}
120
119
}
121
120
122
- if info .Response .Status == nil {
123
- // TODO(anuraaga): Replace with direct translator of StatusCode without casting to int
124
- info .Response .Status = aws .Int64 (int64 (tracetranslator .HTTPStatusCodeFromOCStatus (int32 (span .Status ().Code ()))))
125
- }
126
-
127
121
info .Response .ContentLength = aws .Int64 (extractResponseSizeFromEvents (span ))
128
122
129
123
return filtered , & info
Original file line number Diff line number Diff line change @@ -245,25 +245,6 @@ func TestServerSpanWithSchemeNamePortTargetAttributes(t *testing.T) {
245
245
assert .True (t , strings .Contains (jsonStr , "http://kb234.example.com:8080/users/junit" ))
246
246
}
247
247
248
- func TestHttpStatusFromSpanStatus (t * testing.T ) {
249
- attributes := make (map [string ]interface {})
250
- attributes [semconventions .AttributeHTTPMethod ] = "GET"
251
- attributes [semconventions .AttributeHTTPURL ] = "https://api.example.com/users/junit"
252
- span := constructHTTPClientSpan (attributes )
253
-
254
- filtered , httpData := makeHTTP (span )
255
-
256
- assert .NotNil (t , httpData )
257
- assert .NotNil (t , filtered )
258
- w := testWriters .borrow ()
259
- if err := w .Encode (httpData ); err != nil {
260
- assert .Fail (t , "invalid json" )
261
- }
262
- jsonStr := w .String ()
263
- testWriters .release (w )
264
- assert .True (t , strings .Contains (jsonStr , "200" ))
265
- }
266
-
267
248
func TestSpanWithNotEnoughHTTPRequestURLAttributes (t * testing.T ) {
268
249
attributes := make (map [string ]interface {})
269
250
attributes [semconventions .AttributeHTTPMethod ] = "GET"
You can’t perform that action at this time.
0 commit comments