Open Uscholdo opened 3 months ago
For testing I added this temporarly to test whether the regex is correct for both "first lines":
stage.replace { expression = "^(\\[[^\\]]*\\] ){4}" replace = "*****" }
The outcome shows that both first lines match the regex, so this seems not to be the problem.
Describe the bug We are using the flow-mode configuration in our grafana-agent. To compromise multiline-logs into one log-message that is displayed in grafana we use the "stage.multiline" block in our flow-mode configuration. Unfortunatly not all matching "first lines" are used to add the following logs to a compromised multiline-log.
As you can see in the screenshots, there is one multiline-log compromised and the other(at the top of the picture) isn't and is shown in multiple lines. The regex that is used in the stage.multiline matches both first-lines (already tested), so why is one multiline-log compromised and the other isnt?
To Reproduce Steps to reproduce the behavior:
Expected behavior All multi-line logs where the first line matches the configured regex should be displayed as multiline logs in grafana.
Environment:
Screenshots, Promtail config, or terminal output Grafana-agent configuration (flow mode):
Grafana log output:
Raw logs of the first-line (+2 following lines) of the multiline-log that is NOT compromised by stage.multiline:
Raw logs of the first-line (+3 following lines) multiline-log that is compromised by stage.multiline: