Add a new GLQL logging service and update the query service to use it
What does this MR do and why?
Add a new GLQL logging service and update the query service to use it.
This is needed because we want the same logging and rate limiting logic for both the GraphQL and REST APIs.
For how the query service is being used, you can look at Draft: Create a new GLQL REST API for Duo integ... (!209517)
References
Related to #578342
References
Screenshots or screen recordings
See !211603 for UI screenshots.
How to set up and validate locally
You may wish to run gdk cleanup to have clean logs before you test.
For verifying the UI still works:
- Open a markdown or description field, for instance, an issue comment.
- Add a GLQL query to the comment, e.g. (remove
\):\`\`\`glql display: table fields: title, state, assignee, updated sort: updated desc query: project = "gitlab-duo/test" and type = Issue \`\`\` - Verify that the GLQL query converts to an embedded view when previewing the comment or submitting to the issue.
For verifying logs still add glql_referer and glql_query_sha:
- Open
<GITLAB_REPO_DIR>/log/development_json.log - Find the log for the GLQL request
- Verify the values added to the log
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Robert Hunt