metrics

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerRequestMetrics = MustRegisterCounterVec("request", "default",
	"server request metrics", []string{"status", "rpc", "method", "path", "handler"})

ServerRequestMetrics metrics fro grpc and http request

View Source
var SummaryObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}

Functions

func Handler

func Handler() http.Handler

func MustRegister

func MustRegister(cs ...prometheus.Collector)

func MustRegisterCounter

func MustRegisterCounter(name, namespace, help string) prometheus.Counter

MustRegisterCounter creates and registers a new Counter. Panics if any error occurs.

func MustRegisterCounterVec

func MustRegisterCounterVec(name, namespace, help string, labelNames []string) *prometheus.CounterVec

MustRegisterCounterVec creates and registers a new CounterVec. Panics if any error occurs.

func MustRegisterGauge

func MustRegisterGauge(name, namespace, help string) prometheus.Gauge

MustRegisterGauge creates and registers a new Gauge. Panics if any error occurs.

func MustRegisterGaugeVec

func MustRegisterGaugeVec(name, namespace, help string, labelNames []string) *prometheus.GaugeVec

MustRegisterGaugeVec creates and registers a new GaugeVec. Panics if any error occurs.

func MustRegisterHistogram

func MustRegisterHistogram(name, namespace, help string, buckets []float64) prometheus.Histogram

MustRegisterHistogram creates and registers a new Histogram. Panics if any error occurs.

func MustRegisterHistogramVec

func MustRegisterHistogramVec(name, namespace, help string, buckets []float64, labelNames []string) *prometheus.HistogramVec

MustRegisterHistogramVec creates and registers a new HistogramVec. Panics if any error occurs.

func MustRegisterSummary

func MustRegisterSummary(name, namespace, help string) prometheus.Summary

MustRegisterSummary creates and registers a new Summary. Panics if any error occurs.

func MustRegisterSummaryVec

func MustRegisterSummaryVec(name, namespace, help string, labelNames []string) *prometheus.SummaryVec

MustRegisterSummaryVec creates and registers a new SummaryVec. Panics if any error occurs.

func NewCounter

func NewCounter(name, namespace, help string) prometheus.Counter

NewCounter creates a new Counter.

func NewCounterVec

func NewCounterVec(name, namespace, help string, labelNames []string) *prometheus.CounterVec

NewCounterVec creates a new CounterVec partitioned by the given label names.

func NewGauge

func NewGauge(name, namespace, help string) prometheus.Gauge

NewGauge creates a new Gauge.

func NewGaugeVec

func NewGaugeVec(name, namespace, help string, labelNames []string) *prometheus.GaugeVec

NewGaugeVec creates a new GaugeVec partitioned by the given label names.

func NewHistogram

func NewHistogram(name, namespace, help string, buckets []float64) prometheus.Histogram

NewHistogram creates a new Histogram.

func NewHistogramVec

func NewHistogramVec(name, namespace, help string, buckets []float64, labelNames []string) *prometheus.HistogramVec

NewHistogramVec creates a new HistogramVec partitioned by the given label names.

func NewSummary

func NewSummary(name, namespace, help string) prometheus.Summary

NewSummary creates a new Summary.

func NewSummaryVec

func NewSummaryVec(name, namespace, help string, labelNames []string) *prometheus.SummaryVec

NewSummaryVec creates a new SummaryVec partitioned by the given label names.

Types

This section is empty.

Jump to

Keyboard shortcuts

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