summaryrefslogtreecommitdiff
path: root/internal/command/uploadpack
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2020-07-31 12:58:42 +0000
committerIgor Drozdov <idrozdov@gitlab.com>2020-07-31 12:58:42 +0000
commit87402ed127d9855b8123e5e08a4c89d373cc79e8 (patch)
tree6a28feda2a62ec88e889593d7fbf3ae950659e35 /internal/command/uploadpack
parent701ebca0b5d4a8451afe677c3bdb19cc92a5a2f0 (diff)
downloadgitlab-shell-87402ed127d9855b8123e5e08a4c89d373cc79e8.tar.gz
Generate and log correlation IDs
This will make it easier to tie an SSH access request to Rails API and Gitaly requests.
Diffstat (limited to 'internal/command/uploadpack')
-rw-r--r--internal/command/uploadpack/gitalycall.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/command/uploadpack/gitalycall.go b/internal/command/uploadpack/gitalycall.go
index c15ef38..ba0fef2 100644
--- a/internal/command/uploadpack/gitalycall.go
+++ b/internal/command/uploadpack/gitalycall.go
@@ -29,11 +29,9 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error {
}
return gc.RunGitalyCommand(func(ctx context.Context, conn *grpc.ClientConn) (int32, error) {
- ctx, cancel := context.WithCancel(ctx)
+ ctx, cancel := gc.PrepareContext(ctx, request.Repository, response, request.GitProtocol)
defer cancel()
- gc.LogExecution(request.Repository, response, request.GitProtocol)
-
rw := c.ReadWriter
return client.UploadPack(ctx, conn, rw.In, rw.Out, rw.ErrOut, request)
})