metrics

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Event counters — incremented in real-time by services
	WebhooksProcessedTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "regen_webhooks_processed_total",
			Help: "Total webhooks processed by source and status (success/error)",
		},
		[]string{"source", "status"},
	)

	AlertsReceivedTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "regen_alerts_received_total",
			Help: "Total alerts received by source",
		},
		[]string{"source"},
	)

	IncidentsCreatedTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "regen_incidents_created_total",
			Help: "Total incidents created by severity and trigger (alert/manual)",
		},
		[]string{"severity", "trigger"},
	)

	EscalationsTriggeredTotal = promauto.NewCounter(
		prometheus.CounterOpts{
			Name: "regen_escalations_triggered_total",
			Help: "Total escalation tiers triggered",
		},
	)

	WorkerJobsProcessedTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "regen_worker_jobs_processed_total",
			Help: "Total background jobs processed by type",
		},
		[]string{"job_type"},
	)

	WorkerJobsFailedTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "regen_worker_jobs_failed_total",
			Help: "Total background jobs failed by type",
		},
		[]string{"job_type"},
	)
)

Functions

func Middleware

func Middleware() gin.HandlerFunc

Middleware returns a Gin middleware that instruments HTTP requests

func UpdateBusinessMetrics

func UpdateBusinessMetrics(db *gorm.DB)

UpdateBusinessMetrics updates incident and alert metrics from the database

Types

This section is empty.

Jump to

Keyboard shortcuts

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