drcode-node
v1.0.0
Published
A drcode-node is a Node.js package that facilitates error tracking and performance monitoring for your applications. Utilizing the sentry package internally, drcode-node collects and processes application logs to provide detailed insights into errors and
Downloads
3
Maintainers
Readme
const config = { publicKey: 'yourPublicKey', projectId: 'yourProjectId', tracesSampleRate: 1.0, // optional profilesSampleRate: 1.0 // optional };
// Initialize drcode-node initDrcode(config);
// Express.js example for setting up error handler const app = express();
app.use(setUpErrorHandler);
app.listen(3000, () => { console.log('Server is running on port 3000'); });
publicKey: string; projectId: string; tracesSampleRate?: number; profilesSampleRate?: number; }
export function initDrcode(config: DrCodeConfig): void;
export function setUpErrorHandler( err: Error, req: any, res: any, next: any ): void;