tracing: mark failed spans by catching and re-throwing StandardErrors

Este commit está contenido en:
cn 2018-07-13 14:29:22 +02:00
padre bd7c786c9c
commit 280bfbeb82
Se han modificado 1 ficheros con 10 adiciones y 0 borrados

Ver fichero

@ -34,6 +34,16 @@ module Dyndnsd
span.set_tag('span.kind', 'server')
begin
block.call(span)
rescue StandardError => e
span.set_tag('error', true)
span.log_kv(
event: 'error',
'error.kind': e.class.to_s,
'error.object': e,
message: e.message,
stack: e.backtrace.join("\n")
)
raise
ensure
scope.close
end