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

Bug 1934616 - Add comment to SQL that is generated by buglist.cgi to add userid, query string, and user agent #2373

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dklawren
Copy link
Collaborator

To help pin-pointing where some long running MySQL queries are coming from, we can add comment strings to the SQL statements that will show up in the long running query logs. The extra information will be helpful in finding out where/who they are coming from and we can work with them to find more efficient ways of getting the data they need like bespoke API calls using the Search API support we have.

@dklawren dklawren requested a review from cgsheeh December 13, 2024 17:59
Copy link
Collaborator

@cgsheeh cgsheeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable. Assuming we log information about the queries we're running in a structured format somewhere, perhaps we could also add this information there also?

@dklawren
Copy link
Collaborator Author

Seems reasonable. Assuming we log information about the queries we're running in a structured format somewhere, perhaps we could also add this information there also?

Yeah. We can see the long running queries at a specific time in the Query Insights page Cloud SQL in the GCP console. When people are experiencing slowness on BMO and see that there is high load on the replica, we can look and see what the actual query was and the comment will give us more info on who is running the query.

@dklawren dklawren merged commit 70544f7 into mozilla-bteam:master Dec 18, 2024
15 of 16 checks passed
@dklawren dklawren deleted the 1934616 branch December 18, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants