mirror of
https://github.com/actix/actix-extras.git
synced 2025-02-23 19:03:03 +01:00
Allow root_span to wrap the full middlware chain, not just the output future (#37)
This commit is contained in:
parent
42ede27123
commit
f6ccc73151
@ -133,7 +133,7 @@ where
|
|||||||
let root_span_wrapper = RootSpan::new(root_span.clone());
|
let root_span_wrapper = RootSpan::new(root_span.clone());
|
||||||
req.extensions_mut().insert(root_span_wrapper);
|
req.extensions_mut().insert(root_span_wrapper);
|
||||||
|
|
||||||
let fut = self.service.call(req);
|
let fut = root_span.in_scope(|| self.service.call(req));
|
||||||
Box::pin(
|
Box::pin(
|
||||||
async move {
|
async move {
|
||||||
let outcome = fut.await;
|
let outcome = fut.await;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user