actix-web-correlation-id 1.0.0

An Actix-web middleware component which synchronises a correlation ID for cross API request logging
Documentation
1
2
3
4
5
6
7
8
9
use actix_web::middleware::Logger;

use crate::{CorrelationIdExtract, CorrelationIdVariable};

impl CorrelationIdVariable for Logger {
    fn add_correlation_id(self) -> Self {
        self.custom_request_replace("corr-id", |req| req.correlation_id().to_string())
    }
}