Open eh-am opened 1 year ago
https://docs.npmjs.com/cli/v7/using-npm/workspaces When running using workspaces, the cwd (aka current directory from what yarn/npm is running from) doesn't necessarily match what's in the stack trace.
cwd
yarn/npm
Therefore the following piece of code doesn't replace the current path with . correctly: https://github.com/pyroscope-io/pyroscope-nodejs/blob/09d3f4d1b77d8640181e871db0fa3d60919e4a7d/src/index.ts#L123-L127
.
Here's an example flamegraph https://flamegraph.com/share/00f3cbd1-a17d-11ed-87c6-42e8e9dddd83 And an example repository https://github.com/eh-am/example-pyroscope-nodejs-workspace
https://docs.npmjs.com/cli/v7/using-npm/workspaces When running using workspaces, the
cwd
(aka current directory from whatyarn/npm
is running from) doesn't necessarily match what's in the stack trace.Therefore the following piece of code doesn't replace the current path with
.
correctly: https://github.com/pyroscope-io/pyroscope-nodejs/blob/09d3f4d1b77d8640181e871db0fa3d60919e4a7d/src/index.ts#L123-L127Here's an example flamegraph https://flamegraph.com/share/00f3cbd1-a17d-11ed-87c6-42e8e9dddd83 And an example repository https://github.com/eh-am/example-pyroscope-nodejs-workspace