Skip to content

feat(browser): Export BrowserTracing from package - #7366

Closed
AbhiPrasad wants to merge 12 commits into
developfrom
abhi-browser-tracing-in-browser
Closed

feat(browser): Export BrowserTracing from package#7366
AbhiPrasad wants to merge 12 commits into
developfrom
abhi-browser-tracing-in-browser

Conversation

@AbhiPrasad

@AbhiPrasadAbhiPrasad commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

closes#7342

Building on the work in #7345, this PR exports BrowserTracing from the @sentry/browser package.

This means performance monitoring for the browser now looks like so:

import*asSentryfrom'@sentry/browser';Sentry.init({dsn: "__DSN__",tracesSampleRate: 1.0,integrations: [newSentry.BrowserTracing()]});

If you don't want to use BrowserTracing, you'll have to add the tracing extensions yourself:

import*asSentryfrom'@sentry/browser';Sentry.addTracingExtensions();Sentry.init({dsn: "__DSN__",tracesSampleRate: 1.0,});

@AbhiPrasad
AbhiPrasad requested review from a team, lforst and mydea and removed request for a teamMarch 7, 2023 11:57
Comment threadpackage.json
"resolutions": {
"**/agent-base": "5"
"**/agent-base": "5",
"**/jest-resolve": "29.5.0"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to bump this so that we get around jestjs/jest#9771, which requires Jest >= 28

@AbhiPrasad

Copy link
Copy Markdown
ContributorAuthor

One day I'll merge this

and it will be glorious!

@github-actions

github-actionsBot commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@sentry/browser - ES5 CDN Bundle (gzipped + minified)20.89 KB (+3.81% 🔺)
@sentry/browser - ES5 CDN Bundle (minified)62.24 KB (-0.5% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified)19.62 KB (+4.6% 🔺)
@sentry/browser - ES6 CDN Bundle (minified)55.32 KB (-0.38% 🔽)
@sentry/browser - Webpack (gzipped + minified)20.56 KB (+0.29% 🔺)
@sentry/browser - Webpack (minified)62.32 KB (-6.98% 🔽)
@sentry/react - Webpack (gzipped + minified)20.6 KB (+0.36% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified)47.48 KB (-1.5% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)28.27 KB (+3.94% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)26.75 KB (+5.07% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified)44.41 KB (+3.14% 🔺)
@sentry/replay - Webpack (gzipped + minified)37.55 KB (+1.22% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified)62.84 KB (+3.36% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified)55.87 KB (+3.1% 🔺)

@AbhiPrasadAbhiPrasad mentioned this pull request Mar 7, 2023
@AbhiPrasad

Copy link
Copy Markdown
ContributorAuthor

Closing this because it will break webpack 4 :(

We can only make this change in v8.

@AbhiPrasad
AbhiPrasad deleted the abhi-browser-tracing-in-browser branch March 7, 2023 16:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move BrowserTracing to @sentry/browser

3 participants

@AbhiPrasad@mydea@lforst