Title: span.spanContext is not a function · Issue #10348 · getsentry/sentry-javascript · GitHub
Open Graph Title: span.spanContext is not a function · Issue #10348 · getsentry/sentry-javascript
X Title: span.spanContext is not a function · Issue #10348 · 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/10348
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"span.spanContext is not a function","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\nSelf-hosted/on-premise\n\n### Which SDK are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.98.0\n\n### Framework Version\n\n@immobiliarelabs/fastify-sentry: 8.0.0 and @prisma/client: 5.8.1\n\n### Link to Sentry event\n\nSelf hosted instance\n\n### SDK Setup\n\n```js\r\nSentry.init({\r\n dsn: Env.SENTRY_DSN,\r\n environment: Env.FDM_ENV,\r\n release: Env.FDM_VERSION,\r\n sampleRate: 1,\r\n enableTracing: true,\r\n autoSessionTracking: true,\r\n includeLocalVariables: true,\r\n integrations: [\r\n new Integrations.Prisma({ client: PRISMA }),\r\n new Integrations.LocalVariables({ captureAllExceptions: true })\r\n ],\r\n shouldHandleError: (err, _, reply) => !!err || reply.statusCode >= 500,\r\n extractUserData: (request) => ({\r\n username: request.user ? request.user.name : 'anonymous',\r\n id: request.id\r\n }),\r\n errorResponse: (error, _, reply) => reply.send(error)\r\n})\r\n```\n\n### Steps to Reproduce\n\nWe've been using it with https://github.com/immobiliare/fastify-sentry, but the error seems to be from this package.\r\n\r\nI'm not sure if I could show the actual code here as it is from my job and I signed a NDA, but would love some guidance to help you guys debugging this with me, if possible.\r\n\r\n\n\n### Expected Result\n\nSending traces to sentry should work normally.\n\n### Actual Result\n\n```ts\r\nTypeError: span.spanContext is not a function\r\n at Object.spanToTraceContext (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/spanUtils.ts:13:55)\r\n at applySpanToEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts:179:29)\r\n at Object.applyScopeDataToEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts:20:5)\r\n at Object.prepareEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/prepareEvent.ts:100:3)\r\n at NodeClient._prepareEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:636:20)\r\n at NodeClient._prepareEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/server-runtime-client.ts:252:18)\r\n at NodeClient._processEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:732:20)\r\n at NodeClient._captureEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:675:20)\r\n at NodeClient.captureEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:225:12)\r\n at NodeClient.captureEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/server-runtime-client.ts:127:18)\r\n at Scope.captureEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/scope.ts:683:18)\r\n at Hub.captureEvent (\u003credacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/hub.ts:353:21)\r\n at Transaction.finish (\u003credacted>/node_modules/.pnpm/@sentry+core@7.74.1/node_modules/@sentry/src/tracing/transaction.ts:141:1)\r\n at Object.\u003canonymous> (\u003credacted>/node_modules/.pnpm/@immobiliarelabs+fastify-sentry@8.0.0/node_modules/@immobiliarelabs/fastify-sentry/lib/request.js:120:31)\r\n at onResponseHookIterator (\u003credacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:270:10)\r\n at next (\u003credacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:243:18)\r\n at hookRunner (\u003credacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:265:5)\r\n at ServerResponse.onResFinished (\u003credacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/reply.js:796:7)\r\n at ServerResponse.emit (node:events:530:35)\r\n at ServerResponse.emit (node:domain:488:12)\r\n at onFinish (node:_http_outgoing:1005:10)\r\n at callback (node:internal/streams/writable:756:21)\r\n at afterWrite (node:internal/streams/writable:701:5)\r\n at afterWriteTick (node:internal/streams/writable:687:10)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:81:21)\r\n```","author":{"url":"https://github.com/arthurfiorette","@type":"Person","name":"arthurfiorette"},"datePublished":"2024-01-25T18:42:52Z","url":"https://github.com/getsentry/sentry-javascript/issues/10348"}
| 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:7b93fd66-4da5-e9e3-693c-ab71b8e4bbbd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B580:2A3275:6FD9F4:9D2FC4:6B044C38 |
| html-safe-nonce | 75838cd868775c06247272cf018684d8dd9d23d957598288fb543b063f30c862 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTgwOjJBMzI3NTo2RkQ5RjQ6OUQyRkM0OjZCMDQ0QzM4IiwidmlzaXRvcl9pZCI6IjUwNzEzNzc1ODUzODk0NTY0NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 001bec8f0677400f35e9baea3e8e7f9d782fbb325b1fde0944b49877d01f5c4d |
| hovercard-subject-tag | issue:2100966838 |
| 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/10348/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9c53f2bbd8e97abd579eb41f600773b255820154ee2d90afd9e8de5ce42d57f3/getsentry/sentry-javascript/issues/10348 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9c53f2bbd8e97abd579eb41f600773b255820154ee2d90afd9e8de5ce42d57f3/getsentry/sentry-javascript/issues/10348 |
| 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 | arthurfiorette |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| 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