Process exporter metrics for git process on Gitaly servers are broken
See #1584 (comment 857265771). All named process activity is being attributed to gitaly
.
I suspect this is because our configuration matches a specific path for the Git binary: cookbook
^/opt/gitlab/embedded/bin/git(?:\s+(?:-C|-c|--git-dir)\s+\S+)*\s+(?P<subcommand>\w[\w-]+)
When I look on a Gitaly server with ps
, I see things like:
/tmp/gitaly-git-exec-path-983964344/git -c core.fsyncObjectFiles=true -c gc.auto=0 -c core.autocrlf=input -c core.useReplaceRefs=false -c uploadpack.allowFilter=true -c uploadpack.allowAnySHA1InWant=true -c pack.windowMemory=100m -c pack.writeReverseIndex=true -c core.hooksPath=/tmp/gitaly-hooks-1348285253 -c uploadpack.packObjectsHook=/opt/gitlab/embedded/bin/gitaly-hooks upload-pack --stateless-rpc --end-of-options REDACTED.git
The problem here is that the git
binary is in a subdirectory of /tmp
.