exporter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MemberJoinCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "faythe",
			Subsystem: "cluster",
			Name:      "member_join_total",
			Help:      "A counter of the number of members that have joined.",
		})
	MemberLeaveCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Namespace: "faythe",
			Subsystem: "cluster",
			Name:      "member_leave_total",
			Help:      "A counter of the number of members that have left.",
		})
)

Set of raw Prometheus metrics. Do not increment directly, use Report* methods.

View Source
var (
	InFlightGauge = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "faythe",
			Subsystem: "api",
			Name:      "in_flight_requests",
			Help:      "A gauge of requests currently being served by the wrapper handler.",
		},
	)

	RequestsCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "faythe",
			Subsystem: "api",
			Name:      "requests_total",
			Help:      "A counter for requests to the wrapped handler.",
		},
		[]string{"handler", "code", "method"},
	)

	RequestDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "faythe",
			Subsystem: "api",
			Name:      "request_duration_seconds",
			Help:      "A histogram of latencies for requests.",
			Buckets:   []float64{.05, 0.1, .25, .5, .75, 1, 2, 5, 20, 60},
		},
		[]string{"handler", "code", "method"},
	)

	RequestSize = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "faythe",
			Subsystem: "api",
			Name:      "request_size_bytes",
			Help:      "A histogram of request sizes for requests.",
			Buckets:   prometheus.ExponentialBuckets(100, 10, 7),
		},
		[]string{"handler", "code", "method"},
	)

	ResponseSize = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "faythe",
			Subsystem: "api",
			Name:      "response_size_bytes",
			Help:      "A histogram of response sizes for requests.",
			Buckets:   prometheus.ExponentialBuckets(100, 10, 7),
		},
		[]string{"handler", "code", "method"},
	)
)

Functions

func RegisterMemberInfo

func RegisterMemberInfo(clusterID string, member model.Member)

func ReportATRequestFailureCounter added in v0.2.0

func ReportATRequestFailureCounter(clusterID, endpoint string)

func ReportClusterJoin

func ReportClusterJoin()

func ReportClusterLeave

func ReportClusterLeave()

func ReportFailureHealerActionCounter

func ReportFailureHealerActionCounter(clusterID, actionType string)

func ReportFailureScalerActionCounter

func ReportFailureScalerActionCounter(clusterID, actionType string)

func ReportMetricQueryFailureCounter

func ReportMetricQueryFailureCounter(clusterID, backendType, backendEndpoint string)

func ReportNumScalers

func ReportNumScalers(clusterID string, val float64)

func ReportNumberOfHealers

func ReportNumberOfHealers(clusterID string, val float64)

func ReportSuccessHealerActionCounter

func ReportSuccessHealerActionCounter(clusterID, actionType string)

func ReportSuccessScalerActionCounter

func ReportSuccessScalerActionCounter(clusterID, actionType string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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