Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outbound IP logging #201

Merged
merged 3 commits into from
Feb 15, 2024
Merged

Fix outbound IP logging #201

merged 3 commits into from
Feb 15, 2024

Conversation

jjiang-stripe
Copy link
Collaborator

I was staring at this chunk of code earlier trying to figure out how the outbound remote IP was logged, and realized there was actually a little coding error here. fields in pkg/smokescreen/smokescreen.go was in a closure, so it wasn't writing the fields, and now that it is, we can remove a bit of duplicate code in pkg/smokescreen/conntrack/instrumented_conn.go.

I deployed this change to our QA environment internally and verified that we still see outbound_remote_addr on connection close, as well as outbound_local_addr

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Pull Request Test Coverage Report for Build 5766806490

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 62.398%

Totals Coverage Status
Change from base Build 5764499869: -0.1%
Covered Lines: 1296
Relevant Lines: 2077

💛 - Coveralls

@coveralls
Copy link

coveralls commented Feb 5, 2024

Pull Request Test Coverage Report for Build 7918541800

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 62.398%

Totals Coverage Status
Change from base Build 7064362574: -0.1%
Covered Lines: 1296
Relevant Lines: 2077

💛 - Coveralls

@jjiang-stripe jjiang-stripe force-pushed the jjiang/fix-logging-addrs branch from 6b9e46b to bc280e3 Compare February 14, 2024 22:38
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,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is removed because it's already on the logger as LogFieldOutRemoteAddr

@jjiang-stripe
Copy link
Collaborator Author

r? @cds2-stripe

@jjiang-stripe jjiang-stripe merged commit fbd1ea7 into master Feb 15, 2024
5 checks passed
@jjiang-stripe jjiang-stripe deleted the jjiang/fix-logging-addrs branch February 15, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants