metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusMetrics

type PrometheusMetrics struct {
	ServiceStatusGauge prometheus.Gauge
	LatencyGauge       prometheus.Gauge
	LatencyHistogram   prometheus.Histogram
}

PrometheusMetrics the metrics for the monitor

func (*PrometheusMetrics) RecordLatency

func (hm *PrometheusMetrics) RecordLatency(latency time.Duration)

RecordLatency records the latency

func (*PrometheusMetrics) ServiceDown

func (hm *PrometheusMetrics) ServiceDown()

ServiceDown handles the service down

func (*PrometheusMetrics) ServiceUp

func (hm *PrometheusMetrics) ServiceUp()

ServiceUp handles the service up

func (*PrometheusMetrics) StartLatencyGauge

func (hm *PrometheusMetrics) StartLatencyGauge(name string, group string, monitorName types.MonitorType)

StartLatencyGauge initializes the latency gauge

func (*PrometheusMetrics) StartServiceStatusGauge

func (hm *PrometheusMetrics) StartServiceStatusGauge(name string, group string, monitorName types.MonitorType)

StartServiceStatusGauge initializes the service status gauge

Jump to

Keyboard shortcuts

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