I am having difficulty setting the transaction name and adding custom attributes to a custom transaction tracer that I’m adding to a Shoryuken-based worker. The transaction trace is happening. But, the name is just “Background” where it should be something like “create_event” based on the operation type below.
class SQSWorker include Shoryuken::Worker include NewRelic::Agent::Instrumentation::ControllerInstrumentation shoryuken_options queue: ENV['SQS_INPUT_QUEUE'], body_parser: :json def perform(sqs_message, body) NewRelic::Agent.set_transaction_name(body['operation_type']) NewRelic::Agent.add_custom_attributes(body['payload']) # handle message end add_transaction_tracer :perform, category: :task end
Can you see what I’m doing wrong?