lib/oboe-heroku/base.rb in oboe-heroku-0.9.17.3 vs lib/oboe-heroku/base.rb in oboe-heroku-0.9.17.4

- old
+ new

@@ -31,10 +31,11 @@ attr_accessor :reporter attr_accessor :loaded attr_accessor :sample_source attr_accessor :sample_rate + thread_local :layer thread_local :layer_op # The following accessors indicate the incoming tracing state received # by the rack layer. These are primarily used to identify state # between the Ruby and JOboe instrumentation under JRuby. @@ -98,10 +99,21 @@ return true end end ## + # tracing_layer? + # + # Queries the thread local variable about the current + # layer being traced. This is used in cases of recursive + # operation tracing or one instrumented operation calling another. + # + def tracing_layer?(layer) + return Oboe.layer == layer + end + + ## # tracing_layer_op? # # Queries the thread local variable about the current # operation being traced. This is used in cases of recursive # operation tracing or one instrumented operation calling another. @@ -204,6 +216,5 @@ end module Oboe extend OboeBase end -