It's we, the readers as well as other people concerned, that are "going by". The expression going by something as used in this example is very similar in meaning to the expression judging by/from something. Let's sightly paraphrase that sentence fragment to make it easier to read:
Judging by the reaction to Beijing's surprise decision to stop taking in 24 types of scraps starting 2018, we can now clearly see that a lot of countries actually took for granted China's status as a trash dumping ground.
So, the idea here is that many countries were taken aback by China's unexpected move to put an end to its status as the world's largest importer of waste because they thought that, as long as they were paying good money, China was, is and will always be used as a trash drop-off location for the entire world, which is a status that most people in China probably found humiliating.