Fix the scope of the injection of add_method_tracer

Moved the injection of add_method_tracer from the instance level to the class level.