What is the best way to monitor my java app on google app engine? I realize errors are logged and I can check them in the admin console, but I would like to be a little more proactive. I want to be notified immediately when error has occurred.
If you are open to a commercial option, there is Coalmine. This service automatically catches any uncaught exceptions, records them and notifies you. This should be better than simply catching the exception and emailing it yourself because they collect additional data about the request (such as environment settings, parameters, etc). Setting it up for GAE is really easy. Just add the jar to your path (or the maven dep) and then add a web filter to your web.xml
:
<filter>
<filter-name>coalmine</filter-name>
<filter-class>com.coalmine.connector.servlet.filter.GaeCoalmineFilter</filter-class>
<init-param>
<param-name>signature</param-name>
<param-value>MY_COALMINE_SIGNATURE</param-value>
</init-param>
</filter>
They also include adapters for JUL or Log4j so that log.error(...)
automatically reports to Coalmine. Here is a link to the project page for more instructions and configuration options: https://github.com/coalmine/coalmine_java
Disclaimer: I work at Coalmine.
Assuming that you are able to catch the Exceptions in your code, I suggest that you could use Email Service or the XMPP Service to notify you immediately.
Alternately, you could also look at the LogService API to access your logs programmatically and then notify you, depending on what you are looking at.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With