parent
473489ce06
commit
b2a8ae8c85
|
@ -68,7 +68,7 @@ func (c Collector) Collect(metrics chan<- prometheus.Metric) {
|
||||||
for method, valuePtr := range c.metrics.RequestsTotal {
|
for method, valuePtr := range c.metrics.RequestsTotal {
|
||||||
metrics <- prometheus.MustNewConstMetric(
|
metrics <- prometheus.MustNewConstMetric(
|
||||||
requestsTotalDesc,
|
requestsTotalDesc,
|
||||||
prometheus.GaugeValue,
|
prometheus.CounterValue,
|
||||||
float64(atomic.LoadUint64(valuePtr)),
|
float64(atomic.LoadUint64(valuePtr)),
|
||||||
method,
|
method,
|
||||||
)
|
)
|
||||||
|
@ -77,7 +77,7 @@ func (c Collector) Collect(metrics chan<- prometheus.Metric) {
|
||||||
for httpError, valuePtr := range c.metrics.ErrorsTotal.Load() {
|
for httpError, valuePtr := range c.metrics.ErrorsTotal.Load() {
|
||||||
metrics <- prometheus.MustNewConstMetric(
|
metrics <- prometheus.MustNewConstMetric(
|
||||||
errorsTotalDesc,
|
errorsTotalDesc,
|
||||||
prometheus.GaugeValue,
|
prometheus.CounterValue,
|
||||||
float64(atomic.LoadUint64(valuePtr)),
|
float64(atomic.LoadUint64(valuePtr)),
|
||||||
strconv.Itoa(httpError.StatusCode()),
|
strconv.Itoa(httpError.StatusCode()),
|
||||||
httpError.Error(),
|
httpError.Error(),
|
||||||
|
|
Loading…
Reference in New Issue