metrics

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package metrics provides Prometheus metrics for Contour.

Index

Constants

View Source
const (
	IngressRouteTotalGauge      = "contour_ingressroute_total"
	IngressRouteRootTotalGauge  = "contour_ingressroute_root_total"
	IngressRouteInvalidGauge    = "contour_ingressroute_invalid_total"
	IngressRouteValidGauge      = "contour_ingressroute_valid_total"
	IngressRouteOrphanedGauge   = "contour_ingressroute_orphaned_total"
	IngressRouteDAGRebuildGauge = "contour_ingressroute_dagrebuild_timestamp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IngressRouteMetric

type IngressRouteMetric struct {
	Total    map[Meta]int
	Valid    map[Meta]int
	Invalid  map[Meta]int
	Orphaned map[Meta]int
	Root     map[Meta]int
}

IngressRouteMetric stores various metrics for IngressRoute objects

type Meta

type Meta struct {
	VHost, Namespace string
}

Meta holds the vhost and namespace of a metric object

type Metrics

type Metrics struct {
	CacheHandlerOnUpdateSummary prometheus.Summary
	ResourceEventHandlerSummary *prometheus.SummaryVec
	// contains filtered or unexported fields
}

Metrics provide Prometheus metrics for the app

func NewMetrics

func NewMetrics(registry *prometheus.Registry) *Metrics

NewMetrics creates a new set of metrics and registers them with the supplied registry.

func (*Metrics) SetDAGLastRebuilt added in v0.14.0

func (m *Metrics) SetDAGLastRebuilt(ts time.Time)

SetDAGLastRebuilt records the last time the DAG was rebuilt.

func (*Metrics) SetIngressRouteMetric

func (m *Metrics) SetIngressRouteMetric(metrics IngressRouteMetric)

SetIngressRouteMetric sets metric values for a set of IngressRoutes

type Service

type Service struct {
	httpsvc.Service
	*prometheus.Registry
	Client *kubernetes.Clientset
}

Service serves various metric and health checking endpoints

func (*Service) Start

func (svc *Service) Start(stop <-chan struct{}) error

Start fulfills the g.Start contract. When stop is closed the http server will shutdown.

Jump to

Keyboard shortcuts

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