-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(remix): Add Remix-specific Performance monitoring setup page (#8394)
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/platform-includes/performance/configure-sample-rate/javascript.remix.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}); | ||
``` |
1 change: 1 addition & 0 deletions
1
src/platform-includes/performance/enable-tracing/javascript.remix.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Tracing is available by default in the Sentry Remix SDK package. |
addcedf
There was a problem hiding this comment.
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