-
Notifications
You must be signed in to change notification settings - Fork 56
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
tracing: Add --trace-json
for visualising traces and add more spans
#3327
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is Additional details and impacted files📢 Thoughts on this report? Let us know! |
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 PR would deserve some clean-up to focus on its main ideas (better use of tracing spans and trace visualization using tracing-chrome
).
I agree that tracing span is a powerful tool to improve thin-edge debug-ability. However, I need more evidence to be convinced by visual traces.
I think efforts need to be made elsewhere first, on what is traced and on the level of details.
6574b60
to
5f1e805
Compare
5f1e805
to
a98c989
Compare
This is to make diff smaller for the next commit that adds a chrome layer that outputs a JSON trace file Signed-off-by: Marcel Guzik <[email protected]>
If `--trace-json` option is used, a `trace-TIMESTAMP.json` file will be created which can be opened by tools like ui.perfetto.dev Signed-off-by: Marcel Guzik <[email protected]>
`TEDGE_TRACE_DIR` environment variable is added to enable trace file output in addition to already present `--trace-json`. It also allows the user to specify the directory where the trace file will be written. I decided on the environment variable because it may be tricky to add the flag to all of the invocation of thin-edge services, particularly if we want to trace all the services and when they are started indirectly, like by systemd. Signed-off-by: Marcel Guzik <[email protected]>
a98c989
to
cd50be0
Compare
TODO
Proposed changes
Add
--trace-json
option that when used causes atrace-TIMESTAMP.json
file will be created which can be opened by tools like https://ui.perfetto.dev.Also added more spans, particularly on the
Actor::run
method, so that we can easily see which actor emitted new span/event.Example: Before new spans
trace-1736783287825075.json
Example: After new spans
trace-1736784244896393.json
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments