Skip to content

Commit

Permalink
fix(remix): Add Remix-specific Performance monitoring setup page (#8394)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 authored Nov 3, 2023
1 parent cfe21d9 commit addcedf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<SignInNote />

```typescript {tabTitle:Client} {filename: entry.client.tsx}
import { useLocation, useMatches } from "@remix-run/react";
import * as Sentry from "@sentry/remix";
import { useEffect } from "react";

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.remixRouterInstrumentation(
useEffect,
useLocation,
useMatches
),
}),
],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
});
```

```typescript {tabTitle:Server} {filename: entry.server.tsx}
import * as Sentry from "@sentry/remix";

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tracing is available by default in the Sentry Remix SDK package.

1 comment on commit addcedf

@vercel
Copy link

@vercel vercel bot commented on addcedf Nov 3, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sentry-docs – ./

docs.sentry.io
sentry-docs-git-master.sentry.dev
sentry-docs.sentry.dev

Please sign in to comment.