Great to see more focus on observability for Wasm now. This was a major impetus and still a major goal of the Wizard Research Engine, which has engine-level hooks that allow programmable instrumentation.
We're inspired by this project, linking for posterity: https://github.com/titzer/wizard-engine