You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: create_event_job.rb
    path of file: ./repos/code_fund_ads/app/jobs
    
    the code of the file until where you have to start completion: class CreateEventJob < ApplicationJob
  queue_as :default

  def perform(sgid, body, tags = [])
    ScoutApm::Transaction.ignore! if rand > (ENV["SCOUT_SAMPLE_RATE"] || 1).
    
  def perform(sgid, body, tags = [])
    ScoutApm::Transaction.ignore! if rand > (ENV["SCOUT_SAMPLE_RATE"] || 1).to_f
    eventable = GlobalID::Locator.locate_signed(sgid)
    return unless eventable
    event = Event.build_from(eventable, body, tags)
    event.user_id = eventable.user_id if eventable.respond_to? :user_id
    event.user_id = eventable.id if eventable.class == User
    eventable.events << event
  end