6.1.0
Today we're releasing Prisma ORM version 6.1.0
In this version our tracing
Preview feature is being graduated to GA!
Highlights
Tracing goes GA
The tracing
Preview feature is now stable. You now no longer have to include tracing
in your set of enabled preview features.
generator client {
provider = "prisma-client-js"
- previewFeatures = ["tracing"]
}
We have also changed some of the spans generated by Prisma Client. Previously, a trace would report the following spans:
prisma:client:operation
prisma:client:serialize
prisma:engine
prisma:engine:connection
prisma:engine:db_query
prisma:engine:serialize
Now, the following are reported:
prisma:client:operation
prisma:client:serialize
prisma:engine:query
prisma:engine:connection
prisma:engine:db_query
prisma:engine:serialize
prisma:engine:response_json_serialization
Additionally, we have made a few changes to our dependencies:
@opentelemetry/api
is now a peer dependency instead of a regular dependencyregisterInstrumentations
in@opentelemetry/instrumentation
is now re-exported by@prisma/instrumentation
After upgrading to Prisma ORM 6.1.0 you will need to add @opentelemetry/api
to your dependencies if you haven't already:
npm install @opentelemetry/api
You will also no longer need to have @opentelemetry/instrumentation
if you only use registerInstrumentations
. In this case you can import registerInstrumentations
from @prisma/instrumentation
- import { PrismaInstrumentation } from '@prisma/instrumentation'
+ import { PrismaInstrumentation, registerInstrumentations } from '@prisma/instrumentation'
Mutli-line comments in Prisma Schema Language (PSL)
Comments can now be defined as multi-line in your Prisma schema! Comments can use the existing format:
// this is a schema comment
or can now also use our multi-line format:
/*
* this is a multi-line comment
* You can add in all you want here
* Keep typing and this comment will keep on going
*/
Bug fixes
Tracing related
As we're moving our tracing
preview to GA, a number of issues have been resolved. Here are a few highlights:
- Tests for tracing expanded and improved
- Issues with Elastic APM addressed
- Issues with Datadog tracer addressed
- Prisma Client now respects
suppressTracing
Other issues
We also have a number of other issues that were resolved outside of our tracing
feature.
- Resolved type issues with the
PrismaNeonHTTP
adapter findUnique
returnsnull
when used instead ofPromise.all
- Resolved an issue with the latest version of Alpine Linux
Fixes and improvements
Prisma
- Tracing: Detailed report and profiling informations
- Prisma Client Request Tracing Integration
- Instrumentation error in production:
TypeError: parentTracer.getSpanLimits is not a function
- Prisma is using the internal
Span
constructor - Prisma Client doesn't put all OTEL trace spans under one parent span
- Prisma trace has unaccounted time
prisma:engine
spans do not respectsuppressTracing()
tracing: engine
spans don't pass throughSampler
- Add tests for tracing and different ways to open the first connection (including internal spans)
- Tracing: Long trailing delay in
prisma:client:operation
prisma:engine
spans are missing when there are multiplenew PrismaClient()
invocationsparentTracer.getSpanLimits is not a function
- Support tracers not derived from
opentelemetry-sdk-trace-base
(e.g. Datadog tracer) traceparent
comments with multiple SQL statements- Make
@prisma/instrumentation
dependencies peer dependencies - Make sure
db.statement
attribute doesn't include thetraceparent
comment - [Instrumentation]
registerInstrumentations
uses the global provider instead of the one passed in - Instrumentation: Problems in working with Elastic APM
PrismaNeonHTTP
adapter breaks on some types e.g. timestamp- Promise.all() returns null with findUnique()
- Alpine Linux 3.21:
Prisma failed to detect the libssl/openssl version to use