metrics

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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