Send your go-metrics stats to StatHat
Go
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
metrics-stathat.go
readme.md

readme.md

go-metrics-stathat

A stathat sender for go-metrics

Usage

You will need to get an EZ Key from your settings page.

Create and update metrics on stathat:

import (
	"github.com/rcrowley/go-metrics"           // to get the "metrics" namespace
	"github.com/samuraisam/go-metrics-stathat" // to get the "metricsstathat" namespace
)

// use this registry as you would normally using go-metrics
reg := metrics.NewRegistry()

// every 60 seconds, log all metrics that have been added to the provied registry to stathat
go metricsstathat.StatHat(reg, 60, "MYEZKEY")

Installation

Uses github.com/stathat/stathatgo so you'll need to install it. Obviously, you'll have to be using go-metrics as well.

go get github.com/rcrowley/go-metrics // you should already have this
go get github.com/stathat/stathatgo
go get github.com/samuraisam/go-metrics-stathat