(decrement k)
(decrement k v)
(decrement k v {:keys [rate tags] :or {rate 1.0 tags []}})
(gauge k v)
(gauge k v {:keys [rate tags] :or {rate 1.0 tags []}})
(increment k)
(increment k v)
(increment k v {:keys [rate tags] :or {rate 1.0 tags []}})
(locking-with-timing lock lock-metric metric tags & body)
Helper macro for calling locking-with-timing-call
Helper macro for calling locking-with-timing-call
(locking-with-timing-call lock lock-metric metric tags f)
Like with-timing-metric-call but to handle the case where you're using (locking lock (f)) and you want to time both the acquisition of the lock and the function called inside the lock body.
The lock metric will be published with the same tags as the function, but with the inner metric name and the lock object itself added as tags.
lock - The object to lock with. lock-metric - The name of the metric to record the lock wait time. metric - The metric for the timing of the code inside the lock. tags - The tags for both metrics f - The function to be run inside the lock
Like with-timing-metric-call but to handle the case where you're using (locking lock (f)) and you want to time both the acquisition of the lock and the function called inside the lock body. The lock metric will be published with the same tags as the function, but with the inner metric name and the lock object itself added as tags. lock - The object to lock with. lock-metric - The name of the metric to record the lock wait time. metric - The metric for the timing of the code inside the lock. tags - The tags for both metrics f - The function to be run inside the lock
(map->tags tag-map)
Transform a map into a list of tag strings
Transform a map into a list of tag strings
(setup host port & {:as opts})
(timer)
Returns a delay which will yield the time in milliseconds between creation and first deref.
Example usage: (let [t (timer)] (try ; do stuff (timing :stuff @t {:tags [:ok]}) (catch Exception e (timing :stuff @t {:tags [:error]}) (throw e))))
Returns a delay which will yield the time in milliseconds between creation and first deref. Example usage: (let [t (timer)] (try ; do stuff (timing :stuff @t {:tags [:ok]}) (catch Exception e (timing :stuff @t {:tags [:error]}) (throw e))))
(timing k v)
(timing k v {:keys [rate tags] :or {rate 1.0 tags []}})
(unique k v)
(unique k v {:keys [tags] :or {tags []}})
(with-timing-metric metric tags & body)
Helper macro for calling with-timing-metric-call
Helper macro for calling with-timing-metric-call
(with-timing-metric-call metric tags f)
Wrap a call to f with timing instrumentation. 'metric' is a keyword naming the metrics. 'tags' is a vector of strings to tag the metric with.
Tags that are prefixed with X- (e.g. X-foo-bar) are removed before submitting the timing metric to statsd. The prefixed tags and timing data are logged, allowing for analysis via logs.
Use this for tags that are not appropriate for statsd services such as Datadog, e.g. tags with no bounds on the number of values.
Wrap a call to f with timing instrumentation. 'metric' is a keyword naming the metrics. 'tags' is a vector of strings to tag the metric with. Tags that are prefixed with X- (e.g. X-foo-bar) are removed before submitting the timing metric to statsd. The prefixed tags and timing data are logged, allowing for analysis via logs. Use this for tags that are not appropriate for statsd services such as Datadog, e.g. tags with no bounds on the number of values.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close