This library is brought to you by Edward Hartwell Goose. Thank you very much Ed!

Step 1: Download the Java library

Clone the git repository from here:
git clone

or download the jar file directly.

Step 2: Add counters to your code

When ever you would like to increment a counter, just call:


Behind the scenes, this will result in a "increment" call to the memcache service, which is blazing fast 1).

To update multiple counters at the same time, you can do batch requests like this:
BatchCounter counters = new BatchCounter();

This will only do a single call to memcache instead of three sequential ones.

You can also increment a counter by any discrete number, for example by 5:

counters.increment("Your.Counter.Name", 5L);

Step 3: Set up the ProdEagle export handler

ProdEagle needs to come and collect your counter data in order to be able display graphs and alert you when they drop or exceed a certain value.

Add the following handler to your web.xml:

This handler already has its own authentication method and only allows access to and Administrators of your app.
Do not add additional authentication methods with <security-constraint>.

You should now be able to see by how much your counters have been incremented since the last time collected your data on

Step 4: Set up to collect your counter data

Go to and login using a Google Account that is an Administrator of your AppEngine app.

Add your in the "Your monitored websites" section.

Make sure you use https! Don't use a custom domain if you have on, just use

Now will come and export your data every minute. You need to wait for the first export and then you can start creating new graphs and set up new alerts! Sweet, huh?

1) The first time a counter is incremented, the framework needs to do a datastore write. Additionally, when a fresh serving instance is started, the framework needs to read a datastore entry that contains all counter names. The ProdEagle.* counters record these events if SAVE_PRODEAGLE_STATS in is true (default).