Diagnostics: Anonymize events#782
Conversation
There was a problem hiding this comment.
If we end up sending logs, we will need to anonymize more data, but for now, metrics don't really have any place that we could miss to send PII
Codecov Report
@@ Coverage Diff @@
## diagnostics #782 +/- ##
==============================================
Coverage ? 81.96%
==============================================
Files ? 128
Lines ? 4148
Branches ? 524
==============================================
Hits ? 3400
Misses ? 542
Partials ? 206 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Nice. Would this run in a background thread? Probably wouldn't want to do a bunch of regex checks in the UI thread.
There was a problem hiding this comment.
Yup all the code related to diagnostics will run in a background thread. That part will be added in #785 and a future PR to pass in the diagnostics thread.
9d5d87a to
39cc5b2
Compare
2c34b06 to
a6873d9
Compare
4d73955 to
0bfa010
Compare
There was a problem hiding this comment.
👍🏻 I was gonna suggest having a relatively complex e-mail to cover the fact that you used a good regex.
It's probably not perfect, but this is probably covering 99% of e-mails.
There was a problem hiding this comment.
Something that this doesn't do is anonymize recursively. Can events have nested Maps?
There was a problem hiding this comment.
That's a good point. We are still finishing the API but I'd vote against it, since it could get pretty complex to query... In any case, I can add that functionality just in case since it shouldn't be too hard.
There was a problem hiding this comment.
All your tests are super clear and maintainable 👏🏻
There was a problem hiding this comment.
I was thinking the same, these tests are wonderful
There was a problem hiding this comment.
I was thinking the same, these tests are wonderful
a6873d9 to
51d8760
Compare
9b1d91b to
655caea
Compare
9ba43aa to
cb6a088
Compare
Description
Based on #785
Deals with CSDK-652
This PR introduces some basic anonymization guardrails for diagnostics events. Currently we remove emails, uuids and ips from exception error messages, the only arbitrary piece of data.