getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.98k stars 1.57k forks source link

Opentelemetry problem in 8.29 : Error ELSPROBLEMS #13646

Closed throrin19 closed 1 month ago

throrin19 commented 1 month ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.29.0

Framework Version

@sentry/aws-serverless

Link to Sentry event

No response

Reproduction Example/SDK Setup

The problem is not in Sentry SDK setup but with opentelemetry part.

After upgrade to 8.29.0, out deploy statement does not works. We use serverless with esbuild and first command made is this :

npm ls -json --omit=dev -long -all | more

And we have this error :

npm error code ELSPROBLEMS
npm error invalid: @opentelemetry/instrumentation@0.53.0 /project-dir/node_modules/@opentelemetry/instrumentation

We try to remove our package-lock.json and make a clean npm iand we have this warning at installation (I precise, warning, not error) :

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @sentry/opentelemetry@8.29.0
npm warn Found: @opentelemetry/instrumentation@0.53.0
npm warn node_modules/@opentelemetry/instrumentation
npm warn   @opentelemetry/instrumentation@"^0.53.0" from @opentelemetry/instrumentation-aws-lambda@0.44.0
npm warn   node_modules/@opentelemetry/instrumentation-aws-lambda
npm warn     @opentelemetry/instrumentation-aws-lambda@"0.44.0" from @sentry/aws-serverless@8.29.0
npm warn     node_modules/@sentry/aws-serverless
npm warn   19 more (@opentelemetry/instrumentation-aws-sdk, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer @opentelemetry/instrumentation@"^0.52.1" from @sentry/opentelemetry@8.29.0
npm warn node_modules/@sentry/opentelemetry
npm warn   @sentry/opentelemetry@"8.29.0" from @sentry/node@8.29.0
npm warn   node_modules/@sentry/node
npm warn
npm warn Conflicting peer dependency: @opentelemetry/instrumentation@0.52.1
npm warn node_modules/@opentelemetry/instrumentation
npm warn   peer @opentelemetry/instrumentation@"^0.52.1" from @sentry/opentelemetry@8.29.0
npm warn   node_modules/@sentry/opentelemetry
npm warn     @sentry/opentelemetry@"8.29.0" from @sentry/node@8.29.0
npm warn     node_modules/@sentry/node

I precise, I have only @sentry/aws-serverless indicates in my package.json

Steps to Reproduce

  1. update @sentry/aws-serverless to 8.28.0
  2. run npm ls -json --omit=dev -long -all | more

Expected Result

No problems

Actual Result

npm error code ELSPROBLEMS
npm error invalid: @opentelemetry/instrumentation@0.53.0 /project-dir/node_modules/@opentelemetry/instrumentation
AbhiPrasad commented 1 month ago

This seems to be the same as https://github.com/getsentry/sentry-javascript/issues/13219 - will be cutting a release soon that fixes this!

AbhiPrasad commented 1 month ago

@throrin19 could you try using https://github.com/getsentry/sentry-javascript/releases/tag/8.30.0 and see if that fixes your issue?

throrin19 commented 1 month ago

@AbhiPrasad thanks for your response. I'll try this tomorrow morning

throrin19 commented 1 month ago

@AbhiPrasad Problem fix with the release 8.30.0. Thanks for your help đŸ˜‰