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

Help filter out logs #569

Closed
pgrange opened this issue Oct 19, 2022 · 11 comments · Fixed by #876
Closed

Help filter out logs #569

pgrange opened this issue Oct 19, 2022 · 11 comments · Fixed by #876
Labels
💭 idea An idea or feature request

Comments

@pgrange
Copy link
Contributor

pgrange commented Oct 19, 2022

Why

It is hard to read through the logs as there are quite a lot of them and, depending on the situation, it can be hard to separate noise from information.

Since it's json stuff we should explore how to help filter out interesting logs more easily and, at least, give some advice in documentation.

What

Explore how to filter out interesting logs more easily and share some advice in documentation.

@pgrange pgrange added the 💭 idea An idea or feature request label Oct 19, 2022
@ch1bo
Copy link
Member

ch1bo commented Oct 20, 2022

Besides using tools like grep and jq, there is also the log-filter executable in the hydra-cluster package. But I have never used it by myself. @abailly-iohk did create it.

@GeorgeFlerovsky
Copy link

More options.

Simpler for dev: https://lnav.org/

Advanced for prod: https://prometheus.io/

@ghost
Copy link

ghost commented May 10, 2023

@GeorgeFlerovsky Actually, we already expose Prometheus compatible metrics and it does not by itself solves the log verbosity issue.

From our recent experience troubleshooting opening heads, I'd say this issue is high priority.

@ghost ghost changed the title Help filter out logs Improve usability of logs May 10, 2023
@ghost ghost changed the title Improve usability of logs Help filter out logs May 10, 2023
@ghost
Copy link

ghost commented May 10, 2023

I would like to act upon this red bin item but I think the proper way to go is rather to work on improving the logs. Here are a couple ideas:

  • Log BeginXXX with an eventId and use that in the corresponding EndXXX log entry to reduce amount of data in the latter and easily correlate pair of events/effects
  • Review the data logged with each entry and reduce it to things which are actually interesting to log
  • Do not log full transactions wherever possible but only txids, or trim down the amount of information in the tx (eg. full scripts might not be useful?)
  • Remove chatty Ping network messages and only log state transitions (eg. when a node becomes connected/disconnected)

@GeorgeFlerovsky
Copy link

GeorgeFlerovsky commented May 10, 2023

I think those are sensible ideas.

@uhbif19 what do you think?

@ghost ghost mentioned this issue May 10, 2023
4 tasks
@uhbif19
Copy link
Contributor

uhbif19 commented May 10, 2023

@GeorgeFlerovsky @pgrange

That is cool but does not cover "share some advice in documentation" part. I do not understand what is the supposed algorithm for debugging Hydra issues using logs. Like issues on node connectivity or PostTxOnChainFailed.

@GeorgeFlerovsky
Copy link

@GeorgeFlerovsky @pgrange

That is cool but does not cover "share some advice in documentation" part. I do not understand what is the supposed algorithm for debugging Hydra issues using logs. Like issues on node connectivity or PostTxOnChainFailed.

@uhbif19
What would be your preferred way to debug hydra head issues?

@ghost
Copy link

ghost commented May 11, 2023

@uhbif19 I hear you. I plan to start a section in the docs on Operating & Troubleshooting Hydra which shall contain some advices and tips. More will come as gain experience and feedback from users.

@uhbif19
Copy link
Contributor

uhbif19 commented May 11, 2023

@GeorgeFlerovsky

I do not know, this is why I am asking. Like I want to know for which error/success messages I should look for in first place to check if something is broke.

@ghost
Copy link

ghost commented May 11, 2023

We went through some troubleshooting session lastly while trying to open a head on mainnet, I have some notes I will transfer to docs.

@ghost
Copy link

ghost commented May 16, 2023

@uhbif19 @GeorgeFlerovsky I have started an Operating Hydra Node page with some information about logs and how to troubleshoot common issues: https://github.com/input-output-hk/hydra/blob/abailly-iohk/add-operating-node-section/docs/docs/getting-started/operating-hydra.md

Do you think it's missing some important points? What kind of information could be added/changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 idea An idea or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants