Reputation: 3844
I want to log errors from catch statements, like
try {
...
} catch (error) {
logError(error);
}
or
...
.then()
.catch (error) {
logError(error);
}
I've tried to use https://appcenter.ms analytics for this purpose like this
import Analytics from 'appcenter-analytics';
export const logError = (error) => {
const date = new Date();
const properties = { error: `${date} ${error.message}`, stacktrace: `${date} ${error.stack}` };
if (error && error.response && error.response.data) {
properties.response = `${date} ${error.response.data.toString()}`;
}
Analytics.trackEvent('Error', properties);
};
But app center shows me only the top 10 repeated events, which is not really useful for me.
Are there any common practices and solutions for such purpose? The only service I've found from my searches is https://bugfender.com/.
Upvotes: 2
Views: 3607
Reputation: 1
Also, there is NewRelic. Their implementation is not as straightforward IMO as that of Sentry or others (if you are using react-native to build your app), but their dashboards and the information and KPIs they are collecting is pretty impressive.
Upvotes: 0
Reputation: 3844
I started using Bugfender and find it quite nice. I think I'll keep collecting all solutions I'll find in this answer
Upvotes: 7