metrics

package
v0.0.0-...-6d34543 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSummaryVec

func NewSummaryVec(opts *SummaryOpts) *summaryVec

Types

type CounterVec

type CounterVec interface {
	Inc(labels ...string)
	Add(v float64, labels ...string)
	GetMetric(labels ...string) (prometheus.Counter, error)
	// contains filtered or unexported methods
}

计数器

func CreateMetricCount

func CreateMetricCount(name string, labels ...string) CounterVec

func NewCounterVec

func NewCounterVec(opts *CounterVecOpts) CounterVec

type CounterVecOpts

type CounterVecOpts VectorOpts

type GaugeVec

type GaugeVec interface {
	Set(v float64, labels ...string)
	Inc(labels ...string)
	Add(v float64, labels ...string)
	// contains filtered or unexported methods
}

测量仪

func CreateMetricGauge

func CreateMetricGauge(name string, labels ...string) GaugeVec

func NewGaugeVec

func NewGaugeVec(opts *GaugeVecOpts) GaugeVec

type GaugeVecOpts

type GaugeVecOpts VectorOpts

type HistogramVec

type HistogramVec interface {
	Observe(v float64, labels ...string)
	// contains filtered or unexported methods
}

直方图

func CreateMetricHistogram

func CreateMetricHistogram(name string, buckets []float64, labels ...string) HistogramVec

func NewHistogramVec

func NewHistogramVec(opts *HistogramVecOpts) HistogramVec

type HistogramVecOpts

type HistogramVecOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	Labels    []string
	Buckets   []float64
}

type Prometheus

type Prometheus struct{}

func NewPrometheus

func NewPrometheus() *Prometheus

type SummaryOpts

type SummaryOpts struct {
	Namespace  string
	Subsystem  string
	Name       string
	Help       string
	Labels     []string
	Objectives map[float64]float64
}

type SummaryVec

type SummaryVec interface {
	Observe(v int64, labels ...string)
	// contains filtered or unexported methods
}

汇总

func CreateMetricSummary

func CreateMetricSummary(name string, objectives map[float64]float64, labels ...string) SummaryVec

type VectorOpts

type VectorOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	Labels    []string
}

Jump to

Keyboard shortcuts

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