Skip to content

Commit

Permalink
improve regexp performance in loki.process: call fmt only if debug …
Browse files Browse the repository at this point in the history
…is enabled. fix debug check
  • Loading branch information
r0ka committed Dec 20, 2024
1 parent 194a6a5 commit 69030d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/component/loki/process/stages/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (r *regexStage) Process(labels model.LabelSet, extracted map[string]interfa
extracted[name] = match[i]
}
}
if level.Debug(r.logger).Enabled() {
if level.DebugValue() {
level.Debug(r.logger).Log("msg", "extracted data debug in regex stage", "extracted data", fmt.Sprintf("%v", extracted))
}
}
Expand Down

0 comments on commit 69030d9

Please sign in to comment.