Browse Source

strconv to convert int to string

kegan/rss-user-agent
Kegan Dougal 8 years ago
parent
commit
5c8cc4a81c
  1. 3
      src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go

3
src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go

@ -15,6 +15,7 @@ import (
"html"
"net/http"
"net/url"
"strconv"
"time"
)
@ -174,7 +175,7 @@ func incrementMetrics(urlStr string, err error) {
if ok {
statusCode = herr.StatusCode
}
pollCounter.With(prometheus.Labels{"url": domain, "http_status": string(statusCode)}).Inc()
pollCounter.With(prometheus.Labels{"url": domain, "http_status": strconv.Itoa(statusCode)}).Inc()
} else {
pollCounter.With(prometheus.Labels{"url": domain, "http_status": "200"}).Inc() // technically 2xx but gofeed doesn't tell us which
}

Loading…
Cancel
Save