IMPORTANT NOTE: PRISMA NOW HAS OFFICIAL SUPPORT FOR OPENTELEMETRY. THIS PACKAGE IS DEPRECATED.
This module provides automatic instrumentation for @prisma/client
.
npm install --save opentelemetry-instrumentation-prisma-client
3.8.0 - 3.x
For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { PrismaClientInstrumentation } = require('opentelemetry-instrumentation-prisma-client');
const tracerProvider = new NodeTracerProvider();
tracerProvider.register();
registerInstrumentations({
instrumentations: [
new PrismaClientInstrumentation()
]
});
Name | Type | Default Value | Description | |
---|---|---|---|---|
spanAttributes | Attributes |
undefined |
An optional set of Opentelemetry Attributes to be added to the span. For example spanAttributes: {[SemanticAttributes.DB_SYSTEM]: 'postgresql'}
|
Apache 2.0 - See LICENSE for more information.