From 8aa24e2c389c836c959d035544e5d7e1390c81d3 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 5 Jul 2018 22:03:28 -0500 Subject: [PATCH] Unexport statsd.Prefix --- statsd/statsd.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/statsd/statsd.go b/statsd/statsd.go index 0bb369fac..232404a54 100644 --- a/statsd/statsd.go +++ b/statsd/statsd.go @@ -26,8 +26,8 @@ import ( // statsD defailt host is "127.0.0.1:8125" const ( - // Prefix is appended to each metric event name - Prefix = "pilosa." + // prefix is appended to each metric event name + prefix = "pilosa." // bufferLen Stats lient buffer size. bufferLen = 1024 @@ -80,7 +80,7 @@ func (c *StatsClient) WithTags(tags ...string) pilosa.StatsClient { // Count tracks the number of times something occurs per second. func (c *StatsClient) Count(name string, value int64, rate float64) { - if err := c.client.Count(Prefix+name, value, c.tags, rate); err != nil { + if err := c.client.Count(prefix+name, value, c.tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Count error: %s", err) } } @@ -88,35 +88,35 @@ func (c *StatsClient) Count(name string, value int64, rate float64) { // CountWithCustomTags tracks the number of times something occurs per second with custom tags. func (c *StatsClient) CountWithCustomTags(name string, value int64, rate float64, t []string) { tags := append(c.tags, t...) - if err := c.client.Count(Prefix+name, value, tags, rate); err != nil { + if err := c.client.Count(prefix+name, value, tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Count error: %s", err) } } // Gauge sets the value of a metric. func (c *StatsClient) Gauge(name string, value float64, rate float64) { - if err := c.client.Gauge(Prefix+name, value, c.tags, rate); err != nil { + if err := c.client.Gauge(prefix+name, value, c.tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Gauge error: %s", err) } } // Histogram tracks statistical distribution of a metric. func (c *StatsClient) Histogram(name string, value float64, rate float64) { - if err := c.client.Histogram(Prefix+name, value, c.tags, rate); err != nil { + if err := c.client.Histogram(prefix+name, value, c.tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Histogram error: %s", err) } } // Set tracks number of unique elements. func (c *StatsClient) Set(name string, value string, rate float64) { - if err := c.client.Set(Prefix+name, value, c.tags, rate); err != nil { + if err := c.client.Set(prefix+name, value, c.tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Set error: %s", err) } } // Timing tracks timing information for a metric. func (c *StatsClient) Timing(name string, value time.Duration, rate float64) { - if err := c.client.Timing(Prefix+name, value, c.tags, rate); err != nil { + if err := c.client.Timing(prefix+name, value, c.tags, rate); err != nil { c.logger.Printf("statsd.StatsClient.Timing error: %s", err) } }