Skip to content

Commit

Permalink
remove extraneous import, add recorders_len and targets_len
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Sep 2, 2024
1 parent bff5365 commit c16f43b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metrics-tracing-context/src/label_filter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Label filtering.

use std::{collections::HashSet, fmt::Debug};
use std::collections::HashSet;

use metrics::{KeyName, Label};

Expand Down
8 changes: 6 additions & 2 deletions metrics-util/src/layers/fanout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ pub struct Fanout {

impl fmt::Debug for Fanout {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Fanout").finish_non_exhaustive()
f.debug_struct("Fanout")
.field("recorders_len", &self.recorders.len())
.finish_non_exhaustive()
}
}

Expand Down Expand Up @@ -166,7 +168,9 @@ pub struct FanoutBuilder {

impl fmt::Debug for FanoutBuilder {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("FanoutBuilder").finish_non_exhaustive()
f.debug_struct("FanoutBuilder")
.field("recorders_len", &self.recorders.len())
.finish_non_exhaustive()
}
}

Expand Down
2 changes: 2 additions & 0 deletions metrics-util/src/layers/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ impl fmt::Debug for Router {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Router")
.field("global_mask", &self.global_mask)
.field("targets_len", &self.targets.len())
.field("counter_routes", &self.counter_routes)
.field("gauge_routes", &self.gauge_routes)
.field("histogram_routes", &self.histogram_routes)
Expand Down Expand Up @@ -103,6 +104,7 @@ impl fmt::Debug for RouterBuilder {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RouterBuilder")
.field("global_mask", &self.global_mask)
.field("targets_len", &self.targets.len())
.field("counter_routes", &self.counter_routes)
.field("gauge_routes", &self.gauge_routes)
.field("histogram_routes", &self.histogram_routes)
Expand Down

0 comments on commit c16f43b

Please sign in to comment.