Skip to content

Commit 9c067cd

Browse files
committed
Add tracing spans to the coordinator's stdio tasks
1 parent 69ed15e commit 9c067cd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use tokio::{
2626
};
2727
use tokio_stream::wrappers::ReceiverStream;
2828
use tokio_util::{io::SyncIoBridge, sync::CancellationToken};
29-
use tracing::{instrument, trace, trace_span, warn, Instrument};
29+
use tracing::{info_span, instrument, trace, trace_span, warn, Instrument};
3030

3131
use crate::{
3232
bincode_input_closed,
@@ -2610,6 +2610,9 @@ fn spawn_io_queue(stdin: ChildStdin, stdout: ChildStdout, token: CancellationTok
26102610

26112611
let (tx, from_worker_rx) = mpsc::channel(8);
26122612
tasks.spawn_blocking(move || {
2613+
let span = info_span!("child_io_queue::input");
2614+
let _span = span.enter();
2615+
26132616
let stdout = SyncIoBridge::new(stdout);
26142617
let mut stdout = BufReader::new(stdout);
26152618

@@ -2632,6 +2635,9 @@ fn spawn_io_queue(stdin: ChildStdin, stdout: ChildStdout, token: CancellationTok
26322635

26332636
let (to_worker_tx, mut rx) = mpsc::channel(8);
26342637
tasks.spawn_blocking(move || {
2638+
let span = info_span!("child_io_queue::output");
2639+
let _span = span.enter();
2640+
26352641
let stdin = SyncIoBridge::new(stdin);
26362642
let mut stdin = BufWriter::new(stdin);
26372643

0 commit comments

Comments
 (0)