Liking cljdoc? Tell your friends :D

io.aviso.logging.correlation

Defines a minimal namespace containing a dynamic Var used to propogate the correlation id into the logging layer.

Defines a minimal namespace containing a dynamic Var used to propogate
the correlation id into the logging layer.
raw docstring

*correlation-id*clj

A dynamic var that contains the correlation id used by the %mdc{correlation-id} pattern. Defaults to the empty string.

A dynamic var that contains the correlation id used by the `%mdc{correlation-id}` pattern.
Defaults to the empty string.
sourceraw docstring

default-correlation-id-generatorclj

(default-correlation-id-generator request)

The default correlation id generator ignores the request, and returns a random UUID string. Alternate implementations may use information in the request to build a more meaningful or semantic name.

The default correlation id generator ignores the request, and returns a random UUID string.
Alternate implementations may use information in the request to build a more meaningful or semantic
name.
sourceraw docstring

wrap-with-request-correlationclj

(wrap-with-request-correlation handler)
(wrap-with-request-correlation handler header-name correlation-id-generator)

Wraps a handler with logic that obtains the correlation id from the request (if present).

When the id is not present, a new id is generated.

The id (from the request, or as generated) will be available in the *correlation-id* dynamic Var. This will allow code sending requests to other servers to add the necessary header.

The id will be returned in the response.

Wraps a handler with logic that obtains the correlation id from the request (if present).

When the id is not present, a new id is generated.

The id (from the request, or as generated) will be available in the [[*correlation-id*]] dynamic Var.
This will allow code sending requests to other servers to add the necessary header.

The id will be returned in the response.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close