Documentation ¶
Overview ¶
Package metrics provides Prometheus metrics for Contour.
Index ¶
Constants ¶
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" HTTPProxyTotalGauge = "contour_httpproxy_total" HTTPProxyRootTotalGauge = "contour_httpproxy_root_total" HTTPProxyInvalidGauge = "contour_httpproxy_invalid_total" HTTPProxyValidGauge = "contour_httpproxy_valid_total" HTTPProxyOrphanedGauge = "contour_httpproxy_orphaned_total" DAGRebuildGauge = "contour_dagrebuild_timestamp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.
NOTE: when adding new metrics, update Zero() and run `./hack/generate-metrics-doc.go` using `make metrics-docs` to regenerate the metrics documentation.
func (*Metrics) SetDAGLastRebuilt ¶ added in v1.0.0
SetDAGLastRebuilt records the last time the DAG was rebuilt.
func (*Metrics) SetHTTPProxyMetric ¶ added in v1.0.0
func (m *Metrics) SetHTTPProxyMetric(metrics RouteMetric)
SetHTTPProxyMetric sets metric values for a set of HTTPProxies
func (*Metrics) SetIngressRouteMetric ¶
func (m *Metrics) SetIngressRouteMetric(metrics RouteMetric)
SetIngressRouteMetric sets metric values for a set of IngressRoutes
type RouteMetric ¶ added in v1.0.0
type RouteMetric struct { Total map[Meta]int Valid map[Meta]int Invalid map[Meta]int Orphaned map[Meta]int Root map[Meta]int }
RouteMetric stores various metrics for IngressRoute objects
type Service ¶
type Service struct { httpsvc.Service *prometheus.Registry Client *kubernetes.Clientset }
Service serves various metric and health checking endpoints