Select to view content in your preferred language

Best practices for staying aware of application failures?

794
3
02-14-2013 06:10 AM
SteveCole
Honored Contributor
This is more of an open ended discussion and general question-

As I debug my application more and get it ready for deployment, I've thought more about the post-development phase of an application and one large question has been looming- how do you stay informed about when your app fails? One situation that comes to mind is when the map services you are utilizing in your map are not available.

For example, yesterday and into this morning, I noticed that the layers in my app weren't loading correctly and that the JSON requests were timing out. As it turns out, our Server ran out of disk space. Since I'm actively developing and debugging I can take action fairly quickly; once we publish, however, how do I get timely indications of problems without having to constantly monitor its performance manually (or worse yet get informed by a user)?

Thanks!
Steve
0 Kudos
3 Replies
LukePhilips
Deactivated User
Good topic, hopefully there are many good responses.

I would start with implementing many of the method callbacks and events. Then within those functions log those errors. Assuming your app is using some framework like dojo I'm sure there are log handlers than can take errors and write to a file. For example, adding a layer to the map with addLayer(layer) has the event onLayersAddResult(results) of which the results can be inspected and errors called out. Then for the layer itself, example a dynamic service has the events onError(error) and onUpdateEnd(error). Those errors can also be logged.

It would be nice to see a summary of all error events in the API reference rather than having to poke through every API method to
see if there are any.
0 Kudos
MattLane
Frequent Contributor
Regarding knowing when services are unavailable, I've used this free script before http://www.arcgis.com/home/item.html?id=ffa0007c8e84416eb6c4098fea445737 and had good success. Sends you emails (using whatever email service your organization may have) when it can't get a response.

If you are looking for a third party option with support, I've also used this product before with good success http://www.vestra.com/products/software/geosystems-monitor.html
0 Kudos
SteveCole
Honored Contributor
Thanks guys for the responses. I would have hoped for some more but such is life. Unavailable services seem to be my biggest fear so Matt's link to the Service Notification script was worth it. I wasn't aware of that before and will definitely get that set up within our organization.
0 Kudos