~singpolyma/sgx-jmp

a9caee5f7877887cb2253df5de6cc0c9ec63cc84 — Stephen Paul Weber 13 days ago 71ed2c2
Finish span on error as well
1 files changed, 6 insertions(+), 5 deletions(-)

M lib/patches_for_sentry.rb
M lib/patches_for_sentry.rb => lib/patches_for_sentry.rb +6 -5
@@ 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)