mirror of
https://github.com/cmur2/dyndnsd.git
synced 2024-12-21 14:54:22 +01:00
tracing: mark failed spans by catching and re-throwing StandardErrors
This commit is contained in:
parent
bd7c786c9c
commit
280bfbeb82
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user