class ElasticAPM::CentralConfig

def handle_success(resp)

rubocop:disable Metrics/MethodLength
def handle_success(resp)
  if resp.status == 304
    info 'Received 304 Not Modified'
  else
    update = JSON.parse(resp.body.to_s)
    assign(update)
    info 'Updated config from Kibana'
  end
  schedule_next_fetch(resp)
  true
rescue Exception => e
  error 'Failed to apply remote config, %s', e.inspect
  debug { e.backtrace.join('\n') }
end