Skip to content

Prisma Integration Incompatible with 5.0.0 #8532

Closed
@mwillbanks

Description

@mwillbanks

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/serverless

SDK Version

7.58.1

Framework Version

No response

Link to Sentry event

No response

SDK Setup

import * as Sentry from '@sentry/serverless';
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();
Sentry.AWSLambda.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.STAGE,
  tracesSampleRate: 1.0,
  release: process.env.VERSION,
  integrations: [new Sentry.AWSLambda.Integrations.Prisma({ client: prisma })],
});

Steps to Reproduce

  1. Use @vendia/serverless-express
  2. Use serverless-offline
  3. yarn start
  4. Navigate to any route

Expected Result

Route would load as previous.

Actual Result

✖ Unhandled exception in handler 'api'.
✖ TypeError: Converting circular structure to JSON
      --> starting at object with constructor 'zr'
      |     property 'client' -> object with constructor 't'
      --- property '_fetcher' closes the circle
      at JSON.stringify (<anonymous>)
      at new Prisma (/Volumes/Projects/xxxxx-api/node_modules/@sentry-internal/tracing/cjs/node/integrations/prisma.js:51:93)
      at init (/Volumes/Projects/xxxxx-api/.build/helper/sentry.js:39:24)
      at configureExpress (/Volumes/Projects/xxxxx-api/.build/helper/sentry.js:51:22)
      at Object.<anonymous> (/Volumes/Projects/xxxxx-api/.build/api/app.js:28:31)
      at Module._compile (node:internal/modules/cjs/loader:1196:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
      at Module.load (node:internal/modules/cjs/loader:1074:32)
      at Function.Module._load (node:internal/modules/cjs/loader:909:12)
      at Module.require (node:internal/modules/cjs/loader:1098:19)
✖ Converting circular structure to JSON
      --> starting at object with constructor 'zr'
      |     property 'client' -> object with constructor 't'
      --- property '_fetcher' closes the circle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions