You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(browser): Move browserTracingIntegration code to setup hook (#16386)
This PR removes the warning for multiple browserTracingIntegrations
being setup.
We realised this warning was actually just a symptom of us running a
bunch of the integration code in the function itself, not int `setup()`.
This lead to stuff running twice when users passed in a custom
integration in addition to a default one, because the logic is
basically:
```js
const defaultIntergations = [browserTracingIntegration()];
const usedDefinedIntegrations = [browserTracingIntegration()];
// at this point, the function was already executed twice, leading to side effects even without calling `init`!
```
Now, we move all the logic to setup/setupAfterAll, so this should be
safe. This means that the integration will be deduped anyhow (I added a
test to make sure this is the case), and we no longer need the warning.
fixes#16369
Copy file name to clipboardExpand all lines: dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/multiple-integrations/init.js
Copy file name to clipboardExpand all lines: dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/multiple-integrations/test.ts
0 commit comments