diff --git a/src/common/src/metrics.rs b/src/common/src/metrics.rs index ede5e7f5fe0e..84947bdb14d3 100644 --- a/src/common/src/metrics.rs +++ b/src/common/src/metrics.rs @@ -57,15 +57,12 @@ impl Layer for CustomLayer where S: Subscriber + for<'a> LookupSpan<'a>, { - fn on_event(&self, event: &tracing::Event<'_>, _ctx: Context<'_, S>) { + fn on_event(&self, _event: &tracing::Event<'_>, _ctx: Context<'_, S>) { // Currently one retry will only generate one debug log, // so we can monitor the number of retry only through the metadata target. // Refer to - if event.metadata().target() == "aws_smithy_client::retry" - && event.metadata().level() == &tracing::Level::DEBUG - { - self.aws_sdk_retry_counts.inc(); - } + + self.aws_sdk_retry_counts.inc(); } }