Module: OboeBase
- Included in:
- Oboe
- Defined in:
- lib/base.rb
Overview
Copyright © 2013 AppNeta, Inc. All rights reserved.
Instance Attribute Summary collapse
-
#loaded ⇒ Object
Returns the value of attribute loaded.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
Class Method Summary collapse
Instance Method Summary collapse
- #always? ⇒ Boolean
- #log(layer, label, options = {}) ⇒ Object
- #never? ⇒ Boolean
- #passthrough? ⇒ Boolean
-
#sample?(opts = {}) ⇒ Boolean
These methods should be implemented by the descendants (Oboe_metal, Oboe_metal (JRuby), Heroku_metal).
- #set_sample_rate(rate) ⇒ Object
- #set_tracing_mode(mode) ⇒ Object
- #through? ⇒ Boolean
- #tracing? ⇒ Boolean
Instance Attribute Details
#loaded ⇒ Object
Returns the value of attribute loaded.
6 7 8 |
# File 'lib/base.rb', line 6 def loaded @loaded end |
#reporter ⇒ Object
Returns the value of attribute reporter.
5 6 7 |
# File 'lib/base.rb', line 5 def reporter @reporter end |
Class Method Details
.included(cls) ⇒ Object
8 9 10 |
# File 'lib/base.rb', line 8 def self.included(cls) self.loaded = true end |
Instance Method Details
#always? ⇒ Boolean
12 13 14 |
# File 'lib/base.rb', line 12 def always? Oboe::Config[:tracing_mode].to_s == "always" end |
#log(layer, label, options = {}) ⇒ Object
34 35 36 |
# File 'lib/base.rb', line 34 def log(layer, label, = {}) Context.log(layer, label, = ) end |
#never? ⇒ Boolean
16 17 18 |
# File 'lib/base.rb', line 16 def never? Oboe::Config[:tracing_mode].to_s == "never" end |
#passthrough? ⇒ Boolean
20 21 22 |
# File 'lib/base.rb', line 20 def passthrough? ["always", "through"].include?(Oboe::Config[:tracing_mode]) end |
#sample?(opts = {}) ⇒ Boolean
These methods should be implemented by the descendants (Oboe_metal, Oboe_metal (JRuby), Heroku_metal)
42 43 44 |
# File 'lib/base.rb', line 42 def sample?(opts = {}) raise "sample? should be implemented by metal layer." end |
#set_sample_rate(rate) ⇒ Object
54 55 56 |
# File 'lib/base.rb', line 54 def set_sample_rate(rate) raise "set_sample_rate should be implemented by metal layer." end |
#set_tracing_mode(mode) ⇒ Object
50 51 52 |
# File 'lib/base.rb', line 50 def set_tracing_mode(mode) raise "set_tracing_mode should be implemented by metal layer." end |