API monitoring and logging