Documentation ¶
Index ¶
- Constants
- type DiscovererMetrics
- func (d *DiscovererMetrics) APILatencyMetric(path string, duration time.Duration)
- func (d *DiscovererMetrics) CycleDurationMetric(duration time.Duration)
- func (d *DiscovererMetrics) DiscovererInfoMetric(version string)
- func (d *DiscovererMetrics) DiscovererInvalidServicesMetric(namespace string, totalServices int)
- func (d *DiscovererMetrics) DiscovererReplicatedEndpointsMetric(namespace, serviceName string, totalEp int)
- func (d *DiscovererMetrics) DiscovererReplicatedServicesMetric(namespace string, totalServices int)
- func (d *DiscovererMetrics) DiscovererUpstreamEndpointsMetric(namespace, serviceName string, totalEp int)
- func (d *DiscovererMetrics) DiscovererUpstreamServicesMetric(namespace string, totalServices int)
- func (d *DiscovererMetrics) EndpointsEventTimestampMetric(namespace, name string, timestamp int64)
- func (d *DiscovererMetrics) EndpointsMetricError(namespace, endpointsName, errtype string)
- func (d *DiscovererMetrics) GenericMetricError(errtype string)
- func (d *DiscovererMetrics) QueueSizeGaugeMetric(size int)
- func (d *DiscovererMetrics) RegisterPrometheus(registerDefault bool)
- func (d *DiscovererMetrics) ServiceEventTimestampMetric(namespace, name string, timestamp int64)
- func (d *DiscovererMetrics) ServiceMetricError(namespace, serviceName, errtype string)
Constants ¶
const ( ServiceEventTimestampGauge = "gimbal_service_event_timestamp" EndpointsEventTimestampGauge = "gimbal_endpoints_event_timestamp" ServiceErrorTotalCounter = "gimbal_service_error_total" EndpointsErrorTotalCounter = "gimbal_endpoints_error_total" QueueSizeGauge = "gimbal_queuesize" DiscovererAPILatencyMsHistogram = "gimbal_discoverer_api_latency_milliseconds" DiscovererCycleDurationSecondsHistogram = "gimbal_discoverer_cycle_duration_seconds" DiscovererErrorTotal = "gimbal_discoverer_error_total" DiscovererUpstreamServicesGauge = "gimbal_discoverer_upstream_services_total" DiscovererReplicatedServicesGauge = "gimbal_discoverer_replicated_services_total" DiscovererInvalidServicesGauge = "gimbal_discoverer_invalid_services_total" DiscovererUpstreamEndpointsGauge = "gimbal_discoverer_upstream_endpoints_total" DiscovererReplicatedEndpointsGauge = "gimbal_discoverer_replicated_endpoints_total" DiscovererInvalidEndpointsGauge = "gimbal_discoverer_invalid_endpoints_total" DiscovererInfoGauge = "gimbal_discoverer_info" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscovererMetrics ¶
type DiscovererMetrics struct { Registry *prometheus.Registry Metrics map[string]prometheus.Collector BackendType string BackendName string }
DiscovererMetrics provide Prometheus metrics for the app
func NewMetrics ¶
func NewMetrics(BackendType, BackendName string) DiscovererMetrics
NewMetrics returns a map of Prometheus metrics
func (*DiscovererMetrics) APILatencyMetric ¶ added in v0.2.0
func (d *DiscovererMetrics) APILatencyMetric(path string, duration time.Duration)
APILatencyMetric formats a cycle duration gauge prometheus metric
func (*DiscovererMetrics) CycleDurationMetric ¶ added in v0.2.0
func (d *DiscovererMetrics) CycleDurationMetric(duration time.Duration)
CycleDurationMetric formats a cycle duration gauge prometheus metric
func (*DiscovererMetrics) DiscovererInfoMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererInfoMetric(version string)
DiscovererInfoMetric records version information
func (*DiscovererMetrics) DiscovererInvalidServicesMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererInvalidServicesMetric(namespace string, totalServices int)
DiscovererInvalidServicesMetric records the total number of invalid services
func (*DiscovererMetrics) DiscovererReplicatedEndpointsMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererReplicatedEndpointsMetric(namespace, serviceName string, totalEp int)
DiscovererReplicatedEndpointsMetric records the total replicated endpoints
func (*DiscovererMetrics) DiscovererReplicatedServicesMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererReplicatedServicesMetric(namespace string, totalServices int)
DiscovererReplicatedServicesMetric records the total number of replicated services
func (*DiscovererMetrics) DiscovererUpstreamEndpointsMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererUpstreamEndpointsMetric(namespace, serviceName string, totalEp int)
DiscovererUpstreamEndpointsMetric records the total upstream endpoints in the backend
func (*DiscovererMetrics) DiscovererUpstreamServicesMetric ¶ added in v0.3.0
func (d *DiscovererMetrics) DiscovererUpstreamServicesMetric(namespace string, totalServices int)
DiscovererUpstreamServicesMetric records the total number of upstream services
func (*DiscovererMetrics) EndpointsEventTimestampMetric ¶
func (d *DiscovererMetrics) EndpointsEventTimestampMetric(namespace, name string, timestamp int64)
EndpointsEventTimestampMetric formats a Endpoint event timestamp prometheus metric
func (*DiscovererMetrics) EndpointsMetricError ¶
func (d *DiscovererMetrics) EndpointsMetricError(namespace, endpointsName, errtype string)
EndpointsMetricError formats an endpoint prometheus metric and increments
func (*DiscovererMetrics) GenericMetricError ¶
func (d *DiscovererMetrics) GenericMetricError(errtype string)
GenericMetricError formats a generic prometheus metric and increments
func (*DiscovererMetrics) QueueSizeGaugeMetric ¶ added in v0.2.0
func (d *DiscovererMetrics) QueueSizeGaugeMetric(size int)
QueueSizeGaugeMetric records the queue size prometheus metric
func (*DiscovererMetrics) RegisterPrometheus ¶
func (d *DiscovererMetrics) RegisterPrometheus(registerDefault bool)
RegisterPrometheus registers the Metrics
func (*DiscovererMetrics) ServiceEventTimestampMetric ¶
func (d *DiscovererMetrics) ServiceEventTimestampMetric(namespace, name string, timestamp int64)
ServiceEventTimestampMetric formats a Service event timestamp prometheus metric
func (*DiscovererMetrics) ServiceMetricError ¶
func (d *DiscovererMetrics) ServiceMetricError(namespace, serviceName, errtype string)
ServiceMetricError formats a service prometheus metric and increments