Method, system, and computer program for monitoring performance of applications in a distributed environment