Liking cljdoc? Tell your friends :D

dogstatsd.core

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.
raw docstring

clientclj

(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.
sourceraw docstring

closeclj

(close client)

Close the client, flushing any buffered metrics.

Close the client, flushing any buffered metrics.
sourceraw docstring

countclj

(count client metric delta)
(count client metric delta tags)

Adjust a counter by delta.

Adjust a counter by delta.
sourceraw docstring

decrementclj

(decrement client metric)
(decrement client metric tags)

Decrement a counter by 1.

Decrement a counter by 1.
sourceraw docstring

distributionclj

(distribution client metric value)
(distribution client metric value tags)

Record a value in a global distribution.

Record a value in a global distribution.
sourceraw docstring

eventclj

(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
sourceraw docstring

gaugeclj

(gauge client metric value)
(gauge client metric value tags)

Record the latest value of a gauge.

Record the latest value of a gauge.
sourceraw docstring

histogramclj

(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).
sourceraw docstring

incrementclj

(increment client metric)
(increment client metric tags)

Increment a counter by 1.

Increment a counter by 1.
sourceraw docstring

service-checkclj

(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.
sourceraw docstring

set-metricclj

(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).
sourceraw docstring

timingclj

(timing client metric millis)
(timing client metric millis tags)

Record an execution time in milliseconds.

Record an execution time in milliseconds.
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