(initialize registry & [{:keys [labels]}])Enable function instrumentalization by registering the metric collectors. Metrics include:
fn_duration_seconds: a histogram of execution duration,fn_last_failure_unixtime: a gauge with the last failure timestamp,fn_runs_total: a counter for fn runs, split by success/failure,fn_exceptions_total: a counter for fn exceptions, split by class.Enable function instrumentalization by registering the metric collectors. Metrics include: - `fn_duration_seconds`: a histogram of execution duration, - `fn_last_failure_unixtime`: a gauge with the last failure timestamp, - `fn_runs_total`: a counter for fn runs, split by success/failure, - `fn_exceptions_total`: a counter for fn exceptions, split by class.
(instrument! registry fn-var)(instrument! registry
fn-var
{:keys [fn-name exceptions? duration? last-failure? run-count?
labels]
:or {fn-name (subs (str fn-var) 2)}
:as options})(instrument-namespace! registry namespace)(instrument-namespace! registry namespace options)(wrap-instrumentation f
registry
fn-name
{:keys [duration? exceptions? last-failure? run-count?
labels]
:or {duration? true
exceptions? true
last-failure? true
run-count? true
labels {}}})Wrap the given function to write a series of execution metrics to the given
registry. See initialize.
Wrap the given function to write a series of execution metrics to the given registry. See [[initialize]].
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 |