Skip to content

Commit 91f3055

Browse files
authored
Merge 348aacc into e0d5c10
2 parents e0d5c10 + 348aacc commit 91f3055

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
- Use `Sentry.replay().enableDebugMaskingOverlay()` to overlay the screen with the Session Replay masks.
99
- The masks will be invalidated at most once per `frameRate` (default 1 fps).
1010

11+
### Fixes
12+
13+
- Send UI Profiling app start chunk when it finishes ([#4423](https://github.com/getsentry/sentry-java/pull/4423))
14+
1115
## 8.12.0
1216

1317
### Features

sentry-android-core/src/main/java/io/sentry/android/core/AndroidContinuousProfiler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public void startProfiler(
151151
}
152152
}
153153

154-
private void start() {
154+
private void initScopes() {
155155
if ((scopes == null || scopes == NoOpScopes.getInstance())
156156
&& Sentry.getCurrentScopes() != NoOpScopes.getInstance()) {
157157
this.scopes = Sentry.getCurrentScopes();
@@ -162,6 +162,10 @@ private void start() {
162162
rateLimiter.addRateLimitObserver(this);
163163
}
164164
}
165+
}
166+
167+
private void start() {
168+
initScopes();
165169

166170
// Debug.startMethodTracingSampling() is only available since Lollipop, but Android Profiler
167171
// causes crashes on api 21 -> https://github.com/getsentry/sentry-java/issues/3392
@@ -252,6 +256,7 @@ public void stopProfiler(final @NotNull ProfileLifecycle profileLifecycle) {
252256
}
253257

254258
private void stop(final boolean restartProfiler) {
259+
initScopes();
255260
try (final @NotNull ISentryLifecycleToken ignored = lock.acquire()) {
256261
if (stopFuture != null) {
257262
stopFuture.cancel(true);

0 commit comments

Comments
 (0)