Skip to content

Commit

Permalink
Make child-spans work as expected when using the lambda-runtime (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
TethysSvensson authored Jun 19, 2024
1 parent 175acb6 commit 92cdd74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lambda-runtime/src/layers/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ where

fn call(&mut self, req: LambdaInvocation) -> Self::Future {
let span = request_span(&req.context);
self.inner.call(req).instrument(span)
let future = {
let _guard = span.enter();
self.inner.call(req)
};
future.instrument(span)
}
}

Expand Down

0 comments on commit 92cdd74

Please sign in to comment.