Skip to content

Commit 7e0a038

Browse files
authored
Add Prisma docs back.
1 parent 1dbe3e3 commit 7e0a038

File tree

1 file changed

+23
-0
lines changed
  • src/platforms/node/common/performance/database

1 file changed

+23
-0
lines changed

src/platforms/node/common/performance/database/opt-in.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
title: Opt-in
33
---
44

5+
## Prisma ORM Integration
6+
7+
_(Available from `7.0.0`)_
8+
9+
Sentry supports tracing [Prisma ORM](https://www.prisma.io/) fetchers with Prisma integration. This integration is an opt-in feature and requires that a `PrismaClient` instance is provided.
10+
11+
Prisma integration creates a `db.prisma` span for each query and reports to Sentry with relevant details inside `description` if available.
12+
13+
For example:
14+
15+
```javascript
16+
import { PrismaClient } from '@prisma/client';
17+
import * as Sentry from '@sentry/node';
18+
import * as Tracing from '@sentry/tracing';
19+
import { randomBytes } from 'crypto';
20+
const client = new PrismaClient();
21+
Sentry.init({
22+
dsn: ___PUBLIC_DSN___,
23+
release: '1.0',
24+
tracesSampleRate: 1.0,
25+
integrations: [new Tracing.Integrations.Prisma({ client })],
26+
});
27+
```
528

629
## GraphQL Integration
730

0 commit comments

Comments
 (0)