Improve Marginalia comments for API requests
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
显示
- changelogs/unreleased/sh-improve-api-marginalia-comments.yml 5 个添加, 0 个删除changelogs/unreleased/sh-improve-api-marginalia-comments.yml
- config/initializers/0_marginalia.rb 1 个添加, 1 个删除config/initializers/0_marginalia.rb
- lib/gitlab/marginalia/comment.rb 4 个添加, 0 个删除lib/gitlab/marginalia/comment.rb
- spec/requests/api/api_spec.rb 22 个添加, 0 个删除spec/requests/api/api_spec.rb
加载中
想要评论请 注册 或 登录