redisprom

package
v0.9.17 Latest Latest
Warning

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

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

Documentation

Overview

Package redisprom provides objects to report metrics according to the Baseplate.spec

Index

Constants

View Source
const (
	ClientNameLabel = "redis_client_name" // The service-provided name for the client to identify the backend for redis host(s). MUST be user specified, MAY be blank if not specified.
	DatabaseLabel   = "redis_database"    // Number of the Redis database to which the client is connecting. MAY be blank if not specified.
	SuccessLabel    = "redis_success"     // MUST BE false if the request to Redis raises an exception OR if an error was returned, otherwise true.
	TypeLabel       = "redis_type"        // MUST BE one of standalone, cluster, sentinel, identifies the backend's configuration for responding to the redis request
	DeploymentLabel = "redis_deployment"  // MUST BE one of reddit, elasticache, identifies the provider of the redis backend (not the explicit address)
	CommandLabel    = "redis_command"     // SHALL reflect to Redis command being executed for the request (ie SET)
)

Variables

View Source
var (
	MaxSizeGauge = promauto.With(prometheusbpint.GlobalRegistry).NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "redis_client_max_size",
			Help: "configured maximum number of clients to keep in the pool (for showing % used in dashboards)",
		},
		[]string{redisPoolLabel},
	)
	ActiveConnectionsDesc = prometheus.NewDesc(
		"redis_client_active_connections",
		"current number of connections 'leased' from the pool. MAY be greater than size in the event that the implementation allows for using more connections than in the pool",
		[]string{redisPoolLabel},
		prometheus.Labels{},
	)
	IdleConnectionsDesc = prometheus.NewDesc(
		"redis_client_idle_connections",
		"current number of connections 'idle' (not leased from the pool) and ready to be used",
		[]string{redisPoolLabel},
		prometheus.Labels{},
	)
	PeakActiveConnectionsDesc = prometheus.NewDesc(
		"redis_client_peak_active_connections",
		"maximum number of connections simultaneously 'leased' from the pool since process start",
		[]string{redisPoolLabel},
		prometheus.Labels{},
	)
	TotalConnectionGetsDesc = prometheus.NewDesc(
		"redis_client_connection_gets_total",
		"incremented each time a connection is 'leased' from the pool",
		[]string{redisPoolLabel},
		prometheus.Labels{},
	)
)
View Source
var (
	LatencySeconds = promauto.With(prometheusbpint.GlobalRegistry).NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "redis_client_latency_seconds",
			Help:    "latency histogram",
			Buckets: prometheusbp.DefaultLatencyBuckets,
		},
		[]string{ClientNameLabel, DatabaseLabel, TypeLabel, DeploymentLabel, CommandLabel, SuccessLabel},
	)
	ActiveRequests = promauto.With(prometheusbpint.GlobalRegistry).NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "redis_client_active_requests",
			Help: "total requests that are in-flight",
		},
		[]string{ClientNameLabel, DatabaseLabel, TypeLabel, DeploymentLabel, CommandLabel},
	)
	RequestsTotal = promauto.With(prometheusbpint.GlobalRegistry).NewCounterVec(
		prometheus.CounterOpts{
			Name: "redis_client_requests_total",
			Help: "total request counter",
		},
		[]string{ClientNameLabel, DatabaseLabel, TypeLabel, DeploymentLabel, CommandLabel, SuccessLabel},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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