• Stan Hu's avatar
    Improve Marginalia comments for API requests · a3f8a7a1
    Stan Hu authored
    This change adds a `endpoint_id` annotation to the Marginalia comments
    to help trace SQL queries to their origin. Examples:
    
    * For Grape API requests, this is the route
      (e.g. `/api/:version/users/:id`).
    * For GraphQL requests, this is `GraphqlController#execute`.
    * For Rails requests, this is in the controller and action
      (e.g. `Projects::BlobController#show`).
    
    Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/323161
    a3f8a7a1
comment.rb 1.1 KB