Skip to content

Commit

Permalink
chore: rely only on span status code for hasError
Browse files Browse the repository at this point in the history
  • Loading branch information
makeavish committed Nov 23, 2023
1 parent ae589d9 commit 926fba7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions exporter/clickhousetracesexporter/clickhouse_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ func populateOtherDimensions(attributes pcommon.Map, span *Span) {
if err == nil && statusString != 0 {
statusInt = int64(statusString)
}
if statusInt >= 500 || (statusInt >= 400 && span.Kind != 2) {
span.HasError = true
}
span.HttpCode = strconv.FormatInt(statusInt, 10)
span.ResponseStatusCode = span.HttpCode
} else if k == "http.url" && span.Kind == 3 {
Expand Down Expand Up @@ -202,9 +199,6 @@ func populateOtherDimensions(attributes pcommon.Map, span *Span) {
if err == nil && statusString != 0 {
statusInt = int64(statusString)
}
if statusInt >= 2 {
span.HasError = true
}
span.GRPCCode = strconv.FormatInt(statusInt, 10)
span.ResponseStatusCode = span.GRPCCode
} else if k == "rpc.method" {
Expand Down

0 comments on commit 926fba7

Please sign in to comment.