tracer: add more hooks and handle it in the plugins