lib/pallets/middleware/appsignal_instrumenter.rb in pallets-0.5.0 vs lib/pallets/middleware/appsignal_instrumenter.rb in pallets-0.5.1
- old
+ new
@@ -23,13 +23,14 @@
ensure
transaction.set_action_if_nil("#{job['task_class']}#run (#{job['workflow_class']})")
transaction.params = filtered_context(context)
formatted_metadata(job).each { |kv| transaction.set_metadata(*kv) }
transaction.set_http_or_background_queue_start
- Appsignal::Transaction.complete_current!
Appsignal.increment_counter('pallets_job_count', 1, status: job_status || :successful)
end
end
+ ensure
+ Appsignal::Transaction.complete_current!
end
def self.filtered_context(context)
Appsignal::Utils::HashSanitizer.sanitize(
context,