-
Notifications
You must be signed in to change notification settings - Fork 39
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
Rework & harmonize aggregator log messages #2009
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
I've added some additional data to the input logs of the aggregator runner functions. It’s just a suggestion, i'm not 100% sure if it brings real value without cluttering the logs. Also included a few rephrasing suggestions and typo in the HTTP routes logs.
mithril-aggregator/src/http_server/routes/artifact_routes/cardano_stake_distribution.rs
Outdated
Show resolved
Hide resolved
mithril-aggregator/src/http_server/routes/artifact_routes/snapshot.rs
Outdated
Show resolved
Hide resolved
mithril-aggregator/src/services/cardano_transactions_importer.rs
Outdated
Show resolved
Hide resolved
mithril-aggregator/src/services/cardano_transactions_importer.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Since now each logs are tagged with their source component.
Prefix them with a `>> ` followed by the rust function name (including the `_`) so they can be search easily.
Prefix enter function logs with the http verb followed by the route path.
And instead add them to a property. This allow to keep the main log messages leans while still providing detailed errors info.
And write them to an isolated `error` property.
There is a caveat: payload and query strings can't be logs this way, so in this cas a local "function enter" log is done. This ensure that those data are logged at the price of routes producing two logs for one call.
Adjust some logs messages & added properties
* mithril-aggregator from `0.5.82` to `0.5.83` * mithril-signer from `0.2.199` to `0.2.200`
80a4792
to
20156b9
Compare
Content
This PR:
>> function_name
.HTTP_VERB /path/to/endpoint
.Pre-submit checklist
Issue(s)
Relates to #1981