Skip to content

Commit

Permalink
remove extra field setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jjiang-stripe committed Feb 14, 2024
1 parent 2457d2f commit bc280e3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/smokescreen/conntrack/instrumented_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const (
LogFieldDuration = "duration"
LogFieldError = "error"
LogFieldLastActivity = "last_activity"
LogFieldOutboundAddr = "outbound_remote_addr"
CanonicalProxyConnClose = "CANONICAL-PROXY-CN-CLOSE"
)

Expand Down Expand Up @@ -114,19 +113,13 @@ func (ic *InstrumentedConn) Close() error {
errorMessage = ic.ConnError.Error()
}

var outboundAddr string
if ic.RemoteAddr() != nil {
outboundAddr = ic.RemoteAddr().String()
}

ic.logger.WithFields(logrus.Fields{
LogFieldBytesIn: ic.BytesIn,
LogFieldBytesOut: ic.BytesOut,
LogFieldEndTime: end.UTC(),
LogFieldDuration: duration,
LogFieldError: errorMessage,
LogFieldLastActivity: time.Unix(0, atomic.LoadInt64(ic.LastActivity)).UTC(),
LogFieldOutboundAddr: outboundAddr,
}).Info(CanonicalProxyConnClose)

ic.tracker.Wg().Done()
Expand Down

0 comments on commit bc280e3

Please sign in to comment.