Skip to content

Commit

Permalink
feat: introducing chi middleware for warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Oct 25, 2023
1 parent 28497cf commit 4bde439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions warehouse/api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4bde439

Please sign in to comment.