metrics

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Runs              *prometheus.CounterVec
	ItemsParsed       *prometheus.CounterVec
	LastSuccessfulRun *prometheus.GaugeVec
	RunDuration       *prometheus.HistogramVec
	EmailsFixed       prometheus.Counter
	DBQueryDuration   *prometheus.HistogramVec
}

Metrics holds the various metrics used for monitoring the application. It includes counters for runs, login attempts, and items parsed, a gauge for the last successful run, and a histogram for run duration.

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

NewMetrics creates a new Metrics instance with the provided Registerer. It initializes various Prometheus metrics including counters for runs, login attempts, and items parsed, as well as gauges and histograms for tracking the last successful run and the duration of runs.

Parameters:

  • reg: A prometheus.Registerer used to register the metrics.

Returns:

  • A pointer to the newly created Metrics instance.

Jump to

Keyboard shortcuts

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