AnalyticsSink

Trait AnalyticsSink 

Source
pub trait AnalyticsSink: Send + Sync {
    // Required method
    fn record<'life0, 'async_trait>(
        &'life0 self,
        event: Event,
    ) -> Pin<Box<dyn Future<Output = Result<(), ExtensionsError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Swappable analytics event sink.

Required Methods§

Source

fn record<'life0, 'async_trait>( &'life0 self, event: Event, ) -> Pin<Box<dyn Future<Output = Result<(), ExtensionsError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Accept one event for eventual processing.

Implementors§

Source§

impl AnalyticsSink for EmbeddedAnalytics

The M1 extension contract (feature analysis 11.4): the embedded store IS an extensions::analytics::AnalyticsSink. The trait’s failure model allows perpetual Ok — “accepted”, not “persisted” — which is exactly the drop-and-count policy here (a full channel is the sink’s own overload to absorb, not the caller’s problem).

Source§

impl AnalyticsSink for InMemoryAnalyticsSink