mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-08 22:56:48 +03:00
Correctly trace async message handling
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
dc28305c9f
commit
a3640eb8d4
@ -47,7 +47,7 @@ use tokio::{
|
|||||||
time::Sleep,
|
time::Sleep,
|
||||||
};
|
};
|
||||||
use tower::ServiceBuilder;
|
use tower::ServiceBuilder;
|
||||||
use tracing::info_span;
|
use tracing::{info_span, Instrument};
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
||||||
type MessageHandler = Box<
|
type MessageHandler = Box<
|
||||||
@ -161,7 +161,7 @@ impl Server {
|
|||||||
"handle message",
|
"handle message",
|
||||||
payload_type = envelope.payload_type_name()
|
payload_type = envelope.payload_type_name()
|
||||||
);
|
);
|
||||||
span.in_scope(|| (handler)(server, *envelope).boxed())
|
(handler)(server, *envelope).instrument(span).boxed()
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
if prev_handler.is_some() {
|
if prev_handler.is_some() {
|
||||||
|
Loading…
Reference in New Issue
Block a user