Open shayycisco opened 2 years ago
This is almost a year old at this point, but did you ever sort this out?
I just ran into issues with the logfmt stage complaining about parsing errors ...
@shayycisco as for your suggestion
Is it fair to say that these logs belong to debug? same as the unmarshall of the json stage
I'd argue that a structured log format like json or logfmt should not create a constant flow of parsing errors, what solely beats the purpose. So I much rather have the warning give me more info on what string and from which file could not be parsed for me to fix either the Promtail pipeline or my log format.
And if you really want to apply json or logfmt parsing on a "best effort" approach, there should be a switch for these pipeline stages to "ignore parsing errors" or to mark fields as "optional".
Any progress on this?
So I much rather have the warning give me more info on what string and from which file could not be parsed for me to fix either the Promtail pipeline or my log format.
This is the real answer in this case... The actual log line at fault being printed would really help a lot...
Same problem here, multiple failed to decode logfmt
error messages which are completely useless since they do not contain the message that could not be parsed.
The original PR adding logfmt support was https://github.com/grafana/loki/pull/4346
@cyriltovena @jeschkies @kavirajk could you kindly take a look at this issue and my comment https://github.com/grafana/loki/issues/6066#issuecomment-1641771387? I gladly push a PR, but would love you opinions if you rather want:
debug
level)logfmt
(or json
for that matter) on a best-effort basis (maybe in conjunction with 1)Any update on this? I'd personally like the message added to the log and also ignore parsing errors.
I think logging to the debug level would be a huge improvement along with actually including the line (in only the debug level).
When using the logfmt stage and the log line isn't in this format you get bunch of errors in promtail:
Is it fair to say that these logs belong to debug? same as the unmarshall of the json stage