metrics

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CacheMemoryUsage discloses memory used by caches
	CacheMemoryUsage = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: ociClientNamespaceName,
			Subsystem: cacheSubsystemName,
			Name:      "memory_usage_bytes",
			Help:      "Bytes in memory currently used by cache instance.",
		},
		[]string{"id"},
	)

	// CacheDiskUsage discloses disk used by caches
	CacheDiskUsage = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: ociClientNamespaceName,
			Subsystem: cacheSubsystemName,
			Name:      "disk_usage_bytes",
			Help:      "Bytes on disk currently used by cache instance.",
		},
		[]string{"id"},
	)

	// CachedItems discloses the number of items stored by caches
	CachedItems = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: ociClientNamespaceName,
			Subsystem: cacheSubsystemName,
			Name:      "items_total",
			Help:      "Total number of items currently cached by instance.",
		},
		[]string{"id"},
	)

	// CacheHitsDisk discloses the number of hits for items cached on disk
	CacheHitsDisk = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: ociClientNamespaceName,
			Subsystem: cacheSubsystemName,
			Name:      "disk_hits_total",
			Help:      "Total number of hits for items cached on disk by an instance.",
		},
		[]string{"id"},
	)

	// CacheHitsMemory discloses the number of hits for items cached in memory
	CacheHitsMemory = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: ociClientNamespaceName,
			Subsystem: cacheSubsystemName,
			Name:      "memory_hits_total",
			Help:      "Total number of hits for items cached in memory by an instance.",
		},
		[]string{"id"},
	)
)

Functions

func RegisterCacheMetrics

func RegisterCacheMetrics(reg prometheus.Registerer)

RegisterCacheMetrics allows to register ociclient cache metrics with a given prometheus registerer

Types

This section is empty.

Jump to

Keyboard shortcuts

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