trace: add infrastructure to augment trace output with additional info