class Appsignal::Extension::Jruby::Transaction

def record_event(name, title, body, body_format, duration, gc_duration_ms) # rubocop:disable Metrics/ParameterLists

rubocop:disable Metrics/ParameterLists
def record_event(name, title, body, body_format, duration, gc_duration_ms) # rubocop:disable Metrics/ParameterLists
  case body
  when String
    method = :appsignal_record_event
    body_arg = make_appsignal_string(body)
  when Data
    method = :appsignal_record_event_data
    body_arg = body.pointer
  else
    raise ArgumentError,
      "body argument should be a String or Appsignal::Extension::Data"
  end
  Extension.public_send(
    method,
    pointer,
    make_appsignal_string(name),
    make_appsignal_string(title),
    body_arg,
    body_format,
    duration,
    gc_duration_ms
  )
end