fix: return nil when mtype doesn't match

Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
Manik Rana 2024-07-09 20:42:13 +05:30
parent 50615b4b80
commit 4102f415d3

View file

@ -270,14 +270,10 @@ loop:
}
}
default:
break
// if mtype is not counter, summary or histogram, it won't have a valid _created line
return nil
}
// TODO: for histograms
// if t, _ := newParser.Next(); t != EntrySeries {
// return nil
// }
// gauge_created is a metric
ct := int64(newParser.val)
return &ct