File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,9 @@ public class HTTPClient {
394394 span. attributes. http. scheme = request. scheme
395395 span. attributes. http. target = request. uri
396396 span. attributes. http. host = request. host
397+ if let requestContentLength = request. body? . length {
398+ span. attributes. http. requestContentLength = requestContentLength
399+ }
397400
398401 // TODO: net.peer.ip / Not required, but recommended
399402
@@ -512,6 +515,7 @@ public class HTTPClient {
512515 if case let . success( ( _, response) ) = result, let httpResponse = response as? HTTPClient . Response {
513516 span. attributes. http. statusCode = Int ( httpResponse. status. code)
514517 span. attributes. http. statusText = httpResponse. status. reasonPhrase
518+ span. attributes. http. responseContentLength = httpResponse. body? . readableBytes ?? 0
515519 }
516520 span. end ( )
517521 setupComplete. succeed ( ( ) )
You can’t perform that action at this time.
0 commit comments