metrics

package
v0.29.10 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metrics is an implementation of Azure CloudProvider metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricContext

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

MetricContext indicates the context for Azure client metrics.

func NewMetricContext

func NewMetricContext(prefix, request, resourceGroup, subscriptionID, source string) *MetricContext

NewMetricContext creates a new MetricContext.

func (*MetricContext) CountFailedOperation added in v0.20.0

func (mc *MetricContext) CountFailedOperation()

CountFailedOperation increase the number of failed operations

func (*MetricContext) Observe

func (mc *MetricContext) Observe(err error) error

Observe observes the request latency and failed requests.

func (*MetricContext) ObserveOperationWithResult added in v0.20.0

func (mc *MetricContext) ObserveOperationWithResult(isOperationSucceeded bool)

ObserveOperationWithResult observes the request latency and failed requests of an operation.

func (*MetricContext) RateLimitedCount

func (mc *MetricContext) RateLimitedCount()

RateLimitedCount records the metrics for rate limited request count.

func (*MetricContext) ThrottledCount

func (mc *MetricContext) ThrottledCount()

ThrottledCount records the metrics for throttled request count.

Jump to

Keyboard shortcuts

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