Documentation ¶
Index ¶
- Constants
- type Collector
- func (c *Collector) Collect(ch chan<- prometheus.Metric)
- func (c *Collector) Describe(ch chan<- *prometheus.Desc)
- func (c *Collector) MetricsMiddleware() mux.MiddlewareFunc
- func (c *Collector) RecordBackendLatency(duration time.Duration, statusCode int, destSvc string)
- func (c *Collector) RecordEventType(eventType, eventSource string, statusCode int)
- func (c *Collector) SetHealthStatus(healthy bool)
- type PublishingMetricsCollector
- type Server
Constants ¶
const ( // HealthKey name of the health metric. HealthKey = "eventing_epp_health" // BackendLatencyKey name of the backendLatency metric. BackendLatencyKey = "eventing_epp_backend_duration_milliseconds" // RequestsKey name of the Requests metric. RequestsKey = "eventing_epp_requests_total" // EventTypePublishedMetricKey name of the eventTypeLabel metric. EventTypePublishedMetricKey = "eventing_epp_event_type_published_total" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector implements the prometheus.Collector interface.
func NewCollector ¶
func NewCollector(latency histogram.BucketsProvider) *Collector
NewCollector creates a new instance of Collector.
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface Collect method.
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface Describe method.
func (*Collector) MetricsMiddleware ¶
func (c *Collector) MetricsMiddleware() mux.MiddlewareFunc
MetricsMiddleware returns a http.Handler that can be used as middleware in gorilla.mux to track latencies for all handled paths in the gorilla router.
func (*Collector) RecordBackendLatency ¶
RecordLatency records a backendLatencyHelp metric.
func (*Collector) RecordEventType ¶
RecordEventType records an eventType metric.
func (*Collector) SetHealthStatus ¶
SetHealthStatus updates the health metric.
type PublishingMetricsCollector ¶
type PublishingMetricsCollector interface { prometheus.Collector RecordBackendLatency(duration time.Duration, statusCode int, destSvc string) RecordEventType(eventType, eventSource string, statusCode int) MetricsMiddleware() mux.MiddlewareFunc }
PublishingMetricsCollector interface provides a Prometheus compatible Collector with additional convenience methods for recording epp specific metrics.
Directories ¶
Path | Synopsis |
---|---|
Package metricstest provides utilities for metrics testing.
|
Package metricstest provides utilities for metrics testing. |