Documentation ¶
Index ¶
- type Registry
- func (r *Registry) Get(metricName string, hash metrics.LabelHash, metricType metrics.MetricType) (metrics.VectorHolder, metrics.MetricHolder)
- func (r *Registry) GetCounter(metricName string, labels prometheus.Labels, help string, ...) (prometheus.Counter, error)
- func (r *Registry) GetGauge(metricName string, labels prometheus.Labels, help string, ...) (prometheus.Gauge, error)
- func (r *Registry) GetHistogram(metricName string, labels prometheus.Labels, help string, ...) (prometheus.Observer, error)
- func (r *Registry) GetSummary(metricName string, labels prometheus.Labels, help string, ...) (prometheus.Observer, error)
- func (r *Registry) HashLabels(labels prometheus.Labels) (metrics.LabelHash, []string)
- func (r *Registry) MetricConflicts(metricName string, metricType metrics.MetricType) bool
- func (r *Registry) RemoveStaleMetrics()
- func (r *Registry) Store(metricName string, hash metrics.LabelHash, labels prometheus.Labels, ...)
- func (r *Registry) StoreCounter(metricName string, hash metrics.LabelHash, labels prometheus.Labels, ...)
- func (r *Registry) StoreGauge(metricName string, hash metrics.LabelHash, labels prometheus.Labels, ...)
- func (r *Registry) StoreHistogram(metricName string, hash metrics.LabelHash, labels prometheus.Labels, ...)
- func (r *Registry) StoreSummary(metricName string, hash metrics.LabelHash, labels prometheus.Labels, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct { Registerer prometheus.Registerer Metrics map[string]metrics.Metric Mapper *mapper.MetricMapper // The below value and label variables are allocated in the registry struct // so that we don't have to allocate them every time have to compute a label // hash. ValueBuf, NameBuf bytes.Buffer Hasher hash.Hash64 }
func NewRegistry ¶
func NewRegistry(reg prometheus.Registerer, mapper *mapper.MetricMapper) *Registry
func (*Registry) Get ¶
func (r *Registry) Get(metricName string, hash metrics.LabelHash, metricType metrics.MetricType) (metrics.VectorHolder, metrics.MetricHolder)
func (*Registry) GetCounter ¶
func (r *Registry) GetCounter(metricName string, labels prometheus.Labels, help string, mapping *mapper.MetricMapping, metricsCount *prometheus.GaugeVec) (prometheus.Counter, error)
func (*Registry) GetGauge ¶
func (r *Registry) GetGauge(metricName string, labels prometheus.Labels, help string, mapping *mapper.MetricMapping, metricsCount *prometheus.GaugeVec) (prometheus.Gauge, error)
func (*Registry) GetHistogram ¶
func (r *Registry) GetHistogram(metricName string, labels prometheus.Labels, help string, mapping *mapper.MetricMapping, metricsCount *prometheus.GaugeVec) (prometheus.Observer, error)
func (*Registry) GetSummary ¶
func (r *Registry) GetSummary(metricName string, labels prometheus.Labels, help string, mapping *mapper.MetricMapping, metricsCount *prometheus.GaugeVec) (prometheus.Observer, error)
func (*Registry) HashLabels ¶
Calculates a hash of both the label names and values.
func (*Registry) MetricConflicts ¶
func (r *Registry) MetricConflicts(metricName string, metricType metrics.MetricType) bool
func (*Registry) RemoveStaleMetrics ¶
func (r *Registry) RemoveStaleMetrics()
func (*Registry) Store ¶
func (r *Registry) Store(metricName string, hash metrics.LabelHash, labels prometheus.Labels, vh metrics.VectorHolder, mh metrics.MetricHolder, metricType metrics.MetricType, ttl time.Duration)
func (*Registry) StoreCounter ¶
func (r *Registry) StoreCounter(metricName string, hash metrics.LabelHash, labels prometheus.Labels, vec *prometheus.CounterVec, c prometheus.Counter, ttl time.Duration)
func (*Registry) StoreGauge ¶
func (r *Registry) StoreGauge(metricName string, hash metrics.LabelHash, labels prometheus.Labels, vec *prometheus.GaugeVec, g prometheus.Gauge, ttl time.Duration)
func (*Registry) StoreHistogram ¶
func (r *Registry) StoreHistogram(metricName string, hash metrics.LabelHash, labels prometheus.Labels, vec *prometheus.HistogramVec, o prometheus.Observer, ttl time.Duration)
func (*Registry) StoreSummary ¶
func (r *Registry) StoreSummary(metricName string, hash metrics.LabelHash, labels prometheus.Labels, vec *prometheus.SummaryVec, o prometheus.Observer, ttl time.Duration)
Click to show internal directories.
Click to hide internal directories.