From 9f029dc2de27aacde05f90b5bf86fb86e0eae51e Mon Sep 17 00:00:00 2001 From: Adam Hackl Date: Fri, 1 Nov 2024 10:11:37 -0400 Subject: [PATCH] docs: add examples with new components for log format and level --- modules/kubernetes/annotations/logs/README.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/modules/kubernetes/annotations/logs/README.md b/modules/kubernetes/annotations/logs/README.md index df23b86..b452731 100644 --- a/modules/kubernetes/annotations/logs/README.md +++ b/modules/kubernetes/annotations/logs/README.md @@ -427,10 +427,37 @@ log_annotations.decolorize "default" { annotation = "logs.grafana.com" } +// set default level and log_type to unknown log_utils.default_level "default" { + forward_to = [log_utils.klog_format.default.receiver] +} + +// identify klog format and parse log level +log_utils.klog_format "default" { + forward_to = [log_utils.zerolog_format.default.receiver] +} + +// identify zerolog format and parse log level +log_utils.zerolog_format "default" { + forward_to = [log_utils.json_format.default.receiver] +} + +// identify json format and parse log level +log_utils.json_format "default" { + forward_to = [log_utils.logfmt_format.default.receiver] +} + +// identify logfmt format and parse log level +log_utils.logfmt_format "default" { + forward_to = [log_utils.unknown_format.default.receiver] +} + +// attempt parse log level from unidentified log type +log_utils.unknown_format "default" { forward_to = [log_utils.normalize_level.default.receiver] } +// Set level consistently (case and name) log_utils.normalize_level "default" { forward_to = [ log_utils.pre_process_metrics.default.receiver,