refactor endpoint handling
rename trace.recordException to trace.record
fix exception tracing in examples