diff --git a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx index 66dad28549332..728678a83ebfe 100644 --- a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx @@ -15,7 +15,11 @@ Read more about [Custom Instrumentation](./../custom-instrumentation/) to learn -If you’re adopting Performance in a high-throughput environment, we recommend testing prior to deployment to ensure that your service’s performance characteristics maintain expectations. +If you're adopting Performance in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. + +Note, that calling `Sentry.autoDiscoverNodePerformanceMonitoringIntegrations` will degrade startup performance of your app due to file I/O operations. +This is especially a concern in Serverless functions. +We recommend manually adding database integrations of your choice manually (see example below). @@ -28,7 +32,11 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // Automatically instrument Node.js libraries and frameworks + // (This function is slow because of file I/O, consider manually adding additional integrations instead) ...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(), + // Or manually add integrations of your choice. For example: + Sentry.Integrations.Apollo(), + Sentry.Integraionts.Postgres(), ], // We recommend adjusting this value in production, or using tracesSampler