diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-16 14:09:33 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-16 14:10:56 +0200 |
commit | 79558da92f627da9e310160c89acdeba8b92b359 (patch) | |
tree | e1615fc13c36ccb3cf35edc18a90e60072fac7df /lib/gitlab_access.rb | |
parent | ed59fbc3b72146cd9c4e040c64150c8b961c7d42 (diff) | |
download | gitlab-shell-more-instrumentation-down-the-pipeline.tar.gz |
Add instrumentation to push hooksmore-instrumentation-down-the-pipeline
Related to #22053
Diffstat (limited to 'lib/gitlab_access.rb')
-rw-r--r-- | lib/gitlab_access.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb index ab431bf..34cf4b1 100644 --- a/lib/gitlab_access.rb +++ b/lib/gitlab_access.rb @@ -2,6 +2,7 @@ require_relative 'gitlab_init' require_relative 'gitlab_net' require_relative 'gitlab_access_status' require_relative 'names_helper' +require_relative 'gitlab_metrics' require 'json' class GitlabAccess @@ -20,7 +21,9 @@ class GitlabAccess end def exec - status = api.check_access('git-receive-pack', @repo_path, @actor, @changes, @protocol) + status = GitlabMetrics.measure('check-access:git-receive-pack') do + api.check_access('git-receive-pack', @repo_path, @actor, @changes, @protocol) + end raise AccessDeniedError, status.message unless status.allowed? |