René's URL Explorer Experiment


Title: MongoDB Integration: find method not measured correctly. · Issue #4495 · getsentry/sentry-javascript · GitHub

Open Graph Title: MongoDB Integration: find method not measured correctly. · Issue #4495 · getsentry/sentry-javascript

X Title: MongoDB Integration: find method not measured correctly. · Issue #4495 · getsentry/sentry-javascript

Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.

Open Graph Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.

X Description: Official Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.

Opengraph URL: https://github.com/getsentry/sentry-javascript

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MongoDB Integration: find method not measured correctly. ","articleBody":"## Package + Version\r\n\r\n\"@sentry/node\": \"6.17.3\",\r\n\r\n## Description\r\n\r\nMongo's methods which return a Cursor doesn't measured correctly. \r\nLet's go thru an example: \r\n\r\n```typescript\r\nconst span = Sentry.getCurrentHub().getScope().getTransaction().startChild({\r\n  op: 'fetching',\r\n  description: 'Scenario Events'\r\n});\r\nconst response = await this.collection.find({ scenario_id: tripId }).sort({ st: 1 }).toArray();\r\nspan.finish();\r\n```\r\n\r\nThis will reported to the Sentry like this (this is example from our real app, so the op and description may vary): \r\n![image](https://user-images.githubusercontent.com/1586852/152310174-88e9faaf-f53c-4e00-8224-8a28d699f099.png)\r\n\r\nFirst row in a screenshot is an outer span, and second row is timing from integration. The actual time for query execution is showed in the first line. \r\n\r\n### Root Cause\r\nThe mongo's integration doesn't know anything about cursors. It's just trying to decorate all top level client async methods with instreumentation code. So in case of `find` method which is synchronously returning `FindCursor` instead  of promise it's just measure time of this sync operation instead of query.\r\n\r\n```typescript\r\n// getsentry/sentry-javascript/packages/tracing/src/integrations/node/mongo.ts\r\n const maybePromise = orig.call(this, ...args) as Promise\u003cunknown>;\r\n          if (isThenable(maybePromise)) {\r\n            return maybePromise.then((res: unknown) => {\r\n              span?.finish();\r\n              return res;\r\n            });\r\n          } else {\r\n            span?.finish();\r\n            return maybePromise;\r\n          }\r\n        }\r\n```\r\n\r\n### Proposed Solution\r\nDecorate Async Cursor methods, or return wrapped Cursor with instrumentation. \r\n\r\n### Motivation\r\nIn our application we use find/findOne = 90/10 so built-in integration for mongo just don't work for a most of the cases","author":{"url":"https://github.com/timofei-iatsenko","@type":"Person","name":"timofei-iatsenko"},"datePublished":"2022-02-03T09:02:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/4495"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:b15f5593-7974-ef1a-4b2d-05824d93bee2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE68C:35E323:B8E2C3:1037E8C:6B04386D
html-safe-noncef345c70d9f3e9d6291cf0c58b5eb4deb64d78175b6ecaf6b80e35e2f22d56056
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjhDOjM1RTMyMzpCOEUyQzM6MTAzN0U4Qzo2QjA0Mzg2RCIsInZpc2l0b3JfaWQiOiI3NDE3ODYxMTUxNDEwODk0OTU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3b74b75013a2362e5d7d9b012671dbc64b14168650eb932358cd882aa711d081
hovercard-subject-tagrepository:3328572
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/getsentry/sentry-javascript/issues/4495
twitter:imagehttps://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b
twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/3328572/1b73c77d-6488-4ece-9e12-e61d9eb2ac2b
og:image:altOfficial Sentry SDKs for JavaScript. Contribute to getsentry/sentry-javascript development by creating an account on GitHub.
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
turbo-cache-controlno-cache
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/4495#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F4495
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F4495
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/4495
Reloadhttps://github.com/getsentry/sentry-javascript/issues/4495
Reloadhttps://github.com/getsentry/sentry-javascript/issues/4495
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/4495
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/4495
#6437https://github.com/getsentry/sentry-javascript/pull/6437
MongoDB Integration: find method not measured correctly. https://github.com/getsentry/sentry-javascript/issues/4495#top
#6437https://github.com/getsentry/sentry-javascript/pull/6437
https://github.com/onurtemizkan
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
https://github.com/timofei-iatsenko
timofei-iatsenkohttps://github.com/timofei-iatsenko
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issue-1122820283
https://user-images.githubusercontent.com/1586852/152310174-88e9faaf-f53c-4e00-8224-8a28d699f099.png
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#event-6001169800
https://github.com/timofei-iatsenko
timofei-iatsenkohttps://github.com/timofei-iatsenko
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1028777967
@kamilogorekhttps://github.com/kamilogorek
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1029219290
AbhiPrasadhttps://github.com/AbhiPrasad
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
Package: nodehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20node%22
Package: tracinghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20tracing%22
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#event-6004439598
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Feb 3, 2022https://github.com/getsentry/sentry-javascript/issues/4495#event-6004439782
https://github.com/timofei-iatsenko
timofei-iatsenkohttps://github.com/timofei-iatsenko
on Feb 11, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1036061616
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Feb 11, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1036224374
@thekiphttps://github.com/thekip
https://github.com/timofei-iatsenko
timofei-iatsenkohttps://github.com/timofei-iatsenko
on Feb 14, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1038974427
https://github.com/joergbaier
joergbaierhttps://github.com/joergbaier
on Apr 14, 2022https://github.com/getsentry/sentry-javascript/issues/4495#issuecomment-1099334880
@thekiphttps://github.com/thekip
@AbhiPrasadhttps://github.com/AbhiPrasad
vladanpaunovichttps://github.com/vladanpaunovic
onurtemizkanhttps://github.com/onurtemizkan
on Oct 14, 2022https://github.com/getsentry/sentry-javascript/issues/4495#event-7590608593
AbhiPrasadhttps://github.com/AbhiPrasad
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#6437https://github.com/getsentry/sentry-javascript/pull/6437
on Dec 7, 2022https://github.com/getsentry/sentry-javascript/issues/4495#event-7976386222
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/4495
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/4495
onurtemizkanhttps://github.com/onurtemizkan
Meta: Help Wantedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Meta%3A%20Help%20Wanted%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.