Remove tracing of raw event data

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/15/head
trivernis 3 years ago
parent 023a3c131c
commit 1152c949e4
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -24,7 +24,7 @@ struct EventHeader {
impl Event {
/// Creates a new event with a namespace
#[tracing::instrument(level = "trace")]
#[tracing::instrument(level = "trace", skip(data))]
pub fn with_namespace(
namespace: String,
name: String,
@ -41,7 +41,7 @@ impl Event {
}
/// Creates a new event
#[tracing::instrument(level = "trace")]
#[tracing::instrument(level = "trace", skip(data))]
pub fn new(name: String, data: Vec<u8>, ref_id: Option<u64>) -> Self {
let header = EventHeader {
id: generate_event_id(),
@ -107,7 +107,7 @@ impl Event {
}
/// Encodes the event into bytes
#[tracing::instrument(level = "trace")]
#[tracing::instrument(level = "trace", skip(self))]
pub fn into_bytes(mut self) -> Result<Vec<u8>> {
let mut header_bytes = rmp_serde::to_vec(&self.header)?;
let header_length = header_bytes.len() as u16;

@ -54,7 +54,7 @@ impl EventHandler {
}
/// Handles a received event
#[tracing::instrument(level = "debug", skip(self, ctx))]
#[tracing::instrument(level = "debug", skip(self, ctx, event))]
pub async fn handle_event(&self, ctx: &Context, event: Event) -> Result<()> {
if let Some(cb) = self.callbacks.get(event.name()) {
cb.as_ref()(ctx, event).await?;

@ -23,7 +23,7 @@ impl StreamEmitter {
}
}
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "trace", skip(self, data))]
pub async fn _emit<T: EventSendPayload + Debug>(
&self,
namespace: Option<&str>,
@ -116,6 +116,7 @@ impl EmitMetadata {
}
/// Waits for a reply to the given message.
#[tracing::instrument(skip(self, ctx), fields(self.message_id))]
pub async fn await_reply(&self, ctx: &Context) -> Result<Event> {
let reply = ctx.await_reply(self.message_id).await?;
Ok(reply)

Loading…
Cancel
Save