Liking cljdoc? Tell your friends :D
Clojure only.

wagoe.observability.tracing.core

Pure ergonomics for tracing — the with-span macro. Depends only on the tracing port; the side effects happen in the tracer the macro is handed.

Pure ergonomics for tracing — the `with-span` macro. Depends only on the
tracing port; the side effects happen in the tracer the macro is handed.
raw docstring

with-spancljmacro

(with-span tracer [span-sym name & [attributes]] & body)

Run body inside a span, bound to span-sym. Delegates to the tracer's with-span*, so the span is started, has any thrown exception recorded and rethrown, and is always ended. Returns the value of body.

(with-span tracer [sp "handle-request" {:route "/x"}] (handle sp request))

The attributes map is optional:

(with-span tracer [sp "work"] (do-work))

Run `body` inside a span, bound to `span-sym`. Delegates to the tracer's
`with-span*`, so the span is started, has any thrown exception recorded and
rethrown, and is always ended. Returns the value of `body`.

  (with-span tracer [sp "handle-request" {:route "/x"}]
    (handle sp request))

The attributes map is optional:

  (with-span tracer [sp "work"] (do-work))
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close