Extending Google Appstats

274 Views Asked by At

After watching Guido's Google IO talk and hearing the mention that it can be extended (thus providing an instrumentation mechanism for recording your own events) I am still at a loss on how this would be done.

The functions are all for handling RPC and not simply start/stop calls an expensive function (or wrapper) can make.

Has anyone extended the library, more to the point in a safe manner that doesn't require overriding the original?

1

There are 1 best solutions below

7
On BEST ANSWER

I was referring to the ability to record custom events. A simple example is:

from google.appengine.ext.appstats import recording
recording.recorder.record_custom_event('hello', 'data')

Note that you should really check whether recorder is not None before calling its record_custom_event() method.