Class: Travis::Metrics::Reporter::Graphite
- Inherits:
-
Struct
- Object
- Struct
- Travis::Metrics::Reporter::Graphite
- Defined in:
- lib/travis/metrics/reporter/graphite.rb
Constant Summary collapse
- MSGS =
{ setup: 'Using Graphite metrics reporter (host: %s, port: %s)', error: 'Graphite error: %s (%s)' }
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Instance Method Summary collapse
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
6 7 8 |
# File 'lib/travis/metrics/reporter/graphite.rb', line 6 def config @config end |
#logger ⇒ Object
Returns the value of attribute logger
6 7 8 |
# File 'lib/travis/metrics/reporter/graphite.rb', line 6 def logger @logger end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
12 13 14 |
# File 'lib/travis/metrics/reporter/graphite.rb', line 12 def reporter @reporter end |
Instance Method Details
#setup ⇒ Object
14 15 16 17 18 19 |
# File 'lib/travis/metrics/reporter/graphite.rb', line 14 def setup return unless host logger.info MSGS[:setup] % [host, port] @reporter = Metriks::Reporter::Graphite.new(host, port, interval: interval, on_error: method(:on_error)) reporter.start end |