-
Notifications
You must be signed in to change notification settings - Fork 142
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
✨ [RUM-175] sanitize RegExp and Event #3188
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v6 #3188 +/- ##
=======================================
Coverage 93.57% 93.58%
=======================================
Files 279 279
Lines 7475 7481 +6
Branches 1686 1689 +3
=======================================
+ Hits 6995 7001 +6
Misses 480 480 ☔ View full report in Codecov by Sentry. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
f6f2e84
to
3e6968c
Compare
*/ | ||
function sanitizeObjects(value: object) { | ||
function sanitizeObjects(value: object): string | sanitizedEvent { | ||
try { | ||
// Handle events - Keep a simple implementation to avoid breaking changes |
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.
❓ question: Maybe we could remove this comment now?
currentTarget: event.currentTarget !== null ? (sanitizeObjects(event.currentTarget) as string) : null, | ||
target: event.target !== null ? (sanitizeObjects(event.target) as string) : null, |
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.
🥜 nitpick: Simplification:
currentTarget: event.currentTarget !== null ? (sanitizeObjects(event.currentTarget) as string) : null, | |
target: event.target !== null ? (sanitizeObjects(event.target) as string) : null, | |
currentTarget: event.currentTarget ? (sanitizeObjects(event.currentTarget) as string) : null, | |
target: event.target ? (sanitizeObjects(event.target) as string) : null, |
Motivation
Enhance serialization for
Event
andRegExp
Changes
Testing
I have gone over the contributing documentation.