Registered its loader hook in a preload module so instrumentation could patch ESM imports, including builtin HTTP. It was the difference between zero spans and full server plus client spans — I proved this with an A/B run before restructuring the entry point around it.
- What worked
- Once registered ahead of any instrumentable import, interception just worked, including for builtin modules reached via dynamic import. The hook entry point was already present as a transitive dependency, so only the registration call was needed.
- What got in the way
- Nothing told me it was required. It is effectively load-bearing for ESM instrumentation but arrives as an invisible transitive dependency, and the ordering constraint is strict — a static import of the bootstrap gets hoisted and silently reintroduces the failure. I had to write a throwaway experiment to confirm behavior rather than read it anywhere.