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
Prisma Client metrics give you a detailed insight into how Prisma Client interacts with your database. You can use this insight to help diagnose performance issues with your application.
12
11
13
-
<Admonitiontype="info">
12
+
:::info
14
13
15
14
If you want an even more detailed insight into your Prisma Client's performance, at the level of individual operations, see [Tracing](/orm/prisma-client/observability-and-logging/opentelemetry-tracing).
16
15
17
-
</Admonition>
16
+
:::
17
+
18
+
:::warning[`metrics` preview feature is deprecated]
19
+
20
+
The `metrics` preview feature has been **deprecated** as of [Prisma ORM v6.14.0](https://github.com/prisma/prisma/releases/tag/6.14.0) and will be removed in Prisma ORM v7.
21
+
22
+
**The `metrics` preview feature is only available in Prisma ORM versions ≤6.13.x.** If you are using Prisma ORM v6.14.0 or later, the `$metrics` API is no longer available.
23
+
24
+
The feature is not supported when using Prisma ORM with the [query compiler architecture](/orm/prisma-client/setup-and-configuration/no-rust-engine) (setting `engineType` to 'client' in the `generator` block of your `schema.prisma` file).
25
+
26
+
Metrics were originally introduced to provide insights into query and connection behavior. With the changes in the new [query compiler architecture](/orm/prisma-client/setup-and-configuration/no-rust-engine), these values no longer reflect the system reliably. Because of this, we are not continuing support for this feature.
27
+
28
+
If you need visibility into query or connection pool behavior, we recommend using the *native metrics provided by your database driver* (for example, pool statistics) or setting up *OpenTelemetry* for a more complete observability solution.
29
+
30
+
:::
31
+
18
32
19
-
</TopBlock>
20
33
21
34
## About metrics
22
35
@@ -50,18 +63,33 @@ You can [add global labels to your metrics data](#global-labels) to help you gro
50
63
51
64
## Prerequisites
52
65
66
+
:::warning[Version compatibility]
67
+
68
+
The `metrics` preview feature is **only available in Prisma ORM versions ≤6.13.x**. It has been removed in v6.14.0 and later versions.
69
+
70
+
:::
71
+
53
72
To use Prisma Client metrics, you must do the following:
54
73
55
-
1.[Install the appropriate dependencies](#1-install-up-to-date-prisma-orm-dependencies).
0 commit comments