metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotificationSuccess means the last notification attempt succeeded.
	NotificationSuccess float64 = 0
	// NotificationError means the last notification attempt failed or is still pending.
	NotificationError float64 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry holds Prometheus metrics for the app.

func NewRegistry

func NewRegistry() *Registry

NewRegistry builds a new Prometheus metrics registry.

func (*Registry) IncCheckInReceived

func (r *Registry) IncCheckInReceived(checkIn string)

IncCheckInReceived increments the received check-in counter for a monitor.

func (*Registry) Metrics

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

Metrics returns the Prometheus metrics handler.

func (*Registry) SetMonitorSnapshot

func (r *Registry) SetMonitorSnapshot(checkIn string, snapshot monitor.Snapshot)

SetMonitorSnapshot updates all monitor gauges from the current monitor snapshot.

func (*Registry) SetNotificationStatus

func (r *Registry) SetNotificationStatus(status delivery.Status)

SetNotificationStatus updates per-target notification delivery status gauges.

Jump to

Keyboard shortcuts

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