You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Log entries are being split into multiple lines by docker, and as the loki docker driver (aka. Docker loki log plugin) does not reconstruct entries that are split into multiple lines/chunks , these chunks/lines are treated as individual log entries in Loki and Grafana, which breaks any JSON formatted structured logs
Configured docker-compose service to use the loki-docker-driver docker plugin for logs
Configured plugin to put logs into loki
Started Loki (FROM grafana/loki:2.9.5@sha256:55561cf48b19e03d982e1f959efc0d8842b7be141eb5eaaa4b8a8eeb5a2dfc58)
Started service using docker-compose
Made service produce a huge log entry (this happens outside of my control, as this is not actually an internal service)
Observed "broken" log entries split over multiple lines in Loki using Grafana.
By broken I mean that log entries that were supposed to be a single entry are being parsed and treated as multiple entries, many of which are missing valuable fields like level and original timestamp, as those fields are only detected on the single entry/line which contains those fields, and not for the lines that are being displayed as different entries.
Expected behavior
The loki-docker-driver recombines the split chunks/lines into a single entry/line, and treats them as such, even before the pipeline-configuration in the loki-docker-driver enters the picture.
Environment:
Infrastructure: Docker compose running on desktop computer
Deployment tool: Docker compose
Screenshots, Promtail config, or terminal output
I can share screenshots and logs privately on request
andoks
changed the title
loki-docker-driver does not support reconstructing docker logs split by docker in 16kB chunks
support reconstructing docker logs split by docker in 16kB chunks in loki-docker-driver
Feb 7, 2025
Describe the bug
Log entries are being split into multiple lines by docker, and as the loki docker driver (aka. Docker loki log plugin) does not reconstruct entries that are split into multiple lines/chunks , these chunks/lines are treated as individual log entries in Loki and Grafana, which breaks any JSON formatted structured logs
To Reproduce
Steps to reproduce the behavior:
By broken I mean that log entries that were supposed to be a single entry are being parsed and treated as multiple entries, many of which are missing valuable fields like level and original timestamp, as those fields are only detected on the single entry/line which contains those fields, and not for the lines that are being displayed as different entries.
Expected behavior
The loki-docker-driver recombines the split chunks/lines into a single entry/line, and treats them as such, even before the pipeline-configuration in the loki-docker-driver enters the picture.
Environment:
Screenshots, Promtail config, or terminal output
I can share screenshots and logs privately on request
Links
The text was updated successfully, but these errors were encountered: