Documentation ¶
Overview ¶
Package metrics is an implementation of Azure CloudProvider metrics.
Index ¶
- type MetricContext
- func (mc *MetricContext) CountFailedOperation()
- func (mc *MetricContext) Observe(rerr *retry.Error, labelAndValues ...interface{})
- func (mc *MetricContext) ObserveOperationWithResult(isOperationSucceeded bool, labelAndValues ...interface{})
- func (mc *MetricContext) RateLimitedCount()
- func (mc *MetricContext) ThrottledCount()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricContext ¶
type MetricContext struct { // log level in ObserveOperationWithResult LogLevel int32 // 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 ¶
func (mc *MetricContext) CountFailedOperation()
CountFailedOperation increase the number of failed operations
func (*MetricContext) Observe ¶
func (mc *MetricContext) Observe(rerr *retry.Error, labelAndValues ...interface{})
Observe observes the request latency and failed requests.
func (*MetricContext) ObserveOperationWithResult ¶
func (mc *MetricContext) ObserveOperationWithResult(isOperationSucceeded bool, labelAndValues ...interface{})
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.
Click to show internal directories.
Click to hide internal directories.