Commit 0186006d authored by Amy Qualls's avatar Amy Qualls

Refresh the request profiling page

The request profiling page glossed over a few steps in the process
of profiling a request. Clean up the page to meet GitLab style,
and fix some of the gaps.
parent aa04f84f
...@@ -6,18 +6,34 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -6,18 +6,34 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Request Profiling # Request Profiling
## Procedure To profile a request:
1. Grab the profiling token from **Monitoring > Requests Profiles** admin page 1. Sign in to GitLab as a user with Administrator or Maintainer [permissions](../../../user/permissions.md).
(highlighted in a blue in the image below). 1. In the navigation bar, click **{admin}** **Admin area**.
![Profile token](img/request_profiling_token.png) 1. Navigate to **{monitor}** **Monitoring > Requests Profiles**.
1. Pass the header `X-Profile-Token: <token>` and `X-Profile-Mode: <mode>`(where `<mode>` can be `execution` or `memory`) to the request you want to profile. You can use: 1. In the **Requests Profiles** section, copy the token.
- Browser extensions. For example, [ModHeader](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj) Chrome extension. 1. Pass the headers `X-Profile-Token: <token>` and `X-Profile-Mode: <mode>`(where
- `curl`. For example, `curl --header 'X-Profile-Token: <token>' --header 'X-Profile-Mode: <mode>' https://gitlab.example.com/group/project`. `<mode>` can be `execution` or `memory`) to the request you want to profile. When
1. Once request is finished (which will take a little longer than usual), you can passing headers, you can use:
view the profiling output from **Monitoring > Requests Profiles** admin page.
![Profiling output](img/request_profile_result.png)
## Cleaning up - Browser extensions such as the
[ModHeader](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj)
Chrome extension.
- `curl`. For example:
Profiling output will be cleared out every day via a Sidekiq worker. ```shell
curl --header 'X-Profile-Token: <token>' --header 'X-Profile-Mode: <mode>' "https://gitlab.example.com/group/project"
```
NOTE: **Note:**
Profiled requests can take longer than usual.
After the request completes, you can view the profiling output from the
**{monitor}** **Monitoring > Requests Profiles** administration page:
![Profiling output](img/request_profile_result.png)
## Cleaning up profiled requests
The output from profiled requests is cleared out once each day through a
Sidekiq worker.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment