Documentation
¶
Index ¶
- func StartPusher(ctx context.Context, pushGateway string, jobName string, ...)
- type Counter
- type CounterOpts
- type CounterVec
- type CounterVecOpts
- type Gauge
- type GaugeOpts
- type GaugeVec
- type GaugeVecOpts
- type HistogramVec
- type HistogramVecOpts
- type Labels
- type Opts
- type Timer
- type TimerOption
- type VectorOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Counter ¶
func NewCounter ¶
func NewCounter(opts CounterOpts) Counter
type CounterOpts ¶
type CounterOpts Opts
type CounterVec ¶
type CounterVec interface { // Inc increments labels. Inc(labels ...string) // Add adds labels with v. Add(v float64, labels ...string) Close() bool }
CounterVec interface represents a counter vector.
func NewCounterVec ¶
func NewCounterVec(cfg CounterVecOpts) CounterVec
NewCounterVec returns a CounterVec.
type GaugeVec ¶
type GaugeVec interface { // Set sets v to labels. Set(v float64, labels ...string) // Inc increments labels. Inc(labels ...string) // Add adds v to labels. Add(v float64, labels ...string) Close() bool }
GaugeVec represents a gauge vector.
type HistogramVec ¶
type HistogramVec interface { // Observe adds observation v to labels. Observe(v int64, labels ...string) Close() bool }
A HistogramVec interface represents a histogram vector.
func NewHistogramVec ¶
func NewHistogramVec(cfg HistogramVecOpts) HistogramVec
NewHistogramVec returns a HistogramVec.
type HistogramVecOpts ¶
type HistogramVecOpts struct { Namespace string Subsystem string Name string Help string Labels []string Buckets []float64 }
A HistogramVecOpts is a histogram vector options.
type Timer ¶
type TimerOption ¶
type TimerOption func(*timerOptions)
func WithHistogramBuckets ¶
func WithHistogramBuckets(buckets []float64) TimerOption
WithHistogramBuckets set buckets of histogram default value is float64{.00001, .00005, .0001, .0002, .0005, .001, .005, .01, .025, .05, .1, .5, 1, 2.5, 5, 10, 60}
func WithSummaryQuantiles ¶
func WithSummaryQuantiles(quantiles map[float64]float64) TimerOption
WithSummaryQuantiles set quantile values default value is {0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
Click to show internal directories.
Click to hide internal directories.