Skip to content
Snippets Groups Projects
Unverified Commit 183b4f44 authored by Angelo Capossele's avatar Angelo Capossele Committed by GitHub
Browse files

:bug: Add len check (#662)

parent c7af761c
Branches
Tags
No related merge requests found
......@@ -49,11 +49,13 @@ var onFPCFinalized = events.NewClosure(func(ev *metricspkg.AnalysisFPCFinalizedE
opinionToString(ev.Outcome),
).Set(1)
conflictInitialOpinion.WithLabelValues(
ev.ConflictID,
ev.NodeID,
opinionToString(ev.Opinions[0]),
).Set(1)
if len(ev.Opinions) > 0 {
conflictInitialOpinion.WithLabelValues(
ev.ConflictID,
ev.NodeID,
opinionToString(ev.Opinions[0]),
).Set(1)
}
})
func registerClientsMetrics() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment