Checking out Xamarin Insights
One of the really cool things that came out with Xamarin 4 is Xamarin Insights. Xamarin Insights is an incredibly easy way to get detailed real time app monitoring in your apps.
When I first read about it, I immediately thought of the time I have spent with error reporting AND the time I should have spent doing it better. As most developers know, apps crash, users complain and in the world of app stores for getting apps, the customer / developer relationship is more distant than ever. It is so important to be able to get solid reporting and tracking in your applications so you can improve your apps and make your customers happier.
As you might have guess, I was super excited to try it out, but I wondered how much work it would take to connect it all up. I can honestly say, I can't believe how quick it was to setup and connect. I set aside a few hours to figure it out and I had my sample project working in less than 5 minutes. I couldn't believe it so I made a short screencast to show you.
Here are the basics for those unable to watch the video.
- You add the app in the insights.xamarin.com web interface.
- If you are making a new app, you use the same name and make sure you have the "Use Xamarin Insights" boxed checked while creating the project.
- Start adding in calls to Insights.Report when you have something to report.
If you want to add into an existing app, you need to install the nuget package and add the appropriate Initialize statement which you can get when you add the app in the insights.xamarin.com web interface.
Once you get things connected, you can begin to take a look at what you can do and what you get with so little effort. At the base level, you work with exception reports. Typically, you will be working with a try/catch block and sending the exception with Insights.Report. However, Insights will, by default, report all uncaught exceptions as well. As soon as I read that I had to try it out for myself. It is like magic.
Each "report" gives a nice amount of details though the insights web app (device, OS, stack trace, etc) but if you want to include custom information, to make your life easier, you can by simply adding to the Report call.
The Xamarin Insights web UI is nice and gives plenty of details. In addition, you get settings to turn on/off email notifications, give access to Insights, and set icons. It is simple, but nice. Click on the images below to see the reports from Sample in Xamarin Insights app.
Beyond exception reporting, Xamarin Insights can all do some User and Event tracking. As these are not part of the free plan, I haven't explored them much yet, but I'm hoping to find an opportunity work with Event tracking soon. It would be awesome to track events in your application like when users access certain features and how long they spend doing certain tasks waiting for web api updates.
Overall, Insights is an awesome utility available to Xamarin developers and one I look forward to including in my future apps.