Monitoring and measuring distributed systems