Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some generic debug logs #490

Closed
1 task
sarayourfriend opened this issue Nov 14, 2022 · 1 comment
Closed
1 task

Add some generic debug logs #490

sarayourfriend opened this issue Nov 14, 2022 · 1 comment
Assignees
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

Comments

@sarayourfriend
Copy link
Collaborator

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:

  1. We could eagerly timeout API requests and return a "skeleton" rendered page to improve perceived frontend performance
  2. If there are specific types of SSR requests that cause long render times (or perhaps lengthen times in other parts of the Nuxt request/response lifecycle)

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

  • 🙋 I would be interested in implementing this feature.
@sarayourfriend sarayourfriend added 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 💻 aspect: code Concerns the software code in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users labels Nov 14, 2022
@AetherUnbound AetherUnbound added 🟨 priority: medium Not blocking but should be addressed soon ⛔ status: blocked Blocked & therefore, not ready for work and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Nov 15, 2022
@obulat obulat transferred this issue from WordPress/openverse-frontend Feb 22, 2023
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Feb 23, 2023
@obulat obulat moved this from 📋 Backlog to ⛔ Blocked in Openverse Backlog Feb 24, 2023
@sarayourfriend
Copy link
Collaborator Author

This is technically solved by #3108 because we can now actually see per-request timing on Nuxt. I'll close this as solved. It would be nice to add more logging to the Nuxt service, but let's do so on an as-needed basis, rather than artificially trying to decide what logs are helpful.

@sarayourfriend sarayourfriend self-assigned this Dec 1, 2023
@sarayourfriend sarayourfriend removed the ⛔ status: blocked Blocked & therefore, not ready for work label Dec 1, 2023
@sarayourfriend sarayourfriend moved this from ⛔ Blocked to ✅ Done in Openverse Backlog Dec 1, 2023
@openverse-bot openverse-bot moved this from ✅ Done to 📋 Backlog in Openverse Backlog Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Archived in project
Development

No branches or pull requests

3 participants