Documentation ¶
Overview ¶
Package metrics provides Prometheus metrics for Contour.
Index ¶
- Constants
- func Handler(registry *prometheus.Registry) http.Handler
- type Meta
- type Metrics
- func (m *Metrics) SetDAGCacheObjectMetric(kind string, count int)
- func (m *Metrics) SetDAGLastRebuilt(ts time.Time)
- func (m *Metrics) SetDAGRebuiltTotal()
- func (m *Metrics) SetHTTPProxyMetric(metrics RouteMetric)
- func (m *Metrics) SetStatusUpdateConflict(kind string)
- func (m *Metrics) SetStatusUpdateDuration(duration time.Duration, kind string, onError bool)
- func (m *Metrics) SetStatusUpdateFailed(kind string)
- func (m *Metrics) SetStatusUpdateNoop(kind string)
- func (m *Metrics) SetStatusUpdateSuccess(kind string)
- func (m *Metrics) SetStatusUpdateTotal(kind string)
- func (m *Metrics) Zero()
- type RouteMetric
Constants ¶
const ( BuildInfoGauge = "contour_build_info" HTTPProxyTotalGauge = "contour_httpproxy" HTTPProxyRootTotalGauge = "contour_httpproxy_root" HTTPProxyInvalidGauge = "contour_httpproxy_invalid" HTTPProxyValidGauge = "contour_httpproxy_valid" HTTPProxyOrphanedGauge = "contour_httpproxy_orphaned" DAGCacheObjectGauge = "contour_dag_cache_object" DAGRebuildGauge = "contour_dagrebuild_timestamp" DAGRebuildTotal = "contour_dagrebuild_total" DAGRebuildSeconds = "contour_dagrebuild_seconds" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Meta ¶
type Meta struct {
VHost, Namespace string
}
Meta holds the vhost and namespace of a metric object
type Metrics ¶
type Metrics struct { DAGRebuildSeconds prometheus.Summary CacheHandlerOnUpdateSummary prometheus.Summary EventHandlerOperations *prometheus.CounterVec // 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 generate-metrics-docs` to regenerate the metrics documentation.
func (*Metrics) SetDAGCacheObjectMetric ¶ added in v1.25.0
SetDAGCacheObjectMetric records the total number of items that are currently in the DAG cache.
func (*Metrics) SetDAGLastRebuilt ¶ added in v1.0.0
SetDAGLastRebuilt records the last time the DAG was rebuilt.
func (*Metrics) SetDAGRebuiltTotal ¶ added in v1.13.0
func (m *Metrics) SetDAGRebuiltTotal()
SetDAGRebuiltTotal records the total number of times 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