metricsproxy

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterVecProxy

type CounterVecProxy struct {
	LabelNames []string
	Labels     map[string]map[string]string
	*prometheus.CounterVec
	// contains filtered or unexported fields
}

CounterVecProxy to proxy prometheus.CounterVec

func NewCounterVec

func NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *CounterVecProxy

NewCounterVec creates a new CounterVec based on the provided CounterOpts and partitioned by the given label names.

func (*CounterVecProxy) DeleteAllAboutLabels

func (c *CounterVecProxy) DeleteAllAboutLabels(labels prometheus.Labels) bool

DeleteAllAboutLabels Remove all labelsValue with these labels

func (*CounterVecProxy) GetLabels

func (c *CounterVecProxy) GetLabels() map[string]map[string]string

GetLabels to support get CounterVecProxy's Labels when you use Proxy object

func (*CounterVecProxy) With

With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like

myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42)

func (*CounterVecProxy) WithLabelValues

func (c *CounterVecProxy) WithLabelValues(lvs ...string) prometheus.Counter

WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allows shortcuts like

myVec.WithLabelValues("404", "GET").Add(42)

type GaugeVecProxy

type GaugeVecProxy struct {
	LabelNames []string
	Labels     map[string]map[string]string
	*prometheus.GaugeVec
	// contains filtered or unexported fields
}

GaugeVecProxy to proxy prometheus.GaugeVec

func NewGaugeVec

func NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *GaugeVecProxy

NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and partitioned by the given label names.

func (*GaugeVecProxy) DeleteAllAboutLabels

func (c *GaugeVecProxy) DeleteAllAboutLabels(labels prometheus.Labels) bool

DeleteAllAboutLabels Remove all labelsValue with these labels

func (*GaugeVecProxy) GetLabels

func (c *GaugeVecProxy) GetLabels() map[string]map[string]string

GetLabels to support get GaugeVecProxy's Labels when you use Proxy object

func (*GaugeVecProxy) With

With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like

myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42)

func (*GaugeVecProxy) WithLabelValues

func (c *GaugeVecProxy) WithLabelValues(lvs ...string) prometheus.Gauge

WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allows shortcuts like

myVec.WithLabelValues("404", "GET").Add(42)

type HistogramVecProxy

type HistogramVecProxy struct {
	LabelNames []string
	Labels     map[string]map[string]string
	*prometheus.HistogramVec
	// contains filtered or unexported fields
}

HistogramVecProxy to proxy prometheus.HistogramVec

func NewHistogramVec

func NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *HistogramVecProxy

NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and partitioned by the given label names.

func (*HistogramVecProxy) DeleteAllAboutLabels

func (c *HistogramVecProxy) DeleteAllAboutLabels(labels prometheus.Labels) bool

DeleteAllAboutLabels Remove all labelsValue with these labels

func (*HistogramVecProxy) GetLabels

func (c *HistogramVecProxy) GetLabels() map[string]map[string]string

GetLabels to support get HistogramVecProxy's Labels when you use Proxy object

func (*HistogramVecProxy) With

With works as GetMetricWith but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like

myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21)

func (*HistogramVecProxy) WithLabelValues

func (c *HistogramVecProxy) WithLabelValues(lvs ...string) prometheus.Observer

WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allows shortcuts like

myVec.WithLabelValues("404", "GET").Observe(42.21)

type Proxy

type Proxy interface {
	GetLabels() map[string]map[string]string
	// contains filtered or unexported methods
}

Proxy Interface

type SummaryVecProxy

type SummaryVecProxy struct {
	LabelNames []string
	Labels     map[string]map[string]string
	*prometheus.SummaryVec
	// contains filtered or unexported fields
}

SummaryVecProxy to proxy prometheus.SummaryVec

func NewSummaryVec

func NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *SummaryVecProxy

NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and partitioned by the given label names.

Due to the way a Summary is represented in the Prometheus text format and how it is handled by the Prometheus server internally, “quantile” is an illegal label name. NewSummaryVec will panic if this label name is used.

func (*SummaryVecProxy) DeleteAllAboutLabels

func (c *SummaryVecProxy) DeleteAllAboutLabels(labels prometheus.Labels) bool

DeleteAllAboutLabels Remove all labelsValue with these labels

func (*SummaryVecProxy) GetLabels

func (c *SummaryVecProxy) GetLabels() map[string]map[string]string

GetLabels to support get SummaryVecProxy's Labels when you use Proxy object

func (*SummaryVecProxy) With

With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like

myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21)

func (*SummaryVecProxy) WithLabelValues

func (c *SummaryVecProxy) WithLabelValues(lvs ...string) prometheus.Observer

WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allows shortcuts like

myVec.WithLabelValues("404", "GET").Observe(42.21)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL