Added tracing to command and event sending.