Log filtering cleanup and observability improvements #45

Merged
eblume merged 7 commits from feature/log-filtering-cleanup into main 2026-01-22 17:30:08 -08:00
Showing only changes of commit 848fea9e1f - Show all commits

Silence logfmt parse errors for non-logfmt logs

The logfmt stage tries to parse all logs, including JSON. When it fails,
it adds __error__ labels. Drop these labels since the logs are still
processed correctly (JSON parser already extracted fields).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Erich Blume 2026-01-22 17:23:44 -08:00

View file

@ -103,6 +103,7 @@ data:
}
// Try to parse logfmt logs (e.g., Loki, Prometheus, Go services)
// Silently skip lines that aren't valid logfmt
stage.logfmt {
mapping = {
level = "level",
@ -112,6 +113,11 @@ data:
}
}
// Drop the logfmt error label if parsing failed (prevents noisy errors)
stage.label_drop {
values = ["__error__", "__error_details__"]
}
// Extract labels from parsed data (works for both JSON and logfmt)
stage.labels {
values = {