UNPKG

node-prisma-structure

Version:

A Node.js API structure using Prisma ORM for scalable and modular development. This package includes a complete authentication API (signup, login, logout, password reset, and token-based authentication) and provides a well-organized directory structure fo

25 lines (22 loc) 811 B
const Sentry = require("@sentry/node"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); Sentry.init({ dsn: process.env.SENTRY_DSN, integrations: [ nodeProfilingIntegration(), ], // Tracing tracesSampleRate: 1.0, // Capture 100% of the transactions }); // Manually call startProfiler and stopProfiler // to profile the code in between Sentry.profiler.startProfiler(); // Starts a transaction that will also be profiled Sentry.startSpan({ name: "My First Transaction", }, () => { // the code executing inside the transaction will be wrapped in a span and profiled }); // Calls to stopProfiling are optional - if you don't stop the profiler, it will keep profiling // your application until the process exits or stopProfiling is called. Sentry.profiler.stopProfiler();