Skip to main content

with_correlation_id

Function with_correlation_id 

Source
pub async fn with_correlation_id<F: Future>(
    id: impl Into<String>,
    f: F,
) -> F::Output
Expand description

Run f with id as the correlation id of every write it makes: the id the events staged by those writes carry, so one request’s rows, events and logs share it. The generic write routes do this from the x-correlation-id request header (see correlation_middleware).