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

feat(read_handler): log when max hearbeat missed #151

Merged
merged 5 commits into from
Oct 26, 2024

Conversation

RoloEdits
Copy link
Contributor

This can be useful when debugging if the limit was reached, otherwise there is no easy way to tell.

Also fixed some typos.

This can be useful when debugging if the limit was reached, otherwise
there is no easy way to tell.
@RoloEdits
Copy link
Contributor Author

I'm also wondering if maybe we should change

error!("missing heartbeat from server for {}", self.amqp_connection);

to a warn instead?

@michaelklishin
Copy link
Contributor

@RoloEdits two missed heartbeats (and it's usually two or zero, very rarely just one) per AMQP 0-9-1 spec require the client (or server) to close the connection. So both a warning and an error can be appropriate assuming that right before closing the connection, this client will log a relevant error of sorts.

@RoloEdits
Copy link
Contributor Author

Yeah, currently when its just one miss, which isn't the end of the world, its logged as an error, which when filtering can make things pretty noisy depending on the sink you are using. A warn makes more sense to me in this case. The actual error would be the connection closing due to the misses.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.48%. Comparing base (de3c858) to head (27563e5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
amqprs/src/net/reader_handler.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #151   +/-   ##
=======================================
  Coverage   86.47%   86.48%           
=======================================
  Files          40       40           
  Lines        6619     6620    +1     
=======================================
+ Hits         5724     5725    +1     
  Misses        895      895           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gftea
Copy link
Owner

gftea commented Oct 26, 2024

@RoloEdits thanks!

@gftea gftea merged commit e9c419f into gftea:main Oct 26, 2024
12 of 13 checks passed
@RoloEdits RoloEdits deleted the log-max-heartbeat-missed branch October 26, 2024 22:21
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