Error Logging in Production with Sentry


#1

I just wrote a tutorial on how to set up error logging with Sentry.io for Ionic 2 apps.

Sentry is an open source solution for tracking errors in applications. You can install Sentry on your own server and let your app send its errors there or you can use the Sentry hosted service with a free plan that tracks up to 10.000 events per month. They have paid plans for those who need to track more events.

In the tutorial I also show how to set up source maps on Sentry so you can see the actual TypeScript code that caused the error.


#2

Hi!

I have a bit problem with Sentry error logging on iOS.

Under ionic serve works on Windows and Mac too. Works on Android emulator and device, but on iOS emulator or device it does not reports the error.

ionic cordova run ios -l -c -s --target="iPhone-6s" works on emulator, with an without --prod flag.

Added <allow-navigation href="https://sentry.io/*" /> but nothing changed.

Does anyone have any idea?


#3

Hi @ashteya, I saw your tutorial about Sentry-Ionic integration and thank you for that. Rewriting the urls for Sentry on the callback is a smart move.

For my setup, I was not able to fully implement sourcemapping for Sentry with lazy loaded page modules of Ionic. Have you had any experiences with that? Was your case including any lazy loaded page modules?


#4

Hi @onderceylan.
Sorry for bumping this old thread.
Nevertheless, do you have any news for this? For me it seems that I have the same issue. In the stacktrace there is only a reference to the pagename.module.ts file but not to the pagename.ts file, in which I throw an error. Also, my errors are logged as [object Object] which is not perfect.
Thanks in advance,
Mike


#5

Hey Mike, sorry but no luck so far.