opentelemetry-instrumentation-prisma-client
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

IMPORTANT NOTE: PRISMA NOW HAS OFFICIAL SUPPORT FOR OPENTELEMETRY. THIS PACKAGE IS DEPRECATED.

OpenTelemetry Prisma Client Instrumentation for Node.js

NPM version Apache 2.0 License

This module provides automatic instrumentation for @prisma/client.

Installation

npm install --save opentelemetry-instrumentation-prisma-client

Supported Versions

  • 3.8.0 - 3.x

Usage

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()
  ]
});

Configuration

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'}

License

Apache 2.0 - See LICENSE for more information.

Readme

Keywords

Package Sidebar

Install

npm i opentelemetry-instrumentation-prisma-client

Weekly Downloads

1,837

Version

0.4.0

License

Apache-2.0

Unpacked Size

31.4 kB

Total Files

13

Last publish

Collaborators

  • justindsmith