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] #2581: reduce noise in logs #3340

Merged

Conversation

0x009922
Copy link
Contributor

@0x009922 0x009922 commented Mar 30, 2023

Description

I've researched for possible ways on how to configure logging in warp. I found that it's not easy.

Provided warp's tracing filter has hard-coded log levels. To implement something similar, but with patched levels, we need to implement Filter. This is not possible because library authors decided that this should be kept internally and consumers should build their filters in a "convenient" way with warp::any().

So, we decided to exclude /health route from logging at all, as this is the primary issue.

Also, I found that WasmSmartContract debug repr was not that is expected, and fixed it.

Linked issue

Closes #2581

Benefits

  • less noise in logs
  • less noise in TRACE logs (fixed WASM debug repr)

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

It used to print ALL its bytes instead of
a formatted short form

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Mar 30, 2023
@0x009922 0x009922 changed the title ]2581 reduce logs noise [fix] #2581: reduce noise in logs Mar 30, 2023
@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #3340 (6508920) into iroha2-dev (a4d5c9f) will decrease coverage by 4.65%.
The diff coverage is 44.77%.

@@              Coverage Diff               @@
##           iroha2-dev    #3340      +/-   ##
==============================================
- Coverage       62.33%   57.68%   -4.65%     
==============================================
  Files             169      162       -7     
  Lines           31218    31914     +696     
==============================================
- Hits            19459    18409    -1050     
- Misses          11759    13505    +1746     
Impacted Files Coverage Δ
cli/src/lib.rs 0.28% <0.00%> (-69.15%) ⬇️
cli/src/main.rs 0.85% <0.00%> (-0.25%) ⬇️
cli/src/samples.rs 0.00% <ø> (-61.85%) ⬇️
cli/src/torii/mod.rs 0.00% <0.00%> (-27.66%) ⬇️
cli/src/torii/routing.rs 0.00% <0.00%> (-57.11%) ⬇️
cli/src/torii/utils.rs 0.00% <0.00%> (-84.85%) ⬇️
client/src/http_default.rs 0.00% <0.00%> (-38.94%) ⬇️
client_cli/src/main.rs 0.25% <0.00%> (+<0.01%) ⬆️
config/base/src/lib.rs 91.57% <ø> (+55.21%) ⬆️
config/src/lib.rs 33.33% <ø> (ø)
... and 105 more

... and 26 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@0x009922 0x009922 merged commit 6080ba7 into hyperledger-iroha:iroha2-dev Mar 31, 2023
@0x009922 0x009922 deleted the 2581-reduce-logs-noise branch March 31, 2023 04:59
appetrosyan pushed a commit that referenced this pull request Jun 5, 2023
* [fix]: fix `WasmSmartContract` debug representation

It used to print ALL its bytes instead of
a formatted short form

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>

* [fix] #2581: exclude `/health` endpoint from tracing

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>

---------

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
mversic pushed a commit that referenced this pull request Oct 17, 2023
* [fix]: fix `WasmSmartContract` debug representation

It used to print ALL its bytes instead of
a formatted short form

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>

* [fix] #2581: exclude `/health` endpoint from tracing

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>

---------

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants