class Honeybadger::Notice

def as_json(*args)

Returns:
  • (Hash) - JSON representation of notice.

Other tags:
    Api: - private
def as_json(*args)
  request = construct_request_hash
  request[:context] = s(context)
  request[:local_variables] = local_variables if local_variables
  {
    api_key: s(api_key),
    notifier: NOTIFIER,
    breadcrumbs: sanitized_breadcrumbs,
    error: {
      token: id,
      class: s(error_class),
      message: s(error_message),
      backtrace: s(parsed_backtrace),
      fingerprint: fingerprint_hash,
      tags: s(tags),
      causes: s(prepare_causes(causes))
    },
    details: s(details),
    request: request,
    server: {
      project_root: s(config[:root]),
      revision: s(config[:revision]),
      environment_name: s(config[:env]),
      hostname: s(config[:hostname]),
      stats: stats,
      time: now,
      pid: pid
    }
  }
end