Skip to content

Commit

Permalink
Correct metrics types
Browse files Browse the repository at this point in the history
/cc @kvz
  • Loading branch information
Acconut committed Mar 30, 2017
1 parent 473489c commit b2a8ae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prometheuscollector/prometheuscollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (c Collector) Collect(metrics chan<- prometheus.Metric) {
for method, valuePtr := range c.metrics.RequestsTotal {
metrics <- prometheus.MustNewConstMetric(
requestsTotalDesc,
prometheus.GaugeValue,
prometheus.CounterValue,
float64(atomic.LoadUint64(valuePtr)),
method,
)
Expand All @@ -77,7 +77,7 @@ func (c Collector) Collect(metrics chan<- prometheus.Metric) {
for httpError, valuePtr := range c.metrics.ErrorsTotal.Load() {
metrics <- prometheus.MustNewConstMetric(
errorsTotalDesc,
prometheus.GaugeValue,
prometheus.CounterValue,
float64(atomic.LoadUint64(valuePtr)),
strconv.Itoa(httpError.StatusCode()),
httpError.Error(),
Expand Down

0 comments on commit b2a8ae8

Please sign in to comment.