Skip to content

Commit

Permalink
NETOBSERV-1597: skip RecordKeyMissing error (#660)
Browse files Browse the repository at this point in the history
* skip RecordKeyMissing error

* return nil

---------

Co-authored-by: Joel Takvorian <jtakvori@redhat.com>
  • Loading branch information
jpinsonneau and jotak committed May 21, 2024
1 parent 36832f1 commit fdb4eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pipeline/encode/metrics_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (m *MetricsCommonStruct) extractGenericValue(flow config.GenericMap, info *
}
val, found := flow[info.ValueKey]
if !found {
m.errorsCounter.WithLabelValues("RecordKeyMissing", info.Name, info.ValueKey).Inc()
// No value might mean 0 for counters, to keep storage lightweight - it can safely be ignored
return nil
}
return val
Expand Down

0 comments on commit fdb4eb1

Please sign in to comment.