Skip to content

Commit

Permalink
Bugfix: Error on custom metric creation
Browse files Browse the repository at this point in the history
fixes #19
  • Loading branch information
jfrojo authored Dec 16, 2021
1 parent bba46b5 commit 7a3763f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ginmetrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (m *Monitor) AddMetric(metric *Metric) error {
if err := f(metric); err == nil {
prometheus.MustRegister(metric.vec)
m.metrics[metric.Name] = metric
return nil
}
}
return errors.Errorf("metric type '%d' not existed.", metric.Type)
Expand Down

0 comments on commit 7a3763f

Please sign in to comment.