-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Json structured logs #5784
Json structured logs #5784
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.
this looks pretty good.
defer to @shekhirin and @onbjerg for a closer look
friendly bump here @shekhirin @onbjerg |
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.
This looks great, just nits. Next step is integrating this into the existing logging configuration, right?
verbosity is an easy way to display all logs for a certain level without messing with |
Great! Yep, I am going to proceed then! |
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
… into json-structured-logs
Hi @shekhirin , I have managed to hook up all components. I have also added a Tracer trait in order to standardise the init function and remove the |
Hi @shekhirin gently bump here. I have managed to sync the code with latest main. I have removed the TestTracer and just left the init_test_tracing function since it required a bit of changes around a lot of tests, but tell me if you want i can just do it. I am a bit worried with dealing with more merge conflicts, so help me out here 😊 |
ah sorry about the conflicts, we should have included this much sooner. ptal @shekhirin |
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.
some questions on the API and overall simplification
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
… into json-structured-logs
Hi @shekhirin , all review comments are resolved. Keep in mind there is a slightly different behaviour than what it was before: I have added Also the verbosity cli arg is only being used by the stdout layer. Let me know if we can finally merge this. Thanks a lot!! |
good to merge @shekhirin ? |
@mattsse testing rn |
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, works as expected! Thank you for addressing all the review comments 😄
We will also need to change the CLI documentation in the book, and integrate the tracer into tests with the new |
Thank you for your reviews!
I can take care of it. |
Related to: #5726.
I tried to resume all the functionalities that were a bit spread between
bin/reth/src/cli/mod.rs
andcrates/tracing/src/lib.rs
into a single component defined incrates/tracing/src/tracer.rs
.Basic usage for a json stdout tracer would be:
If no layer is configured it defaults to:
I am a bit confused on why we use
log.filter
andlog.verbosity
as cli args.So i have included them both in the
LayerInfo
, but i feel like since a directive is a rule derived from a filter, I can probably get rid of one of them.LFF (looking for feedback!) please.
CC: @shekhirin @mattsse