Skip to content

Commit dd8abfd

Browse files
Lms24lizokmLuca Forstner
authored
ref(node/serverless): Add note about performance impact of auto discovery of integrations (#7245)
Add note about performance impact of integrations auto-discovery Co-authored-by: Liza Mock <[email protected]> Co-authored-by: Luca Forstner <[email protected]>
1 parent ea83ecc commit dd8abfd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ Read more about [Custom Instrumentation](./../custom-instrumentation/) to learn
1515

1616
<Note>
1717

18-
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.
18+
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.
19+
20+
Note, that calling `Sentry.autoDiscoverNodePerformanceMonitoringIntegrations` will degrade startup performance of your app due to file I/O operations.
21+
This is especially a concern in Serverless functions.
22+
We recommend manually adding <PlatformLink to="/performance/database" >database integrations</PlatformLink> of your choice manually (see example below).
1923

2024
</Note>
2125

@@ -28,7 +32,11 @@ Sentry.init({
2832
// enable HTTP calls tracing
2933
new Sentry.Integrations.Http({ tracing: true }),
3034
// Automatically instrument Node.js libraries and frameworks
35+
// (This function is slow because of file I/O, consider manually adding additional integrations instead)
3136
...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
37+
// Or manually add integrations of your choice. For example:
38+
Sentry.Integrations.Apollo(),
39+
Sentry.Integraionts.Postgres(),
3240
],
3341

3442
// We recommend adjusting this value in production, or using tracesSampler

0 commit comments

Comments
 (0)