diff --git a/docs/platforms/java/common/index.mdx b/docs/platforms/java/common/index.mdx
index 2f8445f0ca87d..e019b7c7f8609 100644
--- a/docs/platforms/java/common/index.mdx
+++ b/docs/platforms/java/common/index.mdx
@@ -1,41 +1,69 @@
-On this page, we get you up and running with Sentry's SDK.
+
-
-
-
-
-Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page.
+
## Install
-Sentry captures data by using an SDK within your application’s runtime.
+Install the Sentry SDK for your Java logging framework or application:
-
-
## Configure
-
+**Error Monitoring** starts once Sentry is configured. **Application Metrics** need no extra configuration, and you'll learn how to send them in step [#4](#send-application-metrics-). This guide also configures **Tracing**, **Logs**, and **Profiling**.
+
+
+
+Don't need a feature? Remove its configuration from the SDK initialization. To disable Profiling, also remove the `sentry-async-profiler` dependency. Profiling is not supported on Windows.
+
+### With OpenTelemetry
-## Verify
+See the [agent setup guide](/platforms/java/opentelemetry/setup/agent/) or [agentless setup guide](/platforms/java/opentelemetry/setup/agentless/) for details.
-This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
+### Without OpenTelemetry
-
+
+
+## Send Logs
+
+
+
+We also provide integrations for:
+- [Logback](/platforms/java/guides/logback/logs/)
+- [Log4j2](/platforms/java/guides/log4j2/logs/)
+- [java.util.logging](/platforms/java/guides/jul/logs/)
-
+## Send Application Metrics
-Learn more about manually capturing an error or message in our Usage documentation.
+
-
+## Verify Your Setup
-To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add this intentional error to your application:
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
+
+
## Next Steps
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/docs/platforms/java/config.yml b/docs/platforms/java/config.yml
index 8cff769ae061e..64a57d2686a90 100644
--- a/docs/platforms/java/config.yml
+++ b/docs/platforms/java/config.yml
@@ -1,4 +1,5 @@
title: Java
+description: "Learn how to set up Sentry in your Java application and capture your first events."
caseStyle: camelCase
supportLevel: production
sdk: sentry.java
diff --git a/docs/platforms/java/guides/jul/config.yml b/docs/platforms/java/guides/jul/config.yml
deleted file mode 100644
index 5267f728b8335..0000000000000
--- a/docs/platforms/java/guides/jul/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-title: java.util.logging
-caseStyle: camelCase
-supportLevel: production
-sdk: sentry.java.jul
diff --git a/docs/platforms/java/guides/jul/index.mdx b/docs/platforms/java/guides/jul/index.mdx
new file mode 100644
index 0000000000000..e9ce06e7a6562
--- /dev/null
+++ b/docs/platforms/java/guides/jul/index.mdx
@@ -0,0 +1,54 @@
+---
+title: java.util.logging
+description: "Learn how to set up Sentry's JUL integration to capture logs."
+caseStyle: camelCase
+supportLevel: production
+sdk: sentry.java.jul
+---
+
+
+
+
+
+
+## Install
+
+Add the `sentry-jul` dependency to your project:
+
+
+
+## Configure
+
+
+
+## Verify Your Setup
+
+To verify that the integration is working, log an error through JUL:
+
+```java
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+Logger logger = Logger.getLogger("example");
+logger.log(Level.SEVERE, "This is a test.", new Exception("This is a test."));
+```
+
+### View Captured Data in Sentry
+
+Now, open the [**Logs**](https://sentry.io/orgredirect/organizations/:orgslug/explore/logs/) page and filter by service, environment, or search keywords to view log entries from your application (it takes a couple of moments for the data to appear).
+
+## Next Steps
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Learn more about setting up logging
+- Learn how to [send application metrics](/platforms/java/metrics/) and [traces](/platforms/java/tracing/)
+- Configure [profiling](/platforms/java/profiling/) to capture performance data from your application
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/docs/platforms/java/guides/log4j2/config.yml b/docs/platforms/java/guides/log4j2/config.yml
deleted file mode 100644
index b253929a83147..0000000000000
--- a/docs/platforms/java/guides/log4j2/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-title: Log4j 2.x
-caseStyle: camelCase
-supportLevel: production
-sdk: sentry.java.log4j2
diff --git a/docs/platforms/java/guides/log4j2/index.mdx b/docs/platforms/java/guides/log4j2/index.mdx
new file mode 100644
index 0000000000000..d2dbea3a06db3
--- /dev/null
+++ b/docs/platforms/java/guides/log4j2/index.mdx
@@ -0,0 +1,54 @@
+---
+title: Log4j 2.x
+description: "Learn how to set up Sentry's Log4j 2.x integration to capture logs."
+caseStyle: camelCase
+supportLevel: production
+sdk: sentry.java.log4j2
+---
+
+
+
+
+
+
+## Install
+
+Add `sentry-log4j2` to your project (Maven Plugin and Gradle Plugin automatically add integrations for you):
+
+
+
+## Configure
+
+
+
+## Verify Your Setup
+
+To verify that the integration is working, log an error through Log4j2:
+
+```java
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+Logger logger = LogManager.getLogger("example");
+logger.error("This is a test log message");
+```
+
+### View Captured Data in Sentry
+
+Now, open the [**Logs**](https://sentry.io/orgredirect/organizations/:orgslug/explore/logs/) page and filter by service, environment, or search keywords to view log entries from your application (it takes a couple of moments for the data to appear).
+
+## Next Steps
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Learn more about setting up logging
+- Learn how to [send application metrics](/platforms/java/metrics/) and [traces](/platforms/java/tracing/)
+- Configure [profiling](/platforms/java/profiling/) to capture performance data from your application
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/docs/platforms/java/guides/logback/config.yml b/docs/platforms/java/guides/logback/config.yml
deleted file mode 100644
index 63631c03eab5f..0000000000000
--- a/docs/platforms/java/guides/logback/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-title: Logback
-caseStyle: camelCase
-supportLevel: production
-sdk: sentry.java.logback
diff --git a/docs/platforms/java/guides/logback/index.mdx b/docs/platforms/java/guides/logback/index.mdx
new file mode 100644
index 0000000000000..bfd248f4e01c9
--- /dev/null
+++ b/docs/platforms/java/guides/logback/index.mdx
@@ -0,0 +1,54 @@
+---
+title: Logback
+description: "Learn how to set up Sentry's Logback integration to capture logs."
+caseStyle: camelCase
+supportLevel: production
+sdk: sentry.java.logback
+---
+
+
+
+
+
+
+## Install
+
+Add `sentry-logback` to your project (Maven Plugin and Gradle Plugin automatically add integrations for you):
+
+
+
+## Configure
+
+
+
+## Verify Your Setup
+
+To verify that the integration is working, log an error through Logback:
+
+```java
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+Logger logger = LoggerFactory.getLogger("example");
+logger.error("This is a test.", new Exception("This is a test."));
+```
+
+### View Captured Data in Sentry
+
+Now, open the [**Logs**](https://sentry.io/orgredirect/organizations/:orgslug/explore/logs/) page and filter by service, environment, or search keywords to view log entries from your application (it takes a couple of moments for the data to appear).
+
+## Next Steps
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Learn more about setting up logging
+- Learn how to [send application metrics](/platforms/java/metrics/) and [traces](/platforms/java/tracing/)
+- Configure [profiling](/platforms/java/profiling/) to capture performance data from your application
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/docs/platforms/java/guides/servlet/config.yml b/docs/platforms/java/guides/servlet/config.yml
index 50cb106924cb9..9b87aa1c7d00d 100644
--- a/docs/platforms/java/guides/servlet/config.yml
+++ b/docs/platforms/java/guides/servlet/config.yml
@@ -1,4 +1,5 @@
title: Servlet
+description: Learn how to set up Sentry in your Servlet-based Java application and capture your first events.
caseStyle: camelCase
supportLevel: production
sdk: sentry.java.servlet
diff --git a/docs/platforms/java/guides/spring-boot/config.yml b/docs/platforms/java/guides/spring-boot/config.yml
deleted file mode 100644
index eb2ea100e14ab..0000000000000
--- a/docs/platforms/java/guides/spring-boot/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-title: Spring Boot
-caseStyle: camelCase
-supportLevel: production
-sdk: sentry.java.spring-boot
diff --git a/docs/platforms/java/guides/spring-boot/index.mdx b/docs/platforms/java/guides/spring-boot/index.mdx
index fedb5bdefc6e3..154c9af1ade59 100644
--- a/docs/platforms/java/guides/spring-boot/index.mdx
+++ b/docs/platforms/java/guides/spring-boot/index.mdx
@@ -1,43 +1,69 @@
---
title: "Spring Boot"
-description: "Learn how to use Sentry's Spring Boot SDK."
+description: "Learn how to set up Sentry in your Spring Boot application and capture your first events."
sdk: sentry.java.spring-boot
+caseStyle: camelCase
+supportLevel: production
---
-On this page, we get you up and running with Sentry's SDK.
+
-Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page.
+
## Install
-Sentry captures data by using an SDK within your application’s runtime.
+Install Sentry for your Spring Boot version:
-
-
## Configure
+**Error Monitoring** starts once Sentry is configured. **Application Metrics** need no extra configuration, and you'll learn how to send them in step [#4](#send-application-metrics-). This guide also configures **Tracing**, **Logs**, and **Profiling**.
+
+
+
-## Verify
+## Send Logs
-This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
+
-
+We also provide integrations for:
+- [Logback](/platforms/java/guides/logback/logs/)
+- [Log4j2](/platforms/java/guides/log4j2/logs/)
+- [java.util.logging](/platforms/java/guides/jul/logs/)
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
-
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
-Learn more about manually capturing an error or message in our Usage documentation.
+Add this intentional error to your application:
-
+
+
+### View Captured Data in Sentry
-To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
+Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
+
+
## Next Steps
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/docs/platforms/java/guides/spring/config.yml b/docs/platforms/java/guides/spring/config.yml
deleted file mode 100644
index 55b567d44205f..0000000000000
--- a/docs/platforms/java/guides/spring/config.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-title: Spring
-caseStyle: camelCase
-supportLevel: production
-sdk: sentry.java.spring
diff --git a/docs/platforms/java/guides/spring/index.mdx b/docs/platforms/java/guides/spring/index.mdx
index 1907d6bcc77ee..1e1f5a911d12a 100644
--- a/docs/platforms/java/guides/spring/index.mdx
+++ b/docs/platforms/java/guides/spring/index.mdx
@@ -1,43 +1,69 @@
---
title: "Spring"
-description: "Learn how to use Sentry's Spring SDK."
+description: "Learn how to set up Sentry in your Spring application and capture your first events."
+caseStyle: camelCase
+supportLevel: production
sdk: sentry.java.spring
---
-On this page, we get you up and running with Sentry's SDK.
+
-Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page.
+
## Install
-Sentry captures data by using an SDK within your application’s runtime.
+Install Sentry for your Spring version:
-
-
## Configure
+**Error Monitoring** starts once Sentry is configured. **Application Metrics** need no extra configuration, and you'll learn how to send them in step [#4](#send-application-metrics-). This guide also configures **Tracing**, **Logs**, and **Profiling**.
+
+
+
-## Verify
+## Send Logs
-This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
+
-
+We also provide integrations for:
+- [Logback](/platforms/java/guides/logback/logs/)
+- [Log4j2](/platforms/java/guides/log4j2/logs/)
+- [java.util.logging](/platforms/java/guides/jul/logs/)
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
-
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
-Learn more about manually capturing an error or message in our Usage documentation.
+Add this intentional error to your application:
-
+
+
+### View Captured Data in Sentry
-To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
+Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
+
+
## Next Steps
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+
+
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/includes/quick-start-features-expandable.mdx b/includes/quick-start-features-expandable.mdx
index 9c5ad15a59de6..63d4779b83e42 100644
--- a/includes/quick-start-features-expandable.mdx
+++ b/includes/quick-start-features-expandable.mdx
@@ -125,7 +125,7 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo";
-
+
-
+
-### DSN Configuration
+Sentry Logs must be enabled for the appender to send log messages as Logs. If Sentry is initialized elsewhere, make sure Logs are enabled there. If the appender initializes the SDK, the `sentry.properties` file as shown in the section below enables them.
-Sentry reads the DSN from the system property `sentry.dsn`, environment variable `SENTRY_DSN` or the `dsn` property in `sentry.properties` file. [See the configuration page](/platforms/java/configuration/) for more details on external configuration.
+### Set the DSN If Nothing Else Initializes Sentry
+You can skip this section if your application already initializes Sentry through [`Sentry.init`](/platforms/java/), the [Spring](/platforms/java/guides/spring/) or [Spring Boot](/platforms/java/guides/spring-boot/) integration, or the [Sentry OpenTelemetry agent](/platforms/java/opentelemetry/setup/agent/).
+
+If you haven't initialized Sentry elsewhere, the handler initializes the SDK for you. It reads the DSN from the system property `sentry.dsn`, the environment variable `SENTRY_DSN`, or the `dsn` property in a `sentry.properties` file. See the [configuration page](/platforms/java/configuration/) for details on external configuration.
```properties {tabTitle:sentry.properties}
dsn=___PUBLIC_DSN___
+
+# Enable logs
+logs.enabled=true
+
# Use Data Collection defaults but don't collect automatic user information.
# https://docs.sentry.io/platforms/java/guides/jul/data-management/data-collected/
data-collection.user-info=false
-# Configure other data categories here.
-
-# Enable logs
-logs.enabled=true
-
```
-
### Minimum Log Level
@@ -52,10 +52,7 @@ Two log levels are used to configure this integration:
1. Configure the lowest level required for a log message to become an event (`minimumEventLevel`) sent to Sentry.
2. Configure the lowest level a message has to be to become a breadcrumb (`minimumBreadcrumbLevel`).
-
3. Configure the lowest level a message has to be to be sent as Sentry Log (`minimumLevel`).
-
-
Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `logging.properties` only affects events logged by way of JUL. The settings will have no effect when calling `Sentry.captureMessage` or similar directly.
diff --git a/platform-includes/getting-started-config/java.log4j2.mdx b/platform-includes/getting-started-config/java.log4j2.mdx
index 21571683b485f..4b256ab5c3587 100644
--- a/platform-includes/getting-started-config/java.log4j2.mdx
+++ b/platform-includes/getting-started-config/java.log4j2.mdx
@@ -1,6 +1,10 @@
-Configuration should happen as early as possible in your application's lifecycle.
+Add the `Sentry` appender to your `log4j2.xml`.
-The following example using the `log4j2.xml` format to configure a `ConsoleAppender` that logs to standard out at the `INFO` level, and a `SentryAppender` that logs to the Sentry server at the `ERROR` level.
+Make sure to set the DSN in one place only:
+- Use the snippet in the "Without DSN" code box tab if Sentry is already initialized in your application. This is the case if you call [`Sentry.init`](/platforms/java/) in your code, use the [Spring](/platforms/java/guides/spring/) or [Spring Boot](/platforms/java/guides/spring-boot/) integration, or run the [Sentry OpenTelemetry agent](/platforms/java/opentelemetry/setup/agent/).
+- Use the snippet in the "With DSN" code box tab to have the appender initialize Sentry.
+
+The example configures a `ConsoleAppender` that logs to standard out at the `INFO` level, and a `SentryAppender` that sends messages at the `ERROR` level and above to Sentry.
@@ -8,8 +12,7 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
-
-```xml
+```xml {tabTitle:Without DSN}
@@ -17,7 +20,7 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
-
+
@@ -29,10 +32,7 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
```
-
-
-
-```xml
+```xml {tabTitle:With DSN}
@@ -40,7 +40,7 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
-
+
@@ -52,31 +52,29 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
```
-
+
+
`SentryAppender` does not support [Log4j's asynchronous loggers](https://logging.apache.org/log4j/2.x/manual/async.html). The Sentry Java SDK itself is already asynchronous and does not perform any blocking operation on the calling thread.
-
-### DSN Configuration
+
-Note that **you need to configure your DSN** (client key) only if you wish to initialize the SDK through the Log4j 2 integration. If you're planning to use `Sentry.init` to provide configuration, such as by using the `beforeSend` callback, you **should not** provide the DSN in both `Sentry.init` and the appender configuration; just leave it out of the appender configuration in this case.
+Sentry Logs must be enabled for the appender to send log messages as Logs. If Sentry is initialized elsewhere, make sure Logs are enabled there. If the appender initializes the SDK, the `sentry.properties` file as shown in the "Additional Options" section below enables them.
-```xml
-
-```
+### Additional Options If the Appender Initializes Sentry
-If the DSN is not present in the `log4j2.xml` configuration, Sentry will attempt to read it from the system property `sentry.dsn`, environment variable `SENTRY_DSN` or the `dsn` property in `sentry.properties` file. [See the configuration page](/platforms/java/configuration/) for more details on external configuration.
+If the appender initializes the SDK, you can also use Sentry's static API, as shown on the usage page, to record breadcrumbs, set the current user, or capture events manually.
+
+To set other options, such as data collection, add a `sentry.properties` file. The DSN is already in the appender, so it isn't needed there. See the [configuration page](/platforms/java/configuration/) for where the SDK reads this file from.
```properties {tabTitle:sentry.properties}
+# Enable logs
+logs.enabled=true
+
# Use Data Collection defaults but don't collect automatic user information.
# https://docs.sentry.io/platforms/java/guides/log4j2/data-management/data-collected/
data-collection.user-info=false
-# Configure other data categories here.
-// ___PRODUCT_OPTION_START___ logs
-logs.enabled=true
-// ___PRODUCT_OPTION_END___ logs
```
-
### Minimum Log Level
@@ -84,10 +82,7 @@ Two log levels are used to configure this integration, as illustrated below in t
1. Configure the lowest level required for a log message to become an event (`minimumEventLevel`) sent to Sentry.
2. Configure the lowest level a message has to be to become a breadcrumb (`minimumBreadcrumbLevel`)
-
3. Configure the lowest level a message has to be to be sent as Sentry Log (`minimumLevel`).
-
-
Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `log4j2.xml` only affects events logged by way of Log4j2. The settings will have no effect when calling `Sentry.captureMessage` or similar directly.
@@ -96,30 +91,22 @@ Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `log4j2.xml` only aff
Breadcrumbs are kept in memory (by default the last 100 records) and are sent with events. For example, by default, if you log 100 entries with `logger.info` or `logger.warn`, no event is sent to Sentry. If you then log with `logger.error`, an event is sent to Sentry that includes those 100 `info` or `warn` messages. For this to work, `SentryAppender` needs to receive **all** log entries to decide what to keep as breadcrumb or send as event. Set the `SentryAppender` log level configuration to a value lower than what is set for the `minimumBreadcrumbLevel` and `minimumEventLevel` so that `SentryAppender` receives these log messages.
-
-```xml
+```xml {tabTitle:Without DSN}
minimumLevel="DEBUG"
-
/>
```
-
-
-```xml
+```xml {tabTitle:With DSN}
minimumLevel="DEBUG"
-
/>
```
-
diff --git a/platform-includes/getting-started-config/java.logback.mdx b/platform-includes/getting-started-config/java.logback.mdx
index c68dff686d876..f3b925b991600 100644
--- a/platform-includes/getting-started-config/java.logback.mdx
+++ b/platform-includes/getting-started-config/java.logback.mdx
@@ -8,7 +8,6 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
-
```xml
@@ -21,11 +20,9 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
- // ___PRODUCT_OPTION_START___ logs
true
- // ___PRODUCT_OPTION_END___ logs
@@ -37,46 +34,27 @@ The `ConsoleAppender` is provided only as an example of a non-Sentry appender se
```
-
-
-```xml
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
+Sentry Logs must be enabled for the appender to send log messages as Logs. If Sentry is initialized elsewhere, make sure Logs are enabled there. If the appender initializes the SDK, the `sentry.properties` file as shown in the section below enables them.
-
-
+### Set the DSN If Nothing Else Initializes Sentry
-
-
-
-
-
-
-```
-
+You can skip this section if your application already initializes Sentry through [`Sentry.init`](/platforms/java/), the [Spring](/platforms/java/guides/spring/) or [Spring Boot](/platforms/java/guides/spring-boot/) integration, or the [Sentry OpenTelemetry agent](/platforms/java/opentelemetry/setup/agent/).
-
-### SDK Configuration
-
-Configure the SDK using a `sentry.properties` file:
+If you haven't initialized Sentry elsewhere, the handler initializes the SDK for you. Configure it with a `sentry.properties` file:
```properties {filename:sentry.properties}
dsn=___PUBLIC_DSN___
+
+# Enable logs
+logs.enabled=true
+
# Use Data Collection defaults but don't collect automatic user information.
# https://docs.sentry.io/platforms/java/guides/logback/data-management/data-collected/
data-collection.user-info=false
-# Configure other data categories here.
```
You can also provide the DSN through the `sentry.dsn` system property or the `SENTRY_DSN` environment variable. [See the configuration page](/platforms/java/configuration/) for more details on external configuration.
-
### Minimum Log Level
@@ -84,10 +62,7 @@ Two log levels are used to configure this integration:
1. Configure the lowest level required for a log message to become an event (`minimumEventLevel`) sent to Sentry.
2. Configure the lowest level a message has to be to become a breadcrumb (`minimumBreadcrumbLevel`).
-
3. Configure the lowest level a message has to be to be sent as Sentry Log (`minimumLevel`).
-
-
Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `logback.xml` only affects events logged by way of Logback. The settings will have no effect when calling `Sentry.captureMessage` or similar directly.
@@ -97,36 +72,16 @@ Setting `minimumEventLevel` or `minimumBreadcrumbLevel` in `logback.xml` only af
Breadcrumbs are kept in memory (by default the last 100 records) and are sent with events. For example, by default, if you log 100 entries with `logger.info` or `logger.warn`, no event is sent to Sentry. If you then log with `logger.error`, an event is sent to Sentry which includes those 100 `info` or `warn` messages. For this to work, `SentryAppender` needs to receive **all** log entries to decide what to keep as breadcrumb or sent as event. Set the `SentryAppender` log level configuration to a value lower than what is set for the `minimumBreadcrumbLevel` and `minimumEventLevel` so that `SentryAppender` receives these log messages.
-
-```xml
-
-
- WARN
-
- DEBUG
- // ___PRODUCT_OPTION_START___ logs
-
- DEBUG
- // ___PRODUCT_OPTION_END___ logs
-
-```
-
-
-
```xml
WARN
DEBUG
- // ___PRODUCT_OPTION_START___ logs
DEBUG
- // ___PRODUCT_OPTION_END___ logs
```
-
-
### Encoded Messages
A Logback encoder can mask or remove sensitive values before Sentry receives a log entry. When you configure an encoder on `SentryAppender`, Sentry sends the encoded message and omits the original message template and parameters by default.
diff --git a/platform-includes/getting-started-config/java.mdx b/platform-includes/getting-started-config/java.mdx
index 2acface3c9a9e..cb0a86533a14d 100644
--- a/platform-includes/getting-started-config/java.mdx
+++ b/platform-includes/getting-started-config/java.mdx
@@ -1,75 +1,59 @@
-
-Configuration should happen as early as possible in your application's lifecycle.
+The following setup initializes the Java SDK without the OpenTelemetry agent. Configuration should happen as early as possible in your application's lifecycle.
+
+The snippet also turns on:
+- Tracing: via `tracesSampleRate`
+- Profiling: via `profileSessionSampleRate` and `profileLifecycle`
+- Data Collection: via `dataCollection`
+- Logs: via `logs.enabled`
```java {tabTitle: Java}
+import io.sentry.ProfileLifecycle;
import io.sentry.Sentry;
Sentry.init(options -> {
options.setDsn("___PUBLIC_DSN___");
// Use Data Collection defaults but don't collect automatic user information.
- // https://docs.sentry.io/platforms/java/data-management/data-collected/
options.getDataCollection().forceDataCollection();
options.getDataCollection().setUserInfo(false);
// Configure other data categories here.
- // ___PRODUCT_OPTION_START___ performance
- // Set traces_sample_rate to 1.0 to capture 100%
+ // Set setTracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production.
options.setTracesSampleRate(1.0);
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
// Enable profiling
options.setProfileSessionSampleRate(1.0);
options.setProfileLifecycle(ProfileLifecycle.TRACE);
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
- // Enable logs to be sent to Sentry
+ // Enable logs
options.getLogs().setEnabled(true);
- // ___PRODUCT_OPTION_END___ logs
});
```
```kotlin {tabTitle: Kotlin}
+import io.sentry.ProfileLifecycle
import io.sentry.Sentry
Sentry.init { options ->
options.dsn = "___PUBLIC_DSN___"
// Use Data Collection defaults but don't collect automatic user information.
- // https://docs.sentry.io/platforms/java/data-management/data-collected/
options.dataCollection.forceDataCollection()
options.dataCollection.userInfo = false
// Configure other data categories here.
- // ___PRODUCT_OPTION_START___ performance
- // Set traces_sample_rate to 1.0 to capture 100%
+ // Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
// Enable profiling
options.profileSessionSampleRate = 1.0
options.profileLifecycle = ProfileLifecycle.TRACE
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
- // Enable logs to be sent to Sentry
+ // Enable logs
options.logs.enabled = true
- // ___PRODUCT_OPTION_END___ logs
}
```
-
-
-
-
-Learn more about setting up logging in our Logs documentation.
-
-
-
-
diff --git a/platform-includes/getting-started-config/java.servlet.mdx b/platform-includes/getting-started-config/java.servlet.mdx
index cbcc3debdb2e1..127c62d5ab25a 100644
--- a/platform-includes/getting-started-config/java.servlet.mdx
+++ b/platform-includes/getting-started-config/java.servlet.mdx
@@ -1,11 +1,16 @@
-
Configuration should happen as early as possible in your application's lifecycle.
-
The following example configures a `SentryInitializer` servlet container initializer that initializes Sentry on application startup.
+The snippet also turns on:
+- Tracing: via `tracesSampleRate`
+- Profiling: via `profileSessionSampleRate` and `profileLifecycle`
+- Data Collection: via `dataCollection`
+- Logs: via `logs.enabled`
+
```java
package sentry.sample;
+import io.sentry.ProfileLifecycle;
import io.sentry.Sentry;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
@@ -19,28 +24,21 @@ public final class SentryInitializer implements ServletContainerInitializer {
options.setDsn("___PUBLIC_DSN___");
// Use Data Collection defaults but don't collect automatic user information.
- // https://docs.sentry.io/platforms/java/guides/servlet/data-management/data-collected/
options.getDataCollection().forceDataCollection();
options.getDataCollection().setUserInfo(false);
// Configure other data categories here.
- // ___PRODUCT_OPTION_START___ performance
// Set traces_sample_rate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production.
options.setTracesSampleRate(1.0);
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
// Enable profiling
options.setProfileSessionSampleRate(1.0);
options.setProfileLifecycle(ProfileLifecycle.TRACE);
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
- // Enable logs to be sent to Sentry
+ // Enable logs
options.getLogs().setEnabled(true);
- // ___PRODUCT_OPTION_END___ logs
});
}
}
@@ -64,41 +62,30 @@ class SentryInitializer : ServletContainerInitializer {
options.dataCollection.forceDataCollection()
options.dataCollection.userInfo = false
// Configure other data categories here.
- // ___PRODUCT_OPTION_START___ performance
// Set traces_sample_rate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production.
options.tracesSampleRate = 1.0
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
// Enable profiling
options.profileSessionSampleRate = 1.0
options.profileLifecycle = ProfileLifecycle.TRACE
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
options.logs.enabled = true
- // ___PRODUCT_OPTION_END___ logs
}
}
}
```
-
-Learn more about setting up logging in our Logs documentation.
+Learn more about setting up logging in our [Logs documentation](/platforms/java/logs/).
-
-
Create a file in `src/main/resources/META-INF/services` named `javax.servlet.ServletContainerInitializer`, with a full name of your custom `SentryInitializer` class as a content:
```properties
sentry.sample.SentryInitializer
```
-
-
diff --git a/platform-includes/getting-started-config/java.spring-boot.mdx b/platform-includes/getting-started-config/java.spring-boot.mdx
index 83df69f0e8d54..9fcf9fbead1ed 100644
--- a/platform-includes/getting-started-config/java.spring-boot.mdx
+++ b/platform-includes/getting-started-config/java.spring-boot.mdx
@@ -1,33 +1,36 @@
+Configuration should happen as early as possible in your application's lifecycle.
+
Sentry's Spring Boot integration auto-configures `sentry.in-app-packages` property with the package where `@SpringBootApplication` or `@SpringBootConfiguration` annotated class is located.
-Provide a `sentry.dsn` property using either `application.properties` or `application.yml`:
+Configure Sentry using either `application.properties` or `application.yml`.
+
+The snippets also configures:
+
+- Data Collection: via `data-collection`
+- Tracing: via `tracesSampleRate`
+- Profiling: via `profileSessionSampleRate` and `profileLifecycle`
+- Logs: via `logs.enabled`
+Don't need a feature? Remove its configuration. Remove the `sentry-async-profiler` dependency to disable Profiling.
```properties {filename:application.properties}
sentry.dsn=___PUBLIC_DSN___
# Use Data Collection defaults but don't collect automatic user information.
-# https://docs.sentry.io/platforms/java/guides/spring-boot/data-management/data-collected/
sentry.data-collection.user-info=false
# Configure other data categories here.
-# ___PRODUCT_OPTION_START___ performance
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
# We recommend adjusting this value in production.
sentry.traces-sample-rate=1.0
-# ___PRODUCT_OPTION_END___ performance
-// ___PRODUCT_OPTION_START___ profiling
# Enable profiling
sentry.profile-session-sample-rate=1.0
sentry.profile-lifecycle=TRACE
-// ___PRODUCT_OPTION_END___ profiling
-// ___PRODUCT_OPTION_START___ logs
# Enable logs
sentry.logs.enabled=true
-// ___PRODUCT_OPTION_END___ logs
```
```yaml {filename:application.yml}
@@ -35,32 +38,27 @@ sentry:
dsn: ___PUBLIC_DSN___
# Use Data Collection defaults but don't collect automatic user information.
- # https://docs.sentry.io/platforms/java/guides/spring-boot/data-management/data-collected/
data-collection:
user-info: false
# Configure other data categories here.
- # ___PRODUCT_OPTION_START___ performance
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
# We recommend adjusting this value in production.
tracesSampleRate: 1.0
- # ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
# Enable profiling
profileSessionSampleRate: 1.0
profileLifecycle: TRACE
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
# Enable logs
logs:
enabled: true
- // ___PRODUCT_OPTION_END___ logs
```
-By default, only unhandled exceptions are sent to Sentry. This behavior can be tuned through configuring the `sentry.exception-resolver-order` property. For example, setting it to `-2147483647` (the value of `org.springframework.core.Ordered#HIGHEST_PRECEDENCE`) ensures exceptions that have been handled by exception resolvers with higher order are sent to Sentry - including ones handled by `@ExceptionHandler` annotated methods.
+### Capture Handled Exceptions
+
+By default, only unhandled exceptions are sent to Sentry. You can tune this behavior by configuring the `sentry.exception-resolver-order` property. For example, setting it to `-2147483647` (the value of `org.springframework.core.Ordered#HIGHEST_PRECEDENCE`) ensures exceptions that have been handled by exception resolvers with higher order are sent to Sentry – including ones handled by `@ExceptionHandler` annotated methods.
```properties {filename:application.properties}
sentry.exception-resolver-order=-2147483647
@@ -70,7 +68,3 @@ sentry.exception-resolver-order=-2147483647
sentry:
exception-resolver-order: -2147483647
```
-
-We recommend using Sentry's Spring Boot integration with one of the [logging framework integrations](logging-frameworks/) as they work together seamlessly. To use Sentry **without** Spring Boot, we recommend using the [Sentry Spring integration](/platforms/java/guides/spring/).
-
-Once this integration is configured you can _also_ use Sentry’s static API, [as shown on the usage page](usage/), to record breadcrumbs, set the current user, or manually send events, for example.
diff --git a/platform-includes/getting-started-config/java.spring.mdx b/platform-includes/getting-started-config/java.spring.mdx
index b0682f6a21e83..483a4c6cbb77b 100644
--- a/platform-includes/getting-started-config/java.spring.mdx
+++ b/platform-includes/getting-started-config/java.spring.mdx
@@ -1,11 +1,10 @@
Configuration should happen as early as possible in your application's lifecycle.
-The `sentry-spring`, `sentry-spring-jakarta`, and `sentry-spring-7` libraries provide an `@EnableSentry` annotation that registers all required Spring beans. `@EnableSentry` can be placed on any class annotated with [@Configuration](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Configuration.html) including the main entry class in Spring Boot applications annotated with [@SpringBootApplication](https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/SpringBootApplication.html).
+The `sentry-spring`, `sentry-spring-jakarta`, and `sentry-spring-7` libraries provide an `@EnableSentry` annotation that registers all required Spring beans. Place it on any class annotated with [@Configuration](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Configuration.html), including your main [@SpringBootApplication](https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/SpringBootApplication.html) class.
```java {tabTitle:Java (Spring 5)} {mdExpandTabs}
import io.sentry.spring.EnableSentry;
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -17,7 +16,6 @@ class SentryConfiguration {
```java {tabTitle:Java (Spring 6)}
import io.sentry.spring.jakarta.EnableSentry;
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -29,7 +27,6 @@ class SentryConfiguration {
```java {tabTitle:Java (Spring 7)}
import io.sentry.spring7.EnableSentry;
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -41,7 +38,6 @@ class SentryConfiguration {
```kotlin {tabTitle:Kotlin (Spring 5)}
import io.sentry.spring.EnableSentry
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -52,7 +48,6 @@ class SentryConfiguration
```kotlin {tabTitle:Kotlin (Spring 6)}
import io.sentry.spring.jakarta.EnableSentry
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -63,7 +58,6 @@ class SentryConfiguration
```kotlin {tabTitle:Kotlin (Spring 7)}
import io.sentry.spring7.EnableSentry
-// NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry
// project/dashboard
@EnableSentry(
dsn = "___PUBLIC_DSN___"
@@ -72,19 +66,38 @@ import io.sentry.spring7.EnableSentry
class SentryConfiguration
```
-Configure Data Collection in `sentry.properties`. Setting any Data Collection field applies its defaults to omitted fields:
+Then configure the remaining options in `sentry.properties`.
+
+The snippet also configures:
+
+- Data Collection: via `data-collection`
+- Tracing: via `traces-sample-rate`
+- Profiling: via `profile-session-sample-rate` and `profile-lifecycle`
+- Logs: via `logs.enabled`
+
+Don't need a feature? Remove its configuration. Remove the `sentry-async-profiler` dependency to disable Profiling.
```properties {filename:sentry.properties}
# Use Data Collection defaults but don't collect automatic user information.
data-collection.user-info=false
# Configure other data categories here.
+
+# Enable tracing
+traces-sample-rate=1.0
+
+# Enable profiling
+profile-session-sample-rate=1.0
+profile-lifecycle=TRACE
+
+# Enable logs
+logs.enabled=true
```
-The DSN can be also provided through the system property `sentry.dsn`, environment variable `SENTRY_DSN` or the `dsn` property in `sentry.properties` file. [See the configuration page](/platforms/java/configuration/) for more details on external configuration.
+The DSN can also come from the `sentry.dsn` system property, the `SENTRY_DSN` environment variable, or `sentry.properties`. See the [configuration page](/platforms/java/configuration/) for details on external configuration.
-Once this integration is configured you can _also_ use Sentry’s static API, [as shown on the usage page](usage/), to record breadcrumbs, set the current user, or manually send events, for example.
+### Capture Handled Exceptions
-By default, only unhandled exceptions are sent to Sentry. This behavior can be tuned through configuring the `exceptionResolverOrder` property. For example, setting it to `Ordered#HIGHEST_PRECEDENCE` ensures exceptions that have been handled by exception resolvers with higher order are sent to Sentry - including ones handled by `@ExceptionHandler` annotated methods.
+By default, only unhandled exceptions are sent to Sentry. You can tune this behavior by configuring the `exceptionResolverOrder` property. For example, setting it to `Ordered#HIGHEST_PRECEDENCE` ensures exceptions that have been handled by exception resolvers with higher order are sent to Sentry – including ones handled by `@ExceptionHandler` annotated methods.
```java {tabTitle:Java (Spring 5)} {mdExpandTabs}
@@ -161,22 +174,3 @@ import org.springframework.core.Ordered
)
class SentryConfiguration
```
-
-
-The SDK can be configured using a `sentry.properties` file:
-
-```properties {filename:sentry.properties}
-// ___PRODUCT_OPTION_START___ performance
-# Enable tracing
-traces-sample-rate=1.0
-// ___PRODUCT_OPTION_END___ performance
-// ___PRODUCT_OPTION_START___ profiling
-# Enable profiling
-profile-session-sample-rate=1.0
-profile-lifecycle=TRACE
-// ___PRODUCT_OPTION_END___ profiling
-// ___PRODUCT_OPTION_START___ logs
-# Enable logs
-logs.enabled=true
-// ___PRODUCT_OPTION_END___ logs
-```
diff --git a/platform-includes/getting-started-config/opentelemetry/java.mdx b/platform-includes/getting-started-config/opentelemetry/java.mdx
index 083b36ef8c2eb..f24823b4a74cd 100644
--- a/platform-includes/getting-started-config/opentelemetry/java.mdx
+++ b/platform-includes/getting-started-config/opentelemetry/java.mdx
@@ -1,32 +1,41 @@
-
+Sentry's OpenTelemetry agent attaches when the JVM starts and is configured through a `sentry.properties` file.
-The SDK can be configured using a `sentry.properties` file:
+Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
+
+```bash
+curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
+```
+
+The SDK can be configured using a `sentry.properties` file.
+
+The snippet also turns on:
+- Tracing: via `traces-sample-rate`
+- Profiling: via `profile-session-sample-rate` and `profile-lifecycle`
+- Data Collection: via `data-collection`
+- Logs: via `logs.enabled`
```properties {filename:sentry.properties}
dsn=___PUBLIC_DSN___
# Use Data Collection defaults but don't collect automatic user information.
-# https://docs.sentry.io/platforms/java/data-management/data-collected/
data-collection.user-info=false
# Configure other data categories here.
-# ___PRODUCT_OPTION_START___ performance
+
+# Enable tracing
traces-sample-rate=1.0
-# ___PRODUCT_OPTION_END___ performance
-// ___PRODUCT_OPTION_START___ logs
+
+# Enable logs
logs.enabled=true
-// ___PRODUCT_OPTION_END___ logs
-// ___PRODUCT_OPTION_START___ profiling
# Enable profiling
profile-session-sample-rate=1.0
profile-lifecycle=TRACE
-// ___PRODUCT_OPTION_END___ profiling
```
-
-
-
-Learn more about setting up logging in our Logs documentation.
+Then run your application with:
+```bash {tabTitle: Environment variable}
+SENTRY_PROPERTIES_FILE=sentry.properties JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
+```
-
-
-
+```bash {tabTitle: Java CLI argument}
+SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
+```
diff --git a/platform-includes/getting-started-config/opentelemetry/java.spring-boot.mdx b/platform-includes/getting-started-config/opentelemetry/java.spring-boot.mdx
index e69de29bb2d1d..61fb5ad9b2a8f 100644
--- a/platform-includes/getting-started-config/opentelemetry/java.spring-boot.mdx
+++ b/platform-includes/getting-started-config/opentelemetry/java.spring-boot.mdx
@@ -0,0 +1,21 @@
+### Add the OpenTelemetry Agent (Optional)
+
+Sentry's OpenTelemetry support lets Sentry use OpenTelemetry instrumentation to trace your application.
+Sentry's agent attaches when the JVM starts and you don't need to update your Sentry configuration.
+
+Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
+```bash
+curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
+```
+
+Then run your application with:
+
+```bash {tabTitle: Environment variable}
+SENTRY_AUTO_INIT=false JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
+```
+
+```bash {tabTitle: Java CLI argument}
+SENTRY_AUTO_INIT=false java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
+```
+
+See the agent setup guide or agentless setup guide for details.
diff --git a/platform-includes/getting-started-config/opentelemetry/java.spring.mdx b/platform-includes/getting-started-config/opentelemetry/java.spring.mdx
index e69de29bb2d1d..7e713eac40e56 100644
--- a/platform-includes/getting-started-config/opentelemetry/java.spring.mdx
+++ b/platform-includes/getting-started-config/opentelemetry/java.spring.mdx
@@ -0,0 +1,29 @@
+### Add the OpenTelemetry Agent (Optional)
+
+Sentry's OpenTelemetry support lets Sentry use OpenTelemetry instrumentation to trace your application.
+Sentry's agent attaches when the JVM starts. Your configuration stays the same, but Sentry is still initialized by `@EnableSentry`, so set `SENTRY_AUTO_INIT=false` to stop the agent from initializing it as well.
+
+Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
+```bash
+curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
+```
+
+Then run your application with:
+```bash {tabTitle: Environment variable}
+SENTRY_AUTO_INIT=false JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
+```
+
+```bash {tabTitle: Java CLI argument}
+SENTRY_AUTO_INIT=false java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
+```
+
+If you run a `.WAR` file on an application server, add the agent to the server's `JAVA_OPTS` instead:
+```bash {tabTitle: Environment variable}
+JAVA_OPTS="${JAVA_OPTS} JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar"
+```
+
+```bash {tabTitle: Java CLI argument}
+JAVA_OPTS="${JAVA_OPTS} JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar"
+```
+
+See the agent setup guide or agentless setup guide for details.
diff --git a/platform-includes/getting-started-install/java.jul.mdx b/platform-includes/getting-started-install/java.jul.mdx
index a2cec0276dc41..6844c6e7949e9 100644
--- a/platform-includes/getting-started-install/java.jul.mdx
+++ b/platform-includes/getting-started-install/java.jul.mdx
@@ -1,34 +1,17 @@
-
-
```xml {tabTitle:Maven}
io.sentry
sentry-jul
{{@inject packages.version('sentry.java.jul', '4.1.0') }}
-// ___PRODUCT_OPTION_START___ profiling
-
- io.sentry
- sentry-async-profiler
- {{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle}
implementation 'io.sentry:sentry-jul:{{@inject packages.version('sentry.java.jul', '4.1.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
-implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT}
libraryDependencies += "io.sentry" % "sentry-jul" % "{{@inject packages.version('sentry.java.jul', '4.1.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
-libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
For other dependency managers, see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-jul).
diff --git a/platform-includes/getting-started-install/java.log4j2.mdx b/platform-includes/getting-started-install/java.log4j2.mdx
index fbb0dfc39c208..3ba1995a89d6a 100644
--- a/platform-includes/getting-started-install/java.log4j2.mdx
+++ b/platform-includes/getting-started-install/java.log4j2.mdx
@@ -1,49 +1,20 @@
-
-
```xml {tabTitle:Maven Plugin} {mdExpandTabs} {filename:pom.xml}
io.sentry
sentry-maven-plugin
{{@inject packages.version('sentry.java.maven-plugin', '0.0.2') }}
-
+
true
-
-
- ___SENTRY_ORG_SLUG___
- ___SENTRY_PROJECT_SLUG___
-
-
- ___SENTRY_AUTH_TOKEN___
-
- true
+
-
-
-
-
-
- uploadSourceBundle
-
-
-
- validateSdkDependencyVersions
-
-
+
-// ___PRODUCT_OPTION_START___ profiling
-
- io.sentry
- sentry-async-profiler
- {{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-
+
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven}
@@ -52,38 +23,20 @@
sentry-log4j2
{{@inject packages.version('sentry.java.log4j2', '4.2.0') }}
-// ___PRODUCT_OPTION_START___ profiling
-
- io.sentry
- sentry-async-profiler
- {{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle Plugin}
plugins {
id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.12.0') }}"
}
-// ___PRODUCT_OPTION_START___ profiling
-dependencies {
- implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-}
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle}
implementation 'io.sentry:sentry-log4j2:{{@inject packages.version('sentry.java.log4j2', '4.2.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
-implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT}
libraryDependencies += "io.sentry" % "sentry-log4j2" % "{{@inject packages.version('sentry.java.log4j2', '4.2.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
-libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
For other dependency managers see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-log4j2).
diff --git a/platform-includes/getting-started-install/java.logback.mdx b/platform-includes/getting-started-install/java.logback.mdx
index 31705e9832079..3e738fda6c71c 100644
--- a/platform-includes/getting-started-install/java.logback.mdx
+++ b/platform-includes/getting-started-install/java.logback.mdx
@@ -1,7 +1,3 @@
-
-
```xml {tabTitle:Maven Plugin} {mdExpandTabs} {filename:pom.xml}
io.sentry
@@ -10,40 +6,15 @@
true
-
-
- ___SENTRY_ORG_SLUG___
- ___SENTRY_PROJECT_SLUG___
-
-
- ___SENTRY_AUTH_TOKEN___
-
- true
+
-
-
-
-
-
- uploadSourceBundle
-
-
-
- validateSdkDependencyVersions
-
-
+
-// ___PRODUCT_OPTION_START___ profiling
-
- io.sentry
- sentry-async-profiler
- {{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-
+
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven}
@@ -52,38 +23,20 @@
sentry-logback
{{@inject packages.version('sentry.java.logback', '4.2.0') }}
-// ___PRODUCT_OPTION_START___ profiling
-
- io.sentry
- sentry-async-profiler
- {{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle Plugin}
plugins {
id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.12.0') }}"
}
-// ___PRODUCT_OPTION_START___ profiling
-dependencies {
- implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-}
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle}
implementation 'io.sentry:sentry-logback:{{@inject packages.version('sentry.java.logback', '4.2.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
-implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT}
libraryDependencies += "io.sentry" % "sentry-logback" % "{{@inject packages.version('sentry.java.logback', '4.2.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
-libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
For other dependency managers, see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-logback).
diff --git a/platform-includes/getting-started-install/java.mdx b/platform-includes/getting-started-install/java.mdx
index 201b8149f6206..5dcbaf675302a 100644
--- a/platform-includes/getting-started-install/java.mdx
+++ b/platform-includes/getting-started-install/java.mdx
@@ -1,16 +1,10 @@
-
-
```groovy {filename:build.gradle}
plugins {
id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.12.0') }}"
}
-// ___PRODUCT_OPTION_START___ profiling
dependencies {
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven Plugin} {mdExpandTabs} {filename:pom.xml}
@@ -46,7 +40,6 @@ dependencies {
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
@@ -54,14 +47,11 @@ dependencies {
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle:SBT}
libraryDependencies += "io.sentry" % "sentry" % "{{@inject packages.version('sentry.java', '4.2.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
diff --git a/platform-includes/getting-started-install/java.servlet.mdx b/platform-includes/getting-started-install/java.servlet.mdx
index aa1a1bb4f3816..b15903f9038ea 100644
--- a/platform-includes/getting-started-install/java.servlet.mdx
+++ b/platform-includes/getting-started-install/java.servlet.mdx
@@ -1,34 +1,24 @@
-
-
```xml {tabTitle:Maven}
io.sentry
sentry-servlet
{{@inject packages.version('sentry.java.servlet', '4.1.0') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle}
implementation 'io.sentry:sentry-servlet:{{@inject packages.version('sentry.java.servlet', '4.1.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT}
libraryDependencies += "io.sentry" % "sentry-servlet" % "{{@inject packages.version('sentry.java.servlet', '4.1.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
For other dependency managers, see the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-servlet).
diff --git a/platform-includes/getting-started-install/java.spring-boot.mdx b/platform-includes/getting-started-install/java.spring-boot.mdx
index 929700cdb29d4..7bc1278923fd1 100644
--- a/platform-includes/getting-started-install/java.spring-boot.mdx
+++ b/platform-includes/getting-started-install/java.spring-boot.mdx
@@ -1,16 +1,10 @@
-
-
```groovy {tabTitle:Gradle Plugin} {mdExpandTabs}
plugins {
id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.12.0') }}"
}
-// ___PRODUCT_OPTION_START___ profiling
dependencies {
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven Plugin}{filename:pom.xml}
@@ -46,7 +40,6 @@ dependencies {
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
@@ -54,28 +47,21 @@ dependencies {
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring Boot 2)}
implementation 'io.sentry:sentry-spring-boot-starter:{{@inject packages.version('sentry.java.spring-boot', '4.2.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring Boot 3)}
implementation 'io.sentry:sentry-spring-boot-starter-jakarta:{{@inject packages.version('sentry.java.spring-boot.jakarta', '6.7.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring Boot 4)}
implementation 'io.sentry:sentry-spring-boot-4:{{@inject packages.version('sentry.java.spring-boot-4', '8.15.1') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring Boot 2)}
@@ -84,13 +70,11 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring-boot-starter
{{@inject packages.version('sentry.java.spring-boot', '4.2.0') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring Boot 3)}
@@ -99,13 +83,11 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring-boot-starter-jakarta
{{@inject packages.version('sentry.java.spring-boot.jakarta', '6.7.0') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring Boot 4)}
@@ -114,13 +96,11 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring-boot-4
{{@inject packages.version('sentry.java.spring-boot-4', '8.15.1') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
diff --git a/platform-includes/getting-started-install/java.spring.mdx b/platform-includes/getting-started-install/java.spring.mdx
index 2260c460a971f..517cd5189c6a2 100644
--- a/platform-includes/getting-started-install/java.spring.mdx
+++ b/platform-includes/getting-started-install/java.spring.mdx
@@ -1,16 +1,10 @@
-
-
```groovy {tabTitle:Gradle Plugin} {mdExpandTabs}
plugins {
id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.12.0') }}"
}
-// ___PRODUCT_OPTION_START___ profiling
dependencies {
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven Plugin}{filename:pom.xml}
@@ -46,7 +40,6 @@ dependencies {
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
@@ -54,28 +47,21 @@ dependencies {
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring 5)}
implementation 'io.sentry:sentry-spring:{{@inject packages.version('sentry.java.spring', '4.2.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring 6)}
implementation 'io.sentry:sentry-spring-jakarta:{{@inject packages.version('sentry.java.spring.jakarta', '6.7.0') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```groovy {tabTitle:Gradle (Spring 7)}
implementation 'io.sentry:sentry-spring-7:{{@inject packages.version('sentry.java.spring-7', '8.15.1') }}'
-// ___PRODUCT_OPTION_START___ profiling
implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}'
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring 5)}
@@ -84,13 +70,11 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring
{{@inject packages.version('sentry.java.spring', '4.2.0') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring 6)}
@@ -99,13 +83,11 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring-jakarta
{{@inject packages.version('sentry.java.spring.jakarta', '6.7.0') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```xml {tabTitle:Maven (Spring 7)}
@@ -114,34 +96,26 @@ implementation 'io.sentry:sentry-async-profiler:{{@inject packages.version('sent
sentry-spring-7
{{@inject packages.version('sentry.java.spring-7', '8.15.1') }}
-// ___PRODUCT_OPTION_START___ profiling
io.sentry
sentry-async-profiler
{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT (Spring 5)}
libraryDependencies += "io.sentry" % "sentry-spring" % "{{@inject packages.version('sentry.java.spring', '4.2.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT (Spring 6)}
libraryDependencies += "io.sentry" % "sentry-spring-jakarta" % "{{@inject packages.version('sentry.java.spring.jakarta', '6.7.0') }}"
-// ___PRODUCT_OPTION_START___ profiling
libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
```scala {tabTitle: SBT (Spring 7)}
libraryDependencies += "io.sentry" % "sentry-spring-7" % "{{@inject packages.version('sentry.java.spring-7', '8.15.1') }}"
-// ___PRODUCT_OPTION_START___ profiling
libraryDependencies += "io.sentry" % "sentry-async-profiler" % "{{@inject packages.version('sentry.java.async-profiler', '8.23.0') }}"
-// ___PRODUCT_OPTION_END___ profiling
```
For other dependency managers see the [central Maven repository (Spring 5)](https://search.maven.org/artifact/io.sentry/sentry-spring), [central Maven repository (Spring 6)](https://search.maven.org/artifact/io.sentry/sentry-spring-jakarta), and [central Maven repository (Spring 7)](https://search.maven.org/artifact/io.sentry/sentry-spring-7).
diff --git a/platform-includes/getting-started-install/opentelemetry/java.mdx b/platform-includes/getting-started-install/opentelemetry/java.mdx
deleted file mode 100644
index 1e625d64d6535..0000000000000
--- a/platform-includes/getting-started-install/opentelemetry/java.mdx
+++ /dev/null
@@ -1,17 +0,0 @@
-
-When running your application, please add our `sentry-opentelemetry-agent` to the `java` command.
-
-Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
-```bash
-curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
-```
-
-Then run your application with:
-```bash {tabTitle: Environment variable}
-SENTRY_PROPERTIES_FILE=sentry.properties JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
-```
-
-```bash {tabTitle: Java CLI argument}
-SENTRY_PROPERTIES_FILE=sentry.properties java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
-```
-
diff --git a/platform-includes/getting-started-install/opentelemetry/java.spring-boot.mdx b/platform-includes/getting-started-install/opentelemetry/java.spring-boot.mdx
deleted file mode 100644
index 1c6c8205d0f96..0000000000000
--- a/platform-includes/getting-started-install/opentelemetry/java.spring-boot.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
-
-When running your application, please add our `sentry-opentelemetry-agent` to the `java` command.
-
-Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
-```bash
-curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
-```
-
-Then run your application with:
-
-```bash {tabTitle: Environment variable}
-SENTRY_AUTO_INIT=false JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
-```
-
-```bash {tabTitle: Java CLI argument}
-SENTRY_AUTO_INIT=false java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
-```
-
diff --git a/platform-includes/getting-started-install/opentelemetry/java.spring.mdx b/platform-includes/getting-started-install/opentelemetry/java.spring.mdx
deleted file mode 100644
index 47bdf895ee087..0000000000000
--- a/platform-includes/getting-started-install/opentelemetry/java.spring.mdx
+++ /dev/null
@@ -1,27 +0,0 @@
-
-When running your application, please add our `sentry-opentelemetry-agent` to the `java` command.
-In case you are using an application server to run your `.WAR` file, please add it to the `JAVA_OPTS` of your application server.
-
-Download the latest version of the `sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar` from [MavenCentral](https://search.maven.org/artifact/io.sentry/sentry-opentelemetry-agent):
-```bash
-curl https://repo1.maven.org/maven2/io/sentry/sentry-opentelemetry-agent/{{@inject packages.version('sentry.java.opentelemetry-agent') }}/sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -o sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar
-```
-
-Then run your application with:
-```bash {tabTitle: Environment variable}
-SENTRY_AUTO_INIT=false JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar" java -jar your-application.jar
-```
-
-```bash {tabTitle: Java CLI argument}
-SENTRY_AUTO_INIT=false java -javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar -jar your-application.jar
-```
-
-In case of an application server, adding the Agent might look more like the following:
-```bash {tabTitle: Environment variable}
-JAVA_OPTS="${JAVA_OPTS} JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar"
-```
-
-```bash {tabTitle: Java CLI argument}
-JAVA_OPTS="${JAVA_OPTS} JAVA_TOOL_OPTIONS="-javaagent:sentry-opentelemetry-agent-{{@inject packages.version('sentry.java.opentelemetry-agent') }}.jar"
-```
-
diff --git a/platform-includes/getting-started-logs/java.mdx b/platform-includes/getting-started-logs/java.mdx
new file mode 100644
index 0000000000000..d36b686af552a
--- /dev/null
+++ b/platform-includes/getting-started-logs/java.mdx
@@ -0,0 +1,50 @@
+Use `Sentry.logger()` to send logs at different levels, such as `info`, `warn`, or `error`. You can pass any attributes you want and search or filter by them later.
+See Set Up Logs for all available logging methods and the syntax for formatting messages.
+
+```java
+import io.sentry.Sentry;
+import io.sentry.SentryAttribute;
+import io.sentry.SentryAttributes;
+import io.sentry.SentryLogLevel;
+import io.sentry.logger.SentryLogParameters;
+
+
+Sentry.logger().info("A simple log message");
+Sentry.logger().error("A %s log message", "formatted");
+
+// attach custom attributes with Sentry.logger().log()
+Sentry.logger().log(
+ SentryLogLevel.FATAL,
+ SentryLogParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("my.string-attribute", "some-value"),
+ SentryAttribute.named("my.attribute", new Point(1, 2))
+ )
+ ),
+ "log message %s",
+ "param1"
+);
+```
+```kotlin
+import io.sentry.Sentry
+import io.sentry.SentryAttribute
+import io.sentry.SentryAttributes
+import io.sentry.SentryLogLevel
+import io.sentry.logger.SentryLogParameters
+
+Sentry.logger().info("A simple log message")
+Sentry.logger().error("A %s log message", "formatted")
+
+// attach custom attributes with Sentry.logger().log()
+Sentry.logger().log(
+ SentryLogLevel.FATAL,
+ SentryLogParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("my.string-attribute", "some-value"),
+ SentryAttribute.named("my.attribute", Point(1, 2))
+ )
+ ),
+ "log message %s",
+ "param1"
+)
+```
diff --git a/platform-includes/getting-started-metrics/java.mdx b/platform-includes/getting-started-metrics/java.mdx
new file mode 100644
index 0000000000000..d434a51bde80c
--- /dev/null
+++ b/platform-includes/getting-started-metrics/java.mdx
@@ -0,0 +1,48 @@
+Use `Sentry.metrics()` to send counters, gauges, and distributions from your app to Sentry. You can pass any attributes you want and search or filter by them later.
+
+See Set Up Metrics for all metric types and configuration options.
+
+```java
+import io.sentry.Sentry;
+import io.sentry.SentryAttribute;
+import io.sentry.SentryAttributes;
+import io.sentry.metrics.MetricsUnit;
+import io.sentry.metrics.SentryMetricsParameters;
+
+Sentry.metrics().count("button_click", 1.0);
+Sentry.metrics().gauge("queue_depth", 42.0);
+
+// pass additional attributes via SentryMetricsParameters
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+);
+```
+```kotlin
+import io.sentry.Sentry
+import io.sentry.SentryAttribute
+import io.sentry.SentryAttributes
+import io.sentry.metrics.MetricsUnit
+import io.sentry.metrics.SentryMetricsParameters
+
+Sentry.metrics().count("button_click", 1.0)
+Sentry.metrics().gauge("queue_depth", 42.0)
+
+// pass additional attributes via SentryMetricsParameters
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+)
+```
diff --git a/platform-includes/getting-started-prerequisites/java.mdx b/platform-includes/getting-started-prerequisites/java.mdx
new file mode 100644
index 0000000000000..f927936bb461f
--- /dev/null
+++ b/platform-includes/getting-started-prerequisites/java.mdx
@@ -0,0 +1,7 @@
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- Your application up and running
+- Java version `8` (also known as Java `1.8`) or above
diff --git a/platform-includes/getting-started-prerequisites/java.spring-boot.mdx b/platform-includes/getting-started-prerequisites/java.spring-boot.mdx
new file mode 100644
index 0000000000000..95a16945dbeda
--- /dev/null
+++ b/platform-includes/getting-started-prerequisites/java.spring-boot.mdx
@@ -0,0 +1,10 @@
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- Your application up and running
+- Spring Boot `2.1.0`+
+ - [Sentry WebFlux integration](/platforms/java/guides/spring-boot/webflux/) requires Spring Boot `2.2.5.RELEASE` or above
+
+If you're on an older version, use [our legacy integration](/platforms/java/legacy/spring/).
diff --git a/platform-includes/getting-started-prerequisites/java.spring.mdx b/platform-includes/getting-started-prerequisites/java.spring.mdx
new file mode 100644
index 0000000000000..7b6197b837596
--- /dev/null
+++ b/platform-includes/getting-started-prerequisites/java.spring.mdx
@@ -0,0 +1,10 @@
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- Your application up and running
+- Spring Framework `5.1.2`+
+ - [Sentry WebFlux integration](/platforms/java/guides/spring-boot/webflux/) requires Spring Framework `5.2.4` or above
+
+If you're on an older version, use [our legacy integration](/platforms/java/legacy/spring/).
diff --git a/platform-includes/getting-started-primer/java.jul.mdx b/platform-includes/getting-started-primer/java.jul.mdx
index 91a706a0ef571..c4f331897064b 100644
--- a/platform-includes/getting-started-primer/java.jul.mdx
+++ b/platform-includes/getting-started-primer/java.jul.mdx
@@ -1,13 +1 @@
-
-
-The `sentry-jul` library provides a [java.util.logging Handler](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Handler.html) that sends logged exceptions to Sentry.
-
-
-
-
-
- Enable the Sentry Logs feature to unlock Sentry's full logging power. With Sentry Logs, you can search, filter, and analyze logs from across your entire application in one place.
-
-
-
-Once this integration is configured you can _also_ use Sentry’s static API, as shown on the usage page, in order to do things like record breadcrumbs, set the current user, or manually send events. The source can be found [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-jul).
+The `sentry-jul` library provides a [java.util.logging Handler](http://docs.oracle.com/javase/8/docs/api/java/util/logging/Handler.html) that sends logged exceptions to Sentry. You can find the source [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-jul).
diff --git a/platform-includes/getting-started-primer/java.log4j2.mdx b/platform-includes/getting-started-primer/java.log4j2.mdx
index fe7c90d61d521..f1cd7b3b36af0 100644
--- a/platform-includes/getting-started-primer/java.log4j2.mdx
+++ b/platform-includes/getting-started-primer/java.log4j2.mdx
@@ -1,13 +1 @@
-
-
-The `sentry-log4j2` library provides [Log4j 2.x](https://logging.apache.org/log4j/2.x/) support for Sentry via an [Appender](https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html) that sends logged exceptions to Sentry.
-
-
-
-
-
- Enable the Sentry Logs feature to unlock Sentry's full logging power. With Sentry Logs, you can search, filter, and analyze logs from across your entire application in one place.
-
-
-
-Once the integration is configured you can _also_ use Sentry’s static API, [as shown on the usage page](usage/), in order to do things like record breadcrumbs, set the current user, or manually send events. The source can be found [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-log4j2).
+The `sentry-log4j2` library provides [Log4j 2.x](https://logging.apache.org/log4j/2.x/) support for Sentry via an [Appender](https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html) that sends logged exceptions to Sentry. You can find the source [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-log4j2).
diff --git a/platform-includes/getting-started-primer/java.logback.mdx b/platform-includes/getting-started-primer/java.logback.mdx
index 63d27a958be47..97ba212b4a5f0 100644
--- a/platform-includes/getting-started-primer/java.logback.mdx
+++ b/platform-includes/getting-started-primer/java.logback.mdx
@@ -1,13 +1 @@
-
-
-The `sentry-logback` library provides [Logback](https://logback.qos.ch/) support for Sentry using an [Appender](https://logback.qos.ch/apidocs/ch/qos/logback/core/Appender.html) that sends logged exceptions to Sentry.
-
-
-
-
-
- Enable the Sentry Logs feature to unlock Sentry's full logging power. With Sentry Logs, you can search, filter, and analyze logs from across your entire application in one place.
-
-
-
-Once this integration is configured you can _also_ use Sentry’s static API, [as shown on the usage page](usage/), in order to do things like record breadcrumbs, set the current user, or manually send events. The source can be found [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-logback).
+The `sentry-logback` library provides [Logback](https://logback.qos.ch/) support for Sentry using an [Appender](https://logback.qos.ch/manual/appenders.html) that sends logged exceptions to Sentry. You can find the source [on GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-logback).
diff --git a/platform-includes/getting-started-primer/java.mdx b/platform-includes/getting-started-primer/java.mdx
index 71d9f4d17370b..4ef723ccdf824 100644
--- a/platform-includes/getting-started-primer/java.mdx
+++ b/platform-includes/getting-started-primer/java.mdx
@@ -2,7 +2,7 @@
Sentry's Java SDK enables capturing sessions for Release health as well as reporting messages and errors.
-Sentry for Java is a collection of modules provided by Sentry; it supports Java 1.8 and above. At its core, Sentry for Java provides a raw client for sending events to Sentry. To begin, we **highly recommend** you use one of the logging libraries or framework integrations.
+Sentry for Java is a collection of modules provided by Sentry. At its core, Sentry for Java provides a raw client for sending events to Sentry. To begin, we **highly recommend** you use one of the logging libraries or framework integrations.
diff --git a/platform-includes/getting-started-primer/java.spring-boot.mdx b/platform-includes/getting-started-primer/java.spring-boot.mdx
index 873056beab061..0bfe586b0f2c7 100644
--- a/platform-includes/getting-started-primer/java.spring-boot.mdx
+++ b/platform-includes/getting-started-primer/java.spring-boot.mdx
@@ -1,17 +1,8 @@
-
-
-There are multiple variants of Sentry available for Spring Boot. If you're using our Gradle plugin it will pick the right dependency for you. If you're manually adding the dependency:
-- For Spring Boot 2, use `sentry-spring-boot-starter` ([GitHub](https://github.com/getsentry/sentry-java/tree/main/sentry-spring-boot-starter))
-- For Spring Boot 3, use `sentry-spring-boot-starter-jakarta` ([GitHub](https://github.com/getsentry/sentry-java/tree/main/sentry-spring-boot-starter-jakarta))
-- For Spring Boot 4, use `sentry-spring-boot-4` ([GitHub](https://github.com/getsentry/sentry-java/tree/main/sentry-spring-boot-4))
-
-Sentry's integration with [Spring Boot](https://spring.io/projects/spring-boot) supports Spring Boot 2.1.0 and above to report unhandled exceptions as well as release and registration of beans. If you're on an older version, use [our legacy integration](/platforms/java/legacy/spring/).
-The minimum version of Spring Boot supported by the Sentry WebFlux integration is, instead, 2.2.5.RELEASE.
-
+
The `sentry-spring-boot-starter`, `sentry-spring-boot-starter-jakarta`, and `sentry-spring-boot-4` libraries enhance [Sentry Spring](/platforms/java/guides/spring/) to:
- manage a fine-grained configuration using `application.properties` or `application.yaml`
- automatically include the release when [Spring Boot Git integration is configured](https://docs.spring.io/spring-boot/how-to/build.html#howto.build.generate-git-info)
- automatically register `BeforeSendCallback`, `BeforeBreadcrumbCallback`, `EventProcessor`, `Integration` beans
-
+
diff --git a/platform-includes/getting-started-primer/java.spring.mdx b/platform-includes/getting-started-primer/java.spring.mdx
index b52f944837d1e..4f193e8e46d2d 100644
--- a/platform-includes/getting-started-primer/java.spring.mdx
+++ b/platform-includes/getting-started-primer/java.spring.mdx
@@ -1,17 +1,3 @@
-
-There are multiple variants of Sentry available for Spring:
-- For Spring 5, use `sentry-spring` ([GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-spring))
-- For Spring 6, use `sentry-spring-jakarta` ([GitHub](https://github.com/getsentry/sentry-java/tree/master/sentry-spring-jakarta))
-- For Spring 7, use `sentry-spring-7` ([GitHub](https://github.com/getsentry/sentry-java/tree/main/sentry-spring-7))
-
-Sentry's integration with [Spring](https://spring.io/projects/spring-framework) supports Spring Framework 5.1.2 and above to report unhandled exceptions and optional user information. If you're on an older version, use [our legacy integration](/platforms/java/legacy/spring/).
-The minimum version of Spring Framework supported by the Sentry WebFlux integration is, instead, 5.2.4.
-
-- Provides a [HandlerExceptionResolver](https://docs.spring.io/spring/docs/4.3.9.RELEASE/javadoc-api/org/springframework/web/servlet/HandlerExceptionResolver.html) to send unhandled exceptions to Sentry
-- Attaches HTTP request information to every `SentryEvent` recorded within the scope of the request
-- Provides the ability to [record user information](/platforms/java/guides/spring/advanced-usage/)
-
-To use Sentry with Spring Boot, we recommend using Sentry [Spring Boot integration](/platforms/java/guides/spring-boot/) as it provides richer configuration capabilities.
-
+Are you using Spring Boot? Then follow our [Spring Boot quick start guide](/platforms/java/guides/spring-boot/) instead.