metrics

package
v1.1.0-beta.74 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CounterType   pkg.MetricType = "counter"
	GaugeType     pkg.MetricType = "gauge"
	HistogramType pkg.MetricType = "histogram"

	CustomGauges     map[string]*prometheus.GaugeVec
	CustomCounters   map[string]*prometheus.CounterVec
	CustomHistograms map[string]*prometheus.HistogramVec

	// Global metrics
	CanaryCheckInfo *prometheus.GaugeVec
	Gauge           *prometheus.GaugeVec

	// Check specific metrics
	OpsInvalidCount *prometheus.CounterVec
	OpsCount        *prometheus.CounterVec
	OpsFailedCount  *prometheus.CounterVec
	OpsSuccessCount *prometheus.CounterVec
	OpsErrorCount   *prometheus.CounterVec
	RequestLatency  *prometheus.HistogramVec
)

Functions

func FillLatencies added in v0.37.0

func FillLatencies(checkKey string, duration string, latency *types.Latency) error

func FillUptime added in v0.37.0

func FillUptime(checkKey, duration string, uptime *types.Uptime) error

func GetMetrics added in v0.11.4

func GetMetrics(key string) (uptime types.Uptime, latency types.Latency)

func Record

func Record(
	ctx context.Context,
	canary v1.Canary,
	result *pkg.CheckResult,
) (_uptime types.Uptime, _latency types.Latency)

func RemoveCheck added in v0.11.4

func RemoveCheck(checks v1.Canary)

func RemoveCheckByKey added in v0.38.11

func RemoveCheckByKey(key string)

func UnregisterGauge added in v0.38.168

func UnregisterGauge(ctx context.Context, checkIDs []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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