Extracted ThreadTrace in an interface and abstract class, such that we
can plug into the Trace example.