Sha256: 2cc8973c6ee68f8da33134a55625dc80b3a497f818be13dda69701a886aeb1b1

Contents?: true

Size: 436 Bytes

Versions: 10

Compression:

Stored size: 436 Bytes

Contents

module Rearview
  class Statsd < ::Statsd

    def initialize
      super(Rearview.config.statsd_connection[:host],Rearview.config.statsd_connection[:port])
      self.namespace = Rearview.config.statsd_connection[:namespace]
    end

    def self.statsd
      @@statsd ||= Rearview::Statsd.new
    end

    def self.report
      if block_given? && Rearview.config.stats_enabled?
        yield self.statsd
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby lib/rearview/statsd.rb
rearview-1.2.2.rc.2-jruby lib/rearview/statsd.rb
rearview-1.2.2.rc.1-jruby lib/rearview/statsd.rb
rearview-1.2.1-jruby lib/rearview/statsd.rb
rearview-1.2.0-jruby lib/rearview/statsd.rb
rearview-1.1.2-jruby lib/rearview/statsd.rb
rearview-1.1.1-jruby lib/rearview/statsd.rb
rearview-1.1.0-jruby lib/rearview/statsd.rb
rearview-1.0.3.rc.4-jruby lib/rearview/statsd.rb
rearview-1.0.3.rc.3-jruby lib/rearview/statsd.rb