riemann.datadog

Forward events to Datadog.

datadog

(datadog opts)

Return a function which accepts either single events or batches of events in a vector and sends them to datadog. Batching reduces latency by at least one order of magnitude and is highly recommended.

Usage:

(datadog {:api-key “bn14a6ac2e3b5h795085217d49cde7eb”})

Option:

  • :api-key Datadog’s API Key for authentication.

Example:

(def datadog-forwarder
  (batch 100 1/10
    (async-queue!
      :datadog-forwarder    ; A name for the forwarder
      {:queue-size     1e4  ; 10,000 events max
       :core-pool-size 5    ; Minimum 5 threads
       :max-pools-size 100} ; Maxium 100 threads
      (datadog {:api-key "bn14a6ac2e3b5h795085217d49cde7eb"}))))

datadog-metric-name

(datadog-metric-name event)

Constructs a metric-name from an event.

generate-datapoint

(generate-datapoint event)

Creates a vector from riemann event.

generate-event

(generate-event event)

post-datapoint

(post-datapoint api-key data)

Post the riemann metrics as datapoints.