Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: client_request span triggers
Browse files Browse the repository at this point in the history
Theodus committed Dec 4, 2024
1 parent 740dc22 commit c1c7d1c
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 3 additions & 8 deletions src/middleware/request_tracing.rs
Original file line number Diff line number Diff line change
@@ -35,16 +35,11 @@ where
}

fn call(&mut self, req: Request<ReqBody>) -> Self::Future {
// Create a tracing span for the client request and enter it. This way events created by the different layers
// in the middleware stack are associated with it.
let client_request_span = tracing::info_span!(
"client_request", // name
self.inner.call(req).instrument(tracing::info_span!(
"client_request",
request_id = field::Empty,
selector = field::Empty,
)
.entered();

self.inner.call(req).instrument(client_request_span.clone())
))
}
}

2 changes: 0 additions & 2 deletions src/network/errors.rs
Original file line number Diff line number Diff line change
@@ -71,8 +71,6 @@ impl From<IndexingError> for ResolutionError {
UnavailableReason::IndexerResolutionError(reason)
}
IndexerInfoResolutionError::IndexerServiceVersionResolutionFailed(err) => {
tracing::debug!(error=?err, "indexer service version resolution failed");

let reason = match err {
VersionResolutionError::FetchError(_) => {
"indexer service version resolution failed"

0 comments on commit c1c7d1c

Please sign in to comment.