metrics

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOWN = iota
	UP
)

Variables

View Source
var (
	// LastStatus reports the most recent status of each heartbeat (0 = DOWN, 1 = UP).
	LastStatus = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "heartbeats_heartbeat_last_status",
			Help: "Most recent status of each heartbeat (0 = DOWN, 1 = UP)",
		},
		[]string{"heartbeat"},
	)

	// ReceivedTotal counts the total number of received heartbeats per ID.
	ReceivedTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "heartbeats_heartbeat_received_total",
			Help: "Total number of received heartbeats per ID",
		},
		[]string{"heartbeat"},
	)
)

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Registry *prometheus.Registry
}

Metrics wraps a Prometheus registry and provides functionality for metric registration.

func NewMetrics

func NewMetrics(store history.Store) *Metrics

NewMetrics creates and initializes a new Metrics instance with all relevant metrics registered.

Jump to

Keyboard shortcuts

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