Add some generic debug logs #490
Labels
💻 aspect: code
Concerns the software code in the repository
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
Problem
We sometimes get p99 response timing spikes up into the 20s of seconds. It would be nice to be able to have some idea where this is coming from.
Until we are able to ingest and use the Prometheus metrics for the frontend, we can rely on logs to gather general timings.
Description
Log server side render timings and API request response times. To make it possible to easily trace a requests logs, we should generate and log a request ID (similar to how we do this for the Django logs).
The goal is to identify whether:
We will want to complete #536 first to add a logging utility, probably implementing the request ID there. And then for this issue (as a separate task) write a Nuxt plugin that adds logging to various hooks with the request ID put into the Nuxt context.
Alternatives
Someone could spend time focused on getting Grafana Agent wired up to consume Prometheus metrics from the Nuxt service. We need to change the load balancer rules for the Nuxt service to disallow external requests from hitting the metrics endpoint, only the Grafana Agent should be able to reach it.
Additional context
Implementation
The text was updated successfully, but these errors were encountered: