Module: AppPerfRpm::Instruments::Sinatra::Base

Defined in:
lib/app_perf_rpm/instruments/sinatra.rb

Instance Method Summary collapse

Instance Method Details

#dispatch_with_traceObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/app_perf_rpm/instruments/sinatra.rb', line 5

def dispatch_with_trace
  if ::AppPerfRpm::Tracer.tracing?
    ::AppPerfRpm::Tracer.trace("sinatra") do |span|
      span.controller = self.class.to_s
      span.action = env["PATH_INFO"]

      dispatch_without_trace
    end
  else
    dispatch_without_trace
  end
end

#handle_exception_with_trace(boom) ⇒ Object



18
19
20
# File 'lib/app_perf_rpm/instruments/sinatra.rb', line 18

def handle_exception_with_trace(boom)
  handle_exception_without_trace(boom)
end