main() async {
// Note: Profiling alpha is available for iOS and macOS since SDK version 7.12.0
options.profilesSampleRate = 1.0;
// ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.enableLogs = true;
+ // ___PRODUCT_OPTION_END___ logs
},
appRunner: () => runApp(
SentryWidget(
diff --git a/docs/platforms/go/common/index.mdx b/docs/platforms/go/common/index.mdx
index 4179c4a200eee..9035e301690e5 100644
--- a/docs/platforms/go/common/index.mdx
+++ b/docs/platforms/go/common/index.mdx
@@ -10,6 +10,20 @@ Check out the other SDKs we support in the left-hand dropdown.
* If you don't have an account and Sentry project established already, please head over to [Sentry](https://sentry.io/signup/), and then return to this page.
+## Features
+
+In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
+
+Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
+
+
+
## Install
diff --git a/docs/platforms/javascript/common/index.mdx b/docs/platforms/javascript/common/index.mdx
index 806e0789d3b95..b8e1406753cda 100644
--- a/docs/platforms/javascript/common/index.mdx
+++ b/docs/platforms/javascript/common/index.mdx
@@ -47,7 +47,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
@@ -63,7 +63,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
@@ -72,7 +72,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-
+
diff --git a/docs/platforms/javascript/guides/angular/manual-setup.mdx b/docs/platforms/javascript/guides/angular/manual-setup.mdx
index 231f38880733e..52710f4ed6111 100644
--- a/docs/platforms/javascript/guides/angular/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/angular/manual-setup.mdx
@@ -24,7 +24,7 @@ You need:
Choose the features you want to configure, and this guide will show you how:
@@ -130,6 +130,11 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
bootstrapApplication(AppComponent, appConfig).catch((err) =>
@@ -190,6 +195,11 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
platformBrowserDynamic()
diff --git a/docs/platforms/javascript/guides/astro/index.mdx b/docs/platforms/javascript/guides/astro/index.mdx
index d9c1c4b11b08e..6cc9947d70ecc 100644
--- a/docs/platforms/javascript/guides/astro/index.mdx
+++ b/docs/platforms/javascript/guides/astro/index.mdx
@@ -26,7 +26,7 @@ Non-Node runtimes, like Vercel's Edge runtime or Cloudflare Pages, are currently
## Install
-
+
Sentry captures data by using an SDK within your application's runtime.
@@ -119,8 +119,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Define how likely traces are sampled. Adjust this value in production,
// or use tracesSampler for greater control.
tracesSampleRate: 1.0,
@@ -159,8 +164,13 @@ Sentry.init({
nodeProfilingIntegration(),
],
// ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Define how likely traces are sampled. Adjust this value in production,
// or use tracesSampler for greater control.
tracesSampleRate: 1.0,
diff --git a/docs/platforms/javascript/guides/azure-functions/index.mdx b/docs/platforms/javascript/guides/azure-functions/index.mdx
index 2d7f99eb1f70f..a2b7271bbb917 100644
--- a/docs/platforms/javascript/guides/azure-functions/index.mdx
+++ b/docs/platforms/javascript/guides/azure-functions/index.mdx
@@ -17,9 +17,9 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
-Sentry captures data by using an SDK within your application’s runtime. This means that you have to add `@sentry/node` as a runtime dependency to your application:
+Sentry captures data by using an SDK within your application's runtime. This means that you have to add `@sentry/node` as a runtime dependency to your application:
diff --git a/docs/platforms/javascript/guides/bun/index.mdx b/docs/platforms/javascript/guides/bun/index.mdx
index ba16ab8d754b9..278ab78f34b44 100644
--- a/docs/platforms/javascript/guides/bun/index.mdx
+++ b/docs/platforms/javascript/guides/bun/index.mdx
@@ -16,9 +16,9 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-
+
-Sentry captures data by using an SDK within your application’s runtime.
+Sentry captures data by using an SDK within your application's runtime.
```bash {tabTitle:Bun}
bun add @sentry/bun
diff --git a/docs/platforms/javascript/guides/capacitor/index.mdx b/docs/platforms/javascript/guides/capacitor/index.mdx
index 08206d7f479c8..bdf5152dd26d5 100644
--- a/docs/platforms/javascript/guides/capacitor/index.mdx
+++ b/docs/platforms/javascript/guides/capacitor/index.mdx
@@ -16,7 +16,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
Sentry captures data by using an SDK within your application's runtime.
diff --git a/docs/platforms/javascript/guides/cloudflare/index.mdx b/docs/platforms/javascript/guides/cloudflare/index.mdx
index 71b5f73023996..62599c36a25be 100644
--- a/docs/platforms/javascript/guides/cloudflare/index.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/index.mdx
@@ -21,6 +21,16 @@ Take a look at your framework of choice, as there are likely additional instruct
If you're not using one of these frameworks, or are just looking for general instructions for Cloudflare usage, you're in the right place.
+## Features
+
+In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
+
+Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
+
+
+
## Install
@@ -75,6 +85,11 @@ export const onRequest = [
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
diff --git a/docs/platforms/javascript/guides/deno/index.mdx b/docs/platforms/javascript/guides/deno/index.mdx
index a789460fb5e2b..5d68948bc69ab 100644
--- a/docs/platforms/javascript/guides/deno/index.mdx
+++ b/docs/platforms/javascript/guides/deno/index.mdx
@@ -27,7 +27,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-
+
```javascript {tabTitle: Deno}
import * as Sentry from "npm:@sentry/deno";
diff --git a/docs/platforms/javascript/guides/electron/index.mdx b/docs/platforms/javascript/guides/electron/index.mdx
index 445d66ca6d5e8..4944f675f0fea 100644
--- a/docs/platforms/javascript/guides/electron/index.mdx
+++ b/docs/platforms/javascript/guides/electron/index.mdx
@@ -17,7 +17,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
```bash {tabTitle:npm}
npm install @sentry/electron --save
diff --git a/docs/platforms/javascript/guides/ember/index.mdx b/docs/platforms/javascript/guides/ember/index.mdx
index 4bef441818922..5edbd3a6cb3c0 100644
--- a/docs/platforms/javascript/guides/ember/index.mdx
+++ b/docs/platforms/javascript/guides/ember/index.mdx
@@ -24,7 +24,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
Sentry captures data by using an SDK within your application's runtime.
@@ -62,8 +62,13 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ user-feedback
],
// ___PRODUCT_OPTION_END___ session-replay
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/javascript/guides/gatsby/index.mdx b/docs/platforms/javascript/guides/gatsby/index.mdx
index 2a2e1a7f91159..e6842ef532ec8 100644
--- a/docs/platforms/javascript/guides/gatsby/index.mdx
+++ b/docs/platforms/javascript/guides/gatsby/index.mdx
@@ -15,7 +15,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
To use Sentry with your Gatsby application, you will need to use `@sentry/gatsby` (Sentry's Gatsby SDK):
@@ -78,8 +78,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/javascript/guides/gcp-functions/index.mdx b/docs/platforms/javascript/guides/gcp-functions/index.mdx
index a1262cc0dc057..3f71fa40944f2 100644
--- a/docs/platforms/javascript/guides/gcp-functions/index.mdx
+++ b/docs/platforms/javascript/guides/gcp-functions/index.mdx
@@ -23,7 +23,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
Add `@sentry/google-cloud-serverless` as a dependency to `package.json`:
diff --git a/docs/platforms/javascript/guides/hono/index.mdx b/docs/platforms/javascript/guides/hono/index.mdx
index 5a20e282487ea..ad41ecafa0ba2 100644
--- a/docs/platforms/javascript/guides/hono/index.mdx
+++ b/docs/platforms/javascript/guides/hono/index.mdx
@@ -21,7 +21,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
## Setup
diff --git a/docs/platforms/javascript/guides/nestjs/index.mdx b/docs/platforms/javascript/guides/nestjs/index.mdx
index f3492b692060f..747b8380253a4 100644
--- a/docs/platforms/javascript/guides/nestjs/index.mdx
+++ b/docs/platforms/javascript/guides/nestjs/index.mdx
@@ -16,7 +16,7 @@ categories:
Choose the features you want to configure, and this guide will show you how:
diff --git a/docs/platforms/javascript/guides/nextjs/index.mdx b/docs/platforms/javascript/guides/nextjs/index.mdx
index c07e37dfc4e72..bbe21a4901c0d 100644
--- a/docs/platforms/javascript/guides/nextjs/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/index.mdx
@@ -13,6 +13,16 @@ categories:
+## Features
+
+In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also get to the root of an error or performance issue faster, by watching a video-like reproduction of a user session with [session replay](/product/explore/session-replay/web/getting-started/).
+
+Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
+
+
+
## Step 1: Install
To install Sentry using the installation wizard, run the following command within your project:
@@ -38,7 +48,93 @@ This guide assumes that you enable all features and allow the wizard to create a
-## Step 2: Verify Your Setup
+## Step 2: Configure
+
+If you prefer to configure Sentry manually, here are the configuration files the wizard would create:
+
+### Client-Side Configuration
+
+```javascript {tabTitle:Client} {filename:instrumentation-client.(js|ts)}
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
+ // Adds request headers and IP for users, for more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
+ sendDefaultPii: true,
+
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
+ Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
+ Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ user-feedback
+ Sentry.feedbackIntegration({
+ // Additional SDK configuration goes in here, for example:
+ colorScheme: "system",
+ }),
+ // ___PRODUCT_OPTION_END___ user-feedback
+ ],
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
+ // ___PRODUCT_OPTION_START___ performance
+ // Set tracesSampleRate to 1.0 to capture 100%
+ // of transactions for tracing.
+ // 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___ session-replay
+
+ // Capture Replay for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Learn more at
+ // https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
+});
+```
+
+### Server-Side Configuration
+
+```javascript {tabTitle:Server} {filename:sentry.server.config.(js|ts)}
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
+ // Adds request headers and IP for users, for more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
+ sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
+ // ___PRODUCT_OPTION_START___ performance
+ // Set tracesSampleRate to 1.0 to capture 100%
+ // of transactions for tracing.
+ // 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
+});
+```
+
+For detailed manual setup instructions, see our [manual setup guide](/platforms/javascript/guides/nextjs/manual-setup/).
+
+## Step 3: Verify Your Setup
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
index caa2c5f083add..b83a6d23d19a3 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
@@ -16,7 +16,7 @@ description: "Learn how to manually set up Sentry in your Next.js app and captur
Choose the features you want to configure, and this guide will show you how:
@@ -140,6 +140,11 @@ Sentry.init({
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
@@ -168,6 +173,11 @@ Sentry.init({
// 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
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// ...
@@ -195,6 +205,11 @@ Sentry.init({
// 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
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// ...
diff --git a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
index d7ed97081100b..4fe201ce24b95 100644
--- a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
@@ -51,7 +51,7 @@ Add the following overrides:
Choose the features you want to configure, and this guide will show you how:
@@ -131,6 +131,11 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
```
@@ -169,6 +174,11 @@ Sentry.init({
// 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
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
```
diff --git a/docs/platforms/javascript/guides/react-router/index.mdx b/docs/platforms/javascript/guides/react-router/index.mdx
index 88763a3f006cc..c8475b544f112 100644
--- a/docs/platforms/javascript/guides/react-router/index.mdx
+++ b/docs/platforms/javascript/guides/react-router/index.mdx
@@ -33,6 +33,7 @@ Sentry captures data by using an SDK within your application's runtime.
"performance",
"session-replay",
"user-feedback",
+ "logs",
{
id: 'profiling',
checked: false
diff --git a/docs/platforms/javascript/guides/react/index.mdx b/docs/platforms/javascript/guides/react/index.mdx
index 512410c889f3e..d317748f25310 100644
--- a/docs/platforms/javascript/guides/react/index.mdx
+++ b/docs/platforms/javascript/guides/react/index.mdx
@@ -16,7 +16,7 @@ categories:
Choose the features you want to configure, and this guide will show you how:
@@ -70,6 +70,11 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/remix/manual-setup.mdx b/docs/platforms/javascript/guides/remix/manual-setup.mdx
index bcc360ec52e6d..cde7fd1bb89f4 100644
--- a/docs/platforms/javascript/guides/remix/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/remix/manual-setup.mdx
@@ -15,7 +15,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
Get started by installing the Sentry Remix SDK:
@@ -90,6 +90,11 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
```
@@ -165,6 +170,11 @@ Sentry.init({
// 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
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
// Optionally capture action formData attributes with errors.
// This requires `sendDefaultPii` set to true as well.
diff --git a/docs/platforms/javascript/guides/solid/index.mdx b/docs/platforms/javascript/guides/solid/index.mdx
index 228d7eb110773..25da692de4f2f 100644
--- a/docs/platforms/javascript/guides/solid/index.mdx
+++ b/docs/platforms/javascript/guides/solid/index.mdx
@@ -16,7 +16,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
Sentry captures data by using an SDK within your application's runtime.
@@ -75,8 +75,13 @@ if (!DEV) {
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/javascript/guides/svelte/index.mdx b/docs/platforms/javascript/guides/svelte/index.mdx
index f7377cc640052..fdbc91d52e8ae 100644
--- a/docs/platforms/javascript/guides/svelte/index.mdx
+++ b/docs/platforms/javascript/guides/svelte/index.mdx
@@ -14,7 +14,7 @@ categories:
Choose the features you want to configure, and this guide will show you how:
@@ -68,8 +68,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
@@ -121,8 +126,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx b/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx
index c0c8665dfd094..f3992e732aaca 100644
--- a/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx
@@ -16,7 +16,7 @@ description: "Learn how to manually set up Sentry in your SvelteKit app and capt
Choose the features you want to configure, and this guide will show you how:
@@ -85,6 +85,11 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
const myErrorHandler = ({ error, event }) => {
@@ -119,6 +124,11 @@ Sentry.init({
// 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
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
const myErrorHandler = ({ error, event }) => {
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
index 3c508108f4351..a52bec956e5e7 100644
--- a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
+++ b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
@@ -10,7 +10,7 @@ description: "Learn how to set up and configure Sentry in your TanStack Start Re
Choose the features you want to configure, and this guide will show you how:
@@ -98,8 +98,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production.
@@ -130,8 +135,13 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
sendDefaultPii: true,
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/javascript/guides/vue/index.mdx b/docs/platforms/javascript/guides/vue/index.mdx
index 8393e2b7782f4..7550b4565d7ed 100644
--- a/docs/platforms/javascript/guides/vue/index.mdx
+++ b/docs/platforms/javascript/guides/vue/index.mdx
@@ -16,7 +16,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
## Install
-
+
Sentry captures data by using an SDK within your application's runtime.
@@ -72,8 +72,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
@@ -127,8 +132,13 @@ Sentry.init({
}),
// ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/php/index.mdx b/docs/platforms/php/index.mdx
index 51c3c4dde4a53..2a52b5edeb1da 100644
--- a/docs/platforms/php/index.mdx
+++ b/docs/platforms/php/index.mdx
@@ -18,7 +18,7 @@ categories:
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-
+
## Install
@@ -59,6 +59,11 @@ To capture all errors, even the one during the startup of your application, you
// Set a sampling rate for profiling - this is relative to traces_sample_rate
'profiles_sample_rate' => 1.0,
// ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ 'enable_logs' => true,
+ // ___PRODUCT_OPTION_END___ logs
]);
```
diff --git a/docs/platforms/python/index.mdx b/docs/platforms/python/index.mdx
index eec89d44ede9c..b4bacc8a4f480 100644
--- a/docs/platforms/python/index.mdx
+++ b/docs/platforms/python/index.mdx
@@ -24,6 +24,7 @@ categories:
'error-monitoring',
'performance',
'profiling',
+ 'logs',
]}
/>
@@ -65,6 +66,11 @@ sentry_sdk.init(
# there is an active span.
profile_lifecycle="trace",
# ___PRODUCT_OPTION_END___ profiling
+ # ___PRODUCT_OPTION_START___ logs
+
+ # Enable logs to be sent to Sentry
+ _experiments={"enable_logs": True},
+ # ___PRODUCT_OPTION_END___ logs
)
```
diff --git a/docs/platforms/ruby/common/index.mdx b/docs/platforms/ruby/common/index.mdx
index ab5826dfd4456..f7f29af8b26cd 100644
--- a/docs/platforms/ruby/common/index.mdx
+++ b/docs/platforms/ruby/common/index.mdx
@@ -12,7 +12,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
## Install
diff --git a/platform-includes/getting-started-config/go.mdx b/platform-includes/getting-started-config/go.mdx
index bf53e7a2eeb17..90d3d51b05647 100644
--- a/platform-includes/getting-started-config/go.mdx
+++ b/platform-includes/getting-started-config/go.mdx
@@ -1,3 +1,11 @@
+
+
```go
package main
@@ -15,8 +23,13 @@ func main() {
// Useful when getting started or trying to figure something out.
Debug: true,
// Adds request headers and IP for users,
- // visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
- SendDefaultPII: true,
+ // visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
+ SendDefaultPII: true,
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ EnableLogs: true,
+ // ___PRODUCT_OPTION_END___ logs
})
if err != nil {
log.Fatalf("sentry.Init: %s", err)
diff --git a/platform-includes/getting-started-config/java.mdx b/platform-includes/getting-started-config/java.mdx
index b47e44b71c797..a93c2fd89deee 100644
--- a/platform-includes/getting-started-config/java.mdx
+++ b/platform-includes/getting-started-config/java.mdx
@@ -1,3 +1,12 @@
+
+
Configuration should happen as early as possible in your application's lifecycle.
@@ -17,6 +26,11 @@ Sentry.init(options -> {
// We recommend adjusting this value in production.
options.setTracesSampleRate(1.0);
// ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.getLogs().setEnabled(true);
+ // ___PRODUCT_OPTION_END___ logs
});
```
@@ -36,6 +50,11 @@ Sentry.init { options ->
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
// ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.logs.enabled = true
+ // ___PRODUCT_OPTION_END___ logs
}
```
diff --git a/platform-includes/getting-started-config/javascript.cloudflare.workers.mdx b/platform-includes/getting-started-config/javascript.cloudflare.workers.mdx
index ab597f963e4ca..f0224d7ffec2c 100644
--- a/platform-includes/getting-started-config/javascript.cloudflare.workers.mdx
+++ b/platform-includes/getting-started-config/javascript.cloudflare.workers.mdx
@@ -18,6 +18,12 @@ export default Sentry.withSentry(
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
// Learn more at
diff --git a/platform-includes/getting-started-config/javascript.mdx b/platform-includes/getting-started-config/javascript.mdx
index 21c85c5e28b34..ccf847a38e13f 100644
--- a/platform-includes/getting-started-config/javascript.mdx
+++ b/platform-includes/getting-started-config/javascript.mdx
@@ -1,3 +1,13 @@
+
+
Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions, transactions, and Session Replays, based on the sample rates set.
Note, that configuration differs slightly depending on how you installed the Sentry SDK. Make sure to follow the instructions in the correct tab, depending on if you installed the Sentry SDK via NPM, using the Loader Script, or via CDN.
@@ -30,6 +40,11 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ user-feedback
],
+ // ___PRODUCT_OPTION_START___ logs
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -86,6 +101,11 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ user-feedback
],
+ // ___PRODUCT_OPTION_START___ logs
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -144,6 +164,11 @@ Sentry.init({
// ___PRODUCT_OPTION_END___ user-feedback
],
+ // ___PRODUCT_OPTION_START___ logs
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
+
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
diff --git a/platform-includes/getting-started-config/javascript.node.mdx b/platform-includes/getting-started-config/javascript.node.mdx
index 16e553db0b90c..029592c6b27f9 100644
--- a/platform-includes/getting-started-config/javascript.node.mdx
+++ b/platform-includes/getting-started-config/javascript.node.mdx
@@ -36,6 +36,11 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
```
@@ -77,5 +82,10 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ _experiments: { enableLogs: true },
+ // ___PRODUCT_OPTION_END___ logs
});
```
diff --git a/platform-includes/getting-started-config/php.mdx b/platform-includes/getting-started-config/php.mdx
index 20c6538d573f1..cb97983814f42 100644
--- a/platform-includes/getting-started-config/php.mdx
+++ b/platform-includes/getting-started-config/php.mdx
@@ -1,8 +1,20 @@
+
+
To capture all errors, even the one during the startup of your application, you should initialize the Sentry PHP SDK as soon as possible.
```php
\Sentry\init([
'dsn' => '___PUBLIC_DSN___',
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ 'enable_logs' => true,
+ // ___PRODUCT_OPTION_END___ logs
]);
```
diff --git a/platform-includes/getting-started-config/python.mdx b/platform-includes/getting-started-config/python.mdx
index 472a7d7a2d058..ae604a35701e1 100644
--- a/platform-includes/getting-started-config/python.mdx
+++ b/platform-includes/getting-started-config/python.mdx
@@ -1,9 +1,9 @@
-
```python
@@ -27,5 +27,12 @@ sentry_sdk.init(
# there is an active span.
profile_lifecycle="trace",
# ___PRODUCT_OPTION_END___ profiling
+ # ___PRODUCT_OPTION_START___ logs
+
+ # Enable logs to be sent to Sentry
+ _experiments={
+ "enable_logs": True,
+ },
+ # ___PRODUCT_OPTION_END___ logs
)
```
diff --git a/platform-includes/getting-started-config/ruby.mdx b/platform-includes/getting-started-config/ruby.mdx
index 068db3d5fa1eb..5743e9fa6bdcc 100644
--- a/platform-includes/getting-started-config/ruby.mdx
+++ b/platform-includes/getting-started-config/ruby.mdx
@@ -1,3 +1,12 @@
+
+
```ruby
require 'sentry-ruby'
@@ -22,5 +31,10 @@ Sentry.init do |config|
# this is relative to traces_sample_rate
config.profiles_sample_rate = 1.0
# ___PRODUCT_OPTION_END___ profiling
+ # ___PRODUCT_OPTION_START___ logs
+
+ # Enable logs to be sent to Sentry
+ config.enable_logs = true
+ # ___PRODUCT_OPTION_END___ logs
end
```
diff --git a/platform-includes/getting-started-node/javascript.mdx b/platform-includes/getting-started-node/javascript.mdx
index 1b4fae63214de..233701f485aa4 100644
--- a/platform-includes/getting-started-node/javascript.mdx
+++ b/platform-includes/getting-started-node/javascript.mdx
@@ -5,7 +5,7 @@
Choose the features you want to configure, and this guide will show you how:
diff --git a/platform-includes/logs/setup/go.mdx b/platform-includes/logs/setup/go.mdx
new file mode 100644
index 0000000000000..924fa933b857e
--- /dev/null
+++ b/platform-includes/logs/setup/go.mdx
@@ -0,0 +1,23 @@
+To enable logging, you need to initialize the SDK with the `EnableLogs` option set to `true`.
+
+```go
+package main
+
+import (
+ "fmt"
+ "time"
+
+ "github.com/getsentry/sentry-go"
+)
+
+func main() {
+ if err := sentry.Init(sentry.ClientOptions{
+ Dsn: "___PUBLIC_DSN___",
+ EnableLogs: true,
+ }); err != nil {
+ fmt.Printf("Sentry initialization failed: %v\n", err)
+ }
+ // Flush buffered events before the program terminates.
+ defer sentry.Flush(2 * time.Second)
+}
+```
\ No newline at end of file
diff --git a/src/components/onboarding/index.tsx b/src/components/onboarding/index.tsx
index a5b25587b8e7e..97fa817a6f30a 100644
--- a/src/components/onboarding/index.tsx
+++ b/src/components/onboarding/index.tsx
@@ -59,6 +59,15 @@ const optionDetails: Record<
),
},
+ logs: {
+ name: 'Logs (Beta)',
+ description: (
+
+ Send text-based log information from your applications to Sentry for viewing
+ alongside relevant errors and searching by text-string or individual attributes.
+
+ ),
+ },
'source-context': {
name: 'Source Context',
description: (
@@ -98,6 +107,7 @@ const OPTION_IDS = [
'profiling',
'session-replay',
'user-feedback',
+ 'logs',
'source-context',
'dsym',
'source-maps',