lib/rails_cloud_tasks/rack/tasks.rb in rails-cloud-tasks-0.0.2 vs lib/rails_cloud_tasks/rack/tasks.rb in rails-cloud-tasks-0.0.3
- old
+ new
@@ -7,11 +7,14 @@
class << self
def call(env)
request = ::Rack::Request.new(env)
job = extract_job(request)
- ActiveJob::Base.execute(job)
+ RailsCloudTasks::Instrumentation.transaction_name!(
+ "RailsCloudTasks/#{job['job_class']}/perform_now"
+ )
+ ActiveJob::Base.execute(job)
response(200, {})
rescue Rack::InvalidPayloadError => e
response(400, { error: e.cause.message })
rescue StandardError => e
response(500, { error: e.message })