-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(js): Update and fix browser profiling integration code snippets
- Loading branch information
Showing
5 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.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,25 @@ | ||
```javascript | ||
import * as Sentry from "@sentry/astro"; | ||
|
||
Sentry.init({ | ||
dsn: "___PUBLIC_DSN___", | ||
integrations: [ | ||
// Add browser profiling integration to the list of integrations | ||
Sentry.browserProfilingIntegration(), | ||
], | ||
|
||
// 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/], | ||
|
||
// Set profilesSampleRate to 1.0 to profile every transaction. | ||
// Since profilesSampleRate is relative to tracesSampleRate, | ||
// the final profiling rate can be computed as tracesSampleRate * profilesSampleRate | ||
// For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would | ||
// results in 25% of transactions being profiled (0.5*0.5=0.25) | ||
profilesSampleRate: 1.0, | ||
}); | ||
``` |
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
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
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