Skip to content

Commit

Permalink
adding a pipeline stage for merge multiple log lines into a single lo…
Browse files Browse the repository at this point in the history
…g message.

Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Jan 5, 2025
1 parent 5aaf69a commit 326a2aa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/docker/promtail-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "/(.*)"
Expand Down

0 comments on commit 326a2aa

Please sign in to comment.