debian-mirror-gitlab/doc/administration/monitoring/performance/request_profiling.md

45 lines
1.7 KiB
Markdown
Raw Normal View History

2020-06-23 00:09:42 +05:30
---
stage: Monitor
2022-04-04 11:22:00 +05:30
group: Respond
2021-02-22 17:27:13 +05:30
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-23 00:09:42 +05:30
---
2022-04-04 11:22:00 +05:30
# Request profiling (DEPRECATED) **(FREE SELF)**
> [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/352488) in GitLab 14.8, and planned for removal in GitLab 15.0.
WARNING:
This feature is in its end-of-life process. It is [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/352488)
for use in GitLab 14.8, and is planned for removal in GitLab 15.0.
2016-11-03 12:29:30 +05:30
2020-06-23 00:09:42 +05:30
To profile a request:
2021-09-04 01:27:46 +05:30
1. Sign in to GitLab as an Administrator or a user with the [Maintainer role](../../../user/permissions.md).
2020-10-24 23:57:45 +05:30
1. In the navigation bar, click **Admin area**.
2021-04-17 20:07:23 +05:30
1. Go to **Monitoring > Requests Profiles**.
2020-06-23 00:09:42 +05:30
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:
- Browser extensions such as the
[ModHeader](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj)
Chrome extension.
- `curl`. For example:
```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-10-24 23:57:45 +05:30
**Monitoring > Requests Profiles** administration page:
2019-02-15 15:39:39 +05:30
2020-06-23 00:09:42 +05:30
![Profiling output](img/request_profile_result.png)
2016-11-03 12:29:30 +05:30
2020-06-23 00:09:42 +05:30
## Cleaning up profiled requests
2019-02-15 15:39:39 +05:30
2020-06-23 00:09:42 +05:30
The output from profiled requests is cleared out once each day through a
Sidekiq worker.