Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ By default, the `browserTracingIntegration()` will create a `pageload` span for
To make sure that spans are created correctly for a custom routing setup, you'll need to opt out of the default span creation by setting `instrumentNavigation: false` and `instrumentPageLoad: false` in the `browserTracingIntegration()` options. You can then manually create spans like this:

```javascript
Sentry.init({
const client = Sentry.init({
integrations: [
Sentry.browserTracingIntegration({
// disable automatic span creation
Expand All @@ -15,8 +15,6 @@ Sentry.init({
],
});

const client = Sentry.getClient()

// We start the pageload span as early as possible!
let pageLoadSpan = Sentry.startBrowserTracingPageLoadSpan(client, {
name: window.location.pathname,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ function setupSentry() {
setupGlobalHub();

// Make sure to call `Sentry.init` BEFORE initializing the OpenTelemetry SDK
Sentry.init({
const client = Sentry.init({
dsn: "___PUBLIC_DSN___",
tracesSampleRate: 1.0,
// set the instrumenter to use OpenTelemetry instead of Sentry
instrumenter: "otel",
// ...
});

const client = getClient();
setupEventContextTrace(client);

// You can wrap whatever local storage context manager you want to use
Expand Down