tracer_hooks¶
- passengersim.tracers.generic.tracer_hooks(tracer: GenericTracer | type[GenericTracer]) tuple[str, ...][source]¶
Get the lifecycle hooks a tracer runs on.
A tracer written in the hook-method form runs on every hook whose
on_<hook>method its class overrides. A tracer written in the legacy form runs on its single declaredhook, calling__call__.- Parameters:
- tracer : GenericTracer or type[GenericTracer]¶
A tracer, or a tracer class.
- Returns:
tuple[str, …] – The hooks, in lifecycle order. Empty for a legacy tracer that declares no
hook, which may then be attached to any one hook.- Raises:
TypeError – If the tracer overrides
on_<hook>methods and also declares ahook, so that it is ambiguous which form applies.