ImqueueInstrumentation.enable() method

Starts tracing: resolves the live @imqueue/rpc and attaches the hooks to its default options.

Signature:

enable(): void;

Returns:

void

Remarks

Does nothing when the module has already been patched — which is the case when the instrumentation came from imqueueInstrumentation(), whose whole purpose is to hand over the same module instance the application imported.

Resolution here is a synchronous require, and that is the one thing this cannot always get right. Under plain Node an ESM package required this way is the very module the application imported, so the hooks land where they are needed. Under a loader that evaluates ESM and CJS separately — tsx, for one — it is a *second* instance, and patching it traces nothing while looking like success. This used to be silent; it now warns, and imqueueInstrumentation() avoids the problem entirely.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.