Documentation
¶
Overview ¶
Package metrics provides helpers for setting up metrics reporting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartLibrato ¶
func StartLibrato(logger log.FieldLogger, cfg Config) metrics.Provider
StartLibrato initializes a new librato provider given the Config, and sets up a runtimemetrics.Collector on it. The runtime collector will emit on the librato.Provider every Config.ReportInterval ticks. You need to call Stop on the librato.Provider before you tear down the process.
Types ¶
type Config ¶
type Config struct {
ReportInterval time.Duration `env:"METRICS_REPORT_INTERVAL,default=60s"`
Source string `env:"METRICS_SOURCE"`
Prefix string `env:"METRICS_PREFIX"`
DefaultTags []string `env:"METRICS_DEFAULT_TAGS"`
Librato Librato
}
Config stores all the env related config to bootstrap metrics.
Click to show internal directories.
Click to hide internal directories.