From 0ab04cd2d4c1ee8959da4ed2f8da01c1f1b5beb6 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 1 Oct 2025 14:04:11 +0200 Subject: [PATCH 1/2] Enhance documentation for Sentry continuous profiling Expanded details on Sentry continuous profiling feature, including configuration options and default settings. --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b3f6ebd68..7d08fb04d5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,17 @@ - Add session replay id to Sentry Logs ([#4740](https://github.com/getsentry/sentry-java/pull/4740)) - Add support for continuous profiling of JVM applications on macOS and Linux ([#4556](https://github.com/getsentry/sentry-java/pull/4556)) - - Sentry continuous profiling on the JVM is using async-profiler under the hood. + - [Sentry continuous profiling](https://docs.sentry.io/product/explore/profiling/) on the JVM is using async-profiler under the hood. + - By default this feature is disabled. Set a profile sample rate and chose a lifecycle (see below) to enable it. + - Add the `sentry-async-profiler` dependency to your project + - Set a sample rate for profiles, e.g. `1.0` to send all of them. You may use `options.setProfilesSampleRate(1.0)` in code or `profiles-sample-rate=1.0` in `sentry.properties` + - Set a profile lifecycle via `options.setProfileLifecycle(ProfileLifecycle.TRACE)` in code or `profile-lifecycle=TRACE` in `sentry.properties` + - By default the lifecycle is set to `MANUAL`, meaning you have to explicitly call `Sentry.startProfiler()` and `Sentry.stopProfiler()` + - You may change it to `TRACE` which will create a profile for each transaction + - To automatically upload Profiles for each transaction in a Spring Boot application + - set `sentry.profile-session-sample-rate=1.0` and `sentry.profile-lifecycle=TRACE` in `application.properties` + - or set `sentry.profile-session-sample-rate: 1.0` and `sentry.profile-lifecycle: TRACE` in `application.yml` + - Profiling can also be combined with our OpenTelemetry integration ### Fixes From c3f1862e84ecab50030f1080ba413e62b4e1bc2b Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 1 Oct 2025 14:12:59 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d08fb04d5d..74e2bdae28b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - [Sentry continuous profiling](https://docs.sentry.io/product/explore/profiling/) on the JVM is using async-profiler under the hood. - By default this feature is disabled. Set a profile sample rate and chose a lifecycle (see below) to enable it. - Add the `sentry-async-profiler` dependency to your project - - Set a sample rate for profiles, e.g. `1.0` to send all of them. You may use `options.setProfilesSampleRate(1.0)` in code or `profiles-sample-rate=1.0` in `sentry.properties` + - Set a sample rate for profiles, e.g. `1.0` to send all of them. You may use `options.setProfileSessionSampleRate(1.0)` in code or `profile-session-sample-rate=1.0` in `sentry.properties` - Set a profile lifecycle via `options.setProfileLifecycle(ProfileLifecycle.TRACE)` in code or `profile-lifecycle=TRACE` in `sentry.properties` - By default the lifecycle is set to `MANUAL`, meaning you have to explicitly call `Sentry.startProfiler()` and `Sentry.stopProfiler()` - You may change it to `TRACE` which will create a profile for each transaction