Debugging GitLab Workhorse

As workhorse is a Golang written application, you can use methods for this language to debug programs.

It also supports remote error logging with Sentry. To activate this feature, set the GITLAB_WORKHORSE_SENTRY_DSN environment variable.

For Omnibus installations

The following is defined in the file (/etc/gitlab/gitlab.rb):

gitlab_workhorse['env'] = {'GITLAB_WORKHORSE_SENTRY_DSN' => 'https://foobar'}

For Source installations

The following environment variable can be set in the file (/etc/default/gitlab):

export GITLAB_WORKHORSE_SENTRY_DSN='https://foobar'

Of course, the first thing to look at is the log files that are produced by this component. On an Omnibus-based GitLab installation, you can find them in /var/log/gitlab/gitlab-workhorse.

The following is an excerpt of the default log file:

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.1 Safari/605.1.15" 0.478
2018-08-16_20:26:43.42795 localhost:8080 @ - - [2018/08/16:20:26:43 +0000] "GET /root/mastering-gitlab-12.git/info/refs?service=git-upload-pack HTTP/1.1" 401 26 "" "git/2.15.2 (Apple Git-101.1)" 0.066
2018-08-16_20:26:50.60861 localhost:8080 @ - - [2018/08/16:20:26:50 +0000] "POST /root/mastering-gitlab-12.git/git-upload-pack HTTP/1.1" 200 329 "" "git/2.15.2 (Apple Git-101.1)" 0.249

In the preceding log file, you see, for example, git-http operations such as git-upload-pack.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.196.182