Liking cljdoc? Tell your friends :D

hive-ttracking.span

BC-3 Spans — span sink abstraction + pure helpers over Span values.

Wave-2: helpers for closing/tagging/hierarchy. Sinks are Wave-3. See PLAN.md §2 BC-3.

BC-3 Spans — span sink abstraction + pure helpers over Span values.

Wave-2: helpers for closing/tagging/hierarchy. Sinks are Wave-3.
See PLAN.md §2 BC-3.
raw docstring

add-sampleclj

(add-sample span k v)

Append {:k k :v v :at nanoTime} onto the span's :samples vector. Preserves insertion order.

Append `{:k k :v v :at nanoTime}` onto the span's :samples vector.
Preserves insertion order.
sourceraw docstring

closeclj

(close span result)
(close span result t1)

Return a closed copy of span stamped with t1 (defaults to nanoTime) and a result value. Pure — does not emit events or mutate sinks.

Return a closed copy of `span` stamped with t1 (defaults to nanoTime) and
a result value. Pure — does not emit events or mutate sinks.
sourceraw docstring

closed?clj

(closed? span)

True iff span has :t1 set.

True iff span has :t1 set.
sourceraw docstring

descendant?clj

(descendant? maybe-child maybe-ancestor)

True iff maybe-child claims maybe-ancestor as its direct parent. Shallow (one-hop) — full-chain walks require an external index.

True iff `maybe-child` claims `maybe-ancestor` as its direct parent.
Shallow (one-hop) — full-chain walks require an external index.
sourceraw docstring

elapsed-msclj

(elapsed-ms span)

Milliseconds elapsed. See elapsed-ns. Returns nil if malformed.

Milliseconds elapsed. See elapsed-ns. Returns nil if malformed.
sourceraw docstring

elapsed-nsclj

(elapsed-ns {:keys [t0 t1] :as _span})

Nanoseconds from span open. Uses :t1 if closed, else nanoTime - :t0. Returns nil if span has no :t0 (malformed).

Nanoseconds from span open. Uses :t1 if closed, else nanoTime - :t0.
Returns nil if span has no :t0 (malformed).
sourceraw docstring

ISpanSinkcljprotocol

flush!clj

(flush! this)

Force-flush any buffered spans. Returns Result.

Force-flush any buffered spans. Returns Result.

queryclj

(query this filter-fn)

Query stored spans by predicate. Returns Result.

Query stored spans by predicate. Returns Result.

record!clj

(record! this span)

Persist a closed Span. Returns Result.

Persist a closed Span. Returns Result.
source

noop-sinkclj

(noop-sink)
source

tagclj

(tag span tag-map)
(tag span k v)

Attach a tag (or merge a map of tags) onto a span. Returns updated span.

Attach a tag (or merge a map of tags) onto a span. Returns updated span.
sourceraw docstring

with-parentclj

(with-parent child parent)

Return child with :parent-id bound to parent's :id. Accepts either a Span record or a raw id keyword/uuid/string for parent.

Return `child` with :parent-id bound to `parent`'s :id. Accepts either a
Span record or a raw id keyword/uuid/string for `parent`.
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