Skip to content

Support API requests in Performance Bar

Heinrich Lee Yu requested to merge 33909-peek-api-requests into master

What does this MR do?

This MR adds Peek support for our Grape endpoints.

It sets the peek_enabled flag in the RequestStore before each request just like we do in our controllers.

Then we persist Peek data manually after each request because Peek only does this for Rails controllers but not for Grape endpoints.

Related to #33909 (closed)

Testing manually

  1. Click the plus button on the performance bar
  2. Type in a request ID or URL of an API call
  3. You should see the queries and other info in the performance bar

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Heinrich Lee Yu

Merge request reports