debian-mirror-gitlab/doc/administration/monitoring/performance/request_profiling.md
2021-01-30 21:13:32 +05:30

1.4 KiB

stage group info
Monitor Health To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers

Request Profiling

To profile a request:

  1. Sign in to GitLab as a user with Administrator or Maintainer permissions.

  2. In the navigation bar, click Admin area.

  3. Navigate to Monitoring > Requests Profiles.

  4. In the Requests Profiles section, copy the token.

  5. Pass the headers X-Profile-Token: <token> and X-Profile-Mode: <mode>(where <mode> can be execution or memory) to the request you want to profile. When passing headers, you can use:

    • Browser extensions such as the ModHeader Chrome extension.

    • curl. For example:

      curl --header 'X-Profile-Token: <token>' --header 'X-Profile-Mode: <mode>' "https://gitlab.example.com/group/project"
      

      Profiled requests can take longer than usual.

After the request completes, you can view the profiling output from the Monitoring > Requests Profiles administration page:

Profiling output

Cleaning up profiled requests

The output from profiled requests is cleared out once each day through a Sidekiq worker.