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.
Click to show internal directories.
Click to hide internal directories.