Documentation ¶
Overview ¶
Package metrics exposes utilities for setting up and using a sub-set of Datadog's dogstatsd client.
Index ¶
- func Configure(conf *config.AgentConfig, tags []string, factory statsdFactory) error
- func Count(name string, value int64, tags []string, rate float64) error
- func Flush() error
- func Gauge(name string, value float64, tags []string, rate float64) error
- func Histogram(name string, value float64, tags []string, rate float64) error
- func Timing(name string, value time.Duration, tags []string, rate float64) error
- type StatsClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(conf *config.AgentConfig, tags []string, factory statsdFactory) error
Configure creates a statsd client for the given agent's configuration, using the specified global tags.
Types ¶
type StatsClient ¶
type StatsClient interface { Gauge(name string, value float64, tags []string, rate float64) error Count(name string, value int64, tags []string, rate float64) error Histogram(name string, value float64, tags []string, rate float64) error Timing(name string, value time.Duration, tags []string, rate float64) error Flush() error }
StatsClient represents a client capable of sending stats to some stat endpoint.
var Client StatsClient = (*statsd.Client)(nil)
Client is a global Statsd client. When a client is configured via Configure, that becomes the new global Statsd client in the package.
Click to show internal directories.
Click to hide internal directories.