/
doc.go
34 lines (28 loc) · 1017 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This file is part of graze/golang-service
//
// Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
//
// license: https://github.com/graze/golang-service/blob/master/LICENSE
// link: https://github.com/graze/golang-service
/*
Package metrics provides a some helpers for sending metrics
Statsd
Connect to a statsd endpoint using environment variables
Environment Variables:
STATSD_HOST: The host of the statsd server
STATSD_PORT: The port of the statsd server
STATSD_NAMESPACE: The namespace to prefix to every metric name
STATSD_TAGS: A comma separared list of tags to apply to every metric reported
Example:
STATSD_HOST: localhost
STATSD_PORT: 8125
STATSD_NAMESPACE: app.live.
STATSD_TAGS: env:live,version:1.0.2
Usage:
client, _ := GetStatsdFromEnv()
client.Incr("metric", []string{"tag","tag2"}, 1)
*/
package metrics