1/ In Backends
2/ Backends are detected through exit point rules. A backend is something that is called by your code but which is "remote" (ie not inside your JVM
The idea here is you said those """"random""" classes makes calls to backend (DB, external services and so on), therefore a backend (Even locally)
Not sure to be clear enough ;)