From f493a1933ef000423f5c576bcf045a176faaeca3 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 17 Oct 2016 15:00:06 +0100 Subject: [PATCH] s/sendMetric/incrementMetrics/ --- src/github.com/matrix-org/go-neb/services/rssbot/rssbot.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 cdcedb7..58b3ca4 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 @@ -136,10 +136,10 @@ func (s *rssBotService) OnPoll(cli *matrix.Client) time.Time { feed, items, err := s.queryFeed(u) if err != nil { logger.WithField("feed_url", u).WithError(err).Error("Failed to query feed") - sendMetric(u, err) + incrementMetrics(u, err) continue } - sendMetric(u, nil) + incrementMetrics(u, nil) // Loop backwards since [0] is the most recent and we want to send in chronological order for i := len(items) - 1; i >= 0; i-- { item := items[i] @@ -161,7 +161,7 @@ func (s *rssBotService) OnPoll(cli *matrix.Client) time.Time { return s.nextTimestamp() } -func sendMetric(urlStr string, err error) { +func incrementMetrics(urlStr string, err error) { // extract domain part of RSS feed URL to get coarser (more useful) statistics domain := urlStr u, urlErr := url.Parse(urlStr)