Documentation ¶
Overview ¶
Package influxdb implements a InfluxDB backend for package metrics.
Index ¶
- func NewCounter(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Counter
- func NewCounterTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Counter
- func NewGauge(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Gauge
- func NewGaugeTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Gauge
- func NewHistogram(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Histogram
- func NewHistogramTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, ...) metrics.Histogram
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCounter ¶
func NewCounter(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportInterval time.Duration) metrics.Counter
NewCounter returns a Counter that writes values in the reportInterval to the given InfluxDB client, utilizing batching.
func NewCounterTick ¶
func NewCounterTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportTicker <-chan time.Time) metrics.Counter
NewCounterTick is the same as NewCounter, but allows the user to pass a own channel to trigger the write process to the client.
func NewGauge ¶
func NewGauge(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportInterval time.Duration) metrics.Gauge
NewGauge creates a new gauge instance, reporting points in the defined reportInterval.
func NewGaugeTick ¶
func NewGaugeTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportTicker <-chan time.Time) metrics.Gauge
NewGaugeTick is the same as NewGauge with a ticker channel instead of a interval.
func NewHistogram ¶
func NewHistogram(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportInterval time.Duration, minValue, maxValue int64, sigfigs int, quantiles ...int) metrics.Histogram
NewHistogram is taken from http://github.com/codahale/metrics. It returns a windowed HDR histogram which drops data older than five minutes.
The histogram exposes metrics for each passed quantile as gauges. Quantiles should be integers in the range 1..99. The gauge names are assigned by using the passed name as a prefix and appending "_pNN" e.g. "_p50".
func NewHistogramTick ¶
func NewHistogramTick(client stdinflux.Client, bp stdinflux.BatchPoints, key string, tags []metrics.Field, reportTicker <-chan time.Time, minValue, maxValue int64, sigfigs int, quantiles ...int) metrics.Histogram
NewHistogramTick is the same as NewHistoGram, but allows to pass a custom reportTicker.
Types ¶
This section is empty.