metrics

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorCounter is a global counter for errors
	ErrorCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "errors_total",
			Help: "Number of errors while reconciling",
		})

	// TemplateErrorCounter counts errors templating monitors
	TemplateErrorCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "template_errors_total",
			Help: "Number of errors applying templates",
		})

	// ChangeCounter counts kubernetes events (e.g. create, delete) on objects (e.g. ClusterRoleBinding)
	ChangeCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "changed_total",
			Help: "Number of times a monitor is created or updated by Astro",
		},
		[]string{"object", "action"},
	)

	// DatadogErrCounter counts errors interacting with the datadog api
	DatadogErrCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "datadog_api_errors",
			Help: "Number of errors interacting with the datadog api",
		})
)

Functions

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics must be called exactly once and registers the prometheus counters as metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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