@@ -38,10 +38,10 @@ type Metrics struct {
38
38
certificateRequestExpiryTimeSeconds * prometheus.GaugeVec
39
39
certificateRequestRenewalTimeSeconds * prometheus.GaugeVec
40
40
certificateRequestReadyStatus * prometheus.GaugeVec
41
- driverIssueCallCount * prometheus.CounterVec
42
- driverIssueErrorCount * prometheus.CounterVec
43
- managedVolumeCount * prometheus.CounterVec
44
- managedCertificateCount * prometheus.CounterVec
41
+ driverIssueCallCountTotal * prometheus.CounterVec
42
+ driverIssueErrorCountTotal * prometheus.CounterVec
43
+ managedVolumeCountTotal * prometheus.CounterVec
44
+ managedCertificateCountTotal * prometheus.CounterVec
45
45
}
46
46
47
47
// New creates a Metrics struct and populates it with prometheus metric types.
@@ -77,41 +77,41 @@ func New(logger *logr.Logger, registry *prometheus.Registry) *Metrics {
77
77
[]string {"name" , "namespace" , "condition" , "issuer_name" , "issuer_kind" , "issuer_group" },
78
78
)
79
79
80
- driverIssueCallCount = prometheus .NewCounterVec (
80
+ driverIssueCallCountTotal = prometheus .NewCounterVec (
81
81
prometheus.CounterOpts {
82
82
Namespace : namespace ,
83
83
Subsystem : subsystem ,
84
- Name : "driver_issue_call_count " ,
84
+ Name : "driver_issue_call_count_total " ,
85
85
Help : "The number of issue() calls made by the driver." ,
86
86
},
87
87
[]string {"node" , "volume" },
88
88
)
89
89
90
- driverIssueErrorCount = prometheus .NewCounterVec (
90
+ driverIssueErrorCountTotal = prometheus .NewCounterVec (
91
91
prometheus.CounterOpts {
92
92
Namespace : namespace ,
93
93
Subsystem : subsystem ,
94
- Name : "driver_issue_error_count " ,
94
+ Name : "driver_issue_error_count_total " ,
95
95
Help : "The number of errors encountered during the driver issue() calls." ,
96
96
},
97
97
[]string {"node" , "volume" },
98
98
)
99
99
100
- managedVolumeCount = prometheus .NewCounterVec (
100
+ managedVolumeCountTotal = prometheus .NewCounterVec (
101
101
prometheus.CounterOpts {
102
102
Namespace : namespace ,
103
103
Subsystem : subsystem ,
104
- Name : "managed_volume_count " ,
104
+ Name : "managed_volume_count_total " ,
105
105
Help : "The number of volume managed by the csi driver." ,
106
106
},
107
107
[]string {"node" },
108
108
)
109
109
110
- managedCertificateCount = prometheus .NewCounterVec (
110
+ managedCertificateCountTotal = prometheus .NewCounterVec (
111
111
prometheus.CounterOpts {
112
112
Namespace : namespace ,
113
113
Subsystem : subsystem ,
114
- Name : "managed_certificate_count " ,
114
+ Name : "managed_certificate_count_total " ,
115
115
Help : "The number of certificates managed by the csi driver." ,
116
116
},
117
117
[]string {"node" },
@@ -126,19 +126,19 @@ func New(logger *logr.Logger, registry *prometheus.Registry) *Metrics {
126
126
certificateRequestExpiryTimeSeconds : certificateRequestExpiryTimeSeconds ,
127
127
certificateRequestRenewalTimeSeconds : certificateRequestRenewalTimeSeconds ,
128
128
certificateRequestReadyStatus : certificateRequestReadyStatus ,
129
- driverIssueCallCount : driverIssueCallCount ,
130
- driverIssueErrorCount : driverIssueErrorCount ,
131
- managedVolumeCount : managedVolumeCount ,
132
- managedCertificateCount : managedCertificateCount ,
129
+ driverIssueCallCountTotal : driverIssueCallCountTotal ,
130
+ driverIssueErrorCountTotal : driverIssueErrorCountTotal ,
131
+ managedVolumeCountTotal : managedVolumeCountTotal ,
132
+ managedCertificateCountTotal : managedCertificateCountTotal ,
133
133
}
134
134
135
135
m .registry .MustRegister (m .certificateRequestExpiryTimeSeconds )
136
136
m .registry .MustRegister (m .certificateRequestRenewalTimeSeconds )
137
137
m .registry .MustRegister (m .certificateRequestReadyStatus )
138
- m .registry .MustRegister (m .driverIssueCallCount )
139
- m .registry .MustRegister (m .driverIssueErrorCount )
140
- m .registry .MustRegister (m .managedVolumeCount )
141
- m .registry .MustRegister (m .managedCertificateCount )
138
+ m .registry .MustRegister (m .driverIssueCallCountTotal )
139
+ m .registry .MustRegister (m .driverIssueErrorCountTotal )
140
+ m .registry .MustRegister (m .managedVolumeCountTotal )
141
+ m .registry .MustRegister (m .managedCertificateCountTotal )
142
142
143
143
return m
144
144
}
@@ -151,22 +151,22 @@ func (m *Metrics) DefaultHandler() http.Handler {
151
151
return mux
152
152
}
153
153
154
- // IncrementIssueCallCount will increase the issue call counter for the driver.
155
- func (m * Metrics ) IncrementIssueCallCount (nodeNameHash , volumeID string ) {
156
- m .driverIssueCallCount .WithLabelValues (nodeNameHash , volumeID ).Inc ()
154
+ // IncrementIssueCallCountTotal will increase the issue call counter for the driver.
155
+ func (m * Metrics ) IncrementIssueCallCountTotal (nodeNameHash , volumeID string ) {
156
+ m .driverIssueCallCountTotal .WithLabelValues (nodeNameHash , volumeID ).Inc ()
157
157
}
158
158
159
- // IncrementIssueErrorCount will increase count of errors during issue call of the driver.
160
- func (m * Metrics ) IncrementIssueErrorCount (nodeNameHash , volumeID string ) {
161
- m .driverIssueErrorCount .WithLabelValues (nodeNameHash , volumeID ).Inc ()
159
+ // IncrementIssueErrorCountTotal will increase count of errors during issue call of the driver.
160
+ func (m * Metrics ) IncrementIssueErrorCountTotal (nodeNameHash , volumeID string ) {
161
+ m .driverIssueErrorCountTotal .WithLabelValues (nodeNameHash , volumeID ).Inc ()
162
162
}
163
163
164
- // IncrementManagedVolumeCount will increase the managed volume counter for the driver.
165
- func (m * Metrics ) IncrementManagedVolumeCount (nodeNameHash string ) {
166
- m .managedVolumeCount .WithLabelValues (nodeNameHash ).Inc ()
164
+ // IncrementManagedVolumeCountTotal will increase the managed volume counter for the driver.
165
+ func (m * Metrics ) IncrementManagedVolumeCountTotal (nodeNameHash string ) {
166
+ m .managedVolumeCountTotal .WithLabelValues (nodeNameHash ).Inc ()
167
167
}
168
168
169
- // IncrementManagedCertificateCount will increase the managed certificate count for the driver.
170
- func (m * Metrics ) IncrementManagedCertificateCount (nodeNameHash string ) {
171
- m .managedCertificateCount .WithLabelValues (nodeNameHash ).Inc ()
169
+ // IncrementManagedCertificateCountTotal will increase the managed certificate count for the driver.
170
+ func (m * Metrics ) IncrementManagedCertificateCountTotal (nodeNameHash string ) {
171
+ m .managedCertificateCountTotal .WithLabelValues (nodeNameHash ).Inc ()
172
172
}
0 commit comments