0.1.0-alpha1 • Published 2 years ago

@axiomhq/axiom-prisma v0.1.0-alpha1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Axiom Prisma

Axiom observability middleware for Prisma

How to use

  • Create an account at Axiom Cloud
  • Create a dataset and an API token with ingest permission for that dataset
  • Set env variables AXIOM_DATASET and AXIOM_TOKEN
  • Insert the following in your code:
import logWithAxiom from './axiom';
const prisma = new PrismaClient({ log: [{ emit: 'event', level: 'query', }] });

prisma.$use(logWithAxiom);