metrics

package
v1.33.9 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoadBalancerRequestCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace:   cloudProviderMetricPrefix,
		Subsystem:   loadBalancerSubSystem,
		Name:        "requests_total",
		Help:        "the number of requests to the load balancer API",
		ConstLabels: nil,
	}, []string{operationLabel})

	LoadBalancerErrorCount = prometheus.NewCounter(prometheus.CounterOpts{
		Namespace:   cloudProviderMetricPrefix,
		Subsystem:   loadBalancerSubSystem,
		Name:        "errors_total",
		Help:        "the number of server errors reported when calling the load balancer API",
		ConstLabels: nil,
	})

	LoadBalancerResponseTimeHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace:   cloudProviderMetricPrefix,
		Subsystem:   loadBalancerSubSystem,
		Name:        "request_duration_seconds",
		Help:        "the response times of the load balancer API",
		ConstLabels: nil,
		Buckets:     nil,
	}, []string{operationLabel})
)

Functions

func NewInstrumentedHTTPClient

func NewInstrumentedHTTPClient() *http.Client

func Run

func Run(ctx context.Context, metricsAddr string) error

Types

type Exporter

type Exporter struct {
}

func NewExporter

func NewExporter() *Exporter

func (*Exporter) Collect

func (e *Exporter) Collect(metrics chan<- prometheus.Metric)

func (*Exporter) Describe

func (e *Exporter) Describe(descs chan<- *prometheus.Desc)

type InstrumentedRoundTripper

type InstrumentedRoundTripper struct {
	// contains filtered or unexported fields
}

func (*InstrumentedRoundTripper) RoundTrip

func (rt *InstrumentedRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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