Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace path when running using workspaces #25

Open
eh-am opened this issue Jan 31, 2023 · 0 comments
Open

replace path when running using workspaces #25

eh-am opened this issue Jan 31, 2023 · 0 comments

Comments

@eh-am
Copy link
Collaborator

eh-am commented Jan 31, 2023

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant