internal/prometheus: remove compose fail metrics
We have switched how 5xx errors are being recorded internally and we are now recording all failures for all endpoints. As a result, a dedicated metric only for compose failures is no longer required.
This commit is contained in:
parent
382db4245a
commit
25faf5ab60
2 changed files with 0 additions and 20 deletions
|
|
@ -3,11 +3,8 @@ package v2
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/prometheus"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -302,13 +299,6 @@ func (s *Server) HTTPErrorHandler(echoError error, c echo.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
internalError := he.Code >= http.StatusInternalServerError && he.Code <= http.StatusNetworkAuthenticationRequired
|
||||
if internalError {
|
||||
if strings.HasSuffix(c.Path(), "/compose") {
|
||||
prometheus.ComposeFailures.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
err, ok := he.Message.(detailsError)
|
||||
if !ok {
|
||||
// No service code was set, so Echo threw this error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue