Documentation
¶
Index ¶
- func NewCounterAsGauge(c metrics.Counter) metrics.Gauge
- func NewCounterAsHistogram(c metrics.Counter) metrics.Histogram
- func NewGaugeAsCounter(g metrics.Gauge) metrics.Counter
- func NewGaugeAsHistogram(g metrics.Gauge) metrics.Histogram
- func NewHistogramAsCounter(h metrics.Histogram) metrics.Counter
- func NewHistogramAsGauge(h metrics.Histogram) metrics.Gauge
- type Counter
- type Gauge
- type Histogram
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCounterAsGauge ¶
NewCounterAsGauge returns a Gauge that actually writes the value on an underlying Counter
func NewCounterAsHistogram ¶
NewCounterAsHistogram returns a Histogram that actually writes the value on an underlying Counter
func NewGaugeAsCounter ¶
NewGaugeAsCounter returns a Counter that actually writes the value on an underlying Gauge
func NewGaugeAsHistogram ¶
NewGaugeAsHistogram returns a Histogram that actually writes the value on an underlying Gauge
func NewHistogramAsCounter ¶
NewHistogramAsCounter returns a Counter that actually writes the value on an underlying Histogram
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter implements prometheus.Counter, via prometheus CounterVec
func NewCounter ¶
func NewCounter(cv *prometheus.CounterVec) *Counter
NewCounter wraps the CounterVec and returns a usable Counter object
func NewCounterFrom ¶
func NewCounterFrom(opts prometheus.CounterOpts, labelNames []string) *Counter
NewCounterFrom creates a new Counter from a CounterOpts and a list of label names
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge implements prometheus.Gauge, via prometheus GaugeVec
func NewGauge ¶
func NewGauge(gv *prometheus.GaugeVec) *Gauge
NewGauge wraps the GaugeVec and returns a usable Gauge object
func NewGaugeFrom ¶
func NewGaugeFrom(opts prometheus.GaugeOpts, labelNames []string) *Gauge
NewGaugeFrom creates a new Gauge from a GaugeOpts and a list of label names
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
Histogram implements Histogram via a Prometheus HistogramVec. The difference between a Histogram and a Summary is that Histograms require predefined quantile buckets, and can be statistically aggregated.
func NewHistogram ¶
func NewHistogram(hv *prometheus.HistogramVec) *Histogram
NewHistogram wraps the HistogramVec and returns a usable Histogram object.
func NewHistogramFrom ¶
func NewHistogramFrom(opts prometheus.HistogramOpts, labelNames []string) *Histogram
NewHistogramFrom constructs and registers a Prometheus HistogramVec, and returns a usable Histogram object.
type Summary ¶
type Summary struct {
// contains filtered or unexported fields
}
Summary implements Histogram, via a Prometheus SummaryVec. The difference between a Summary and a Histogram is that Summaries don't require predefined quantile buckets, but cannot be statistically aggregated.
func NewSummary ¶
func NewSummary(sv *prometheus.SummaryVec) *Summary
NewSummary wraps the SummaryVec and returns a usable Summary object
func NewSummaryFrom ¶
func NewSummaryFrom(opts prometheus.SummaryOpts, labelNames []string) *Summary
NewSummaryFrom constructs and registers a Prometheus SummaryVec, and returns a usable Summary object.