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

Reduce connection close error logs #150

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

gabrielcorado
Copy link
Contributor

When a connection closes without any message left, there is always a log that appears. This happens not even when the connection is established and closed, but in all connections being closed. This has shown to be a very annoying log (sometimes entire slots of logs are just composed by this message) and does not fully represent the error and can be misleading.

{"component":"pitaya","level":"error","msg":"Error reading next available message: invalid header","time":"2020-12-09T21:21:25Z"}

The idea here is to treat a connection close differently from, for example, a header with an invalid format or an incomplete message. By doing this, we are able to not log an error when it happens and reduce the noise generated in the logs.

Copy link
Contributor

@leohahn leohahn left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1073

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 69.153%

Totals Coverage Status
Change from base Build 1071: 0.05%
Covered Lines: 4589
Relevant Lines: 6636

💛 - Coveralls

@gabrielcorado gabrielcorado merged commit 194b1b3 into master Dec 10, 2020
@gabrielcorado gabrielcorado deleted the feature/reduce-connection-close-logs branch December 10, 2020 15:13
@renatoaf
Copy link
Member

😍 this fixes #138 right?

@rodopoulos
Copy link
Contributor

😍 this fixes #138 right?

Yes! :)

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.

None yet

5 participants