Skip to content

Commit

Permalink
Merge pull request #20 from jfrojo/patch-1
Browse files Browse the repository at this point in the history
Bugfix: Error on custom metric creation
  • Loading branch information
penglongli authored Dec 20, 2021
2 parents bba46b5 + 7a3763f commit 8f239af
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 8f239af

Please sign in to comment.