text: const Sentry = require('@sentry/node');
  Sentry.init({
    dsn: process.env.SENTRY_DSN,
    tracesSampleRate: 0.5,
    environment: strapi.config.environment,
  });
  
  module.exports = strapi => {
    return {
      initialize() {
        strapi.app.use(async (ctx, next) => {
          try {
            await next();
          } catch (error) {
            Sentry.captureException(error);
            throw error;
          }
        });
      },
    };
  };
  