Skip to content

Commit

Permalink
docs: add examples with new components for log format and level
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhackl committed Nov 1, 2024
1 parent c0f5411 commit 9f029dc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions modules/kubernetes/annotations/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9f029dc

Please sign in to comment.