mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 07:14:22 +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:
@@ -29,12 +29,15 @@ slog-stdlog = "4.1.0"
|
||||
thiserror = "1.0.30"
|
||||
tokio = { version = "1.28.1", features = [ "rt", "rt-multi-thread" ] }
|
||||
unix_socket2 = "0.5.4"
|
||||
tracing = "0.1.36"
|
||||
tracing-opentelemetry = "0.18.0"
|
||||
|
||||
kata-types = { path = "../../../libs/kata-types"}
|
||||
kata-sys-util = { path = "../../../libs/kata-sys-util"}
|
||||
logging = { path = "../../../libs/logging"}
|
||||
oci = { path = "../../../libs/oci" }
|
||||
service = { path = "../service" }
|
||||
runtimes = { path = "../runtimes" }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.2.0"
|
||||
|
||||
@@ -142,7 +142,7 @@ fn real_main() -> Result<()> {
|
||||
Action::Delete(args) => {
|
||||
let mut shim = ShimExecutor::new(args);
|
||||
let rt = get_tokio_runtime().context("get tokio runtime")?;
|
||||
rt.block_on(shim.delete())?
|
||||
rt.block_on(shim.delete())?;
|
||||
}
|
||||
Action::Run(args) => {
|
||||
// set mnt namespace
|
||||
@@ -151,7 +151,7 @@ fn real_main() -> Result<()> {
|
||||
|
||||
let mut shim = ShimExecutor::new(args);
|
||||
let rt = get_tokio_runtime().context("get tokio runtime")?;
|
||||
rt.block_on(shim.run())?
|
||||
rt.block_on(shim.run())?;
|
||||
}
|
||||
Action::Help => show_help(&args[0]),
|
||||
Action::Version => show_version(None),
|
||||
|
||||
@@ -20,6 +20,7 @@ const SHIM_PID_FILE: &str = "shim.pid";
|
||||
pub(crate) const ENV_KATA_RUNTIME_BIND_FD: &str = "KATA_RUNTIME_BIND_FD";
|
||||
|
||||
/// Command executor for shim.
|
||||
#[derive(Debug)]
|
||||
pub struct ShimExecutor {
|
||||
pub(crate) args: Args,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user