https://lakhan.me/posts/implementing-tracing-part-5/