prometheus: split off request timing information into separate mw

Tracks the worker api in addition to the composer api.
This commit is contained in:
Sanne Raymaekers 2023-06-23 12:28:28 +02:00
parent 9594156baf
commit 2837b2a3ad
4 changed files with 31 additions and 9 deletions

View file

@ -93,6 +93,7 @@ func (s *Server) Handler(path string) http.Handler {
mws := []echo.MiddlewareFunc{
prometheus.StatusMiddleware(prometheus.ComposerSubsystem),
prometheus.HTTPDurationMiddleware(prometheus.ComposerSubsystem),
}
if s.config.JWTEnabled {
mws = append(mws, auth.TenantChannelMiddleware(s.config.TenantProviderFields, HTTPError(ErrorTenantNotFound)))