Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/node
SDK Version
7.98.0
Framework Version
@immobiliarelabs/fastify-sentry: 8.0.0 and @prisma/client: 5.8.1
Link to Sentry event
Self hosted instance
SDK Setup
Sentry.init({dsn: Env.SENTRY_DSN,environment: Env.FDM_ENV,release: Env.FDM_VERSION,sampleRate: 1,enableTracing: true,autoSessionTracking: true,includeLocalVariables: true,integrations: [newIntegrations.Prisma({client: PRISMA}),newIntegrations.LocalVariables({captureAllExceptions: true})],shouldHandleError: (err,_,reply)=>!!err||reply.statusCode>=500,extractUserData: (request)=>({username: request.user ? request.user.name : 'anonymous',id: request.id}),errorResponse: (error,_,reply)=>reply.send(error)})Steps to Reproduce
We've been using it with https://github.com/immobiliare/fastify-sentry, but the error seems to be from this package.
I'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.
Expected Result
Sending traces to sentry should work normally.
Actual Result
TypeError: span.spanContextisnotafunctionatObject.spanToTraceContext(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/spanUtils.ts:13:55)atapplySpanToEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts:179:29)atObject.applyScopeDataToEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts:20:5)atObject.prepareEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/utils/prepareEvent.ts:100:3)atNodeClient._prepareEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:636:20)atNodeClient._prepareEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/server-runtime-client.ts:252:18)atNodeClient._processEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:732:20)atNodeClient._captureEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:675:20)atNodeClient.captureEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/baseclient.ts:225:12)atNodeClient.captureEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/server-runtime-client.ts:127:18)atScope.captureEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/scope.ts:683:18)atHub.captureEvent(<redacted>/node_modules/.pnpm/@sentry+core@7.98.0/node_modules/@sentry/src/hub.ts:353:21)atTransaction.finish(<redacted>/node_modules/.pnpm/@sentry+core@7.74.1/node_modules/@sentry/src/tracing/transaction.ts:141:1)atObject.<anonymous>(<redacted>/node_modules/.pnpm/@immobiliarelabs+fastify-sentry@8.0.0/node_modules/@immobiliarelabs/fastify-sentry/lib/request.js:120:31)atonResponseHookIterator(<redacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:270:10)atnext(<redacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:243:18)athookRunner(<redacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/hooks.js:265:5)atServerResponse.onResFinished(<redacted>/node_modules/.pnpm/fastify@4.25.2/node_modules/fastify/lib/reply.js:796:7)atServerResponse.emit(node:events:530:35)atServerResponse.emit(node:domain:488:12)atonFinish(node:_http_outgoing:1005:10)atcallback(node:internal/streams/writable:756:21)atafterWrite(node:internal/streams/writable:701:5)atafterWriteTick(node:internal/streams/writable:687:10)atprocess.processTicksAndRejections(node:internal/process/task_queues:81:21)
Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/node
SDK Version
7.98.0
Framework Version
@immobiliarelabs/fastify-sentry: 8.0.0 and @prisma/client: 5.8.1
Link to Sentry event
Self hosted instance
SDK Setup
Steps to Reproduce
We've been using it with https://github.com/immobiliare/fastify-sentry, but the error seems to be from this package.
I'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.
Expected Result
Sending traces to sentry should work normally.
Actual Result