Implementing Crash Reporting: Raygun

Hey folks,

What is the best place for error/crash reporting code in Apollo Server? I am using formatError function in ApolloServer instantiation to send in case of any errors but that removes stack trace if NODE_ENV is production. Is it more appropriate to put it in a plugin?

const server = new ApolloServer({

  formatError: (err) => {
    notifyRaygun(err, requestInfo);
    return err;