Use the events framework to publish the traces.

Implement a default trace listener that commits the trace to storage and
update the debugger example.