Skip to content

Is yarn 4 with nodeLinker pnpm supported ? #2812

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

Open
1 task
pithu opened this issue May 5, 2025 · 1 comment
Open
1 task

Is yarn 4 with nodeLinker pnpm supported ? #2812

pithu opened this issue May 5, 2025 · 1 comment

Comments

@pithu
Copy link

pithu commented May 5, 2025

We have a typescript project that is using winston logger and express. We transpiling the code with tsc to commonjs. We are using yarn4 as a package manager, @opentelemetry/[email protected] and @opentelemetry/[email protected]

We run the server with node --require @opentelemetry/auto-instrumentations-node/register --inspect dist/index.js

When setting the yarn nodeLinker to node-modules (yarn config set nodeLinker node-module) the winston log library is logging the trace context as expected.

When setting the yarn nodeLinker to pnpm (yarn config set nodeLinker pnpm) the winston log library is NOT logging the trace context as expected. the trace-id is missing in winston context.

  • [ x ] This only affects the JavaScript OpenTelemetry library
  • This may affect other libraries, but I would like to get opinions here first
@pithu
Copy link
Author

pithu commented May 5, 2025

I can confirm that our setup is working with nodeLinker pnp, the default for yarn.

yarn config set nodeLinker pnp
yarn install
yarn node --require @opentelemetry/auto-instrumentations-node/register --inspect dist/index.js

With this setup, winston is logging the trace context as expected.

So could it be an issue how pnpm symlinks external dependencies to the node_modules folder ?

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

No branches or pull requests

1 participant