Skip to content
Night Brownie Night Brownie

Middleware

Custom middleware for night-brownie.

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.

Methods:

  • __call__

    Bind the context variables to the logging context.

__call__ async

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

Bind the context variables to the logging context.