protected void setResponseTags ( HttpRequest < ? > request , HttpResponse < ? > response , Span span ) { HttpStatus status = response . getStatus ( ) ; int code = status . getCode ( ) ; if ( code > HTTP_SUCCESS_CODE_UPPER_LIMIT ) { span . setTag ( TAG_HTTP_STATUS_CODE , code ) ; span . setTag ( TAG_ERROR , status . getReason ( ) ) ; } request . getAttribute ( HttpAttributes . ERROR , Throwable . class ) . ifPresent ( error -> setErrorTags ( span , error ) ) ; }
Sets the response tags .