prisma-opentracing-middleware
Prisma (2) Client middleware.
Required Reading
Middlewares are an experimental feature. Read more about them here
Quick Start
Install the package using yarn
:
yarn add prisma-opentracing-middleware
Code
import { PrismaClient } from "@prisma/client";
import { createTracerMiddleware } from "prisma-opentracing-middleware";
import { Tracer } from "elastic-apm-node-opentracing";
const db = new PrismaClient();
const tracer = new Tracer();
db.use(createTracerMiddleware(tracer));