You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
44
-
*
27
+
* Adds Sentry tracing instrumentation for the [Prisma](https://www.npmjs.com/package/prisma) ORM.
45
28
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
46
29
*
47
-
* @example
48
-
*
49
-
* Make sure `previewFeatures = ["tracing"]` is set in the prisma client generator block. See the
50
-
* [prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) for more details.
30
+
* Make sure `previewFeatures = ["tracing"]` is added to the generator block in of your Prisma schema.
* NOTE: By default, this integration works with Prisma version 5.
40
+
* To get performance instrumentation for other Prisma versions,
41
+
* 1. Install the `@prisma/instrumentation` package with the desired version.
42
+
* 1. Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option of this integration:
60
43
*
61
-
* ```javascript
62
-
* const Sentry = require('@sentry/node');
44
+
* ```js
45
+
* import { PrismaInstrumentation } from '@prisma/instrumentation'
63
46
*
64
-
* Sentry.init({
65
-
* integrations: [Sentry.prismaIntegration()],
66
-
* });
67
-
* ```
47
+
* Sentry.init({
48
+
* integrations: [
49
+
* prismaIntegration({
50
+
* // Override the default instrumentation that Sentry uses
51
+
* prismaInstrumentation: new PrismaInstrumentation()
52
+
* })
53
+
* ]
54
+
* })
55
+
* ```
56
+
*
57
+
* The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.
* Overrides the instrumentation used by the Sentry SDK with the passed in instrumentation instance.
65
+
*
66
+
* NOTE: By default, the Sentry SDK uses the Prisma v5 instrumentation. Use this option if you need performance instrumentation different Prisma versions.
67
+
*
68
+
* For more information refer to the documentation of `prismaIntegration()` or see https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/
0 commit comments