Expand description
HTTP transactions.
This is a session-level subscription that delivers parsed HTTP transaction records and associated connection metadata.
§Example
Counts the number of HTTP GET requests with a user agent containing Safari:
#[filter("http.method = 'GET' and http.user_agent ~ 'Safari'")]
fn main() {
let config = default_config();
let cnt = AtomicUsize::new(0);
let cb = |_http: HttpTransaction| {
cnt.fetch_add(1, Ordering::Relaxed);
};
let mut runtime = Runtime::new(config, filter, cb).unwrap();
runtime.run();
println!("Count: {:?}", cnt);
}Structs§
- Http
Transaction - A parsed HTTP transaction and connection metadata.