From 4bde439014c9ca8101bb5ac170325b7d62073606 Mon Sep 17 00:00:00 2001 From: achettyiitr Date: Wed, 25 Oct 2023 20:32:38 +0530 Subject: [PATCH] feat: introducing chi middleware for warehouse --- warehouse/api/http.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/warehouse/api/http.go b/warehouse/api/http.go index 96226ded1b..cee4cb7efa 100644 --- a/warehouse/api/http.go +++ b/warehouse/api/http.go @@ -25,6 +25,7 @@ import ( ierrors "github.com/rudderlabs/rudder-server/warehouse/internal/errors" lf "github.com/rudderlabs/rudder-server/warehouse/logfield" + "github.com/rudderlabs/rudder-go-kit/chiware" "github.com/rudderlabs/rudder-go-kit/config" kithttputil "github.com/rudderlabs/rudder-go-kit/httputil" "github.com/rudderlabs/rudder-go-kit/logger" @@ -127,6 +128,9 @@ func NewApi( func (a *Api) Start(ctx context.Context) error { srvMux := chi.NewRouter() + srvMux.Use( + chiware.StatMiddleware(ctx, srvMux, a.statsFactory, "warehouse"), + ) if mode.IsStandAlone(a.mode) { srvMux.Get("/health", a.healthHandler)