drop line if can't parse

This commit is contained in:
2022-11-09 20:45:44 +02:00
parent 2232a748db
commit d28a4bec05
2 changed files with 5 additions and 4 deletions

View File

@@ -22,9 +22,10 @@ func (unparsed RawC) parse(parsed chan<- singleLine) {
if err := line.parse(); err != nil {
promRecordPrefixParsingErr.WithLabelValues(raw.MetricsName).Add(1)
log.Printf("parsing kubernetes log line in %q: %e", raw.File.Path, err)
continue
}
// TODO: should this only be on success?
parsed <- line
}
}