Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(node/serverless): Add note about performance impact of auto discovery of integrations #7245

Merged
merged 3 commits into from
Jun 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Read more about [Custom Instrumentation](./../custom-instrumentation/) to learn

<Note>

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).
Lms24 marked this conversation as resolved.
Show resolved Hide resolved
Lms24 marked this conversation as resolved.
Show resolved Hide resolved
Lms24 marked this conversation as resolved.
Show resolved Hide resolved

</Note>

Expand All @@ -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)
Lms24 marked this conversation as resolved.
Show resolved Hide resolved
...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
Expand Down