pub struct TracingHandler;Expand description
Handler that emits security events using the tracing crate.
This integrates security audit logging with the broader Rust ecosystem’s tracing infrastructure, allowing security events to be processed by any tracing subscriber (console, file, OpenTelemetry, etc.).
§Example
ⓘ
use actix_security::http::security::audit::{AuditLogger, TracingHandler};
use tracing_subscriber;
// Initialize tracing subscriber
tracing_subscriber::fmt::init();
// Create audit logger with tracing handler
let logger = AuditLogger::new().add_handler(TracingHandler::new());Implementations§
Source§impl TracingHandler
impl TracingHandler
Sourcepub fn new() -> TracingHandler
pub fn new() -> TracingHandler
Create a new tracing handler.
Events are emitted to the actix_security::audit target.
Trait Implementations§
Source§impl Clone for TracingHandler
impl Clone for TracingHandler
Source§fn clone(&self) -> TracingHandler
fn clone(&self) -> TracingHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TracingHandler
impl Default for TracingHandler
Source§fn default() -> TracingHandler
fn default() -> TracingHandler
Returns the “default value” for a type. Read more
Source§impl SecurityEventHandler for TracingHandler
impl SecurityEventHandler for TracingHandler
Source§fn handle(&self, event: &SecurityEvent)
fn handle(&self, event: &SecurityEvent)
Handle a security event.
impl Copy for TracingHandler
Auto Trait Implementations§
impl Freeze for TracingHandler
impl RefUnwindSafe for TracingHandler
impl Send for TracingHandler
impl Sync for TracingHandler
impl Unpin for TracingHandler
impl UnwindSafe for TracingHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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