metrics

package
v0.0.0-...-1f21e5e Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProxyTotalResponses = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Subsystem: "k8s_proxy",
			Name:      "total_requests",
			Help:      "Total count API requests",
		},
		[]string{resourceLabel, methodLabel, codeLabel},
	)
	K8sClientResponseTime = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: "k8s_proxy",
			Name:      "client_request_time",
			Help:      "Request times in ms for k8s client from proxy store",
		},
		[]string{resourceLabel, methodLabel, codeLabel})
	ProxyStoreResponseTime = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: "k8s_proxy",
			Name:      "store_request_time",
			Help:      "Request times in ms for k8s proxy store",
		},
		[]string{resourceLabel, methodLabel, codeLabel})
)

Functions

This section is empty.

Types

type MetricLogger

type MetricLogger struct {
	Resource string
	Method   string
}

func (MetricLogger) IncTotalResponses

func (m MetricLogger) IncTotalResponses(err error)

func (MetricLogger) RecordK8sClientResponseTime

func (m MetricLogger) RecordK8sClientResponseTime(err error, val float64)

func (MetricLogger) RecordProxyStoreResponseTime

func (m MetricLogger) RecordProxyStoreResponseTime(err error, val float64)

Jump to

Keyboard shortcuts

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