After months and months of development, our PHP application is finally live and running. What is going to happen next?
In an imaginary world, we sit and relax. We watch our application get popular and users flood in. And the application will just handle itself nicely because we have done all the testing. Right? Unfortunately, that is not the truth.
As users come in, errors start happening. No matter how many tests we have done. It is impossible to cover all the edge cases caused by real users.
Monitoring is the next step after development. It is the next thing we need to do after our application goes live.
In this tutorial, we discuss what things to monitor and their related services we have used.
For each web request, we want to monitor its metrics such as its URI, request method, response time, status code, and so on.
From the metrics above, we can derive average response time, error rates, and so on.
Related services:
Exceptions from our codebase typically indicate some critical errors or edge cases in our system. We want to fix them before users get affected by their occurrence.
Related services:
When it comes to debugging and troubleshooting. Logs are essential. They contain information we need to fix errors and trace user behaviors.
Related service:
Modern PHP applications use external services(dependencies) such as MySQL, Elasticsearch, Redis, and so on. We need to monitor their performance to ensure the whole application's health.
Related tool:
What other information do you monitor and what tools do you use? Please leave a comment to let us know.