prometheus

package
v0.0.0-...-f9dcdc7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTPRequests = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "agent",
		Subsystem: "http",
		Name:      "requests_total",
	}, []string{"method", "path", "status"})

	ServiceLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "agent",
		Subsystem: "http",
		Name:      "service_latency",
		Buckets:   []float64{0.001, 0.005, 0.01, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10},
	}, []string{"path"})
	ClusterSize = promauto.NewGauge(prometheus.GaugeOpts{
		Namespace: "agent",
		Subsystem: "cluster",
		Name:      "nodes",
		Help:      "How many nodes are in the cluster",
	})

	ChannelBuffer = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "agent",
		Subsystem: "channel",
		Name:      "buffer",
		Help:      "Track buffered channel buffers to detect backpressure",
	}, []string{"id"})
	CacheHits = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "agent",
		Subsystem: "cache",
		Name:      "hits",
	}, []string{"key", "resource", "tier"})
	CacheMisses = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "agent",
		Subsystem: "cache",
		Name:      "misses",
	}, []string{"key", "resource", "tier"})
	CacheLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "agent",
		Subsystem: "cache",
		Name:      "latency",
	}, []string{"key", "resource", "tier"})

	CacheEntries = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "agent",
		Subsystem: "cache",
		Name:      "entries",
	}, []string{"resource"})
	CacheRejected = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "agent",
		Subsystem: "cache",
		Name:      "rejected",
	}, []string{"resource"})
	RatelimitPushPullEvents = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: "agent",
		Subsystem: "ratelimit",
		Name:      "push_pull_events",
	}, []string{"nodeId", "peerId"})
	RatelimitPushPullLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "agent",
		Subsystem: "ratelimit",
		Name:      "push_pull_latency",
		Help:      "Latency of push/pull events in seconds",
	}, []string{"nodeId", "peerId"})
)

Functions

func Listen

func Listen(path string, port int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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