@@ -24,14 +24,14 @@ import (
24
24
)
25
25
26
26
// AcsCustomMetrics encapsulates all CloudStack custom metrics defined for the controller.
27
- type AcsCustomMetrics struct {
27
+ type ACSCustomMetrics struct {
28
28
acsReconciliationErrorCount * prometheus.CounterVec
29
29
errorCodeRegexp * regexp.Regexp
30
30
}
31
31
32
- // NewCustomMetrics constructs an AcsCustomMetrics with all desired CloudStack custom metrics and any supporting resources.
33
- func NewCustomMetrics () AcsCustomMetrics {
34
- customMetrics := AcsCustomMetrics {}
32
+ // NewCustomMetrics constructs an ACSCustomMetrics with all desired CloudStack custom metrics and any supporting resources.
33
+ func NewCustomMetrics () ACSCustomMetrics {
34
+ customMetrics := ACSCustomMetrics {}
35
35
customMetrics .acsReconciliationErrorCount = prometheus .NewCounterVec (
36
36
prometheus.CounterOpts {
37
37
Name : "acs_reconciliation_errors" ,
@@ -55,9 +55,9 @@ func NewCustomMetrics() AcsCustomMetrics {
55
55
return customMetrics
56
56
}
57
57
58
- // IncrementAcsReconciliationErrors accepts a CloudStack error message and increments the custom
59
- // acs_reconciliation_errors counter, labeled with the error code if present in the error message.
60
- func (m * AcsCustomMetrics ) EvaluateErrorAndIncrementAcsReconciliationErrorCounter (acsError error ) {
58
+ // EvaluateErrorAndIncrementAcsReconciliationErrorCounter accepts a CloudStack error message and increments
59
+ // the custom acs_reconciliation_errors counter, labeled with the error code if present in the error message.
60
+ func (m * ACSCustomMetrics ) EvaluateErrorAndIncrementAcsReconciliationErrorCounter (acsError error ) {
61
61
if acsError != nil {
62
62
matches := m .errorCodeRegexp .FindStringSubmatch (acsError .Error ())
63
63
if len (matches ) > 1 {
0 commit comments