diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 7447059..d34753d 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -28,6 +28,7 @@ tokio-uring = { version = "0.4", optional = true } toml = "0.6" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } +probe = "0.3" [build-dependencies] libbpf-cargo = { version = "0.20", features = ["novendor"] } diff --git a/agent/src/log_writer.rs b/agent/src/log_writer.rs index 3fe21d1..e382331 100644 --- a/agent/src/log_writer.rs +++ b/agent/src/log_writer.rs @@ -4,6 +4,7 @@ use crate::config; use anyhow::{bail, Context as _, Result}; use crypto_auditing::types::EventGroup; +use probe::probe; use serde_cbor::{ser::IoWrite, Serializer}; use std::path::PathBuf; use time::{macros::format_description, OffsetDateTime}; @@ -179,6 +180,11 @@ impl LogWriter { config::Format::Minimal => to_vec_minimal(&group)?, }; self.write_all(v).await?; + probe!( + crypto_auditing_internal_agent, + event_group, + group.events().len() + ); self.written_events += group.events().len(); } self.groups.clear();