Closed
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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/nextjs
SDK Version
7.13
Framework Version
12.3
Link to Sentry event
Steps to Reproduce
- Build an API endpoint in Nextjs
- Use Prisma to load data
- Look at span in Sentry
// /api/reports.tsx
const handler = async (req, res) => {
console.log("here");
let reports = await prisma.report.findMany({
orderBy: { submittedDate: 'desc' }
})
for (const report of reports) {
const expenses = await prisma.expense.findMany({
where: { reportId: report.id }
})
}
res.status(200).json({ reports })
}
export default withSentry(handler);
Expected Result
DB spans would be nested under an API route
transaction
/api/reports
db.prisma
db.prisma
db.prisma
db.prisma
...