Skip to content

Commit 410896b

Browse files
committed
improvement
1 parent a4f5b52 commit 410896b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: auction-server/src/per_metrics.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ impl MetricsLayerData {
9292
}
9393

9494
pub fn is_metrics(metadata: &Metadata, check_tracing_enabled: bool) -> bool {
95-
let tracing_check = match check_tracing_enabled {
96-
true => metadata
95+
let tracing_check = !check_tracing_enabled
96+
|| metadata
9797
.fields()
9898
.iter()
99-
.any(|f| f.name() == "tracing_enabled"),
100-
false => true,
101-
};
99+
.any(|f| f.name() == "tracing_enabled");
102100
tracing_check && (metadata.target().starts_with("metrics"))
103101
}
104102

0 commit comments

Comments
 (0)