Skip to content

Commit 92cdd74

Browse files
Make child-spans work as expected when using the lambda-runtime (#896)
1 parent 175acb6 commit 92cdd74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lambda-runtime/src/layers/trace.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ where
4343

4444
fn call(&mut self, req: LambdaInvocation) -> Self::Future {
4545
let span = request_span(&req.context);
46-
self.inner.call(req).instrument(span)
46+
let future = {
47+
let _guard = span.enter();
48+
self.inner.call(req)
49+
};
50+
future.instrument(span)
4751
}
4852
}
4953

0 commit comments

Comments
 (0)