File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
mithril-aggregator/src/metrics Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ impl MetricsService {
128
128
. iter ( )
129
129
. map ( |metric_family| {
130
130
(
131
- metric_family. get_name ( ) . to_string ( ) ,
131
+ metric_family. name ( ) . to_string ( ) ,
132
132
self . build_metric_map_per_label ( metric_family) ,
133
133
)
134
134
} )
@@ -138,7 +138,7 @@ impl MetricsService {
138
138
fn build_label_key ( & self , labels : & [ LabelPair ] ) -> String {
139
139
labels
140
140
. iter ( )
141
- . map ( |p| p. get_value ( ) )
141
+ . map ( |p| p. value ( ) )
142
142
. collect :: < Vec < _ > > ( )
143
143
. join ( "," )
144
144
}
@@ -150,7 +150,7 @@ impl MetricsService {
150
150
. map ( |m| {
151
151
(
152
152
self . build_label_key ( m. get_label ( ) ) ,
153
- m. get_counter ( ) . get_value ( ) as u32 ,
153
+ m. get_counter ( ) . as_ref ( ) . unwrap_or_default ( ) . value ( ) as u32 ,
154
154
)
155
155
} )
156
156
. collect ( )
@@ -218,7 +218,7 @@ mod tests {
218
218
219
219
for metric_family in metrics_service. registry . gather ( ) {
220
220
for metric in metric_family. get_metric ( ) {
221
- assert ! ( metric. has_counter ( ) ) ;
221
+ assert ! ( metric. get_counter ( ) . is_some ( ) ) ;
222
222
}
223
223
}
224
224
}
You can’t perform that action at this time.
0 commit comments