Skip to content

proposal - state of the art logging

It would be great to have gitlab providing state of the art container logging.

By state of the art I mean to have direct writes from applications to std[out|err] without going thru files (disk, log rotates, ..) and awful tail output.

If the container is running a single service that isn't an issue. if the container runs several services then maybe a proper solution would be to get the logger adding a field like "component" indicating from where the log comes from.

If no other option, a "gitlab logging agent" sidecar container could share an "emptyDir" volume with the other pod containers, read the files (structured) logs, add a json field "component", fill it up based on the incoming log file name (and eventually truncate the files at some point) and write to std[out|err].

CF https://cloud.google.com/solutions/best-practices-for-operating-containers#use_the_native_logging_mechanisms_of_containers

This way logging would be "cloud native" and would be compatible with regular log processing pipelines without extra-headache

Edited by Jean-Baptiste Guerraz