Sha256: d11d561f0422005435484211c74e7c2c440c6c462222de59e60bba4680e209f9

Contents?: true

Size: 336 Bytes

Versions: 2

Compression:

Stored size: 336 Bytes

Contents

require "statsd"
require "forwardable"

module GovukStatsd
  extend SingleForwardable
  def_delegators :client, :increment, :time, :gauge

  def self.client
    @statsd_client ||= begin
      statsd_client = ::Statsd.new("localhost")
      statsd_client.namespace = ENV["GOVUK_STATSD_PREFIX"].to_s
      statsd_client
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
govuk_app_config-1.0.0 lib/govuk_app_config/govuk_statsd.rb
govuk_app_config-0.3.0 lib/govuk_app_config/govuk_statsd.rb