Skip to content

Commit

Permalink
Correctly tag mulitline logs for regex multi line handler. (#32647)
Browse files Browse the repository at this point in the history
  • Loading branch information
gh123man authored Jan 3, 2025
1 parent 70c641d commit f56d4db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/logs/internal/decoder/multiline_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (h *MultiLineHandler) sendBuffer() {
if h.isBufferTruncated && pkgconfigsetup.Datadog().GetBool("logs_config.tag_truncated_logs") {
msg.ParsingExtra.Tags = append(msg.ParsingExtra.Tags, message.TruncatedReasonTag("multiline_regex"))
}
if h.isBufferTruncated && pkgconfigsetup.Datadog().GetBool("logs_config.tag_multi_line_logs") {
if h.linesCombined > 1 && pkgconfigsetup.Datadog().GetBool("logs_config.tag_multi_line_logs") {
msg.ParsingExtra.Tags = append(msg.ParsingExtra.Tags, message.MultiLineSourceTag(h.multiLineTagValue))
}
h.outputFn(msg)
Expand Down

0 comments on commit f56d4db

Please sign in to comment.