LLT-6820: Add pubkey info to logs - #78
Conversation
4f050c3 to
199e985
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
- Coverage 73.02% 72.66% -0.37%
==========================================
Files 20 20
Lines 4601 4642 +41
==========================================
+ Hits 3360 3373 +13
- Misses 1241 1269 +28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Can you attach a sample of new logs? |
tomaszklak
left a comment
There was a problem hiding this comment.
Could we use tracing::Span(::enter) to avoid modifying all the logs explicitly?
|
|
||
| impl PubKey { | ||
| /// Raw key material. | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
Why is allow(dead_code) needed?
| /// Separator rendered between the kept fragments of a masked public key. | ||
| const MASK_SEPARATOR: &str = "..."; |
There was a problem hiding this comment.
nit: I don't see the point of putting this into a const
| } | ||
|
|
||
| impl std::fmt::Display for PubKey { | ||
| fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
There was a problem hiding this comment.
Can you explain why is there so much more code than the old format_pubkey_short ?
|
@tomaszklak I guess it makes ss makes more sense, to capture |
|
That's from tests, but libtelio has it's own logging setup and I'm curious (and would want ta make sure) how it will look like in production logs. |
199e985 to
dc459f9
Compare

Problem
Currently it's hard to match neptun logs with a peer because there is no peer info attached
Solution
Add peer field to tracing logs with masked public key