We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d5e6e8 commit fd7a386Copy full SHA for fd7a386
packages/autometrics/src/utils.ts
@@ -92,10 +92,15 @@ function getWrappedFunctionPath(): string | undefined {
92
return (
93
index > 2 &&
94
file &&
95
+ // Ignore autometrics internals
96
!file.includes("autometrics/index.cjs") &&
97
!file.includes("autometrics/index.mjs") &&
98
!file.includes("wrappers.ts") &&
- !file.includes("wrappers.js")
99
+ !file.includes("wrappers.js") &&
100
+ // Ignore reflect-metadata - often used by IOC libraries for runtime dependency injection
101
+ // Without this, instrumented functions will be attributed to this module rather than
102
+ // the module the function truly belongs to
103
+ !file.includes("reflect-metadata")
104
);
105
});
106
return call?.file;
0 commit comments