lib/oboe/api/tracing.rb in oboe-1.3.6 vs lib/oboe/api/tracing.rb in oboe-1.3.7
- old
+ new
@@ -9,10 +9,12 @@
# the block and report errors.
#
# layer - The layer the block of code belongs to.
# opts - A hash containing key/value pairs that will be reported along
# with the first event of this layer (optional).
+ # protect_op - specify the operating being traced. Used to avoid
+ # double tracing between operations that call each other
#
# Example
#
# def computation(n)
# fib(n)
@@ -26,10 +28,10 @@
# end
#
# result = computation_with_oboe(1000)
#
# Returns the result of the block.
- def trace(layer, opts={}, protect_op=false)
+ def trace(layer, opts={}, protect_op=nil)
log_entry(layer, opts, protect_op)
begin
yield
rescue Exception => e
log_exception(layer, e)