From 1b3ca41a19f8f759822fd99c742624b7608e3928 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 28 Sep 2023 11:36:11 +0800 Subject: [PATCH] UserReport: also route to Sentry ## Why Better search, viewing, alert. ## Flaws The sentry version should not be considered the primary one since: - ad-blockers block the packet - sentry's own throttling will sometimes drop successive entries, even if they are distinct. ## Aside Sentry has a formal crash report widget and different dashboard. But that takes a bit of effort and testing to set up, so just use the existing mechanism for now. https://docs.sentry.io/platforms/javascript/enriching-events/user-feedback/?original_referrer=https%3A%2F%2Fdocs.sentry.io%2Fproduct%2Fuser-feedback%2F#embeddable-javascript-widget --- ui/page/report/view.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/page/report/view.jsx b/ui/page/report/view.jsx index c7327ac44f..7a965f6de2 100644 --- a/ui/page/report/view.jsx +++ b/ui/page/report/view.jsx @@ -1,3 +1,4 @@ +import analytics from 'analytics'; import { doToast } from 'redux/actions/notifications'; import { FormField } from 'component/common/form'; import { Lbryio } from 'lbryinc'; @@ -33,6 +34,12 @@ class ReportPage extends React.Component { window.app.store.dispatch(action); }); + analytics.log('User Feedback', { + level: 'info', + fingerprint: ['/$/report'], + extra: { feedback: message }, + }); + this.setState({ message: '' }); }