documint.metrics

Documint metrics registry

async-activity-counter

(async-activity-counter d collector)
Wrap the given async operation to increment the given collector once it is
entered and decrement it once execution is done. This needs a [[gauge]]
collector (since [[counter]] ones cannot be decremented).

Example: Counting the number of in-flight requests in an HTTP server.

async-counters

(async-counters d {:keys [total success failure]})
Wrap the given async operation to increment the given counters:

- `:total`: incremented when the block is left,
- `:success`: incremented when the block has executed successfully,
- `:failure`: incremented when the block has thrown an exception.

async-duration

(async-duration d collector)
Wrap the given async operation to write its execution time to the given
collector.

Works with [[gauge]], [[histogram]] and [[summary]] collectors.

registry