Module: Kafka::Statsd
- Defined in:
- lib/kafka/statsd.rb
Overview
Reports operational metrics to a Statsd agent.
require "kafka/statsd"
Kafka::Statsd.namespace = "custom-namespace"
Kafka::Statsd.host = "statsd.something.com"
Kafka::Statsd.port = 1234
Once the file has been required, no further configuration is needed – all operational metrics are automatically emitted.
Defined Under Namespace
Classes: AsyncProducerSubscriber, ConnectionSubscriber, ConsumerSubscriber, FetcherSubscriber, ProducerSubscriber, StatsdSubscriber
Constant Summary
collapse
- DEFAULT_NAMESPACE =
"ruby_kafka"
- DEFAULT_HOST =
'127.0.0.1'
- DEFAULT_PORT =
8125
Class Method Summary
collapse
Class Method Details
.host=(host) ⇒ Object
37
38
39
40
|
# File 'lib/kafka/statsd.rb', line 37
def self.host=(host)
statsd.host = host
statsd.connect if statsd.respond_to?(:connect)
end
|
.namespace=(namespace) ⇒ Object
47
48
49
|
# File 'lib/kafka/statsd.rb', line 47
def self.namespace=(namespace)
statsd.namespace = namespace
end
|
.port=(port) ⇒ Object
42
43
44
45
|
# File 'lib/kafka/statsd.rb', line 42
def self.port=(port)
statsd.port = port
statsd.connect if statsd.respond_to?(:connect)
end
|