6 Integration testing and monitoring
This chapter covers
- Understanding application telemetry and how Aspire processes logs, metrics, and traces
- Seeing how Aspire manages health checks
- Setting up and running integration tests in Aspire
- Using different testing frameworks for integration tests
- Testing the user interfaces of applications hosted by Aspire
In this chapter, we make our application resilient by testing it before deployment to production and monitoring it while it’s running in production. We'll start with monitoring because the relevant dependencies are already included in the standard Aspire Starter Project template on which our application is based.
Monitoring applications is crucial for several reasons. It allows us to detect problems such as errors, failures, performance bottlenecks, and security breaches early, and early detection enables proactive responses, minimizing effects on users and the business.
Monitoring also helps ensure that our applications are reliable and available. By tracking uptime, response times, and error rates, we can identify areas for improvement and take steps to improve reliability and availability.
Monitoring can also help us use hardware resources efficiently by providing insights into the performance of our applications and infrastructure. By analyzing metrics such as CPU use, memory use, and response times, we can identify performance bottlenecks, optimize resource allocation, and improve overall system performanc