drcode-wrapper
v1.8.3
Published
A wrapper for Sentry that simplifies DSN configuration and error handling.
Downloads
23
Maintainers
Readme
const config = { protocol: 'https', publicKey: 'yourPublicKey', host: 'sentry.io', port: 443, projectId: 'yourProjectId', tracesSampleRate: 1.0, // optional profilesSampleRate: 1.0 // optional };
// Initialize drcode-wrapper 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'); });
export function initDrcode(config: DrCodeConfig): void;
export function setUpErrorHandler( err: Error, req: any, res: any, next: any ): void;