Liking cljdoc? Tell your friends :D

swirrl.dogstatsd

(def client (configure {:endpoint "localhost:8125"}))

Total value/rate:

(increment! client :chat.request/count 1) (decrement! client :chat.request/count 1)

In-the-moment value:

(gauge! client :chat.ws.connections 17)

Values distribution (mean, avg, max, percentiles):

(histogram! client :chat.request/time 188.17) (distribution! client :chat.request/time 188.17)

Counting unique values:

(set! client :chat.user/email "nikita@mailforspam.com")

Supported opts (third argument):

{ :tags => [String+] | { Keyword -> Any | Nil } :sample-rate => Double[0..1] }

E.g. (increment! client :chat.request/count 1 { :tags { :env "production", :chat nil } ;; => |#env:production,chat :tags [ "env:production" "chat" ] ;; => |#env:production,chat :sample-rate 0.5 } ;; Throttling 50%

(def client (configure {:endpoint "localhost:8125"}))

Total value/rate:

  (increment! client :chat.request/count  1)
  (decrement! client :chat.request/count  1)

In-the-moment value:

  (gauge! client :chat.ws.connections 17)

Values distribution (mean, avg, max, percentiles):

  (histogram! client :chat.request/time   188.17)
  (distribution! client :chat.request/time   188.17)

Counting unique values:

  (set! client :chat.user/email "nikita@mailforspam.com")

Supported opts (third argument):

  { :tags => [String+] | { Keyword -> Any | Nil }
    :sample-rate => Double[0..1] }

E.g. (increment! client :chat.request/count 1
       { :tags        { :env "production", :chat nil } ;; => |#env:production,chat
         :tags        [ "env:production"  "chat" ]   ;; => |#env:production,chat
         :sample-rate 0.5 }                              ;; Throttling 50%
raw docstring

configureclj

(configure {:keys [endpoint] :as opts})

Just pass StatsD server endpoint:

(configure {:endpoint "localhost:8125"}) (configure {:endpoint ":8125"}) (configure {:endpoint "localhost"})

You can also set extra system-wide tags:

(configure {:endpoint "localhost:8125" :tags {:env "production"}})

Just pass StatsD server endpoint:

  (configure {:endpoint "localhost:8125"})
  (configure {:endpoint ":8125"})
  (configure {:endpoint "localhost"})

You can also set extra system-wide tags:

  (configure {:endpoint "localhost:8125" :tags {:env "production"}})
sourceraw docstring

decrement!clj

(decrement! client name)
(decrement! client name value)
(decrement! client name value opts)

Sends a decrement count event to dogstatsd.

Used for deriving total value/rate.

The COUNT metric submission type represents the total number of event occurrences in one time interval. A COUNT can be used to track the total number of connections made to a database or the total number of requests to an endpoint. This number of events can accumulate or decrease over time—it is not monotonically increasing.

Note: A COUNT is different from the RATE metric type, which represents the number of event occurrences normalized per second given the defined time interval

Sends a decrement count event to dogstatsd.

Used for deriving total value/rate.

The COUNT metric submission type represents the total number of
event occurrences in one time interval. A COUNT can be used to track
the total number of connections made to a database or the total
number of requests to an endpoint. This number of events can
accumulate or decrease over time—it is not monotonically increasing.

Note: A COUNT is different from the RATE metric type, which represents
the number of event occurrences normalized per second given the
defined time interval
sourceraw docstring

distribution!clj

(distribution! client name value)
(distribution! client name value opts)

The DISTRIBUTION metric type is specific to DogStatsD. Emit a DISTRIBUTION metric-stored as a DISTRIBUTION metric-to Datadog.

(distribution! client "example-metric.gauge" (rand-int 20))

The above instrumentation calculates the sum, count, average, minimum, maximum, 50th percentile (median), 75th percentile, 90th percentile, 95th percentile and 99th percentile. Distributions can be used to measure the distribution of any type of value, such as the size of uploaded files, or classroom test scores.

The DISTRIBUTION metric type is specific to DogStatsD. Emit a
DISTRIBUTION metric-stored as a DISTRIBUTION metric-to Datadog.

(distribution! client "example-metric.gauge" (rand-int 20))

The above instrumentation calculates the sum, count, average,
minimum, maximum, 50th percentile (median), 75th percentile, 90th
percentile, 95th percentile and 99th percentile. Distributions can
be used to measure the distribution of any type of value, such as
the size of uploaded files, or classroom test scores.
sourceraw docstring

event!clj

(event! client title text opts)

Events are records of notable changes relevant for managing and troubleshooting IT operations, such as code deployments, service health, configuration changes, or monitoring alerts.

title => String text => String opts => { :tags => [String+] | { Keyword -> Any | Nil } :date-happened => #inst :hostname => String :aggregation-key => String :priority => :normal | :low :source-type=name => String :alert-type => :error | :warning | :info | :success }

Events are records of notable changes relevant for managing and
troubleshooting IT operations, such as code deployments, service
health, configuration changes, or monitoring alerts.

 title => String
 text  => String
 opts  => { :tags             => [String+] | { Keyword -> Any | Nil }
            :date-happened    => #inst
            :hostname         => String
            :aggregation-key  => String
            :priority         => :normal | :low
            :source-type=name => String
            :alert-type       => :error | :warning | :info | :success }
sourceraw docstring

format-metricclj

(format-metric client-tags metric type value tags sample-rate)
source

gauge!clj

(gauge! client name value)
(gauge! client name value opts)

Submit a gauge to dogstatsd.

Used for deriving an in-the-moment value.

Suppose you are submitting a GAUGE metric, temperature, from a single host running the Datadog Agent. This host emits the following values in a flush time interval: [71,71,71,71,71,71,71.5].

The Agent submits the last reported number, in this case 71.5, as the GAUGE metric’s value.

Submit a gauge to dogstatsd.

Used for deriving an in-the-moment value.

Suppose you are submitting a GAUGE metric, temperature, from a
single host running the Datadog Agent. This host emits the following
values in a flush time interval: [71,71,71,71,71,71,71.5].

The Agent submits the last reported number, in this case 71.5, as
the GAUGE metric’s value.
sourceraw docstring

histogram!clj

(histogram! client name value)
(histogram! client name value opts)

The HISTOGRAM metric type is specific to DogStatsD. Emit a HISTOGRAM metric—stored as a GAUGE and RATE metric—to Datadog.

Used for deriving a values distribution (mean, avg, max, percentiles).

Learn more about the HISTOGRAM type here:

https://docs.datadoghq.com/metrics/types/?tab=histogram#definition

The HISTOGRAM metric type is specific to DogStatsD. Emit a HISTOGRAM
metric—stored as a GAUGE and RATE metric—to Datadog.

Used for deriving a values distribution (mean, avg, max, percentiles).

Learn more about the HISTOGRAM type here:

https://docs.datadoghq.com/metrics/types/?tab=histogram#definition
sourceraw docstring

increment!clj

(increment! client name)
(increment! client name value)
(increment! client name value opts)

Sends an increment count event to dogstatsd.

Used for deriving total value/rate.

The COUNT metric submission type represents the total number of event occurrences in one time interval. A COUNT can be used to track the total number of connections made to a database or the total number of requests to an endpoint. This number of events can accumulate or decrease over time—it is not monotonically increasing.

Note: A COUNT is different from the RATE metric type, which represents the number of event occurrences normalized per second given the defined time interval

Sends an increment count event to dogstatsd.

Used for deriving total value/rate.

The COUNT metric submission type represents the total number of
event occurrences in one time interval. A COUNT can be used to track
the total number of connections made to a database or the total
number of requests to an endpoint. This number of events can
accumulate or decrease over time—it is not monotonically increasing.

Note: A COUNT is different from the RATE metric type, which represents
the number of event occurrences normalized per second given the
defined time interval
sourceraw docstring

measure!cljmacro

(measure! client metric opts & body)

Measures the time taken to evaluate body and submits it as a histogram metric.

Measures the time taken to evaluate body and submits it as a
histogram metric.
sourceraw docstring

RenderMetriccljprotocol

render-metric-keyclj

(render-metric-key t)
source

set!clj

(set! client name value)
(set! client name value opts)

Counts unique values. Stored as a GAUGE type in Datadog. Each value in the stored timeseries is the count of unique values submitted to StatsD for a metric over the flush period.

Counts unique values. Stored as a GAUGE type in Datadog. Each value
in the stored timeseries is the count of unique values submitted to
StatsD for a metric over the flush period.
sourceraw docstring

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

× close