grafana / grafana/pyroscope-nodejs

replace path when running using workspaces

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
51
Forks
36
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.