mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #556 from grafana/charleskorn/fix-logger
Don't drop rule name and index information from rule evaluation logs when adding trace ID
This commit is contained in:
commit
b7f66b93b9
|
@ -461,7 +461,7 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) {
|
||||||
}(time.Now())
|
}(time.Now())
|
||||||
|
|
||||||
if sp.SpanContext().IsSampled() && sp.SpanContext().HasTraceID() {
|
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()
|
g.metrics.EvalTotal.WithLabelValues(GroupKey(g.File(), g.Name())).Inc()
|
||||||
|
|
Loading…
Reference in a new issue