metrics

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Count

func Count(metricName string, count int64, labels map[string]string) error

func Gauge

func Gauge(metricName string, value interface{}, labels map[string]string) error

func Histogram added in v0.2.2

func Histogram(metricName string, value int64, labels map[string]string) error

func Increment

func Increment(metricName string, labels map[string]string) error

func SetVoid

func SetVoid()

func Setup

func Setup() error

Types

type CounterVec added in v0.2.2

type CounterVec interface {
	With(labels prometheus.Labels) prometheus.Counter
	Collect(chan<- prometheus.Metric)
	Describe(chan<- *prometheus.Desc)
}

type GaugeVec added in v0.2.2

type GaugeVec interface {
	With(labels prometheus.Labels) prometheus.Gauge
	Collect(chan<- prometheus.Metric)
	Describe(chan<- *prometheus.Desc)
}

type HistogramVec added in v0.2.2

type HistogramVec interface {
	With(labels prometheus.Labels) prometheus.Observer
	Collect(chan<- prometheus.Metric)
	Describe(chan<- *prometheus.Desc)
}

type MetricInstrument added in v0.2.2

type MetricInstrument interface {
	Increment(metricName string, labels map[string]string) error
	Count(metricName string, count int64, labels map[string]string) error
	Gauge(metricName string, value interface{}, labels map[string]string) error
	Histogram(metricName string, value int64, labels map[string]string) error
	Close()
}

type PrometheusCollector added in v0.2.2

type PrometheusCollector struct {
	// contains filtered or unexported fields
}

func (*PrometheusCollector) Close added in v0.2.2

func (p *PrometheusCollector) Close()

func (*PrometheusCollector) Count added in v0.2.2

func (p *PrometheusCollector) Count(metricName string, count int64, labels map[string]string) error

func (*PrometheusCollector) Gauge added in v0.2.2

func (p *PrometheusCollector) Gauge(metricName string, value interface{}, labels map[string]string) error

func (*PrometheusCollector) Histogram added in v0.2.2

func (p *PrometheusCollector) Histogram(metricName string, value int64, labels map[string]string) error

func (*PrometheusCollector) Increment added in v0.2.2

func (p *PrometheusCollector) Increment(metricName string, labels map[string]string) error

func (*PrometheusCollector) Register added in v0.2.2

func (p *PrometheusCollector) Register() error

type Statsd

type Statsd struct {
	// contains filtered or unexported fields
}

func (*Statsd) Close

func (s *Statsd) Close()

func (*Statsd) Count added in v0.2.2

func (s *Statsd) Count(metricName string, count int64, labels map[string]string) error

func (*Statsd) Gauge added in v0.2.2

func (s *Statsd) Gauge(metricName string, value interface{}, labels map[string]string) error

func (*Statsd) Histogram added in v0.2.2

func (s *Statsd) Histogram(metricName string, value int64, labels map[string]string) error

func (*Statsd) Increment added in v0.2.2

func (s *Statsd) Increment(metricName string, labels map[string]string) error

Jump to

Keyboard shortcuts

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