metrics

package
v0.0.0-...-a2ce4e4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TotalRequests = NewCounterWithLabel(
		"request_total",
		"Total number of processed requests",
		[]string{"cluster", "method", "status_code"},
	)

	ProcessingRequests = NewGaugeWithLabel(
		"request_processing",
		"Current number of processing requests",
		[]string{"cluster", "method"},
	)

	RequestLatency = NewHistogramWithLabel(
		"request_latency_ms",
		"Histogram of latency for requests",
		[]float64{200.0, 400.0, 600.0, 800.0, 1000.0, 1500.0, 2000.0,
			2500.0, 3000.0, 5000.0, 10000.0, 20000.0, 30000.0, 45000.0, 60000.0},
		[]string{"cluster", "method"},
	)

	RealTimeRequestLatency = NewGaugeWithLabel(
		"realtime_request_latency_ms",
		"Histogram of max latency for requests",
		[]string{"cluster", "method"},
	)

	RealTimeRequestBodySize = NewGaugeWithLabel(
		"realtime_request_body_size",
		"Max request body size of every request",
		[]string{"cluster", "method"},
	)
)

Functions

func GetCluster

func GetCluster() string

func InitMonitor

func InitMonitor(c string)

func NewCounter

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

func NewCounterWithLabel

func NewCounterWithLabel(name string, help string, label []string) (m *prometheus.CounterVec)

func NewGaugeWithLabel

func NewGaugeWithLabel(name string, help string, label []string) (m *prometheus.GaugeVec)

func NewHistogramWithLabel

func NewHistogramWithLabel(name string, help string, buckets []float64, label []string) (m *prometheus.HistogramVec)

func NewSummaryWithLabel

func NewSummaryWithLabel(name string, help string, objectives map[float64]float64, label []string) (m *prometheus.SummaryVec)

Types

This section is empty.

Jump to

Keyboard shortcuts

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