Categorygithub.com/netflix/metrics-client-go
module
0.0.0-20171019173821-bb173f41fc07
Repository: https://github.com/netflix/metrics-client-go.git
Documentation: pkg.go.dev

# README

A go client for the Atlasd sidecar API on localhost. This package requires that you install Atlasd on the given system, and that Atlasd is running on the expected port.

Metrics

Usage:

ctx, cancel := context.WithCancel(context.Background())
// see WithURLInterval for customizations
m := metrics.New(ctx, log.New(ioutil.Discard, "metrics: ", log.LstdFlags))

m.Gauge("gauge.name", tags, 15)
m.Counter("counter.name", tags, 1)
m.Timer("foo.elapsed", tags, 5*time.Minute)

// ...

// later:
m.Flush()
cancel() // stops all metrics processing, all operations become a noop

# Packages

No description provided by the author