Documentation ¶
Index ¶
- func GetTypeFromResourceID(resourceID string) string
- func RegisterMetrics(metrics ...Metrics)
- type ARMClientMetrics
- func (a ARMClientMetrics) RecordAzureFailedRequestsTotal(resourceName string, method HTTPMethod)
- func (a ARMClientMetrics) RecordAzureRequestsTime(resourceName string, requestTime time.Duration, method HTTPMethod)
- func (a ARMClientMetrics) RecordAzureSuccessRequestsTotal(resourceName string, statusCode int, method HTTPMethod)
- func (a ARMClientMetrics) RegisterMetrics()
- type HTTPMethod
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTypeFromResourceID ¶
GetTypeFromResourceID is a helper method for metrics to extract resourceType from resourceID
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 HTTPMethod)
RecordAzureFailedRequestsTotal records the number of failed requests to ARM.
func (ARMClientMetrics) RecordAzureRequestsTime ¶
func (a ARMClientMetrics) RecordAzureRequestsTime(resourceName string, requestTime time.Duration, method HTTPMethod)
RecordAzureRequestsTime records the round-trip time taken by the request to ARM.
func (ARMClientMetrics) RecordAzureSuccessRequestsTotal ¶
func (a ARMClientMetrics) RecordAzureSuccessRequestsTotal(resourceName string, statusCode int, method HTTPMethod)
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 HTTPMethod ¶
type HTTPMethod string
const ( HttpPut HTTPMethod = http.MethodPut HttpDelete HTTPMethod = http.MethodDelete HttpGet HTTPMethod = http.MethodGet )
Click to show internal directories.
Click to hide internal directories.