stats

package
v0.0.0-...-37f65c1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Durations = prometheus.NewSummaryVec(
		prometheus.SummaryOpts{
			Name:       "request_durations_seconds",
			Help:       "request latency distributions.",
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001, 1.0: 0.0},
		},
		[]string{"stage"},
	)

	Attempts = prometheus.NewSummaryVec(
		prometheus.SummaryOpts{
			Name:       "attempts",
			Help:       "distributions of number of attempts made",
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001, 1.0: 0.0},
		},
		[]string{},
	)

	CacheCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "cache",
			Help: "cache hit and misses",
		},
		[]string{"path", "cache"},
	)

	RequestCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "request",
			Help: "requests",
		},
		[]string{"host", "status"},
	)

	HealthGauge = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "backends",
			Help: "number of healthy backends",
		},
		[]string{"backends"},
	)

	AvailableConnectionsGauge = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "connections",
			Help: "number of available connections",
		},
		[]string{"connections"},
	)
)

Functions

func StartUp

func StartUp(addr string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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