refactor(tracing): extract the tracing code to a standalone package