Documentation ¶
Index ¶
- func NewMetricsPolicy(metrics *ARMClientMetrics) policy.Policy
- func RegisterMetrics(metrics ...Metrics)
- type ARMClientMetrics
- func (a *ARMClientMetrics) RecordAzureFailedRequestsTotal(resourceName string, method string)
- func (a ARMClientMetrics) RecordAzureRequestsTime(resourceName string, requestTime time.Duration, method string)
- func (a *ARMClientMetrics) RecordAzureSuccessRequestsTotal(resourceName string, statusCode int, method string)
- func (a *ARMClientMetrics) RegisterMetrics()
- type Metrics
- type MetricsPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetricsPolicy ¶
func NewMetricsPolicy(metrics *ARMClientMetrics) policy.Policy
func RegisterMetrics ¶
func RegisterMetrics(metrics ...Metrics)
Types ¶
type ARMClientMetrics ¶
type ARMClientMetrics struct {
// contains filtered or unexported fields
}
func NewARMClientMetrics ¶
func NewARMClientMetrics() *ARMClientMetrics
func (*ARMClientMetrics) RecordAzureFailedRequestsTotal ¶
func (a *ARMClientMetrics) RecordAzureFailedRequestsTotal(resourceName string, method string)
RecordAzureFailedRequestsTotal records the number of failed requests to ARM.
func (ARMClientMetrics) RecordAzureRequestsTime ¶
func (a ARMClientMetrics) RecordAzureRequestsTime(resourceName string, requestTime time.Duration, method string)
RecordAzureRequestsTime records the round-trip time taken by the request to ARM.
func (*ARMClientMetrics) RecordAzureSuccessRequestsTotal ¶
func (a *ARMClientMetrics) RecordAzureSuccessRequestsTotal(resourceName string, statusCode int, method string)
RecordAzureSuccessRequestsTotal records the total successful number requests to ARM by increasing the counter.
func (*ARMClientMetrics) RegisterMetrics ¶
func (a *ARMClientMetrics) RegisterMetrics()
RegisterMetrics registers the collectors with prometheus server.
type MetricsPolicy ¶
type MetricsPolicy struct {
// contains filtered or unexported fields
}
MetricsPolicy is an Azure SDK Track 2 policy for logging metrics about HTTP status
Click to show internal directories.
Click to hide internal directories.