Skip to content

Commit

Permalink
remove inner filter
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Jun 13, 2023
1 parent 93fa1e4 commit 71910d6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/common/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,12 @@ impl<S> Layer<S> 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 <https://docs.rs/aws-smithy-client/0.55.3/src/aws_smithy_client/retry.rs.html>
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();
}
}

Expand Down

0 comments on commit 71910d6

Please sign in to comment.