Error span on 5xx only
This commit is contained in:
parent
fe6acdf4d2
commit
be81ce244e
2 changed files with 8 additions and 2 deletions
|
@ -117,7 +117,7 @@ func LogRequest(span opentracing.Span, r *http.Request) {
|
|||
func LogResponseCode(span opentracing.Span, code int) {
|
||||
if span != nil {
|
||||
ext.HTTPStatusCode.Set(span, uint16(code))
|
||||
if code >= 400 {
|
||||
if code >= http.StatusInternalServerError {
|
||||
ext.Error.Set(span, true)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue