Skip to content

Commit c16f43b

Browse files
committed
remove extraneous import, add recorders_len and targets_len
1 parent bff5365 commit c16f43b

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

metrics-tracing-context/src/label_filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Label filtering.
22
3-
use std::{collections::HashSet, fmt::Debug};
3+
use std::collections::HashSet;
44

55
use metrics::{KeyName, Label};
66

metrics-util/src/layers/fanout.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ pub struct Fanout {
105105

106106
impl fmt::Debug for Fanout {
107107
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
108-
f.debug_struct("Fanout").finish_non_exhaustive()
108+
f.debug_struct("Fanout")
109+
.field("recorders_len", &self.recorders.len())
110+
.finish_non_exhaustive()
109111
}
110112
}
111113

@@ -166,7 +168,9 @@ pub struct FanoutBuilder {
166168

167169
impl fmt::Debug for FanoutBuilder {
168170
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
169-
f.debug_struct("FanoutBuilder").finish_non_exhaustive()
171+
f.debug_struct("FanoutBuilder")
172+
.field("recorders_len", &self.recorders.len())
173+
.finish_non_exhaustive()
170174
}
171175
}
172176

metrics-util/src/layers/router.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ impl fmt::Debug for Router {
2121
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2222
f.debug_struct("Router")
2323
.field("global_mask", &self.global_mask)
24+
.field("targets_len", &self.targets.len())
2425
.field("counter_routes", &self.counter_routes)
2526
.field("gauge_routes", &self.gauge_routes)
2627
.field("histogram_routes", &self.histogram_routes)
@@ -103,6 +104,7 @@ impl fmt::Debug for RouterBuilder {
103104
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
104105
f.debug_struct("RouterBuilder")
105106
.field("global_mask", &self.global_mask)
107+
.field("targets_len", &self.targets.len())
106108
.field("counter_routes", &self.counter_routes)
107109
.field("gauge_routes", &self.gauge_routes)
108110
.field("histogram_routes", &self.histogram_routes)

0 commit comments

Comments
 (0)