Add client feature logging and metrics
Related https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14332
Example logs:
time="2017-10-05T13:40:10+01:00"
level=info
msg="spawn complete"
args="[/usr/local/bin/git --git-dir /Users/andrewn/code/gitlab/gitlab-development-kit/repositories/moocow/html5-boilerplate.git log -z --pretty=format:%H%x1f%s%x1f%B%x1f%an%x1f%ae%x1f%aI%x1f%cn%x1f%ce%x1f%cI%x1f%P --max-count=1 a0073b9de64963a6ff91992d4b518eb0d87dba93 -- modernizr-config.json]"
command.exitCode=0
command.inblock=0
command.maxrss=1970176
command.oublock=0
command.real_time_ms=10.458
command.system_time_ms=1.9780000000000002
command.user_time_ms=2.419
grpc.meta.client_feature=bob
grpc.meta.client_name=gitlab-ruby
grpc.method=LastCommitForPath
grpc.request.repoPath=moocow/html5-boilerplate.git
grpc.request.repoStorage=default
grpc.request.topLevelGroup=moocow
grpc.service=gitaly.CommitService
path=/usr/local/bin/git
peer.address=
span.kind=server
system=grpc
(notice the new grpc.meta.client_feature
and grpc.meta.client_name
fields)
New metrics are also available in prometheus:
gitaly_feature_requests{client_feature="bob",client_name="gitlab-ruby",grpc_code="OK"} 146
This will give us insight into n+1 problems, feature-by-feature failures and more
Edited by GitLab Release Tools Bot