From 65d2fb5d11037c4c52972a577b035c19dafbe528 Mon Sep 17 00:00:00 2001 From: bin Date: Fri, 11 Jun 2021 09:45:30 +0800 Subject: [PATCH] agent: remove instrument attribute for some simple functions For some simple functions that only process memory data(list/hashmap), they don't need to be instrumented. And sometime they may generate non-parent spans, if they are called from daemon-style "threads". Fixes: #1968 Signed-off-by: bin --- src/agent/src/sandbox.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/agent/src/sandbox.rs b/src/agent/src/sandbox.rs index 56afa02fcd..5d559b8532 100644 --- a/src/agent/src/sandbox.rs +++ b/src/agent/src/sandbox.rs @@ -181,7 +181,6 @@ impl Sandbox { Ok(true) } - #[instrument] pub fn add_container(&mut self, c: LinuxContainer) { self.containers.insert(c.id.clone(), c); } @@ -210,12 +209,10 @@ impl Sandbox { Ok(()) } - #[instrument] pub fn get_container(&mut self, id: &str) -> Option<&mut LinuxContainer> { self.containers.get_mut(id) } - #[instrument] pub fn find_process(&mut self, pid: pid_t) -> Option<&mut Process> { for (_, c) in self.containers.iter_mut() { if c.processes.get(&pid).is_some() {