sibyl
sibyl copied to clipboard
Use `DynamicSupervisor` and `GenServer`s for `Sibyl.Dynamic`
See TODO linked in Sibyl.Dynamic module for more info, but in short:
Right now, dynamic tracing traces all specified functions via one single process. This is fine for simple traces, but unless we distinguish between invocations of specified functions by their PIDs, we risk accidentally starting, nesting, or ending spans prematurely.
We should instead, based on the PID of the incoming dynamic trace, delegate the handling of messages to GenServers under a DynamicSupervisor which can start up if needed.