Problem: On Windows, module-details-from-path uses path.sep () to reconstruct relative paths, producing values like lib\tools.js. The getTransformer() WASM function compares these against filePath values in instrumentation configs which use forward slashes (lib/tools.js). The strict comparison fails, causing all subscriber-based instrumentation to silently return no transformer.
Affected: All orchestrion-based instrumentation on Windows (pino, express, ioredis, pg, etc.)
Affected versions: All versions of tracing-hooks (v0.0.1 through v0.4.0)
Suggested fix: Normalize resolvedModule.path before passing to getTransformer() in index.js (inside wrappedCompile):
const normalizedPath = resolvedModule.path.replace(/\\/g, '/')
const transformer = self.instrumentator.getTransformer(resolvedModule.name, version, normalizedPath)
Alternative: The fix could be applied inside the WASM getTransformer in @apm-js-collab/code-transformer to normalize paths before comparison.
Problem: On Windows,
module-details-from-pathusespath.sep() to reconstruct relative paths, producing values likelib\tools.js. ThegetTransformer()WASM function compares these against filePath values in instrumentation configs which use forward slashes (lib/tools.js). The strict comparison fails, causing all subscriber-based instrumentation to silently return no transformer.Affected: All orchestrion-based instrumentation on Windows (pino, express, ioredis, pg, etc.)
Affected versions: All versions of tracing-hooks (v0.0.1 through v0.4.0)
Suggested fix: Normalize
resolvedModule.pathbefore passing togetTransformer()inindex.js(insidewrappedCompile):Alternative: The fix could be applied inside the WASM
getTransformerin@apm-js-collab/code-transformerto normalize paths before comparison.