make trace api static to fix tracing/asserts during static deinit (global dtors that assert racing the dtor of the global trace object)