Change summary
lib/patches_for_sentry.rb | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Detailed changes
@@ -63,12 +63,13 @@ module SentryIQManager
transaction = Sentry.get_current_scope.get_transaction
return yield unless transaction&.sampled
- span = transaction.start_child(
- op: "xmpp.iq",
- description: description
- )
+ span = transaction.start_child(op: "xmpp.iq", description: description)
- yield.then { span.finish }
+ yield.then { span.finish }.catch do |e|
+ span.set_status("internal_error")
+ span.finish
+ EMPromise.reject(e)
+ end
end
def stanza_description(stanza)