mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-17 22:34:25 +01:00
tracing: Add tracing to runtime-rs
Introduce tracing into runtime-rs, only some functions are instrumented. Fixes: #5239 Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com> Signed-off-by: Yushuo <y-shuo@linux.alibaba.com>
This commit is contained in:
@@ -11,6 +11,7 @@ async-trait = "0.1.48"
|
||||
slog = "2.5.2"
|
||||
slog-scope = "4.4.0"
|
||||
tokio = { version = "1.28.1", features = ["rt-multi-thread"] }
|
||||
tracing = "0.1.36"
|
||||
ttrpc = { version = "0.7.1" }
|
||||
|
||||
common = { path = "../runtimes/common" }
|
||||
|
||||
@@ -39,6 +39,19 @@ pub struct ServiceManager {
|
||||
namespace: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for ServiceManager {
|
||||
// todo: some how to implement debug for handler
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("ServiceManager")
|
||||
.field("receiver", &self.receiver)
|
||||
.field("task_server.is_some()", &self.task_server.is_some())
|
||||
.field("binary", &self.binary)
|
||||
.field("address", &self.address)
|
||||
.field("namespace", &self.namespace)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
async fn send_event(
|
||||
containerd_binary: String,
|
||||
address: String,
|
||||
|
||||
Reference in New Issue
Block a user