pub struct SecureTelemetry { /* private fields */ }Expand description
Security-aware telemetry helper
Implementations§
Source§impl SecureTelemetry
impl SecureTelemetry
pub fn new(provider: Arc<dyn TelemetryProvider>) -> Self
Sourcepub fn record_security_event(
&self,
event_type: &str,
client_id: &str,
threat_level: &str,
)
pub fn record_security_event( &self, event_type: &str, client_id: &str, threat_level: &str, )
Record a security event with sanitized data
Sourcepub fn record_performance(&self, operation: &str, duration_ms: f64)
pub fn record_performance(&self, operation: &str, duration_ms: f64)
Record performance metrics
Sourcepub fn record_rate_limit(&self, client_id: &str, allowed: bool)
pub fn record_rate_limit(&self, client_id: &str, allowed: bool)
Record rate limit metrics
Sourcepub fn record_neutralization(
&self,
threat_type: &str,
action: &str,
duration_ms: f64,
success: bool,
)
pub fn record_neutralization( &self, threat_type: &str, action: &str, duration_ms: f64, success: bool, )
Record neutralization event
Sourcepub fn record_neutralization_batch(
&self,
total_threats: usize,
neutralized: usize,
duration_ms: f64,
)
pub fn record_neutralization_batch( &self, total_threats: usize, neutralized: usize, duration_ms: f64, )
Record neutralization batch metrics
Auto Trait Implementations§
impl !RefUnwindSafe for SecureTelemetry
impl !UnwindSafe for SecureTelemetry
impl Freeze for SecureTelemetry
impl Send for SecureTelemetry
impl Sync for SecureTelemetry
impl Unpin for SecureTelemetry
impl UnsafeUnpin for SecureTelemetry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more