diff --git a/docs/platforms/android/metrics/index.mdx b/docs/platforms/android/metrics/index.mdx
new file mode 100644
index 00000000000000..054b46a924a62c
--- /dev/null
+++ b/docs/platforms/android/metrics/index.mdx
@@ -0,0 +1,30 @@
+---
+title: Set Up Metrics
+sidebar_title: Metrics
+description: "Metrics allow you to send, view and query counters, gauges and measurements from your Sentry-configured apps to track application health and drill down into related traces, logs, and errors."
+sidebar_order: 4500
+sidebar_section: features
+beta: true
+---
+
+With Sentry Metrics, you can send counters, gauges, distributions, and sets from your applications to Sentry. Once in Sentry, these metrics can be viewed alongside relevant errors, and searched using their individual attributes.
+
+
+This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry-javascript/discussions/18055) if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony.
+
+
+## Requirements
+
+
+
+## Usage
+
+
+
+## Options
+
+
+
+## Default Attributes
+
+
diff --git a/docs/platforms/java/common/crons/index.mdx b/docs/platforms/java/common/crons/index.mdx
index c7b132a62216ba..8c118fb34b57d9 100644
--- a/docs/platforms/java/common/crons/index.mdx
+++ b/docs/platforms/java/common/crons/index.mdx
@@ -2,7 +2,7 @@
title: Set Up Crons
sidebar_title: Crons
description: "Sentry Crons allows you to monitor the uptime and performance of any scheduled, recurring job in your application."
-sidebar_order: 5
+sidebar_order: 6
sidebar_section: features
---
diff --git a/docs/platforms/java/common/feature-flags/index.mdx b/docs/platforms/java/common/feature-flags/index.mdx
index 4a96afc3dc7b9d..7b4a1416cea4b7 100644
--- a/docs/platforms/java/common/feature-flags/index.mdx
+++ b/docs/platforms/java/common/feature-flags/index.mdx
@@ -1,7 +1,7 @@
---
title: Set Up Feature Flags
sidebar_title: Feature Flags
-sidebar_order: 7
+sidebar_order: 8
sidebar_section: features
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error.
---
diff --git a/docs/platforms/java/common/gradle/index.mdx b/docs/platforms/java/common/gradle/index.mdx
index 0d3c7f151686ab..7fec927f43a406 100644
--- a/docs/platforms/java/common/gradle/index.mdx
+++ b/docs/platforms/java/common/gradle/index.mdx
@@ -1,7 +1,7 @@
---
title: Gradle
description: Learn about using the Sentry Gradle Plugin.
-sidebar_order: 8
+sidebar_order: 9
sidebar_section: features
og_image: /og-images/platforms-java-common-gradle.png
---
diff --git a/docs/platforms/java/common/maven/index.mdx b/docs/platforms/java/common/maven/index.mdx
index 7209d70c95dcba..4fd36049aec929 100644
--- a/docs/platforms/java/common/maven/index.mdx
+++ b/docs/platforms/java/common/maven/index.mdx
@@ -1,7 +1,7 @@
---
title: Maven
description: "Learn about using the Sentry Maven Plugin."
-sidebar_order: 9
+sidebar_order: 10
sidebar_section: features
---
diff --git a/docs/platforms/java/common/metrics/index.mdx b/docs/platforms/java/common/metrics/index.mdx
new file mode 100644
index 00000000000000..a1076483c5cc4c
--- /dev/null
+++ b/docs/platforms/java/common/metrics/index.mdx
@@ -0,0 +1,30 @@
+---
+title: Set Up Metrics
+sidebar_title: Metrics
+description: "Metrics allow you to send, view and query counters, gauges and measurements from your Sentry-configured apps to track application health and drill down into related traces, logs, and errors."
+sidebar_order: 4
+sidebar_section: features
+beta: true
+---
+
+With Sentry Metrics, you can send counters, gauges, distributions, and sets from your applications to Sentry. Once in Sentry, these metrics can be viewed alongside relevant errors, and searched using their individual attributes.
+
+
+This feature is currently in open beta. Please reach out on [GitHub](https://github.com/getsentry/sentry/discussions/102275) if you have feedback or questions. Features in beta are still in-progress and may have bugs. We recognize the irony.
+
+
+## Requirements
+
+
+
+## Usage
+
+
+
+## Options
+
+
+
+## Default Attributes
+
+
diff --git a/docs/platforms/java/common/opentelemetry/index.mdx b/docs/platforms/java/common/opentelemetry/index.mdx
index 70fc429782681c..71f652e813e52c 100644
--- a/docs/platforms/java/common/opentelemetry/index.mdx
+++ b/docs/platforms/java/common/opentelemetry/index.mdx
@@ -2,7 +2,7 @@
title: OpenTelemetry Support
sdk: sentry.java.opentelemetry-agent
description: "Using OpenTelemetry with Sentry."
-sidebar_order: 10
+sidebar_order: 11
sidebar_section: features
---
diff --git a/docs/platforms/java/common/profiling/index.mdx b/docs/platforms/java/common/profiling/index.mdx
index 108620e3350fe6..427290675ea4b8 100644
--- a/docs/platforms/java/common/profiling/index.mdx
+++ b/docs/platforms/java/common/profiling/index.mdx
@@ -2,7 +2,7 @@
title: Set Up Java Profiling
sidebar_title: Profiling
description: "Learn how to enable profiling in your app if it is not already set up."
-sidebar_order: 4
+sidebar_order: 5
sidebar_section: features
supported:
- java
diff --git a/docs/platforms/java/common/user-feedback/index.mdx b/docs/platforms/java/common/user-feedback/index.mdx
index 44685ebad1de45..64b4325cac20e6 100644
--- a/docs/platforms/java/common/user-feedback/index.mdx
+++ b/docs/platforms/java/common/user-feedback/index.mdx
@@ -2,7 +2,7 @@
title: Set Up User Feedback
sidebar_title: User Feedback
description: "Learn more about collecting user feedback when an event occurs. Sentry pairs the feedback with the original event, giving you additional insight into issues."
-sidebar_order: 6
+sidebar_order: 7
sidebar_section: features
---
diff --git a/docs/product/explore/metrics/getting-started/index.mdx b/docs/product/explore/metrics/getting-started/index.mdx
index 86e1349c92cc85..ec818cdb890e59 100644
--- a/docs/product/explore/metrics/getting-started/index.mdx
+++ b/docs/product/explore/metrics/getting-started/index.mdx
@@ -174,6 +174,32 @@ To set up Sentry Metrics, use the links below for supported SDKs. After it's bee
url="/platforms/javascript/guides/wasm/metrics/"
/>
+### Java
+
+-
+-
+-
+
+### Mobile
+
+-
+
### Python
- {
+ // ...
+ options.getMetrics().setBeforeSend((metric, hint) -> {
+ // Drop metrics with specific attributes
+ if (metric.getAttributes().containsKey("dropmetric")) {
+ return null;
+ }
+
+ // Modify metric attributes
+ metric.setAttribute("processed", new SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true));
+ return metric;
+ });
+ }
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.android.core.SentryAndroid
+import io.sentry.android.core.SentryAndroidOptions
+import io.sentry.SentryAttributeType
+import io.sentry.SentryLogEventAttributeValue
+
+SentryAndroid.init(context) { options ->
+ // ...
+ options.metrics.setBeforeSend { metric, hint ->
+ // Drop metrics with specific attributes
+ if (metric.attributes.containsKey("dropmetric")) {
+ return@setBeforeSend null
+ }
+
+ // Modify metric attributes
+ metric.setAttribute(
+ "processed",
+ SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true)
+ )
+ metric
+ }
+}
+```
+
+### Disabling Metrics
+
+If you want to disable metrics collection entirely, you can do so by disabling the `metrics.enabled` flag:
+
+```xml {tabTitle: XML}
+
+```
+```java {tabTitle: Java}
+import io.sentry.android.core.SentryAndroid;
+import io.sentry.android.core.SentryAndroidOptions;
+
+SentryAndroid.init(context,
+ options -> {
+ // ...
+ options.getMetrics().setEnabled(false);
+ }
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.android.core.SentryAndroid
+import io.sentry.android.core.SentryAndroidOptions
+
+SentryAndroid.init { options ->
+ // ...
+ options.metrics.setEnabled(false)
+}
+```
diff --git a/platform-includes/metrics/options/java.mdx b/platform-includes/metrics/options/java.mdx
new file mode 100644
index 00000000000000..13f862f66a17e0
--- /dev/null
+++ b/platform-includes/metrics/options/java.mdx
@@ -0,0 +1,78 @@
+The Sentry Java SDK provides several options to configure how metrics are captured and sent to Sentry.
+
+### Filtering and Modifying Metrics
+
+Use the `getMetrics().beforeSend` callback to filter or modify metrics before they're sent to Sentry. This is useful for:
+
+- Removing sensitive data from metric attributes
+- Dropping metrics you don't want to send
+- Adding or modifying attributes
+
+The callback receives a metric object and must return either a modified metric or `null` to drop it.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+import io.sentry.SentryAttributeType;
+import io.sentry.SentryLogEventAttributeValue;
+
+Sentry.init(
+ options -> {
+ // ...
+ options.getMetrics().setBeforeSend((metric, hint) -> {
+ // Drop metrics with specific attributes
+ if (metric.getAttributes().containsKey("dropmetric")) {
+ return null;
+ }
+
+ // Modify metric attributes
+ metric.setAttribute("processed", new SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true));
+ return metric;
+ });
+ }
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+import io.sentry.SentryAttributeType
+import io.sentry.SentryLogEventAttributeValue
+
+Sentry.init { options ->
+ // ...
+ options.metrics.setBeforeSend { metric, hint ->
+ // Drop metrics with specific attributes
+ if (metric.attributes.containsKey("dropmetric")) {
+ return@setBeforeSend null
+ }
+
+ // Modify metric attributes
+ metric.setAttribute(
+ "processed",
+ SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true)
+ )
+ metric
+ }
+}
+```
+
+### Disabling Metrics
+
+If you want to disable metrics collection entirely, you can do so by disabling the `metrics.enabled` flag:
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.init(
+ options -> {
+ // ...
+ options.getMetrics().setEnabled(false);
+ }
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.init { options ->
+ // ...
+ options.metrics.setEnabled(false)
+}
+```
\ No newline at end of file
diff --git a/platform-includes/metrics/options/java.spring-boot.mdx b/platform-includes/metrics/options/java.spring-boot.mdx
new file mode 100644
index 00000000000000..e37da6e1e94bca
--- /dev/null
+++ b/platform-includes/metrics/options/java.spring-boot.mdx
@@ -0,0 +1,72 @@
+#### beforeSendMetric
+
+To filter metrics, or update them before they are sent to Sentry, you can expose a bean implementing the metrics `beforeSend` callback:
+
+```java {tabTitle: Java}
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import io.sentry.SentryLogEventAttributeValue;
+import io.sentry.SentryOptions;
+import io.sentry.SentryAttributeType;
+import io.sentry.SentryOptions.Metrics.BeforeSendMetricCallback;
+
+@Configuration
+public class SentryMetricsConfiguration {
+ @Bean
+ public BeforeSendMetricCallback beforeSendMetric() {
+ return (metric, hint) -> {
+ // Drop metrics with specific attributes
+ if (metric.getAttributes().containsKey("dropmetric")) {
+ return null;
+ }
+
+ // Modify metric attributes
+ metric.setAttribute("processed", new SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true));
+ return metric;
+ };
+ }
+}
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.SentryAttributeType
+import io.sentry.SentryLogEventAttributeValue
+import io.sentry.SentryOptions
+import io.sentry.SentryOptions.Metrics.BeforeSendMetricCallback
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+
+@Configuration
+class SentryMetricsConfiguration {
+ @Bean
+ fun beforeSendMetric(): BeforeSendMetricCallback =
+ BeforeSendMetricCallback { metric, hint ->
+ // Drop metrics with specific attributes
+ if (metric.attributes.containsKey("dropmetric")) {
+ return@BeforeSendMetricCallback null
+ }
+
+ // Modify metric attributes
+ metric.setAttribute(
+ "processed",
+ SentryLogEventAttributeValue(SentryAttributeType.BOOLEAN, true)
+ )
+ metric
+ }
+}
+```
+
+The `beforeSend` function receives a metric object, and should return the metric object if you want it to be sent to Sentry, or `null` if you want to discard it.
+
+### Disabling Metrics
+
+If you want to disable metrics collection entirely, you can do so by disabling the `metrics.enabled` flag:
+
+```properties {tabTitle:application.properties}
+sentry.metrics.enabled=false
+```
+```yaml {tabTitle:application.yml}
+sentry:
+ metrics:
+ enabled: false
+```
diff --git a/platform-includes/metrics/requirements/android.mdx b/platform-includes/metrics/requirements/android.mdx
new file mode 100644
index 00000000000000..5c566e3854d02d
--- /dev/null
+++ b/platform-includes/metrics/requirements/android.mdx
@@ -0,0 +1 @@
+Metrics are supported in Sentry Android SDK version `8.30.0` and above.
diff --git a/platform-includes/metrics/requirements/java.mdx b/platform-includes/metrics/requirements/java.mdx
new file mode 100644
index 00000000000000..7a16ffd4571803
--- /dev/null
+++ b/platform-includes/metrics/requirements/java.mdx
@@ -0,0 +1 @@
+Metrics are supported in Sentry Java SDK version `8.30.0` and above.
diff --git a/platform-includes/metrics/usage/android.mdx b/platform-includes/metrics/usage/android.mdx
new file mode 100644
index 00000000000000..21a2fd7525ae00
--- /dev/null
+++ b/platform-includes/metrics/usage/android.mdx
@@ -0,0 +1,146 @@
+Once the SDK is initialized, you can send metrics using the `Sentry.metrics()` APIs.
+
+The `metrics` namespace exposes methods that you can use to capture different types of metric information: `count`, `gauge` and `distribution`.
+
+### Counter
+
+Use `count` to track an incrementing value, such as the number of times a button was clicked or a function was called.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().count("button_click", 1.0);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().count("button_click", 1.0)
+```
+
+### Gauge
+
+Use `gauge` to track a value that can go up and down, such as the current memory usage or the number of items in a queue.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().gauge("queue_depth", 42.0);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().gauge("queue_depth", 42.0)
+```
+
+### Distribution
+
+Use `distribution` to track the distribution of a value, such as the response time of a request.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().distribution("response_time", 187.5);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().distribution("response_time", 187.5)
+```
+
+### Adding Attributes
+
+You can also pass additional attributes to any of the metric methods via `SentryMetricsParameters`. Attributes allow you to filter and group metrics.
+
+```java {tabTitle: Java}
+import java.util.Map;
+
+import io.sentry.Sentry;
+import io.sentry.SentryAttribute;
+import io.sentry.SentryAttributes;
+import io.sentry.metrics.MetricsUnit;
+import io.sentry.metrics.SentryMetricsParameters;
+
+Sentry.metrics().distribution(
+ "page_load",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ Map.of("browser", "Firefox")
+ )
+);
+
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+);
+```
+```kotlin {tabTitle: 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().distribution(
+ "page_load",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ mapOf("browser" to "Firefox")
+ )
+)
+
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+)
+```
+
+### Specifying Units
+
+For `gauge` and `distribution` metrics, you can specify a unit using the `unit` option. This helps Sentry display the metric value in a human-readable format. `MetricsUnit` offers constants for units supported by Sentry. Sending in custom units is not supported.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+import io.sentry.metrics.MetricsUnit;
+
+Sentry.metrics().distribution(
+ "response_time",
+ 187.5,
+ MetricsUnit.Duration.MILLISECOND
+);
+
+Sentry.metrics().gauge(
+ "memory_usage",
+ 1024.0,
+ MetricsUnit.Information.BYTE
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+import io.sentry.metrics.MetricsUnit
+
+Sentry.metrics().distribution(
+ "response_time",
+ 187.5,
+ MetricsUnit.Duration.MILLISECOND
+)
+
+Sentry.metrics().gauge(
+ "memory_usage",
+ 1024.0,
+ MetricsUnit.Information.BYTE
+)
+```
diff --git a/platform-includes/metrics/usage/java.mdx b/platform-includes/metrics/usage/java.mdx
new file mode 100644
index 00000000000000..21a2fd7525ae00
--- /dev/null
+++ b/platform-includes/metrics/usage/java.mdx
@@ -0,0 +1,146 @@
+Once the SDK is initialized, you can send metrics using the `Sentry.metrics()` APIs.
+
+The `metrics` namespace exposes methods that you can use to capture different types of metric information: `count`, `gauge` and `distribution`.
+
+### Counter
+
+Use `count` to track an incrementing value, such as the number of times a button was clicked or a function was called.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().count("button_click", 1.0);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().count("button_click", 1.0)
+```
+
+### Gauge
+
+Use `gauge` to track a value that can go up and down, such as the current memory usage or the number of items in a queue.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().gauge("queue_depth", 42.0);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().gauge("queue_depth", 42.0)
+```
+
+### Distribution
+
+Use `distribution` to track the distribution of a value, such as the response time of a request.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+
+Sentry.metrics().distribution("response_time", 187.5);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+
+Sentry.metrics().distribution("response_time", 187.5)
+```
+
+### Adding Attributes
+
+You can also pass additional attributes to any of the metric methods via `SentryMetricsParameters`. Attributes allow you to filter and group metrics.
+
+```java {tabTitle: Java}
+import java.util.Map;
+
+import io.sentry.Sentry;
+import io.sentry.SentryAttribute;
+import io.sentry.SentryAttributes;
+import io.sentry.metrics.MetricsUnit;
+import io.sentry.metrics.SentryMetricsParameters;
+
+Sentry.metrics().distribution(
+ "page_load",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ Map.of("browser", "Firefox")
+ )
+);
+
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+);
+```
+```kotlin {tabTitle: 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().distribution(
+ "page_load",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ mapOf("browser" to "Firefox")
+ )
+)
+
+Sentry.metrics().distribution(
+ "response_time",
+ 1.0,
+ MetricsUnit.Duration.MILLISECOND,
+ SentryMetricsParameters.create(
+ SentryAttributes.of(
+ SentryAttribute.stringAttribute("browser", "Firefox")
+ )
+ )
+)
+```
+
+### Specifying Units
+
+For `gauge` and `distribution` metrics, you can specify a unit using the `unit` option. This helps Sentry display the metric value in a human-readable format. `MetricsUnit` offers constants for units supported by Sentry. Sending in custom units is not supported.
+
+```java {tabTitle: Java}
+import io.sentry.Sentry;
+import io.sentry.metrics.MetricsUnit;
+
+Sentry.metrics().distribution(
+ "response_time",
+ 187.5,
+ MetricsUnit.Duration.MILLISECOND
+);
+
+Sentry.metrics().gauge(
+ "memory_usage",
+ 1024.0,
+ MetricsUnit.Information.BYTE
+);
+```
+```kotlin {tabTitle: Kotlin}
+import io.sentry.Sentry
+import io.sentry.metrics.MetricsUnit
+
+Sentry.metrics().distribution(
+ "response_time",
+ 187.5,
+ MetricsUnit.Duration.MILLISECOND
+)
+
+Sentry.metrics().gauge(
+ "memory_usage",
+ 1024.0,
+ MetricsUnit.Information.BYTE
+)
+```
diff --git a/src/middleware.ts b/src/middleware.ts
index 52609c12f0df02..c7af14c06ae9ef 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -1770,14 +1770,6 @@ const USER_DOCS_REDIRECTS: Redirect[] = [
to: '/platforms/javascript/guides/:guide/opentelemetry/',
},
// START redirecting deprecated generic metrics docs to concepts
- {
- from: '/platforms/java/metrics/',
- to: '/concepts/key-terms/tracing/span-metrics/',
- },
- {
- from: '/platforms/android/metrics/',
- to: '/concepts/key-terms/tracing/span-metrics/',
- },
{
from: '/platforms/apple/metrics/',
to: '/concepts/key-terms/tracing/span-metrics/',