Skip to content

Commit

Permalink
Merge pull request #32 from DataDog/quentin/namespace-dogstatsd
Browse files Browse the repository at this point in the history
Namespace dogstastd
  • Loading branch information
degemer authored Sep 21, 2016
2 parents 543c99e + c47c983 commit d053004
Show file tree
Hide file tree
Showing 9 changed files with 414 additions and 394 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CHANGELOG

2.0.0/ UNRELEASED
=================

### Breaking changes
#### Namespace

The `Statsd` is now namespaced under the Datadog module.

To update:
- `require 'statsd'` -> `require 'datadog/statsd`
- `Statsd` -> `Datadog::Statsd`

1.6.0/ 2015.12.21
==================

Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ source 'https://rubygems.org'
gemspec

gem 'rake', '10.1.0'
gem 'rack', '~> 1.6'

group :development do
gem "faker", "~> 1.2.0"
Expand All @@ -14,4 +15,5 @@ end

group :test do
gem "timecop"
gem 'json', '~> 1.8'
end
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ Then start instrumenting your code:
require 'statsd'

# Create a stats instance.
statsd = Statsd.new('localhost', 8125)
statsd = Datadog::Statsd.new('localhost', 8125)

# you could also create a statsd class if you need a drop in replacement
# class Statsd < Datadog::Statsd
# end

# Increment a counter.
statsd.increment('page.views')
Expand Down
4 changes: 2 additions & 2 deletions dogstatsd-ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$:.unshift File.expand_path("../lib", __FILE__)
require "statsd"
require "datadog/statsd"

Gem::Specification.new do |s|
s.name = "dogstatsd-ruby"
s.version = Statsd.VERSION
s.version = Datadog::Statsd.VERSION

s.authors = ["Rein Henrichs"]

Expand Down
4 changes: 2 additions & 2 deletions examples/random_event_every_xsecnonds_to_localhost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@


# Load the dogstats module.
require '../lib/statsd'
require '../lib/datadog/statsd'

# Create a stats instance.
statsd = Statsd.new('localhost', 8125)
statsd = Datadog::Statsd.new('localhost', 8125)

# Data to run random tests
titles = Array.new
Expand Down
Loading

0 comments on commit d053004

Please sign in to comment.