Module: HostedGraphite
- Extended by:
- Forwardable, HostedGraphite
- Included in:
- HostedGraphite
- Defined in:
- lib/hosted_graphite/protocols/http.rb,
lib/hosted_graphite.rb,
lib/hosted_graphite/testing.rb,
lib/hosted_graphite/version.rb,
lib/hosted_graphite/protocol.rb,
lib/hosted_graphite/ext/sidekiq.rb,
lib/hosted_graphite/protocols/tcp.rb,
lib/hosted_graphite/protocols/udp.rb,
lib/hosted_graphite/protocols/statsd.rb
Overview
ANALYSE, is this implementation thread safe ?
Defined Under Namespace
Modules: Ext Classes: HTTP, MissingAPIKey, Protocol, STATSD, TCP, UDP
Constant Summary collapse
- VERSION =
'0.2.0'
Instance Attribute Summary collapse
- #api_key ⇒ Object
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
Class Method Summary collapse
- .send_metric(*args) ⇒ Object
- .testing ⇒ Object (also: increment, decrement, count, gauge, set, timing, time)
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
20 21 22 |
# File 'lib/hosted_graphite.rb', line 20 def api_key @api_key ||= ENV['HOSTEDGRAPHITE_APIKEY'] end |
#enabled ⇒ Object
Returns the value of attribute enabled.
10 11 12 |
# File 'lib/hosted_graphite.rb', line 10 def enabled @enabled end |
#namespace ⇒ Object
Returns the value of attribute namespace.
10 11 12 |
# File 'lib/hosted_graphite.rb', line 10 def namespace @namespace end |
#protocol ⇒ Object
Returns the value of attribute protocol.
11 12 13 |
# File 'lib/hosted_graphite.rb', line 11 def protocol @protocol end |
Class Method Details
.send_metric(*args) ⇒ Object
28 29 30 |
# File 'lib/hosted_graphite.rb', line 28 def send_metric(*args) protocol.send_metric(*args) if enabled? end |
.testing ⇒ Object Also known as: increment, decrement, count, gauge, set, timing, time
20 21 22 |
# File 'lib/hosted_graphite/testing.rb', line 20 def testing(*) yield if block_given? end |