-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Always add browserTracingIntegration
in Meta Framework SDKs
#13010
Comments
For reference: #9095 |
The function |
IMHO this check can remain as it is? as soon as this is defined that is enough, for all of these fields! |
Just to confirm: Are we talking about the correctness of |
No, not about the correctness of |
I'd say we can safely ignore If users would still like to avoid TwP scenarios there's still another escape hatch: |
Problem Statement
Currently, our meta-framework SDKs (in contrast to the frontend framework and base browser SDKs) automatically add
browserTracingIntegration
if:__SENTRY_TRACING__
tree-shaking flag is not replaced at build timehasTracingEnabled
returns true, meaningtracesSampleRate
,tracesSampler
orenableTracing
options are setThe second (2) condition unfortunately breaks "Tracing without Performance" which in our frontend framework SDKs is enabled as soon as
browserTracingIntegration
is added but no sample rates are set. Adding to this, there is no bundle size advantage in not addingbrowserTracingIntegration
because thehasTracingEnabled
check is performed at runtime. This results in the integration code always being added to the bundle.We realized this while working on and reviewing #13005
Solution Brainstorm
We're going to change the behaviour here to remove condition 2 entirely. Meaning, by default,
browserTracingIntegration
will always be added, unless users configure the tree shaking flag (1). This change should be implemented in all our meta framework SDKs that currently automatically addbrowserTracingIntegration
.The benefits of always adding the integration are:
transaction
field is populated via the framework'sbrowserTracingIntegration
settingscope.transactionName
. This means higher quality transaction names out of the box.Implementation
Implementing this behaviour requires two changes:
hasTracingEnabled
guard in the SDK initializationsentrySvelteKit
vite plugin or Astro integration options) for users to easily opt out of tracing. This option should pass the boolean to the Sentry bundler plugin'sbundleSizeOptimizations.excludePerformanceMonitoring
option.The text was updated successfully, but these errors were encountered: