Documentation ¶
Index ¶
- Variables
- func FillLatencies(checkKey string, duration string, latency *types.Latency) error
- func FillUptime(checkKey, duration string, uptime *types.Uptime) error
- func GetMetrics(key string) (uptime types.Uptime, latency types.Latency)
- func Record(ctx context.Context, canary v1.Canary, result *pkg.CheckResult) (_uptime types.Uptime, _latency types.Latency)
- func RemoveCheck(checks v1.Canary)
- func RemoveCheckByKey(key string)
- func UnregisterGauge(ctx context.Context, checkIDs []string)
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 OpsCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "canary_check_count", Help: "The total number of checks", }, []string{"type", "endpoint", "canary_name", "canary_namespace", "owner", "severity", "key", "name"}, ) CanaryCheckInfo = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "canary_check_info", Help: "Information about the canary check", }, []string{"type", "endpoint", "canary_name", "canary_namespace", "owner", "severity", "key", "name"}, ) OpsSuccessCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "canary_check_success_count", Help: "The total number of successful checks", }, []string{"type", "endpoint", "canary_name", "canary_namespace", "owner", "severity", "key", "name"}, ) OpsFailedCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "canary_check_failed_count", Help: "The total number of failed checks", }, []string{"type", "endpoint", "canary_name", "canary_namespace", "owner", "severity", "key", "name"}, ) RequestLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "canary_check_duration", Help: "A histogram of the response latency in milliseconds.", Buckets: []float64{5, 10, 25, 50, 200, 500, 1000, 3000, 10000, 30000}, }, []string{"type", "endpoint", "canary_name", "canary_namespace", "owner", "severity", "key", "name"}, ) Gauge = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "canary_check", Help: "A gauge representing the canaries success (0) or failure (1)", }, []string{"key", "type", "canary_name", "canary_namespace", "name"}, ) GenericGauge = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "canary_check_gauge", Help: "A gauge representing duration", }, []string{"type", "canary_name", "metric", "canary_namespace", "owner", "severity", "key", "name"}, ) GenericCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "canary_check_counter", Help: "A gauge representing counters", }, []string{"type", "canary_name", "metric", "value", "canary_namespace", "owner", "severity", "key", "name"}, ) GenericHistogram = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "canary_check_histogram", Help: "A histogram representing durations", Buckets: []float64{5, 10, 25, 50, 200, 500, 1000, 2500, 5000, 10000, 20000}, }, []string{"type", "canary_name", "metric", "canary_namespace", "owner", "severity", "key", "name"}, ) )
Functions ¶
func FillLatencies ¶ added in v0.37.0
func FillUptime ¶ added in v0.37.0
func GetMetrics ¶ added in v0.11.4
func RemoveCheck ¶ added in v0.11.4
func RemoveCheckByKey ¶ added in v0.38.11
func RemoveCheckByKey(key string)
func UnregisterGauge ¶ added in v0.38.168
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.