metrics

package
v0.0.0-...-39b8527 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ServerErrors metric to capture errors from api
	ServerErrors = promauto.NewCounter(prometheus.CounterOpts{
		Namespace: "lighthouse",
		Subsystem: "search",
		Name:      "errors",
		Help:      "The error count per api",
	})

	// SearchDuration metric to capture the duration of each search request
	SearchDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "lighthouse",
		Subsystem: "search",
		Name:      "duration",
		Help:      "The duration for search by type and term count",
	}, []string{"type", "term_count"})

	// AutoCompleteDuration metric to capture the duration of each auto complete request
	AutoCompleteDuration = promauto.NewHistogram(prometheus.HistogramOpts{
		Namespace: "lighthouse",
		Subsystem: "auto_complete",
		Name:      "duration",
		Help:      "The duration for auto_complete by type and term count",
	})

	// JobLoad metric for number of active calls by job
	JobLoad = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "lighthouse",
		Subsystem: "jobs",
		Name:      "job_load",
		Help:      "Number of active calls by job",
	}, []string{"job"})
)

Functions

func Job

func Job(start time.Time, name string)

Job helper function to make tracking metric one line deferral

Types

This section is empty.

Jump to

Keyboard shortcuts

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