Skip to content

chore: improve p2p protocol error logging#1179

Merged
glevco merged 1 commit intomasterfrom
chore/p2p-error-logging
Nov 8, 2024
Merged

chore: improve p2p protocol error logging#1179
glevco merged 1 commit intomasterfrom
chore/p2p-error-logging

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Nov 8, 2024

Motivation

In a recent PR we changed the error handling when processing P2P protocol messages. It was changed from a try-except to an errback on a Deferred. Because of that, logging with exc_info is not useful, since we're not in an exception context anymore, it's empty. Instead, we should log the traceback from the twisted.Failure.

Also, I changed it from warn to error as any error should be handled before reaching this code, and if it does, it's an unhandled error that we should know about.

Acceptance Criteria

  • When logging errors during processing of a P2P protocol message, include the traceback and change it to error instead of warn.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Nov 8, 2024
@glevco glevco marked this pull request as ready for review November 8, 2024 22:49
@github-actions
Copy link

github-actions bot commented Nov 8, 2024

🐰 Bencher Report

Branchchore/p2p-error-logging
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Lower Boundary
nanoseconds (ns)
(Limit %)
Upper Boundary
nanoseconds (ns)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
101,455,453,043.28
(-0.31%)
91,594,021,961.85
(90.28%)
111,948,249,064.48
(90.63%)
🐰 View full continuous benchmarking report in Bencher

@codecov
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.75%. Comparing base (6ad7089) to head (995fe1f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1179      +/-   ##
==========================================
- Coverage   84.84%   84.75%   -0.10%     
==========================================
  Files         314      314              
  Lines       24335    24335              
  Branches     3708     3708              
==========================================
- Hits        20648    20624      -24     
- Misses       2979     2996      +17     
- Partials      708      715       +7     

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

@glevco glevco merged commit 759c1d7 into master Nov 8, 2024
@glevco glevco deleted the chore/p2p-error-logging branch November 8, 2024 23:21
@jansegre jansegre mentioned this pull request Nov 21, 2024
2 tasks
@jansegre jansegre mentioned this pull request Dec 11, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants