Module: Oboe
- Includes:
- Oboe_metal
- Defined in:
- lib/heroku_metal.rb
Class Attribute Summary collapse
-
.reporter ⇒ Object
Returns the value of attribute reporter.
Class Method Summary collapse
- .always? ⇒ Boolean
-
.disconnect! ⇒ Object
Disconnect/Reconnect wrappers used for forking webservers such as Unicorn or Passenger.
- .never? ⇒ Boolean
- .passthrough? ⇒ Boolean
- .reconnect! ⇒ Object
- .sample?(opts = {}) ⇒ Boolean
- .through? ⇒ Boolean
- .tracing? ⇒ Boolean
Class Attribute Details
.reporter ⇒ Object
Returns the value of attribute reporter.
51 52 53 |
# File 'lib/heroku_metal.rb', line 51 def reporter @reporter end |
Class Method Details
.always? ⇒ Boolean
53 54 55 |
# File 'lib/heroku_metal.rb', line 53 def always? Oboe::Config[:tracing_mode].to_s == "always" end |
.disconnect! ⇒ Object
Disconnect/Reconnect wrappers used for forking webservers such as Unicorn or Passenger
84 85 86 |
# File 'lib/heroku_metal.rb', line 84 def disconnect! ::Oboe::Context.disconnect(::Oboe.reporter) end |
.never? ⇒ Boolean
57 58 59 |
# File 'lib/heroku_metal.rb', line 57 def never? Oboe::Config[:tracing_mode].to_s == "never" end |
.passthrough? ⇒ Boolean
61 62 63 |
# File 'lib/heroku_metal.rb', line 61 def passthrough? ["always", "through"].include?(Oboe::Config[:tracing_mode]) end |
.reconnect! ⇒ Object
88 89 90 |
# File 'lib/heroku_metal.rb', line 88 def reconnect! ::Oboe::Context.reconnect(::Oboe.reporter) end |
.sample?(opts = {}) ⇒ Boolean
65 66 67 68 69 70 71 |
# File 'lib/heroku_metal.rb', line 65 def sample?(opts = {}) # Assure defaults since SWIG enforces Strings opts[:layer] ||= '' opts[:xtrace] ||= '' opts['TV-Meta'] ||= '' Oboe::Context.sampleRequest(opts[:layer], opts[:xtrace], opts['TV-Meta']) end |
.through? ⇒ Boolean
73 74 75 |
# File 'lib/heroku_metal.rb', line 73 def through? Oboe::Config[:tracing_mode] == "through" end |
.tracing? ⇒ Boolean
77 78 79 |
# File 'lib/heroku_metal.rb', line 77 def tracing? Oboe::Context.isValid and not Oboe.never? end |