2020-06-03 23:08:05 -04:00
---
stage: Monitor
2021-03-18 11:09:04 -04:00
group: Monitor
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-06-03 23:08:05 -04:00
---
2021-01-28 01:08:59 -05:00
# Request Profiling **(FREE SELF)**
2016-10-14 13:49:36 -04:00
2020-06-10 11:08:07 -04:00
To profile a request:
2018-11-29 18:07:14 -05:00
2020-06-10 11:08:07 -04:00
1. Sign in to GitLab as a user with Administrator or Maintainer [permissions ](../../../user/permissions.md ).
2020-07-28 20:09:37 -04:00
1. In the navigation bar, click **Admin area** .
2021-03-08 22:09:36 -05:00
1. Go to **Monitoring > Requests Profiles** .
2020-06-10 11:08:07 -04:00
1. In the **Requests Profiles** section, copy the token.
1. 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:
2016-10-14 13:49:36 -04:00
2020-06-10 11:08:07 -04:00
- Browser extensions such as the
[ModHeader ](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj )
Chrome extension.
- `curl` . For example:
2018-11-29 18:07:14 -05:00
2020-06-10 11:08:07 -04:00
```shell
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
2020-08-04 14:09:49 -04:00
**Monitoring > Requests Profiles** administration page:
2020-06-10 11:08:07 -04:00
![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.