mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00:00
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 <bin@hyper.sh>
This commit is contained in:
parent
cfb8139f36
commit
65d2fb5d11
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user