Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #816
What we need
As described here: #816, in the case of a problem, there is no way to get additional information post-mortem. So we have to spend some time recreating the problem. There was mention of the
defmt
crate for embedded devices, which afaik doesn't work on Linux machines.What will be changed
I'll try a simple approach. The
tracing-subscriber
crate allows us to add a new layer that we can use to forward ourtrace
logs. Using the cratetracing-appender
we can save them to the disk rolling files every hour. To save disk space, we can compress files and remove old ones.Current rococo
debug
logs take ~66 MB for an hour, ~5 MB zipped. Assumingtrace
logs cost 6 times more, I bet for ~400 MB, ~30 zipped, which is not too much to keep logs for the last 24 hours. And of course I have to check how it affects the node performance.I assume we can turn off this additional logging in the configuration, just like we do with prometheus metrics.
Checklist
T
required)