[v9.4.x] Authn: Add separate context for session tagging (#63571)

Authn: Add separate context for session tagging  (#63561)

add context

(cherry picked from commit 635a456fa4)

Co-authored-by: Jo <joao.guerreiro@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2023-02-22 17:17:44 +01:00
committed by GitHub
parent 8aaca53a32
commit 8e4fa99ec7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ func (a *Anonymous) Authenticate(ctx context.Context, r *authn.Request) (*authn.
a.log.Warn("tag anon session panic", "err", err)
}
}()
if err := a.anonSessionService.TagSession(ctx, r.HTTPRequest); err != nil {
if err := a.anonSessionService.TagSession(context.Background(), r.HTTPRequest); err != nil {
a.log.Warn("Failed to tag anonymous session", "error", err)
}
}()
@@ -247,7 +247,7 @@ func (h *ContextHandler) initContextWithAnonymousUser(reqContext *contextmodel.R
reqContext.Logger.Warn("tag anon session panic", "err", err)
}
}()
if err := h.anonSessionService.TagSession(reqContext.Req.Context(), reqContext.Req); err != nil {
if err := h.anonSessionService.TagSession(context.Background(), reqContext.Req); err != nil {
reqContext.Logger.Warn("Failed to tag anonymous session", "error", err)
}
}()