module StatsD

The `StatsD` module contains low-level metrics for collecting metrics and sending them to the backend.

@see .singleton_client Metric method calls on the `StatsD` singleton will

be handled by the client assigned to `StatsD.singleton_client`.

@see StatsD::Instrument `StatsD::Instrument` contains module to instrument

existing methods with StatsD metrics

Attributes

logger[RW]

The logger to use in case of any errors.

@return [Logger] @see StatsD::Instrument::LogSink

singleton_client[W]

The StatsD client that handles method calls on the StatsD singleton.

E.g. a call to `StatsD.increment` will be handled by this client.

@return [StatsD::Instrument::Client]

Public Class Methods

singleton_client() click to toggle source

The StatsD client that handles method calls on the StatsD singleton @return [StatsD::Instrument::Client]

# File lib/statsd/instrument.rb, line 313
def singleton_client
  @singleton_client ||= StatsD::Instrument::Environment.current.client
end