Documentation ¶
Overview ¶
Metrics package is a wrapper around prometheus Registry+metrics It allows storing, removing and retrieving metrics by a unique string identifier
Index ¶
- Variables
- type Registry
- func (registry *Registry) Get(name string) (c prometheus.Collector, err error)
- func (registry *Registry) GetPrometheusRegistry() *prometheus.Registry
- func (registry *Registry) HTTPHandler() http.Handler
- func (registry *Registry) NewCounter(opts prometheus.CounterOpts) prometheus.Counter
- func (registry *Registry) NewCounterVec(opts prometheus.CounterOpts, labels []string) *prometheus.CounterVec
- func (registry *Registry) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge
- func (registry *Registry) NewGaugeVec(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec
- func (registry *Registry) NewSummaryVec(opts prometheus.SummaryOpts, labels []string) *prometheus.SummaryVec
- func (registry *Registry) Register(name string, c prometheus.Collector) (err error)
- func (registry *Registry) RegisterNewCounter(name string, opts prometheus.CounterOpts) (c prometheus.Counter, err error)
- func (registry *Registry) RegisterNewCounterVec(name string, opts prometheus.CounterOpts, labels []string) (c *prometheus.CounterVec, err error)
- func (registry *Registry) RegisterNewGauge(name string, opts prometheus.GaugeOpts) (c prometheus.Gauge, err error)
- func (registry *Registry) RegisterNewGaugeVec(name string, opts prometheus.GaugeOpts, labels []string) (c *prometheus.GaugeVec, err error)
- func (registry *Registry) RegisterNewSummaryVec(name string, opts prometheus.SummaryOpts, labels []string) (c *prometheus.SummaryVec, err error)
- func (registry *Registry) RegisterOrGet(name string, c prometheus.Collector) (cRegistered prometheus.Collector, err error)
- func (registry *Registry) RegisterOrGetNewCounter(name string, opts prometheus.CounterOpts) (c prometheus.Counter, err error)
- func (registry *Registry) RegisterOrGetNewCounterVec(name string, opts prometheus.CounterOpts, labels []string) (c *prometheus.CounterVec, err error)
- func (registry *Registry) RegisterOrGetNewGauge(name string, opts prometheus.GaugeOpts) (c prometheus.Gauge, err error)
- func (registry *Registry) RegisterOrGetNewGaugeVec(name string, opts prometheus.GaugeOpts, labels []string) (c *prometheus.GaugeVec, err error)
- func (registry *Registry) RegisterOrGetNewSummaryVec(name string, opts prometheus.SummaryOpts, labels []string) (c *prometheus.SummaryVec, err error)
- func (registry *Registry) Unregister(name string) (err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(namespace string, prometheusRegistry *prometheus.Registry) (registry *Registry, err error)
func (*Registry) Get ¶
func (registry *Registry) Get(name string) (c prometheus.Collector, err error)
func (*Registry) GetPrometheusRegistry ¶
func (registry *Registry) GetPrometheusRegistry() *prometheus.Registry
func (*Registry) HTTPHandler ¶
func (*Registry) NewCounter ¶ added in v0.0.12
func (registry *Registry) NewCounter(opts prometheus.CounterOpts) prometheus.Counter
Counter
func (*Registry) NewCounterVec ¶
func (registry *Registry) NewCounterVec(opts prometheus.CounterOpts, labels []string) *prometheus.CounterVec
CounterVec
func (*Registry) NewGauge ¶ added in v0.0.19
func (registry *Registry) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge
Gauge
func (*Registry) NewGaugeVec ¶ added in v0.0.19
func (registry *Registry) NewGaugeVec(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec
GaugeVec
func (*Registry) NewSummaryVec ¶
func (registry *Registry) NewSummaryVec(opts prometheus.SummaryOpts, labels []string) *prometheus.SummaryVec
SummaryVec
func (*Registry) Register ¶
func (registry *Registry) Register(name string, c prometheus.Collector) (err error)
func (*Registry) RegisterNewCounter ¶ added in v0.0.12
func (registry *Registry) RegisterNewCounter(name string, opts prometheus.CounterOpts) (c prometheus.Counter, err error)
func (*Registry) RegisterNewCounterVec ¶
func (registry *Registry) RegisterNewCounterVec(name string, opts prometheus.CounterOpts, labels []string) (c *prometheus.CounterVec, err error)
func (*Registry) RegisterNewGauge ¶ added in v0.0.19
func (registry *Registry) RegisterNewGauge(name string, opts prometheus.GaugeOpts) (c prometheus.Gauge, err error)
func (*Registry) RegisterNewGaugeVec ¶ added in v0.0.19
func (registry *Registry) RegisterNewGaugeVec(name string, opts prometheus.GaugeOpts, labels []string) (c *prometheus.GaugeVec, err error)
func (*Registry) RegisterNewSummaryVec ¶
func (registry *Registry) RegisterNewSummaryVec(name string, opts prometheus.SummaryOpts, labels []string) (c *prometheus.SummaryVec, err error)
func (*Registry) RegisterOrGet ¶ added in v0.2.0
func (registry *Registry) RegisterOrGet(name string, c prometheus.Collector) (cRegistered prometheus.Collector, err error)
func (*Registry) RegisterOrGetNewCounter ¶ added in v0.2.0
func (registry *Registry) RegisterOrGetNewCounter(name string, opts prometheus.CounterOpts) (c prometheus.Counter, err error)
func (*Registry) RegisterOrGetNewCounterVec ¶ added in v0.2.0
func (registry *Registry) RegisterOrGetNewCounterVec(name string, opts prometheus.CounterOpts, labels []string) (c *prometheus.CounterVec, err error)
func (*Registry) RegisterOrGetNewGauge ¶ added in v0.2.0
func (registry *Registry) RegisterOrGetNewGauge(name string, opts prometheus.GaugeOpts) (c prometheus.Gauge, err error)
func (*Registry) RegisterOrGetNewGaugeVec ¶ added in v0.2.0
func (registry *Registry) RegisterOrGetNewGaugeVec(name string, opts prometheus.GaugeOpts, labels []string) (c *prometheus.GaugeVec, err error)
func (*Registry) RegisterOrGetNewSummaryVec ¶ added in v0.2.0
func (registry *Registry) RegisterOrGetNewSummaryVec(name string, opts prometheus.SummaryOpts, labels []string) (c *prometheus.SummaryVec, err error)
func (*Registry) Unregister ¶
Click to show internal directories.
Click to hide internal directories.