Hello, I've discovered an issue with the new tracer implementation - when http status code that the route returns is 500, the span status is still set to Unset. The previous implementation of the tracer would set it to Error.
The only place where the tracer sets it to error is this:
err := next(c)
if err != nil {
span.SetAttributes(semconv.ErrorType(err))
span.SetStatus(codes.Error, err.Error())
if config.OnNextError != nil {
config.OnNextError(c, err)
}
}
but in case of responses like return c.String(http.StatusInternalServerError, "error") err is always nil.
Hello, I've discovered an issue with the new tracer implementation - when http status code that the route returns is 500, the span status is still set to
Unset. The previous implementation of the tracer would set it toError.The only place where the tracer sets it to error is this:
but in case of responses like
return c.String(http.StatusInternalServerError, "error")erris always nil.