Metalshark
Metalshark

Reputation: 8482

Extending Google Appstats

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?

Upvotes: 1

Views: 265

Answers (1)

Guido van Rossum
Guido van Rossum

Reputation: 16890

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.

Upvotes: 2

Related Questions