Skip to content

Commit 67271fa

Browse files
committed
Set tracer for VM
1 parent 78936ea commit 67271fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,15 @@ async fn execute_service(
119119
let tracer = vm::setup_tracer(&otel_endpoint, &service_name)
120120
.map_err(|e| RuntimeError::InitTraceError(e))?;
121121

122+
let mut vm = vm::VM::new(service_code.clone(), &service_name, print_tx)
123+
.with_remote_call_tx(coordinator.get_main_tx().clone())
124+
.with_remote_call_rx(remote_call_rx)
125+
.with_tracer(tracer.clone());
122126
coordinator.add_service(
123127
service_name.to_string(),
124128
remote_call_tx.clone(),
125129
Some(tracer),
126130
);
127-
let mut vm = vm::VM::new(service_code.clone(), &service_name, print_tx)
128-
.with_remote_call_tx(coordinator.get_main_tx().clone())
129-
.with_remote_call_rx(remote_call_rx);
130131
let mut handles = Vec::new();
131132
let app_name = service_name.to_string();
132133
let print_handle = tokio::spawn(async move {

0 commit comments

Comments
 (0)