Skip to content

Commit 8f239af

Browse files
authored
Merge pull request #20 from jfrojo/patch-1
Bugfix: Error on custom metric creation
2 parents bba46b5 + 7a3763f commit 8f239af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: ginmetrics/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func (m *Monitor) AddMetric(metric *Metric) error {
111111
if err := f(metric); err == nil {
112112
prometheus.MustRegister(metric.vec)
113113
m.metrics[metric.Name] = metric
114+
return nil
114115
}
115116
}
116117
return errors.Errorf("metric type '%d' not existed.", metric.Type)

0 commit comments

Comments
 (0)