add spans for for jemalloc mallctl points

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-03-30 01:56:00 +00:00
parent 5bf5afaec8
commit dc6e9e74d9

View file

@ -335,6 +335,12 @@ where
Ok(res) Ok(res)
} }
#[tracing::instrument(
name = "get",
level = "trace"
skip_all,
fields(?key)
)]
fn get<T>(key: &Key) -> Result<T> fn get<T>(key: &Key) -> Result<T>
where where
T: Copy + Debug, T: Copy + Debug,
@ -346,6 +352,12 @@ where
unsafe { mallctl::raw::read_mib(key.as_slice()) }.map_err(map_err) unsafe { mallctl::raw::read_mib(key.as_slice()) }.map_err(map_err)
} }
#[tracing::instrument(
name = "xchg",
level = "trace"
skip_all,
fields(?key, ?val)
)]
fn xchg<T>(key: &Key, val: T) -> Result<T> fn xchg<T>(key: &Key, val: T) -> Result<T>
where where
T: Copy + Debug, T: Copy + Debug,