Title: Profiles not sent by express SDK · Issue #14655 · getsentry/sentry-javascript · GitHub
Open Graph Title: Profiles not sent by express SDK · Issue #14655 · getsentry/sentry-javascript
X Title: Profiles not sent by express SDK · Issue #14655 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14655
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Profiles not sent by express SDK","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n8.42.0\n\n### Framework Version\n\nexpress v4.18.2\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\ninstrument.js\n```\nconst Sentry = require(\"@sentry/node\");\nconst { nodeProfilingIntegration } = require(\"@sentry/profiling-node\");\n\n// Ensure to call this before requiring any other modules!\nSentry.init({\n debug:true,\n dsn: \"....\",\n integrations: [\n // Add our Profiling integration\n nodeProfilingIntegration(),\n ],\n // Add Tracing by setting tracesSampleRate\n // We recommend adjusting this value in production\n tracesSampleRate: 1.0,\n\n // Set sampling rate for profiling\n // This is relative to tracesSampleRate\n profilesSampleRate: 1.0,\n});\n```\n\napp code:\n```\nrequire(\"./instrument\");\n\n// Now require other modules\nconst express = require(\"express\");\nconst Sentry = require(\"@sentry/node\");\n\nconst app = express()\nconst port = 8000\nconst http = require('http')\n\nfunction bubble (arr){ //bubble sort for computation\n for (var i = 0; i \u003c arr.length; i++) {\n for (var j = 0; j \u003c (arr.length - i - 1); j++) {\n if (arr[j] > arr[j + 1]) {\n var temp = arr[j]\n arr[j] = arr[j + 1]\n arr[j + 1] = temp\n }\n }\n }\n}\n\napp.get(\"/\", function rootHandler(req, res) {\n var arr = Array.from({length: 400000}, () => Math.floor(Math.random() * 4000));\n bubble(arr)\n res.end(\"hiii\")\n});\n\nSentry.setupExpressErrorHandler(app);\napp.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))\n```\n\n### Steps to Reproduce\n\n1. Run the app above\n2. Go to localhost:8000\n\n### Expected Result\n\nThe SDK sends profiles and transactions to the Sentry project.\n\n### Actual Result\n\nTransactions are sent but no profiles. Here is the SDK debug log attached. Noticeably are the lines:\n```\nSentry Logger [log]: [Profiling] started profiling transaction: GET\nSentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - query: true\nSentry Logger [log]: [Tracing] Starting sampled span\n....\nSentry Logger [log]: [Profiling] stopped profiling of transaction: GET /\nSentry Logger [log]: Flushing outcomes...\nSentry Logger [log]: No outcomes to send\nSentry Logger [log]: [Profiling] max profile duration elapsed, stopping profiling for: GET /\nSentry Logger [log]: [Profiling] stopped profiling of transaction: GET /\nSentry Logger [log]: [Profiling] profiler returned null profile for: GET / this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started\nSentry Logger [log]: Flushing client reports based on interval.\n```\n\nThese are the same log messages reported by the affected customer, which had profiles sent by the SDK normally prior to the update from v7.120.0 to v8.42.0\n\n[profilelogs.txt](https://github.com/user-attachments/files/18091739/profilelogs.txt)\n","author":{"url":"https://github.com/rodolfoBee","@type":"Person","name":"rodolfoBee"},"datePublished":"2024-12-11T08:18:24Z","url":"https://github.com/getsentry/sentry-javascript/issues/14655"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:704e999d-da2a-fae1-76c9-28acd536cd4d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB50:2F9258:1F97BD4:294564A:6B040C8C |
| html-safe-nonce | 8d171d73bc7bee74d98ace0c9bca081bcdb8402a32ae0ca44949f142f701be91 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjUwOjJGOTI1ODoxRjk3QkQ0OjI5NDU2NEE6NkIwNDBDOEMiLCJ2aXNpdG9yX2lkIjoiODAzODgxNjM4MTkyMTM5NzkwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 44d02e07cdf98390fdd8dc5a10a022dce4424f4019f425d4014d2c7eca032c27 |
| hovercard-subject-tag | issue:2732203977 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/14655/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba4d24743487cd7438f0434610ce91fca487ffe1c5b0d1c62d42b4a3dfa0b010/getsentry/sentry-javascript/issues/14655 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba4d24743487cd7438f0434610ce91fca487ffe1c5b0d1c62d42b4a3dfa0b010/getsentry/sentry-javascript/issues/14655 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rodolfoBee |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width