diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2022-04-14 05:47:34 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2022-04-14 05:47:34 +0000 |
commit | 5fe0d17f11eb122d45bad9126c7c0646e196b1c5 (patch) | |
tree | bc89cbdc9ec3ca400305975e83363669fe639e69 /internal/sshd/connection.go | |
parent | 9abd6d79043f90057ff9a7bf9deecb868e83c46d (diff) | |
parent | cc353a57f3aa8f3f751c175ea596d2baca0b1f19 (diff) | |
download | gitlab-shell-5fe0d17f11eb122d45bad9126c7c0646e196b1c5.tar.gz |
Merge branch 'id-metrics-for-results' into 'main'
Add additional metrics to gitlab-sshd
See merge request gitlab-org/gitlab-shell!593
Diffstat (limited to 'internal/sshd/connection.go')
-rw-r--r-- | internal/sshd/connection.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/internal/sshd/connection.go b/internal/sshd/connection.go index 25b082a..1312833 100644 --- a/internal/sshd/connection.go +++ b/internal/sshd/connection.go @@ -2,7 +2,6 @@ package sshd import ( "context" - "time" "golang.org/x/crypto/ssh" "golang.org/x/sync/semaphore" @@ -29,13 +28,6 @@ func newConnection(maxSessions int64, remoteAddr string) *connection { func (c *connection) handle(ctx context.Context, chans <-chan ssh.NewChannel, handler channelHandler) { ctxlog := log.WithContextFields(ctx, log.Fields{"remote_addr": c.remoteAddr}) - metrics.SshdConnectionsInFlight.Inc() - - defer func(started time.Time) { - metrics.SshdConnectionsInFlight.Dec() - metrics.SshdConnectionDuration.Observe(time.Since(started).Seconds()) - }(time.Now()) - for newChannel := range chans { ctxlog.WithField("channel_type", newChannel.ChannelType()).Info("connection: handle: new channel requested") if newChannel.ChannelType() != "session" { |