Liking cljdoc? Tell your friends :D

ken.context

Functions for collecting context from various sources and merging into a collected context map.

Some example sources of context data:

  • environmental data about stack/sys/env/host names
  • request call graph context from prodigal
  • tracing span information
Functions for collecting context from various sources and merging into a
collected context map.

Some example sources of context data:
- environmental data about stack/sys/env/host names
- request call graph context from prodigal
- tracing span information
raw docstring

*local*clj

Dynamic context data bound in the local process. This is merged last into the collected context data, so it may override their entries.

Dynamic context data bound in the local process. This is merged last into
the collected context data, so it may override their entries.
sourceraw docstring

clear!clj

(clear!)

Remove all registered context collectors.

Remove all registered context collectors.
sourceraw docstring

collectclj

(collect)

Collect a merged context map by calling each registered context function.

Collect a merged context map by calling each registered context function.
sourceraw docstring

register!clj

(register! k f)

Register a function for collecting context data to include in events. Returns the key k.

The key uniquely identifies the function and will replace any existing collector; it may also be used to remove it later with unregister!.

Register a function for collecting context data to include in events.
Returns the key `k`.

The key uniquely identifies the function and will replace any existing
collector; it may also be used to remove it later with `unregister!`.
sourceraw docstring

register-static!clj

(register-static! data)
(register-static! k data)

Register the provided map of data as a static set of context attributes which apply to all events in the process. This is useful for common patterns such as environmental sources of context. Returns the key identifying the registered collector.

Register the provided map of data as a static set of context attributes
which apply to all events in the process. This is useful for common patterns
such as environmental sources of context. Returns the key identifying the
registered collector.
sourceraw docstring

unregister!clj

(unregister! k)

Remove the identified function from the collection of context collectors.

Remove the identified function from the collection of context collectors.
sourceraw docstring

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

× close