Goal: Provide project owners with insights into their API's health and speed.
Context: The dashboard currently only shows total requests but lacks data on latency (response time) and error rates.
Implementation Requirements:
- Create a global middleware in
apps/public-api to record the response-time and status code of every request.
- Store this data efficiently (e.g., using a dedicated
Analytics collection or aggregation logic).
- Create endpoints in
apps/dashboard-api that return "Average Response Time" and "Error %" for a specific time range.
- Ensure the logging process is asynchronous so it does not impact main API performance.
Goal: Provide project owners with insights into their API's health and speed.
Context: The dashboard currently only shows total requests but lacks data on latency (response time) and error rates.
Implementation Requirements:
apps/public-apito record theresponse-timeandstatus codeof every request.Analyticscollection or aggregation logic).apps/dashboard-apithat return "Average Response Time" and "Error %" for a specific time range.