This package defines the
nl.jomco.ring-trace-context/wrap-trace-context middleware function.
This parses the traceparent header if present or generates new
traceparent data and sets it on the request for the wrapped handler
under the :traceparent key.
request =>
{:request-method :get
# ...
:traceparent {:version "00",
:trace-id "74e744b8a6cb016a0ebf84d7d7932512",
:parent-id "23fc93418d1e37bd",
:trace-flags "00"}}
The standard defines two headers; traceparent and
tracestate.
traceparentThe traceparent header contains 4 fields, version, trace-id,
parent-id and flags. The only currenly defined versions are "00"
(hexadecimal), and the "invalid version" "ff".
tracestateTODO: document further
https://newrelic.com/blog/nerdlog/w3c-trace-context-distributed-tracing-standard
https://www.w3.org/TR/trace-context/
new-context alias for new-span and fix implementation when
nil is passed.*trace-context* dynamic var, and related functions.traceparent header also on response in middlewaretrace-context on request and response mapnew-spantrace-context for parsed objects and
traceparent for raw string.Can you improve this documentation?Edit on sourcehut
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |