Liking cljdoc? Tell your friends :D

com.unbounce.dogstatsd.core


decrementclj

(decrement metric)
(decrement metric {:keys [tags sample-rate by] :or {by 1.0}})
source

eventclj

(event {:keys [title text timestamp hostname aggregation-key priority
               source-type-name alert-type]}
       tags)

Records an Event.

This is a datadog extension, and may not work with other servers.

See http://docs.datadoghq.com/guides/dogstatsd/#events-1

:date can either be inst? or msecs :priority one of :normal or low. If unset, defaults to :normal :alert-type one of :error, :warning, :info, or :success. If unset, defaults to :info

Records an Event.

This is a datadog extension, and may not work with other servers.

See http://docs.datadoghq.com/guides/dogstatsd/#events-1

:date can either be inst? or msecs
:priority    one of :normal or low. If unset, defaults to :normal
:alert-type  one of :error, :warning, :info, or :success. If unset, defaults to :info
sourceraw docstring

gaugeclj

(gauge metric value)
(gauge metric value {:keys [sample-rate tags]})
source

histogramclj

(histogram metric value)
(histogram metric value {:keys [sample-rate tags]})
source

incrementclj

(increment metric)
(increment metric {:keys [tags sample-rate by] :or {by 1.0}})
source

service-checkclj

(service-check {:keys [name status hostname message check-run-id timestamp]}
               tags)

Records a ServiceCheck. This is a datadog extension, and may not work with other servers.

See https://docs.datadoghq.com/agent/agent_checks/#sending-service-checks

At minimum, the name and status is required in the payload.

Records a ServiceCheck. This is a datadog extension, and may not work with
other servers.

See https://docs.datadoghq.com/agent/agent_checks/#sending-service-checks

At minimum, the name and status is required in the payload.
sourceraw docstring

set-valueclj

(set-value metric value {:keys [tags]})
source

setup!clj

(setup! & {:keys [host port prefix tags once?]})

Sets up the statsd client.

If :host is not explicitly specified, it will defer to the environment variable DD_AGENT_HOST. If :port is not explicitly specified, it will first try to read it from the env var DD_DOGSTATSD_PORT, and then fallback to the default port 8125.

Examples:

To setup the client on host "some-other-post" and port 1234

(setup! :host "some-other-host" :port 1234)

To setup the client once and avoid reloading it, use :once?

(setup! :host "some-other-host" :once? true)

Sets up the statsd client.

If :host is not explicitly specified, it will defer to the environment variable DD_AGENT_HOST.
If :port is not explicitly specified, it will first try to read it from the env var DD_DOGSTATSD_PORT, and then fallback to the default port 8125.

Examples:

To setup the client on host "some-other-post" and port 1234

  (setup! :host "some-other-host" :port 1234)

To setup the client once and avoid reloading it, use :once?

  (setup! :host "some-other-host" :once? true)
sourceraw docstring

shutdown!clj

(shutdown!)

Cleanly stops the statsd client.

May throw an exception if the socket cannot be closed.

Cleanly stops the statsd client.

May throw an exception if the socket cannot be closed.
sourceraw docstring

str-arrayclj

(str-array tags)
source

time!cljmacro

(time! [metric opts] & body)

Times the body and records the execution time (in msecs) as a histogram.

Takes opts is a map of :sample-rate and :tags to apply to the histogram

Examples:

(statsd/time! ["my.metric"] (Thread/sleep 1000))

(statsd/time! ["my.metric.with.tags" {:tags #{"foo"} :sample-rate 0.3}] (Thread/sleep 1000))

Times the body and records the execution time (in msecs) as a histogram.

Takes opts is a map of :sample-rate and :tags to apply to the histogram

Examples:

(statsd/time! ["my.metric"]
  (Thread/sleep 1000))

(statsd/time! ["my.metric.with.tags" {:tags #{"foo"} :sample-rate 0.3}]
  (Thread/sleep 1000))

sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close