Skip to main content

RequestObserver

Trait RequestObserver 

Source
pub trait RequestObserver:
    Send
    + Sync
    + 'static {
    // Required method
    fn on_response(&self, observation: &RequestObservation);
}
Expand description

Application-owned telemetry adapter. Callbacks must be fast, nonblocking, and must not panic. Enqueue bounded events in your adapter for async exporters. No vendor, exporter, global registry, or background worker is installed by Capy.

Required Methods§

Source

fn on_response(&self, observation: &RequestObservation)

Observe completion of a request’s response headers, including timeouts.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F: Fn(&RequestObservation) + Send + Sync + 'static> RequestObserver for F