metric

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "bcs_api",
		Name:      "request_count_total",
		Help:      "Counter of requests to bcs-api.",
	}, []string{"type", "method"})

	RequestErrorCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "bcs_api",
		Name:      "request_err_count_total",
		Help:      "Counter of error requests to bcs-api.",
	}, []string{"type", "method"})

	RequestLatency = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "bcs_api",
		Name:      "request_latency_seconds",
		Buckets:   timeBuckets,
		Help:      "Histogram of the time (in seconds) each request took.",
	}, []string{"type", "method"})

	RequestErrorLatency = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "bcs_api",
		Name:      "request_error_latency_seconds",
		Buckets:   timeBuckets,
		Help:      "Histogram of the time (in seconds) each error request took.",
	}, []string{"type", "method"})
)

Metrics the bcs-api exports.

Functions

func RunMetric

func RunMetric(conf *config.ApiServConfig, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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