Skip to content

Commit 5b3f314

Browse files
authored
docs(browser): Delete deprecated profilesSampler (#14549)
## DESCRIBE YOUR PR Removes all occurrences of `profilesSampler` in the JS browser SDKs as this API is not available and also deprecated, so we won't implement it. - getsentry/sentry-javascript#16773 (comment) - getsentry/sentry-javascript#17279 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
1 parent 6f5db9a commit 5b3f314

File tree

11 files changed

+0
-243
lines changed

11 files changed

+0
-243
lines changed

platform-includes/profiling/automatic-instrumentation-setup/_default.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,3 @@ Sentry.init({
2424
profilesSampleRate: 1.0,
2525
});
2626
```
27-
28-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
29-
30-
```javascript
31-
const Sentry = require("@sentry/browser");
32-
33-
Sentry.init({
34-
dsn: "___PUBLIC_DSN___",
35-
integrations: [
36-
// Add browser profiling integration to the list of integrations
37-
Sentry.browserTracingIntegration(),
38-
Sentry.browserProfilingIntegration(),
39-
],
40-
tracesSampleRate: 1.0,
41-
42-
// This function will be called for every sampled span
43-
// to determine if it should be profiled
44-
profilesSampler: (samplingContext) => {
45-
return 1.0;
46-
},
47-
});
48-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,3 @@ Sentry.init({
2424
profilesSampleRate: 1.0,
2525
});
2626
```
27-
28-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
29-
30-
```javascript
31-
import * as Sentry from "@sentry/angular";
32-
33-
Sentry.init({
34-
dsn: "___PUBLIC_DSN___",
35-
integrations: [
36-
// Add browser profiling integration to the list of integrations
37-
Sentry.browserTracingIntegration(),
38-
Sentry.browserProfilingIntegration(),
39-
],
40-
tracesSampleRate: 1.0,
41-
42-
// This function will be called for every sampled span
43-
// to determine if it should be profiled
44-
profilesSampler: (samplingContext) => {
45-
return 1.0;
46-
},
47-
});
48-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,3 @@ Sentry.init({
2323
profilesSampleRate: 1.0,
2424
});
2525
```
26-
27-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
28-
29-
```javascript
30-
import * as Sentry from "@sentry/astro";
31-
32-
Sentry.init({
33-
dsn: "___PUBLIC_DSN___",
34-
integrations: [
35-
// Add browser profiling integration to the list of integrations
36-
Sentry.browserTracingIntegration(),
37-
Sentry.browserProfilingIntegration(),
38-
],
39-
tracesSampleRate: 1.0,
40-
41-
// This function will be called for every sampled span
42-
// to determine if it should be profiled
43-
profilesSampler: (samplingContext) => {
44-
return 1.0;
45-
},
46-
});
47-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.electron.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,3 @@ Sentry.init({
2626
profilesSampleRate: 1.0,
2727
});
2828
```
29-
30-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
31-
32-
```javascript
33-
const Sentry = require("@sentry/electron/renderer");
34-
35-
Sentry.init({
36-
dsn: "___PUBLIC_DSN___",
37-
integrations: [
38-
// Add browser profiling integration to the list of integrations
39-
Sentry.browserTracingIntegration(),
40-
Sentry.browserProfilingIntegration(),
41-
],
42-
tracesSampleRate: 1.0,
43-
44-
// This function will be called for every sampled span
45-
// to determine if it should be profiled
46-
profilesSampler: (samplingContext) => {
47-
return 1.0;
48-
},
49-
});
50-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,3 @@ Sentry.init({
2323
profilesSampleRate: 1.0,
2424
});
2525
```
26-
27-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
28-
29-
```javascript {filename:instrumentation-client.js|ts}
30-
import * as Sentry from "@sentry/nextjs";
31-
32-
Sentry.init({
33-
dsn: "___PUBLIC_DSN___",
34-
integrations: [
35-
// Add browser profiling integration to the list of integrations
36-
Sentry.browserTracingIntegration(),
37-
Sentry.browserProfilingIntegration(),
38-
],
39-
tracesSampleRate: 1.0,
40-
41-
// This function will be called for every sampled span
42-
// to determine if it should be profiled
43-
profilesSampler: (samplingContext) => {
44-
return 1.0;
45-
},
46-
});
47-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,3 @@ Sentry.init({
2323
profilesSampleRate: 1.0,
2424
});
2525
```
26-
27-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
28-
29-
```javascript {filename:sentry.client.config.js|ts}
30-
import * as Sentry from "@sentry/nuxt";
31-
32-
Sentry.init({
33-
dsn: "___PUBLIC_DSN___",
34-
integrations: [
35-
// Add browser profiling integration to the list of integrations
36-
Sentry.browserTracingIntegration(),
37-
Sentry.browserProfilingIntegration(),
38-
],
39-
tracesSampleRate: 1.0,
40-
41-
// This function will be called for every sampled span
42-
// to determine if it should be profiled
43-
profilesSampler: (samplingContext) => {
44-
return 1.0;
45-
},
46-
});
47-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,3 @@ Sentry.init({
2424
profilesSampleRate: 1.0,
2525
});
2626
```
27-
28-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
29-
30-
```javascript
31-
import * as Sentry from "@sentry/react";
32-
33-
Sentry.init({
34-
dsn: "___PUBLIC_DSN___",
35-
integrations: [
36-
// Add browser profiling integration to the list of integrations
37-
Sentry.browserTracingIntegration(),
38-
Sentry.browserProfilingIntegration(),
39-
],
40-
tracesSampleRate: 1.0,
41-
42-
// This function will be called for every sampled span
43-
// to determine if it should be profiled
44-
profilesSampler: (samplingContext) => {
45-
return 1.0;
46-
},
47-
});
48-
```
49-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,3 @@ Sentry.init({
2424
profilesSampleRate: 1.0,
2525
});
2626
```
27-
28-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
29-
30-
```javascript {filename:entry.client.tsx}
31-
import * as Sentry from "@sentry/remix";
32-
33-
Sentry.init({
34-
dsn: "___PUBLIC_DSN___",
35-
integrations: [
36-
// Add browser profiling integration to the list of integrations
37-
Sentry.browserTracingIntegration(),
38-
Sentry.browserProfilingIntegration(),
39-
],
40-
tracesSampleRate: 1.0,
41-
42-
// This function will be called for every sampled span
43-
// to determine if it should be profiled
44-
profilesSampler: (samplingContext) => {
45-
return 1.0;
46-
},
47-
});
48-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,3 @@ Sentry.init({
2424
profilesSampleRate: 1.0,
2525
});
2626
```
27-
28-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
29-
30-
```javascript
31-
import * as Sentry from "@sentry/svelte";
32-
33-
Sentry.init({
34-
dsn: "___PUBLIC_DSN___",
35-
integrations: [
36-
// Add browser profiling integration to the list of integrations
37-
Sentry.browserTracingIntegration(),
38-
Sentry.browserProfilingIntegration(),
39-
],
40-
tracesSampleRate: 1.0,
41-
42-
// This function will be called for every sampled span
43-
// to determine if it should be profiled
44-
profilesSampler: (samplingContext) => {
45-
return 1.0;
46-
},
47-
});
48-
```

platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,3 @@ Sentry.init({
2323
profilesSampleRate: 1.0,
2424
});
2525
```
26-
27-
Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function:
28-
29-
```javascript {filename:hooks.client.js}
30-
import * as Sentry from "@sentry/sveltekit";
31-
32-
Sentry.init({
33-
dsn: "___PUBLIC_DSN___",
34-
integrations: [
35-
// Add browser profiling integration to the list of integrations
36-
Sentry.browserTracingIntegration(),
37-
Sentry.browserProfilingIntegration(),
38-
],
39-
tracesSampleRate: 1.0,
40-
41-
// This function will be called for every sampled span
42-
// to determine if it should be profiled
43-
profilesSampler: (samplingContext) => {
44-
return 1.0;
45-
},
46-
});
47-
```

0 commit comments

Comments
 (0)