7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/app_perf_rpm/instruments/emque_consuming.rb', line 7
def route_with_trace(topic, type, message)
action = type.to_s.split(".").last
span = ::AppPerfRpm.tracer.start_span("#{topic}##{action}", tags: {
"component" => "EmqueConsuming",
"http.url" => "/#{topic}/#{action}",
"peer.address" => Socket.gethostname
})
AppPerfRpm::Utils.log_source_and_backtrace(span, :emque_consuming)
route_without_trace(topic, type, message)
rescue Exception => e
if span
span.set_tag('error', true)
span.log_error(e)
end
raise
ensure
span.finish if span
end
|