metrics

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

View Source
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

Source Files

Jump to

Keyboard shortcuts

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