Skip to content

Middleware

Custom middleware for foreman.

CLASS DESCRIPTION
LogCorrelationIdMiddleware

Add a correlation ID to the bound logging context.

Classes

LogCorrelationIdMiddleware

LogCorrelationIdMiddleware(app: ASGIApp)

Add a correlation ID to the bound logging context.

A correlation ID is a unique identifier that is passed along with a request and included in all logs related to that request. This allows us to trace the flow of a request through the system, even when it spans multiple services.

METHOD DESCRIPTION
__call__

Bind the context variables to the logging context.

Functions

__call__ async
__call__(scope: Scope, receive: Receive, send: Send) -> None

Bind the context variables to the logging context.

Functions