From 81a697c541c76b75501f3580d717b95bd1a71fb1 Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Tue, 6 Oct 2020 22:59:31 +0200 Subject: [PATCH] Fixes the frontend logs to include org_id. The auth middleware was happening after the stats one and so org_id was not set :facepalm:. Signed-off-by: Cyril Tovena --- pkg/loki/modules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index 9ab99376677bb..ce6c0df458ddb 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -354,8 +354,8 @@ func (t *Loki) initQueryFrontend() (_ services.Service, err error) { frontendHandler := middleware.Merge( serverutil.RecoveryHTTPMiddleware, - queryrange.StatsHTTPMiddleware, t.httpAuthMiddleware, + queryrange.StatsHTTPMiddleware, serverutil.NewPrepopulateMiddleware(), serverutil.ResponseJSONMiddleware(), ).Wrap(t.frontend.Handler())