As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 4e3ff70b authored by Igor Drozdov's avatar Igor Drozdov
Browse files

Unify all operations within same connection into span

parent f6baecaa
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,6 +7,7 @@ require (
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/mattn/go-shellwords v1.0.11
github.com/mikesmitty/edkey v0.0.0-20170222072505-3356ea4e686a
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/otiai10/copy v1.4.2
github.com/pires/go-proxyproto v0.6.0
github.com/prometheus/client_golang v1.10.0
Loading
Loading
Loading
Loading
@@ -12,6 +12,7 @@ import (
"sync"
"time"
"github.com/opentracing/opentracing-go"
"github.com/pires/go-proxyproto"
"golang.org/x/crypto/ssh"
Loading
Loading
@@ -216,6 +217,9 @@ func (s *Server) handleConn(ctx context.Context, nconn net.Conn) {
ctx, cancel := context.WithCancel(correlation.ContextWithCorrelation(ctx, correlation.SafeRandomID()))
defer cancel()
span, ctx := opentracing.StartSpanFromContext(ctx, "SSH connection")
defer span.Finish()
sconn, chans, reqs, err := ssh.NewServerConn(nconn, s.serverConfig(ctx))
if err != nil {
log.WithError(err).Info("Failed to initialize SSH connection")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment