Register func to be called when the trace hook detail is getting invoked.
Use null for detail to register to all hooks.
| tracer |
the tracer |
| detail |
the detailed hook |
| func |
the callback |