The Fundamentals of Synthetic Monitoring