summaryrefslogtreecommitdiff
path: root/internal/sshd/connection.go
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2022-04-14 05:47:34 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2022-04-14 05:47:34 +0000
commit5fe0d17f11eb122d45bad9126c7c0646e196b1c5 (patch)
treebc89cbdc9ec3ca400305975e83363669fe639e69 /internal/sshd/connection.go
parent9abd6d79043f90057ff9a7bf9deecb868e83c46d (diff)
parentcc353a57f3aa8f3f751c175ea596d2baca0b1f19 (diff)
downloadgitlab-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.go8
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" {