prometheus fixup panics and interface conversations
Some checks are pending
build / test (push) Waiting to run
build / lint (push) Waiting to run
codeql / analyze (go) (push) Waiting to run

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-04-15 00:49:09 +03:00
parent 0975e8fb4d
commit 21494e0e7a

View File

@ -359,7 +359,7 @@ func (m *prometheusMeter) Write(w io.Writer, opts ...meter.Option) error {
Type: dto.MetricType_GAUGE.Enum(),
}
v.(*floatCounters).cs.Range(func(_, nv any) bool {
c := nv.(*prometheusGauge)
c := nv.(*prometheusFloatCounter)
m := &dto.Metric{}
_ = c.c.Write(m)
fillMetric(m, c.labels)