We would like to monitor the resource usage on our application. This will help determine in the future how we scale our application with changing requests rates.
Steps:
implement a custom metric api_requests_total. Hint: go to middleware.py where there is already some logic to trace all requests coming in.
Set up a dashboard in grafana. This should include the rate of total requests per every one minute. It should also include the process_cpu_seconds_total metric automatically exported by django as a rate per minute.
This dashboard will give us insights into how CPU usage fluctuates with request rates
We would like to monitor the resource usage on our application. This will help determine in the future how we scale our application with changing requests rates.
Steps:
implement a custom metric
api_requests_total. Hint: go to middleware.py where there is already some logic to trace all requests coming in.Set up a dashboard in grafana. This should include the rate of total requests per every one minute. It should also include the process_cpu_seconds_total metric automatically exported by django as a rate per minute.
This dashboard will give us insights into how CPU usage fluctuates with request rates