Title: [NextJS] No data being sent from server-side functions · Issue #17193 · getsentry/sentry-javascript · GitHub
Open Graph Title: [NextJS] No data being sent from server-side functions · Issue #17193 · getsentry/sentry-javascript
X Title: [NextJS] No data being sent from server-side functions · Issue #17193 · 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/17193
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[NextJS] No data being sent from server-side functions","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/nextjs\n\n### SDK Version\n\n9.42.1\n\n### Framework Version\n\nNextJS 15.4.4\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\nI've set up a repo with an app that reproduces the problem consistently: https://github.com/cbovis/nextjs-sentry-server-bug. The repo just contains a template NextJS app with most of the set up instructions from https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ applied to it.\n\nAn API route exists which calls `logger.info` and then throws an error. On the app's homepage there's a \"break the world\" button which calls that endpoint as per the verify step of the setup guide (https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#step-8-verify). The homepage also calls `logger.info`.\n\nIt's configured with a real DSN which hopefully the Sentry team can view the associated data of.\n\nThe reproduction is only broken when deployed to Vercel (standard configuration). When running locally data gets sent to Sentry as expected from both client and server code.\n\nWhen running locally with debug enabled I see that Sentry flushes data a little while after the API request completes. I'm wondering if this issue is only see in Vercel because of the serverless environment being destroyed before flushing happens. NextJS has an `after` function for scheduling work after a request is finished (https://nextjs.org/docs/app/api-reference/functions/after). Perhaps this isn't being used?\n\n### Steps to Reproduce\n\nHosted at https://nextjs-sentry-server-bug.vercel.app/ for convenience.\n \n1. Hit the homepage of the app and click the button.\n2. Access the API route manually for good measure (https://nextjs-sentry-server-bug.vercel.app/api/sentry-example-api)\n\n### Expected Result\n\nExpect to see logging and errors in the associated Sentry account for production environment. Also expect to see both frontend/backend transactions and spans.\n\n### Actual Result\n\nOnly logging, errors, transactions, and spans are stored for client-side code, not server-side code.","author":{"url":"https://github.com/cbovis","@type":"Person","name":"cbovis"},"datePublished":"2025-07-28T15:06:24Z","url":"https://github.com/getsentry/sentry-javascript/issues/17193"}
| 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:161519df-8867-dd99-572f-d57acd246f10 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D804:2FF249:416422:5964B6:6B05DC3D |
| html-safe-nonce | a3786d0cb266cc31e570cfcf792658beabe2dc064a0a681dad9b8ac1fb13da72 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODA0OjJGRjI0OTo0MTY0MjI6NTk2NEI2OjZCMDVEQzNEIiwidmlzaXRvcl9pZCI6IjI3NzE2NjI2MjI2Mjg4OTU4MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6a5d077105ce0435a0a02e12aedb1af5ffd31c95fe693d2d36adf58119e2e2d |
| hovercard-subject-tag | issue:3270292554 |
| 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/17193/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16a80ecc9aff5ca41115408c840adc5ba5f8cc850bb05d27ff91f89b3a1bed3a/getsentry/sentry-javascript/issues/17193 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16a80ecc9aff5ca41115408c840adc5ba5f8cc850bb05d27ff91f89b3a1bed3a/getsentry/sentry-javascript/issues/17193 |
| 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 | cbovis |
| hostname | github.com |
| expected-hostname | github.com |
| None | ab9d6b164c6e5b32656ef80f1a302b2dafee4e4c9360ef3fced66da06fb522fa |
| 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 | 2db8c3558610af6beef9310dcf5537e201a6e5fb |
| 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