mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-07 00:06:24 +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,
|
||||
};
|
||||
use tower::ServiceBuilder;
|
||||
use tracing::info_span;
|
||||
use tracing::{info_span, Instrument};
|
||||
use util::ResultExt;
|
||||
|
||||
type MessageHandler = Box<
|
||||
@ -161,7 +161,7 @@ impl Server {
|
||||
"handle message",
|
||||
payload_type = envelope.payload_type_name()
|
||||
);
|
||||
span.in_scope(|| (handler)(server, *envelope).boxed())
|
||||
(handler)(server, *envelope).instrument(span).boxed()
|
||||
}),
|
||||
);
|
||||
if prev_handler.is_some() {
|
||||
|
Loading…
Reference in New Issue
Block a user