Conversation
|
Tagging @MGibson1 who had some great suggestions for the internal confluence docs that these changes originated from. Also tagging @justindbaur as Matt mentioned you're looking into tracing for C#. |
|
Great job! No new security vulnerabilities introduced in this pull request |
| 2026-02-27T21:33:38.451849Z INFO the_nebuchadnezzar::layer_three: follow the white rabbit. foo=Name: Morpheus | ||
| ``` | ||
|
|
||
| ## Async |
There was a problem hiding this comment.
Please include how the level parameter of #[instrument] impacts contained logs of a higher level.
There was a problem hiding this comment.
What I think is interesting and probably deserves a callout is that the instrument context is only applied when it's level is met.
I'm kind of surprised by this behavior since it reduces the context of log messages, but if you know about it, perhaps it can be used for good
There was a problem hiding this comment.
Yeah TBH, I hadn't used that level parameter for the instrument macro in the past, so when I was experimenting with it as part of this suggestion, it also took me by surprise. On the surface it seems like it'd be less useful than I'd assumed it would be. In my commit 31efbcf , I tried to make a case for when it might be useful, but it feels contrived.
If you still want to include the mention of it here in this guide, I will add a note as you specified, about calling out the behavior of when the level is met.
There was a problem hiding this comment.
I think what you did is fine. The other option is to just suggest against it's usage.
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Deploying contributing-docs with
|
| Latest commit: |
ef07f1f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0438e1b6.contributing-docs.pages.dev |
| Branch Preview URL: | https://neuronull-pm-30550-add-contr.contributing-docs.pages.dev |
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
MGibson1
left a comment
There was a problem hiding this comment.
I think one more round on the items I replied to, they're not quite hitting what I think they should
MGibson1
left a comment
There was a problem hiding this comment.
Let's resolve that empty page and then we're good to go

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-30550
📔 Objective
This PR ports a couple of internal confluence docs around our usage of Rust specific logging frameworks for Desktop Native, and general logging guidelines, into the contributing docs.
The language-agnostic guidelines are influenced by my own experience and only a small portion of that (so far) has been at Bitwarden. I welcome any suggestions/ideas.
One area I didn't go too in depth with in these proposed changes is that of security/privacy around logging sensitive data. That is a whole subject in itself and we had some internal chats about it, there are some areas in Desktop Native that I'm aware of which take some approaches to preventing developers from accidentally logging sensitive data. But I felt that could be a separate follow-up effort to get alignment on before writing any documentation about it.
Plan is to
📸 Screenshots