Skip to content

Commit 171ee6f

Browse files
Log global request id as greq and request id as req in scheduler
1 parent 0f9875a commit 171ee6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/scheduler/pipeline.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func NewPipeline(config conf.SchedulerConfig, database db.DB, monitor Monitor) P
9494
func (p *Pipeline) Run(request api.Request, novaWeights map[string]float64) ([]string, error) {
9595
// Use a logger that is traceable.
9696
traceLog := slog.With(
97-
slog.String("req", request.Context.GlobalRequestID),
97+
slog.String("greq", request.Context.GlobalRequestID),
98+
slog.String("req", request.Context.RequestID),
9899
slog.String("user", request.Context.UserID),
99100
slog.String("project", request.Context.ProjectID),
100101
)

0 commit comments

Comments
 (0)