From 326a2aa90e4e9ef34b3a7d5addd3cf05a08b0d65 Mon Sep 17 00:00:00 2001 From: Alfredo Gutierrez Date: Sun, 5 Jan 2025 11:32:08 -0600 Subject: [PATCH] adding a pipeline stage for merge multiple log lines into a single log message. Signed-off-by: Alfredo Gutierrez --- server/docker/promtail-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/docker/promtail-config.yaml b/server/docker/promtail-config.yaml index a0f0eb60b..8e99f62c0 100644 --- a/server/docker/promtail-config.yaml +++ b/server/docker/promtail-config.yaml @@ -13,6 +13,13 @@ scrape_configs: pipeline_stages: - docker: docker_url: unix:///var/run/docker.sock + # This multiline stage merges multiple lines for one exception stack trace + # into a single log message. + - multiline: + # firstline: A regex that identifies the start of a new log entry + firstline: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}' + # Maximum wait time for more lines before sending the collected log upstream + max_wait_time: 3s relabel_configs: - source_labels: [__meta_docker_container_name] regex: "/(.*)"