Skip to content

Commit

Permalink
Merge pull request #556 from grafana/charleskorn/fix-logger
Browse files Browse the repository at this point in the history
Don't drop rule name and index information from rule evaluation logs when adding trace ID
  • Loading branch information
charleskorn authored Oct 30, 2023
2 parents c0ddc1f + 0d62622 commit b7f66b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) {
}(time.Now())

if sp.SpanContext().IsSampled() && sp.SpanContext().HasTraceID() {
logger = log.WithPrefix(g.logger, "traceID", sp.SpanContext().TraceID())
logger = log.WithPrefix(logger, "traceID", sp.SpanContext().TraceID())
}

g.metrics.EvalTotal.WithLabelValues(GroupKey(g.File(), g.Name())).Inc()
Expand Down

0 comments on commit b7f66b9

Please sign in to comment.