func (g *Graphite) NewCounter(name string) *Counter {
	c := NewCounter(g.prefix + name)
	g.mtx.Lock()
	g.counters[g.prefix+name] = c
	g.mtx.Unlock()
	return c
}
NewCounter returns a counter. Observations are aggregated and emitted once
per write invocation.
package graphite
import (
	"fmt"
	"io"
	"sync"
	"time"
	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/metrics"
	"github.com/go-kit/kit/metrics/generic"
	"github.com/go-kit/kit/util/conn"
)
type Graphite struct {
	mtx        sync.RWMutex
	prefix     string
	counters   map[string]*Counter
	gauges     map[string]*Gauge
	histograms map[string]*Histogram
	logger     log.Logger
}
func New(prefix string, logger log.Logger) *Graphite {
	return &Graphite{
		prefix:     prefix,
		counters:   map[string]*Counter{},
		gauges:     map[string]*Gauge{},
		histograms: map[string]*Histogram{},
		logger:     logger,
	}
}