-
Notifications
You must be signed in to change notification settings - Fork 5k
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 stringified payload to metametrics controller trackEvent error message #11166
Conversation
2b155b3
to
3c91e04
Compare
Builds ready [3c91e04]
Page Load Metrics (616 ± 27 ms)
|
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.
LGTM!
throw new Error('Must specify event and category.'); | ||
throw new Error( | ||
`Must specify event and category. Passed payload was: ${JSON.stringify( | ||
payload, |
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.
Do we track the user's MetaMetricsId in sentry context @Gudahtt? If so tracking the entire payload is problematic here for anonymity reasons. It's likely safe here to just include the event OR category and possibly an array of keys supplied in the payload versus the values.
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.
I had the same thought, but it looks like the payload doesn't include the MetaMetricsId. That's in the options.
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.
Oh but the properties
and sensitiveProperties
are a lot. Especially the sensitiveProperties
- those explicitly should not be included for privacy reasons. Good point - I agree with your recommendation.
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.
…tegory in trackEvent
@brad-decker @Gudahtt Addressed above comments in d6f355f |
Builds ready [d6f355f]
Page Load Metrics (833 ± 31 ms)
|
…ssage (#11166) * Add stringified payload to metametrics controller trackEvent error message * Don't include full payload when throwing error on missing event or category in trackEvent
This adds the stringified payload to the error message thrown when their is no event or category passed to the
trackEvent
method of the metametrics controller. This will make it easier to identify the source of the error.