Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,

// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});
```
Expand Down Expand Up @@ -148,8 +151,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});
```
Expand Down
6 changes: 4 additions & 2 deletions docs/platforms/javascript/guides/azure-functions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ logs

Expand Down
72 changes: 1 addition & 71 deletions docs/platforms/javascript/guides/gcp-functions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,77 +40,7 @@ Run the command for your preferred package manager to add the Sentry SDK to your

Make sure to initialize Sentry at the top of your function code and wrap each function with the appropriate helper. Select the tab that matches the kind of function you're using (HTTP, Background, or CloudEvent):

```javascript {tabTitle:Http functions}
const Sentry = require("@sentry/google-cloud-serverless");

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,
// ___PRODUCT_OPTION_START___ performance

// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// We recommend adjusting this value in production
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ logs

// Enable logs to be sent to Sentry
enableLogs: true,
// ___PRODUCT_OPTION_END___ logs
});

exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
// your code
});
```

```javascript {tabTitle:Background functions}
const Sentry = require("@sentry/google-cloud-serverless");

Sentry.init({
dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance

// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// We recommend adjusting this value in production
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
});

exports.helloEvents = Sentry.wrapEventFunction((data, context, callback) => {
// your code
});
```

```javascript {tabTitle:CloudEvent functions}
const Sentry = require("@sentry/google-cloud-serverless");

Sentry.init({
dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance

// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// We recommend adjusting this value in production
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
});

exports.helloEvents = Sentry.wrapCloudEventFunction((context, callback) => {
// your code
});
```
<PlatformContent includePath="getting-started-config" />

## Step 3: Add Readable Stack Traces With Source Maps (Optional)

Expand Down
8 changes: 3 additions & 5 deletions docs/platforms/javascript/guides/react-router/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,10 @@ Sentry.init({
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// Set profilesSampleRate to 1.0 to profile 100%
// of sampled transactions.
// This is relative to tracesSampleRate
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,10 @@ Sentry.init({
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling
// Set profilesSampleRate to 1.0 to profile 100%
// of sampled transactions.
// This is relative to tracesSampleRate
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});
```
Expand Down
34 changes: 34 additions & 0 deletions platform-includes/getting-started-complete/javascript.remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Choose the features you want to configure, and this guide will show you how:

Run the command for your preferred package manager to add the Sentry SDK to your application:

<OnboardingOption optionId="profiling" hideForThisOption>

```bash {tabTitle:npm}
npm install @sentry/remix --save
```
Expand All @@ -36,6 +38,23 @@ yarn add @sentry/remix
pnpm add @sentry/remix
```

</OnboardingOption>

<OnboardingOption optionId="profiling">
```bash {tabTitle:npm}
npm install @sentry/remix @sentry/profiling-node --save
```

```bash {tabTitle:yarn}
yarn add @sentry/remix @sentry/profiling-node
```

```bash {tabTitle:pnpm}
pnpm add @sentry/remix @sentry/profiling-node
```

</OnboardingOption>

## Step 2: Configure

### Configure Client-Side Sentry
Expand Down Expand Up @@ -164,13 +183,21 @@ Create an instrumentation file `instrument.server.mjs` in your project's root fo

```typescript {tabTitle:Server} {filename: instrument.server.mjs}
import * as Sentry from "@sentry/remix";
// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from "@sentry/profiling-node";
// ___PRODUCT_OPTION_END___ profiling

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit: and captures action formData attributes
// https://docs.sentry.io/platforms/javascript/guides/remix/configuration/options/#sendDefaultPii
sendDefaultPii: true,
// ___PRODUCT_OPTION_START___ profiling

// Add our Profiling integration
integrations: [nodeProfilingIntegration()],
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ performance

// Set tracesSampleRate to 1.0 to capture 100%
Expand All @@ -180,6 +207,13 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ logs

// Enable logs to be sent to Sentry
Expand Down
28 changes: 14 additions & 14 deletions platform-includes/getting-started-config/javascript.aws-lambda.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
// ___PRODUCT_OPTION_START___ profiling

integrations: [
nodeProfilingIntegration(),
],

integrations: [nodeProfilingIntegration()],
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ performance

Expand All @@ -27,8 +25,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});

Expand All @@ -45,15 +45,13 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
// ___PRODUCT_OPTION_START___ profiling

integrations: [
nodeProfilingIntegration(),
],

integrations: [nodeProfilingIntegration()],
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ performance

Expand All @@ -66,8 +64,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance

// ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
```javascript {tabTitle:Http functions}
const Sentry = require("@sentry/google-cloud-serverless");
// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
// ___PRODUCT_OPTION_END___ profiling

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,

// ___PRODUCT_OPTION_START___ profiling

integrations: [
nodeProfilingIntegration(),
],
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ performance

// Add Performance Monitoring by setting tracesSampleRate
Expand All @@ -23,8 +27,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});

Expand All @@ -35,18 +41,18 @@ exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {

```javascript {tabTitle:Background functions}
const Sentry = require("@sentry/google-cloud-serverless");
// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
// ___PRODUCT_OPTION_END___ profiling

Sentry.init({
dsn: "___PUBLIC_DSN___",

// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the current quick start guide sendDefaultPii is only listed in the "HTTP functions" tab, so I deleted it from here -- let me know if I need to re-add it 👍


// ___PRODUCT_OPTION_START___ profiling

integrations: [
nodeProfilingIntegration(),
],
// ___PRODUCT_OPTION_END___ profiling
// ___PRODUCT_OPTION_START___ performance

// Add Performance Monitoring by setting tracesSampleRate
Expand All @@ -58,8 +64,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});

Expand All @@ -79,6 +87,7 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ profiling

integrations: [
nodeProfilingIntegration(),
],
Expand All @@ -94,8 +103,10 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ profiling

// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
// Enable profiling for a percentage of sessions
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate
profileSessionSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
});

Expand Down
Loading