metrics

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	SUCCESS float64 = 0
	ERROR   float64 = 1
)

heartbeats_receiver_last_status

View Source
const (
	HeartbeatOK        float64 = 0
	HeartbeatLate      float64 = 1
	HeartbeatMissing   float64 = 2
	HeartbeatRecovered float64 = 3
	HeartbeatNever     float64 = -1
)

heartbeats_heartbeat_last_state

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry added in v0.20.0

type Registry struct {
	// contains filtered or unexported fields
}

Registry holds Prometheus metrics for the app.

func NewRegistry added in v0.22.0

func NewRegistry() *Registry

NewRegistry builds a new Prometheus metrics registry.

func (*Registry) IncHeartbeatReceived added in v0.20.0

func (r *Registry) IncHeartbeatReceived(id string)

IncHeartbeatReceived increments the receive counter for a heartbeat.

func (*Registry) Metrics added in v0.20.0

func (r *Registry) Metrics() http.Handler

Metrics returns the Prometheus metrics handler.

func (*Registry) SetHeartbeatState added in v0.22.0

func (r *Registry) SetHeartbeatState(id string, state string)

SetHeartbeatState updates the last state gauge for a heartbeat.

func (*Registry) SetReceiverStatus added in v0.20.0

func (r *Registry) SetReceiverStatus(receiver, typ, target string, status float64)

SetReceiverStatus sets the receiver status gauge.

Jump to

Keyboard shortcuts

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