uses_hook_methods

passengersim.tracers.generic.uses_hook_methods(tracer: GenericTracer | type[GenericTracer]) → bool[source]

Whether a tracer is written in the hook-method form.

Parameters:
tracer : GenericTracer or type[GenericTracer]

A tracer, or a tracer class.

Returns:

bool – True if the class overrides at least one on_<hook> method, and False for a legacy tracer that runs __call__ on one hook.