-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(profiling): Add docs for UI profiling (Browser JS) #15611
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| <SdkOption name="profileSessionSampleRate" type='number'> | ||
|
|
||
| A number between `0` and `1` that sets the percentage of how many sessions should have profiling enabled. `1.0` enables profiling in every session, `0.5` enables profiling for 50% of the sessions, and `0` enables it for none. The sampling decision is made once at the beginning of a session. This option is required to enable profiling. |
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.
I wonder if we should include a minimum version note for these options.
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.
Yes, I also think that would be helpful information to provide
Bundle ReportChanges will increase total bundle size by 55.78kB (0.24%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
inventarSarah
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 great, thank you 🍪
|
|
||
| ## Profiling Modes | ||
|
|
||
| Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. |
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.
| Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. | |
| Profiling supports two modes: `manual` and `trace`. These modes are mutually exclusive and cannot be used at the same time. |
|
|
||
| Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time. | ||
|
|
||
| In `manual` mode, the profiling data collection can be managed via calls to `Sentry.uiProfiler.startProfiler` and `Sentry.uiProfiler.stopProfiler`. You are entirely in the in control of when the profiler runs. |
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 `manual` mode, the profiling data collection can be managed via calls to `Sentry.uiProfiler.startProfiler` and `Sentry.uiProfiler.stopProfiler`. You are entirely in the in control of when the profiler runs. | |
| In `manual` mode, you can manage the profiling data collection via calls to `Sentry.uiProfiler.startProfiler` and `Sentry.uiProfiler.stopProfiler`. You have full control over when the profiler runs. |
|
|
||
| In `manual` mode, the profiling data collection can be managed via calls to `Sentry.uiProfiler.startProfiler` and `Sentry.uiProfiler.stopProfiler`. You are entirely in the in control of when the profiler runs. | ||
|
|
||
| In `trace` mode, the profiler manages its own start and stop calls, which are based on spans: the profiler continues to run while there is at least one active span, and stops when there are no active spans. |
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 `trace` mode, the profiler manages its own start and stop calls, which are based on spans: the profiler continues to run while there is at least one active span, and stops when there are no active spans. | |
| In `trace` mode, the profiler manages its own start and stop calls based on spans. It continues to run while at least one span is active, and stops when there are no active spans. |
| - Profiling respects **both** `profile_session_sample_rate` and the tracing sampling configuration (`traces_sample_rate` or `traces_sampler`). | ||
| - `profile_session_sample_rate` is checked first. If the session is not sampled, no profiling will occur. | ||
| - If the session is sampled, `traces_sample_rate` / `traces_sampler` is evaluated for each root span to determine if it should be profiled. | ||
| - Only if a root span is sampled (this is based on `traces_sample_rate` / `traces_sampler`), profiling will start. Therefore, profile sampling is re-evaluated on each root span. |
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.
| - Only if a root span is sampled (this is based on `traces_sample_rate` / `traces_sampler`), profiling will start. Therefore, profile sampling is re-evaluated on each root span. | |
| - Only if a root span is sampled (this is based on `traces_sample_rate` / `traces_sampler`), profiling will start. Therefore, profile sampling is re-evaluated for each root span. |
|
|
||
| <SdkOption name="profileSessionSampleRate" type='number'> | ||
|
|
||
| A number between `0` and `1` that sets the percentage of how many sessions should have profiling enabled. `1.0` enables profiling in every session, `0.5` enables profiling for 50% of the sessions, and `0` enables it for none. The sampling decision is made once at the beginning of a session. This option is required to enable profiling. |
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.
Yes, I also think that would be helpful information to provide
| <SdkOption name="profilesSampleRate" type='number'> | ||
|
|
||
| A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all transactions created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled. | ||
| **Deprecated:** Use `profileSessionSampleRate` instead to configure continuous profiling. |
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.
If we add a minimum version note above, we could also add the version here
| // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would | ||
| // result in 25% of transactions being profiled (0.5*0.5=0.25) | ||
| profilesSampleRate: 1.0, | ||
| // Set profileSessionSampleRate to 1.0 to enable profiling during every user session. |
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.
Here we only have one comment line -- the other SDKs have two. Not sure if this is on purpose :)
## DESCRIBE YOUR PR Adds docs for the new UI Profiling APIs in the browser. part of getsentry/sentry-javascript#17279 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
## DESCRIBE YOUR PR Adds docs for the new UI Profiling APIs in the browser. part of getsentry/sentry-javascript#17279 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
DESCRIBE YOUR PR
Adds docs for the new UI Profiling APIs in the browser.
part of getsentry/sentry-javascript#17279
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: