I'm trying to setup a Raven-based client in my Loopback app using
existing instructions for Express. This uses a middleware approach as shown there, but I'm having trouble interpreting the proper way of doing it inside a Loopback app.
I've added a snippet like this:
var sentry_dsn = process.env.SENTRY_DSN;
if (sentry_dsn) {
app.use(raven.middleware.express.requestHandler(sentry_dsn));
app.use(raven.middleware.express.errorHandler(sentry_dsn));
}
at the top of server.js, but it messed up my other middleware. Also
found this as a all-around solution to this problem, but I can't figure out how to properly hook everything up.
If anybody has a tip or experience with it, I'd love to hear about it. Thanks.