From 5c8cc4a81cb4e31f3a4cec9b82e42e75237bcd08 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 17 Oct 2016 17:22:58 +0100 Subject: [PATCH] strconv to convert int to string --- src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go b/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go index 58b3ca4..c2e5be0 100644 --- a/src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go +++ b/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 }