cloudapi/v2: 5xx error metrics
Currently error metrics are being recorded for errors with the exact error code of 500. This commit enables recording metrics for all 5xx errors.
This commit is contained in:
parent
708d985194
commit
c0ceede084
1 changed files with 2 additions and 1 deletions
|
|
@ -251,7 +251,8 @@ func (s *Server) HTTPErrorHandler(echoError error, c echo.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if he.Code == http.StatusInternalServerError {
|
||||
internalError := he.Code >= http.StatusInternalServerError && he.Code <= http.StatusNetworkAuthenticationRequired
|
||||
if internalError {
|
||||
if strings.HasSuffix(c.Path(), "/compose") {
|
||||
prometheus.ComposeFailures.Inc()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue