improve tracing instruments on database::map

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-25 06:26:34 +00:00
parent 6c66391988
commit 62d560e2fb
15 changed files with 15 additions and 38 deletions

View file

@ -11,7 +11,6 @@ use crate::{keyval, keyval::KeyVal, ser, stream};
/// - Query is serialized
/// - Result is deserialized
#[implement(super::Map)]
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
pub fn rev_stream_from<'a, K, V, P>(&'a self, from: &P) -> impl Stream<Item = Result<KeyVal<'_, K, V>>> + Send
where
P: Serialize + ?Sized + Debug,
@ -27,7 +26,7 @@ where
/// - Query is serialized
/// - Result is raw
#[implement(super::Map)]
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
#[tracing::instrument(skip(self), level = "trace")]
pub fn rev_stream_from_raw<P>(&self, from: &P) -> impl Stream<Item = Result<KeyVal<'_>>> + Send
where
P: Serialize + ?Sized + Debug,
@ -41,7 +40,6 @@ where
/// - Query is raw
/// - Result is deserialized
#[implement(super::Map)]
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
pub fn rev_stream_raw_from<'a, K, V, P>(&'a self, from: &P) -> impl Stream<Item = Result<KeyVal<'_, K, V>>> + Send
where
P: AsRef<[u8]> + ?Sized + Debug + Sync,
@ -57,7 +55,7 @@ where
/// - Query is raw
/// - Result is raw
#[implement(super::Map)]
#[tracing::instrument(skip(self), fields(%self), level = "trace")]
#[tracing::instrument(skip(self, from), fields(%self), level = "trace")]
pub fn rev_raw_stream_from<P>(&self, from: &P) -> impl Stream<Item = Result<KeyVal<'_>>> + Send
where
P: AsRef<[u8]> + ?Sized + Debug,