Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AZAPIMetricRecorderFn ¶
AZAPIMetricRecorderFn returns a function that can be used to record a prometheus metric for Azure API calls. NOTE: a pointer to an error (which itself is a fat interface pointer) is necessary to enable the callers of this function to enclose this call into a `defer` statement.
func DriverAPIMetricRecorderFn ¶
DriverAPIMetricRecorderFn returns a function that can be used to record a prometheus metric for driver API calls. NOTE: a pointer to an error (which itself is a fat interface pointer) is necessary to enable the callers of this function to enclose this call into a `defer` statement.
func RecordAzAPIMetric ¶
RecordAzAPIMetric records a prometheus metric for Azure API calls. * If there is an error then it will increment the APIFailedRequestCount counter vec metric. * If the Azure API call is successful then it will record 2 metrics:
- It will increment APIRequestCount counter vec metric.
- It will compute the time taken for API call completion and record it.
NOTE: If this function is called via `defer` then please keep in mind that parameters passed to defer are evaluated at the time of definition. So if you have an error that is computed later in the function then ensure that you use named return parameters.
func RecordDriverAPIMetric ¶
RecordDriverAPIMetric records a prometheus metric capturing the total duration of a successful execution for any driver method (e.g. CreateMachine, DeleteMachine etc.). In case an error is returned then a failed counter metric is recorded.
Types ¶
This section is empty.