-
Notifications
You must be signed in to change notification settings - Fork 43
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
Adding instrucment #762
Adding instrucment #762
Conversation
Co-authored-by: Akosh Farkash <aakoshh@gmail.com>
Co-authored-by: Akosh Farkash <aakoshh@gmail.com>
…yard/ipc into topdown-lost-commits
@@ -44,6 +46,7 @@ fn init_tracing(opts: &options::Options) -> Option<WorkerGuard> { | |||
fmt::Layer::new() | |||
.json() | |||
.with_writer(non_blocking.with_max_level(log_level)) | |||
.with_span_events(FmtSpan::CLOSE) |
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.
What does this do?
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.
The documentation is a bit short in exact details, but I think if we use FmtSpan::CLOSE
only like here then the generated event will also contain the total time the span was entered (+ time the span existed but was not entered).
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.
Sorry, just noticed that the tests are actually failing: https://github.com/consensus-shipyard/ipc/actions/runs/8098552876/job/22132258717
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.
Ah, no worries, I see this is going into the other branch where you are already fixing them.
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
@@ -44,6 +46,7 @@ fn init_tracing(opts: &options::Options) -> Option<WorkerGuard> { | |||
fmt::Layer::new() | |||
.json() | |||
.with_writer(non_blocking.with_max_level(log_level)) | |||
.with_span_events(FmtSpan::CLOSE) |
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.
The documentation is a bit short in exact details, but I think if we use FmtSpan::CLOSE
only like here then the generated event will also contain the total time the span was entered (+ time the span existed but was not entered).
Adding
#[instrument]
to debug topdown syncer performance issue.