Доработана конфигурация взаимодействия со statsd

This commit is contained in:
ErickSkrauch 2017-03-25 15:55:57 +03:00
parent 201a257d69
commit 6a881a62e3

View File

@ -63,11 +63,12 @@ func main() {
// statsd
var statsdString = os.Getenv("STATSD_ADDR")
if (statsdString != "") {
log.Println("Connecting to statsd")
hostname, _ := os.Hostname()
statsdReceiver, err := statsd.NewReceiver(statsd.Config{
Address: statsdString,
Prefix: "ely.skinsystem." + hostname + ".",
FlushEvery: 2,
Prefix: "ely.skinsystem." + hostname + ".app.",
FlushEvery: 1,
})
if (err != nil) {
log.Fatal("statsd connection error")