-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add message receive and send tracing to chip-tool #13637
Add message receive and send tracing to chip-tool #13637
Conversation
PR #13637: Size comparison from 7b28de4 to 6ddeb63 Increases (2 builds for linux)
Decreases (5 builds for k32w, qpg, telink)
Full report (14 builds for efr32, k32w, linux, p6, qpg, telink)
|
PR #13637: Size comparison from 1c2091b to 133f419 Increases (2 builds for linux)
Decreases (17 builds for esp32, k32w, mbed, nrfconnect, qpg, telink)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
/rebase |
- Move tracing from SecureMessageCodec to SessionManager to allow covering both received and sent messages - Add received message tracing - Update trace handling to be flexible to receiving a context pointer. - Refactor trace handling logic in common/tracing to be more flexible to - Add bookend FinishEvent to the TraceStream interface to assist in event flushing. Testing done: - Integration tests pass, unit tests all pass - Validated manually through several runs that with chip-tool (using `--trace_log 1`) that dumped received/sent message traces match the outer higher-level (but less detailed) logs around them
133f419
to
17c0a1d
Compare
fast track: this has been up sufficiently for cross timezone review. Functionality is mostly concerning tests/debug rather than functionality. Already has a few checkmarks without open concerns. |
PR #13637: Size comparison from 78a6636 to 17c0a1d Increases (3 builds for linux, p6)
Decreases (14 builds for esp32, nrfconnect, qpg, telink)
Full report (27 builds for efr32, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
|
* Add message receive and send tracing to chip-tool - Move tracing from SecureMessageCodec to SessionManager to allow covering both received and sent messages - Add received message tracing - Update trace handling to be flexible to receiving a context pointer. - Refactor trace handling logic in common/tracing to be more flexible to - Add bookend FinishEvent to the TraceStream interface to assist in event flushing. Testing done: - Integration tests pass, unit tests all pass - Validated manually through several runs that with chip-tool (using `--trace_log 1`) that dumped received/sent message traces match the outer higher-level (but less detailed) logs around them * Restyled by clang-format * Address review comments Co-authored-by: Restyled.io <[email protected]>
Hi @tcarmelveilleux, |
Problem
Also, there didn't exist a way to see all traffic without encryption hacks for a given node, to assist in debugging.
Change overview
SecureMessageCodec
toSessionManager
to allow covering both received and sent messagesFinishEvent
to theTraceStream
interface to assist in event flushing.What it looks like in the logs with
--trace_log 1
in chip-tool (and tracing enabled, which it isn't by default in the build yet):Two messages, one outgoing, one incoming:
After basic parsing to recover JSON:
Testing
--trace_log 1
) that dumped received/sent message traces match the outer higher-level (but less detailed) logs around them