-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(js): Update profiling option in quick start guides #16202
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
|
||
| // Adds request headers and IP for users, for more info visit: | ||
| // https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii | ||
| sendDefaultPii: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current quick start guide sendDefaultPii is only listed in the "HTTP functions" tab, so I deleted it from here -- let me know if I need to re-add it 👍
e00cf9c to
8fc7dd2
Compare
| // ___PRODUCT_OPTION_END___ performance | ||
| // ___PRODUCT_OPTION_START___ profiling | ||
|
|
||
| // Set profilesSampleRate to 1.0 to profile 100% | ||
| // of sampled transactions. | ||
| // This is relative to tracesSampleRate | ||
| // Enable profiling for a percentage of sessions | ||
| // Learn more at | ||
| // https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#profilesSampleRate | ||
| profilesSampleRate: 1.0, | ||
| // https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate | ||
| profileSessionSampleRate: 1.0, | ||
| // ___PRODUCT_OPTION_END___ profiling | ||
| // ___PRODUCT_OPTION_START___ logs | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The Express v7.x quickstart guide was not updated to use profileSessionSampleRate and still uses the deprecated profilesSampleRate option, contrary to the PR's goal.
Severity: MEDIUM
Suggested Fix
In the file platform-includes/getting-started-node/javascript.express__v7.x.mdx, replace the two instances of profilesSampleRate: 1.0 with profileSessionSampleRate: 1.0. Also, update the associated comment to reflect that sampling is session-based and not relative to tracesSampleRate.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: platform-includes/getting-started-config/javascript.node.mdx#L29-L38
Potential issue: The pull request aimed to update all JavaScript quickstart guides to
use `profileSessionSampleRate` instead of the deprecated `profilesSampleRate`. However,
the Express v7.x guide (`javascript.express__v7.x.mdx`) was missed and still contains
`profilesSampleRate`. This means users following this specific guide will implement a
deprecated, transaction-based sampling method instead of the intended session-based one.
The accompanying code comment, "This is relative to tracesSampleRate," is also now
incorrect for the modern approach and will be misleading if the option is updated
without changing the comment.
Did we get this right? 👍 / 👎 to inform future reviews.
coolguyzone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
DESCRIBE YOUR PR
Updated all JS quick start guides to use
profileSessionSampleRateinstead ofprofilesSampleRate.GCF and Remix were missing node profiling settings, although the pages have the Profiling onboarding option -> updated them accordingly
closes: #16169
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES