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

这个提交包含在:
cn
2018-07-13 15:08:21 +02:00
父节点 bd7c786c9c
当前提交 280bfbeb82
+10
查看文件
@@ -34,6 +34,16 @@ module Dyndnsd
span.set_tag('span.kind', 'server') span.set_tag('span.kind', 'server')
begin begin
block.call(span) 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 ensure
scope.close scope.close
end end