GeezerVison is showing github.com — feat(nuxt): Automatically add BrowserTracing by s1gr1d · Pull Request #13005 · getsentry/sentry-javascript
Conversation
Add BrowserTracing when tracesSampleRate is set.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
|
|
|
// in which case everything inside will get tree-shaken away
|
|
|
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
|
|
|
if (hasTracingEnabled(options)) {
|
Lms24
Jul 22, 2024
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
So, I checked and this logic is identical to next, sveltekit and astro. So far so good but there is a flaw here that we probably were not aware of:
hasTracingEnabled returns false if neither tracesSampleRate, tracesSampler nor enableTracing are set. So in this case, we'd not add the integration here. However, the only way to enable "Tracing without Performance" in browser land is to add browserTracingIntegration but not set any of the three options.
Before we merge this PR, let's discuss if we change this behaviour in all SDKs or continue with it.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
andreiborza reacted with thumbs up emoji
|
|
// This evaluates to true unless __SENTRY_TRACING__ is text-replaced with "false",
|
|
|
// in which case everything inside will get tree-shaken away
|
|
|
if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {
|
|
|
if (hasTracingEnabled(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.
As discussed today, let's remove this guard and later, once we have a vite plugin setup, add an easy-to-use option to configure the __SENTRY_TRACING__ flag :)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Lms24
Lms24 approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|