7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/baseline_red_rpm/instruments/sinatra.rb', line 7
def dispatch_with_trace
if ::BaselineRedRpm::Tracer.tracing?
operation = "#{self.class}##{env["PATH_INFO"]}"
span = ::BaselineRedRpm.tracer.start_span(operation, tags: {
component: "Sinatra"
})
BaselineRedRpm::Utils.log_source_and_backtrace(span, :sinatra)
end
dispatch_without_trace
rescue Exception => e
if span
span.set_tag('error', true)
span.log_error(e)
end
raise
ensure
span.finish if span
end
|