I was recently trying to integrate sentry Performance monitoring and profiling with a Foal TS based application. I used the same logic that we use to integrate sentry APM with an express application. It is working well with express but if i use the same techinique in Foal TS it is not working
const expressInstance = express();
const app = await createApp(AppController);
Sentry.init({
dsn: ***',
tracesSampleRate: 1.0,
profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate
// includeLocalVariables: true,
integrations: [
// enable HTTP calls tracing
new Sentry.Integrations.Http({ tracing: true }),
new Sentry.Integrations.Express({ app: expressInstance }),
// // Automatically instrument Node.js libraries and frameworks
// // (This function is slow because of file I/O, consider manually adding additional integrations instead)
//...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
// Add profiling integration to list of integrations
new ProfilingIntegration(),
// new Sentry.Integrations.LocalVariables({ captureAllExceptions: true })
],
});
expressInstance.use(Sentry.Handlers.requestHandler());
expressInstance.use(Sentry.Handlers.tracingHandler());
expressInstance.use(Sentry.Handlers.errorHandler())
Version of FoalTS: 4.2.0
I was recently trying to integrate sentry Performance monitoring and profiling with a Foal TS based application. I used the same logic that we use to integrate sentry APM with an express application. It is working well with express but if i use the same techinique in Foal TS it is not working