Documentation
¶
Index ¶
Constants ¶
View Source
const ( DOWN = iota UP )
Variables ¶
View Source
var ( // HeartbeatStatus is a gauge metric representing the last status of each heartbeat. HeartbeatStatus = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "heartbeats_heartbeat_last_status", Help: "Total number of heartbeats", }, []string{"heartbeat"}, ) // TotalHeartbeats is a counter metric tracking the total number of heartbeats. TotalHeartbeats = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "heartbeats_heartbeats_total", Help: "The total number of heartbeats", }, []string{"heartbeat"}, ) )
View Source
var PromMetrics = NewMetrics()
PromMetrics holds the global instance of Metrics.
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() *Metrics
NewMetrics creates and initializes a new Metrics instance with all relevant metrics registered.
Click to show internal directories.
Click to hide internal directories.