Idiomatic Clojure wrapper over the official Datadog java-dogstatsd-client.
Build a client with client, then send metrics (increment, decrement,
count, gauge, histogram, distribution, timing, set-metric),
events, and service-checks. The client is java.io.Closeable, so use it
with with-open or call close.
Tags may be a map ({:env "prod"} -> env:prod) or a seq of strings
(["env:prod"]). Metric names may be keywords or strings.
Idiomatic Clojure wrapper over the official Datadog java-dogstatsd-client.
Build a client with `client`, then send metrics (`increment`, `decrement`,
`count`, `gauge`, `histogram`, `distribution`, `timing`, `set-metric`),
`event`s, and `service-check`s. The client is `java.io.Closeable`, so use it
with `with-open` or call `close`.
Tags may be a map (`{:env "prod"}` -> `env:prod`) or a seq of strings
(`["env:prod"]`). Metric names may be keywords or strings.(client {:keys [prefix host port constant-tags aggregation?]
:or {host "localhost" port 8125}})Build a StatsDClient. Options:
:host agent host (default "localhost") :port agent port (default 8125) :prefix prefix prepended to every metric name :constant-tags tags added to every metric (map or seq of strings) :aggregation? client-side aggregation (default: the client's default, true)
The returned client is Closeable.
Build a StatsDClient. Options: :host agent host (default "localhost") :port agent port (default 8125) :prefix prefix prepended to every metric name :constant-tags tags added to every metric (map or seq of strings) :aggregation? client-side aggregation (default: the client's default, true) The returned client is Closeable.
(close client)Close the client, flushing any buffered metrics.
Close the client, flushing any buffered metrics.
(count client metric delta)(count client metric delta tags)Adjust a counter by delta.
Adjust a counter by delta.
(decrement client metric)(decrement client metric tags)Decrement a counter by 1.
Decrement a counter by 1.
(distribution client metric value)(distribution client metric value tags)Record a value in a global distribution.
Record a value in a global distribution.
(event client title text)(event client
title
text
{:keys [tags alert-type hostname aggregation-key source-type date]})Send an event. Options:
:tags map or seq of strings :alert-type :error | :warning | :info | :success :hostname source hostname :aggregation-key key to group related events :source-type source type name :date event timestamp in millis since epoch
Send an event. Options: :tags map or seq of strings :alert-type :error | :warning | :info | :success :hostname source hostname :aggregation-key key to group related events :source-type source type name :date event timestamp in millis since epoch
(gauge client metric value)(gauge client metric value tags)Record the latest value of a gauge.
Record the latest value of a gauge.
(histogram client metric value)(histogram client metric value tags)Record a value in a histogram (server-side statistical distribution).
Record a value in a histogram (server-side statistical distribution).
(increment client metric)(increment client metric tags)Increment a counter by 1.
Increment a counter by 1.
(service-check client name status)(service-check client name status {:keys [tags message hostname]})Send a service check. status is :ok | :warning | :critical | :unknown. Options: :tags, :message, :hostname.
Send a service check. status is :ok | :warning | :critical | :unknown. Options: :tags, :message, :hostname.
(set-metric client metric value)(set-metric client metric value tags)Record a member of a set (counts unique occurrences).
Record a member of a set (counts unique occurrences).
(timing client metric millis)(timing client metric millis tags)Record an execution time in milliseconds.
Record an execution time in milliseconds.
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 |