observability

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostnameLabel  = "hostname"
	NamespaceLabel = "namespace"
	NameLabel      = "name"
	ProviderLabel  = "provider"
	VersionLabel   = "version"
	OsLabel        = "os"
	ArchLabel      = "arch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpMetrics

type HttpMetrics struct {
	RequestsTotal   *prometheus.CounterVec
	RequestDuration *prometheus.HistogramVec
	RequestSize     *prometheus.SummaryVec
	ResponseSize    *prometheus.SummaryVec
}

type Middleware

type Middleware interface {
	// WrapHandler wraps the given HTTP handler for instrumentation.
	WrapHandler(handler http.Handler) http.HandlerFunc
}

func NewMiddleware

func NewMiddleware(metrics *HttpMetrics) Middleware

NewMiddleware returns a Middleware interface.

type MirrorMetrics

type MirrorMetrics struct {
	ListProviderVersions     *prometheus.CounterVec
	ListProviderInstallation *prometheus.CounterVec
	RetrieveProviderArchive  *prometheus.CounterVec
}

type ModuleMetrics

type ModuleMetrics struct {
	ListVersions *prometheus.CounterVec
	Download     *prometheus.CounterVec
}

type ProviderMetrics

type ProviderMetrics struct {
	ListVersions *prometheus.CounterVec
	Download     *prometheus.CounterVec
}

type ServerMetrics

type ServerMetrics struct {
	Mirror   *MirrorMetrics
	Module   *ModuleMetrics
	Provider *ProviderMetrics
	Http     *HttpMetrics
}

func NewMetrics

func NewMetrics(buckets []float64) *ServerMetrics

Jump to

Keyboard shortcuts

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