Skip to content

Commit

Permalink
ref(js): Update and fix browser profiling integration code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Feb 12, 2024
1 parent a849f4e commit cbbb247
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
// Add browser profiling integration to the list of integrations
new Sentry.BrowserTracing(),
new Sentry.BrowserProfilingIntegration(),
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
Expand Down
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,
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
// Add browser profiling integration to the list of integrations
Sentry.browserTracingIntegration(),
Sentry.browserTracingIntegration(),
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
// Add browser profiling integration to the list of integrations
new Sentry.BrowserProfilingIntegration(),
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
// Add browser profiling integration to the list of integrations
new Sentry.BrowserProfilingIntegration(),
Sentry.browserProfilingIntegration(),
],

// Set tracesSampleRate to 1.0 to capture 100%
Expand Down

0 comments on commit cbbb247

Please sign in to comment.