Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application monitoring for google app engine java

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.

like image 824
Dieseltime Avatar asked Sep 04 '12 16:09

Dieseltime


2 Answers

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.

like image 113
Brad Avatar answered Sep 27 '22 23:09

Brad


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.

like image 39
Romin Avatar answered Sep 27 '22 23:09

Romin