Module: Datadog

Defined in:
lib/datadog/statsd.rb

Overview

Datadog::Statsd: A DogStatsd client (www.datadoghq.com)

Examples:

Set up a global Statsd client for a server on localhost:8125

require 'datadog/statsd'
$statsd = Datadog::Statsd.new 'localhost', 8125

Send some stats

$statsd.increment 'page.views'
$statsd.timing 'page.load', 320
$statsd.gauge 'users.online', 100

Use #time to time the execution of a block

$statsd.time('account.activate') { @account.activate! }

Create a namespaced statsd client and increment ‘account.activate’

statsd = Datadog::Statsd.new 'localhost', 8125, :namespace => 'account'
statsd.increment 'activate'

Create a statsd client with global tags

statsd = Datadog::Statsd.new 'localhost', 8125, :tags => 'tag1:true'

Defined Under Namespace

Classes: Statsd