From cef61e97f950022b9ddbafa8a8d24e5e770ef1ba Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 22 Jun 2023 14:06:01 +0200 Subject: [PATCH 1/3] ref(node/serverless): Add note about performance impact of integrations auto-discovery --- .../instrumentation/automatic-instrumentation.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx index 66dad28549332b..3ba515534feea4 100644 --- a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx @@ -15,7 +15,9 @@ 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` might degrade startup performance of your app. This is especially a concern in Serverless functions. If you're experiencing this, manually add [database integrations](../../database/) of your choice instead (see example below). @@ -28,7 +30,11 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // Automatically instrument Node.js libraries and frameworks + // (This might degrade startup performance) ...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 From 8210f97f3c4f91c723149da3693c6b033c055def Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 29 Jun 2023 16:07:25 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Liza Mock Co-authored-by: Luca Forstner --- .../performance/instrumentation/automatic-instrumentation.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx index 3ba515534feea4..2e7e33d6644703 100644 --- a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx @@ -17,7 +17,7 @@ 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. -Note that calling `Sentry.autoDiscoverNodePerformanceMonitoringIntegrations` might degrade startup performance of your app. This is especially a concern in Serverless functions. If you're experiencing this, manually add [database integrations](../../database/) of your choice instead (see example below). +Note, that calling `Sentry.autoDiscoverNodePerformanceMonitoringIntegrations` might degrade startup performance of your app. This is especially a concern for Serverless functions. If you're experiencing this, add [database integrations](../../database/) of your choice manually (see example below). @@ -30,7 +30,7 @@ Sentry.init({ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // Automatically instrument Node.js libraries and frameworks - // (This might degrade startup performance) + // (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(), From 2d474aa27e19222d33cffeaaf5d25193a029125a Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 29 Jun 2023 16:56:40 +0200 Subject: [PATCH 3/3] review suggestions --- .../performance/instrumentation/automatic-instrumentation.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx index 2e7e33d6644703..728678a83ebfe0 100644 --- a/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx +++ b/src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx @@ -17,7 +17,9 @@ 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. -Note, that calling `Sentry.autoDiscoverNodePerformanceMonitoringIntegrations` might degrade startup performance of your app. This is especially a concern for Serverless functions. If you're experiencing this, add [database integrations](../../database/) of your choice manually (see example below). +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).