metrics

package
v0.0.0-...-4b3986e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// PrometheusNamespace namespace for Prometheus metrics
	PrometheusNamespace = "periskop"
)

Variables

View Source
var (

	// InstancesScrapped is a Prometheus gauge to track the number of instances scrapped
	InstancesScrapped = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: PrometheusNamespace,
			Name:      "instances_scrapped",
			Help:      "Number of instances scrapped.",
		},
		scrappedLabels,
	)
	// ErrorsScrapped is a Prometheus counter to track the total of errors scrapped
	ErrorsScrapped = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: PrometheusNamespace,
			Name:      "errors_scrapped_total",
			Help:      "Total number of errors scrapped.",
		},
		scrappedLabels,
	)
	// ServiceErrors is a Prometheus counter to track errors in the Periskop service
	ServiceErrors = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: PrometheusNamespace,
			Name:      "application_errors_total",
			Help:      "Total number of errors in the Periskop service.",
		},
		[]string{"type"},
	)
	// ErrorOccurrences is a Prometheus counter to track the number of times that an scrapped aggregated error is produced.
	ErrorOccurrences = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: PrometheusNamespace,
			Name:      "error_occurrences",
			Help:      "Number of occurrences per service, error type and severity.",
		},
		[]string{"service_name", "severity", "target", "aggregation_key"},
	)
	ErrorCollector = periskop.NewErrorCollector()
)

nolint

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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