Skip to content

Improve log messages #6161

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

Open
gw0 opened this issue Apr 22, 2025 · 0 comments
Open

Improve log messages #6161

gw0 opened this issue Apr 22, 2025 · 0 comments

Comments

@gw0
Copy link
Contributor

gw0 commented Apr 22, 2025

SUMMARY

Some log messages have an incorrect level, unclear message, or missing. Due to the huge amount of logs, we should keep in mind that many node operators have logging level set to warn or even error.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • runtime
  • worker/registration
ADDITIONAL INFORMATION
  1. If anything is wrong with the runtime/enclave, it should be an have "level":"error". Currently:
{"component":"ronl","level":"warn","module":"runtime","msg":"runtime execution failed: Enclave panicked.","runtime_id":"...","runtime_name":"...","ts":"2025-04-19T17:11:02.417243335Z"}
  1. Failed node registrations should be logged with "level":"error". Currently we only log when registration is scheduled and when it succeeds, but not when it fails:
{"caller":"worker.go:373","epoch_height":26221881,"level":"info","module":"worker/registration","msg":"per-epoch re-registration scheduled","target_height":26221896,"ts":"2025-04-19T17:10:57.260326573Z"}
{"caller":"worker.go:835","epoch":43656,"level":"info","module":"worker/registration","msg":"performing node (re-)registration","node_id":"...","ts":"2025-04-18T11:11:12.356493166Z"}
{"caller":"worker.go:951","level":"info","module":"worker/registration","msg":"node registered with the registry","ts":"2025-04-18T11:09:51.232704473Z"}
  1. It is unclear as what the node registered as on success. Which mode/role (validator/compute/observer), for which runtime, and for which entity? Maybe even what it failed to register as?
{"caller":"worker.go:951","level":"info","module":"worker/registration","msg":"node registered with the registry","ts":"2025-04-18T11:09:51.232704473Z"}
  1. The registration process is full of unclear log messages (for a typical node operator). It mentions "nil hook" and "not registering" as if something is wrong, but then either logs a successful registration (or quietly retries in case of a failed node registration).
{"caller":"worker.go:1127","level":"info","module":"worker/registration","msg":"starting node registration service","ts":"2025-04-18T11:19:46.767946795Z"}
{"caller":"worker.go:230","level":"debug","module":"worker/registration","msg":"waiting for consensus sync","ts":"2025-04-18T11:19:46.767967779Z"}
{"caller":"worker.go:951","level":"info","module":"worker/registration","msg":"node registered with the registry","ts":"2025-04-18T11:19:57.851673391Z"}
{"caller":"worker.go:408","level":"debug","module":"worker/registration","msg":"enumerating role provider hooks","ts":"2025-04-18T11:21:10.739051727Z"}
{"caller":"worker.go:426","level":"debug","module":"worker/registration","msg":"nil hook for role","role":"compute","ts":"2025-04-18T11:21:10.739148041Z","ver":3}
{"caller":"worker.go:443","level":"debug","module":"worker/registration","msg":"not registering, no role provider hooks","ts":"2025-04-18T11:21:10.739172249Z"}
{"caller":"worker.go:408","level":"debug","module":"worker/registration","msg":"enumerating role provider hooks","ts":"2025-04-18T11:21:18.206749094Z"}
{"caller":"worker.go:426","level":"debug","module":"worker/registration","msg":"nil hook for role","role":"compute","ts":"2025-04-18T11:21:18.206771224Z","ver":4}
{"caller":"worker.go:443","level":"debug","module":"worker/registration","msg":"not registering, no role provider hooks","ts":"2025-04-18T11:21:18.206776875Z"}
{"caller":"worker.go:408","level":"debug","module":"worker/registration","msg":"enumerating role provider hooks","ts":"2025-04-18T11:21:18.207684376Z"}
{"caller":"worker.go:835","epoch":43656,"level":"info","module":"worker/registration","msg":"performing node (re-)registration","node_id":"...","ts":"2025-04-18T11:21:18.207833678Z"}
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

No branches or pull requests

1 participant