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

Mongo instrumentation doesn't work with promises #12181

Closed
3 tasks done
richardsimko opened this issue May 23, 2024 · 4 comments
Closed
3 tasks done

Mongo instrumentation doesn't work with promises #12181

richardsimko opened this issue May 23, 2024 · 4 comments
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug

Comments

@richardsimko
Copy link
Contributor

richardsimko commented May 23, 2024

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.2.1

Framework Version

8.2.1

Link to Sentry event

No response

SDK Setup

N/A

Steps to Reproduce

  1. Run an app with Sentry and mongodb
  2. Make a mongodb call with a promise (Not using callbacks)

Expected Result

Traces appear in the instrumentation for the mongodb call (This worked on Sentry < v8.0)

Actual Result

Traces don't appear in the instrumentation

I was asked to open this as a separate issue here: #11499 (comment)

It's an issue in open telemetry which is being tracked here: open-telemetry/opentelemetry-js-contrib#2218

@github-actions github-actions bot added the Package: browser Issues related to the Sentry Browser SDK label May 23, 2024
@richardsimko
Copy link
Contributor Author

richardsimko commented May 23, 2024

Sorry, wrong SDK, it's supposed to be @sentry/node!

@mydea mydea added Package: node Issues related to the Sentry Node SDK and removed Package: browser Issues related to the Sentry Browser SDK labels May 23, 2024
@mydea
Copy link
Member

mydea commented May 23, 2024

Thanks for opening this, we'll try to see if we can contribute this fix upstream!

@richardsimko
Copy link
Contributor Author

richardsimko commented May 23, 2024

Ehh this is really embarrassing but... It works again.

Perhaps my analysis of the root cause was wrong, but since Sentry 8.2.1 it seems to have been fixed. Perhaps #12028 fixed it?

If you have access to our data here is a trace with 8.0.0 where it didn't work:

https://fl101.sentry.io/performance/trace/25f2d12e60134a958dd2f8f604fcad82/?node=txn-9bb0fb5c84d044dd9b7ba3860bc30327&pageEnd=2024-05-17T22%3A45%3A29.000&pageStart=2024-05-17T03%3A24%3A47.000&timestamp=1715985836

And here is one with 8.1.1 for the same endpoint (No changes have been made to the relevant code) which does work:

https://fl101.sentry.io/performance/trace/a3b44d9227bb4feaad6cb3389eb3dfcd/?fov=0%2C23.580810546875&node=txn-5e341572c30c4b4ca268e974a3266812&statsPeriod=24h&timestamp=1716495503

@AbhiPrasad
Copy link
Member

I'm glad it was resolved with a simple version bump. Thanks for helping us validate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug
Projects
Archived in project
Development

No branches or pull requests

3 participants