MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / execute_plan

Method execute_plan

nodedb/src/control/exec_receiver.rs:42–62  ·  view source on GitHub ↗
(&self, req: ExecuteRequest)

Source from the content-addressed store, hash-verified

40
41impl PlanExecutor for LocalPlanExecutor {
42 async fn execute_plan(&self, req: ExecuteRequest) -> ExecuteResponse {
43 let trace_id = nodedb_types::TraceId(req.trace_id);
44 let tenant_id = req.tenant_id;
45 let exporter = Arc::clone(&self.state.trace_exporter);
46 let start = SystemTime::now();
47 let span = info_span!("executor.execute_plan", trace_id = %trace_id, tenant_id);
48 let resp = self.execute_plan_inner(req).instrument(span).await;
49 // Emit one OTLP executor span per leaseholder so the gateway's
50 // upstream span joins the N leaseholder spans into a single
51 // distributed trace via the shared `trace_id`.
52 exporter.emit(
53 "executor.execute_plan",
54 trace_id,
55 start,
56 SystemTime::now(),
57 tenant_id,
58 0,
59 resp.success,
60 );
61 resp
62 }
63}
64
65impl LocalPlanExecutor {

Callers

nothing calls this directly

Calls 4

TraceIdClass · 0.85
nowFunction · 0.85
execute_plan_innerMethod · 0.80
emitMethod · 0.45

Tested by

no test coverage detected