package expvar
import "github.com/go-kit/kit/metrics/expvar"
Package expvar provides expvar backends for metrics. Label values are not supported.
Index ¶
- type Counter
- func NewCounter(name string) *Counter
- func (c *Counter) Add(delta float64)
- func (c *Counter) With(labelValues ...string) metrics.Counter
- type Gauge
- func NewGauge(name string) *Gauge
- func (g *Gauge) Add(delta float64)
- func (g *Gauge) Set(value float64)
- func (g *Gauge) With(labelValues ...string) metrics.Gauge
- type Histogram
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter implements the counter metric with an expvar float. Label values are not supported.
func NewCounter ¶
NewCounter creates an expvar Float with the given name, and returns an object that implements the Counter interface.
func (*Counter) Add ¶
Add implements Counter.
func (*Counter) With ¶
With is a no-op.
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge implements the gauge metric with an expvar float. Label values are not supported.
func NewGauge ¶
NewGauge creates an expvar Float with the given name, and returns an object that implements the Gauge interface.
func (*Gauge) Add ¶
Add implements metrics.Gauge.
func (*Gauge) Set ¶
Set implements Gauge.
func (*Gauge) With ¶
With is a no-op.
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
Histogram implements the histogram metric with a combination of the generic Histogram object and several expvar Floats, one for each of the 50th, 90th, 95th, and 99th quantiles of observed values, with the quantile attached to the name as a suffix. Label values are not supported.
func NewHistogram ¶
NewHistogram returns a Histogram object with the given name and number of buckets in the underlying histogram object. 50 is a good default number of buckets.
func (*Histogram) Observe ¶
Observe implements Histogram.
func (*Histogram) With ¶
With is a no-op.
Source Files ¶
- Version
- v0.13.0 (latest)
- Published
- May 29, 2023
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 hours ago –
Tools for package owners.