Skip to content

Conversation

@AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Mar 21, 2023

ref getsentry/sentry-javascript#5815

Docs for changes in getsentry/sentry-javascript#7342 that was just released with 7.44.0.

This PR updates our instructions to remove the dependency on using the @sentry/tracing package for the frontend JS SDKs. Instead users can now just import BrowserTracing directly from a package.

Basically from:

import * as Sentry from '@sentry/browser';
import { BrowserTracing } from '@sentry/tracing';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  integrations: [new BrowserTracing()],
});

to

import * as Sentry from '@sentry/browser';

Sentry.init({
  dsn: '__DSN__',
  tracesSampleRate: 1.0,
  integrations: [new Sentry.BrowserTracing()],
});

@vercel
Copy link

vercel bot commented Mar 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 9:54AM (UTC)

Copy link
Contributor

@lizokm lizokm left a comment

Choose a reason for hiding this comment

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

Made a few suggestions.

@AbhiPrasad
Copy link
Member Author

Plan is now to merge this in next week!

@timfish
Copy link
Collaborator

timfish commented Mar 23, 2023

I found these changes too but didn't put them in my PR because they're browser related.

3 of the 4 file changes are simply replacing .getCurrentHub().getScope().getTransaction() with .getActiveTransaction() and could arguably go in another PR.

However there was also a yarn add tracing left in /src/platform-includes/performance/enable-tracing/javascript.mdx which can be seen here.

@AbhiPrasad AbhiPrasad requested review from a team March 30, 2023 07:52
@AbhiPrasad AbhiPrasad requested review from a team as code owners March 30, 2023 07:52
@AbhiPrasad AbhiPrasad force-pushed the abhi-remove-browser-tracing-package branch from 36422e0 to 6e3f32f Compare March 30, 2023 07:57
@AbhiPrasad AbhiPrasad force-pushed the abhi-remove-browser-tracing-package branch from 6e3f32f to 37cdc3c Compare March 30, 2023 07:58
@AbhiPrasad
Copy link
Member Author

Sorry for the ping folks - had a busted git merge that I needed to repair.

@AbhiPrasad AbhiPrasad merged commit 1ad5d48 into master Mar 30, 2023
@AbhiPrasad AbhiPrasad deleted the abhi-remove-browser-tracing-package branch March 30, 2023 11:08
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants