Implement a metaclass to instrument all method calls.