CorrelationIdMiddleware

class CorrelationIdMiddleware[F[_]](correlationIdHeaderName: CIString, attributeKey: Key[CorrelationId], generator: () => String)(using evidence$1: Sync[F])

Provides correlation ID functionality. Either generates new correlation ID for a request or takes the one sent in HTTP header and puts it to org.http4s.Request attributes. It is also filled into HTTP response header.

Use method retrieveCorrelationId to get the value from request attributes.

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def wrap(routes: HttpRoutes[F]): HttpRoutes[F]