getsentry / getsentry/sentry-java

Profiler samples are re-anchored once at profile end

Open
#5,581 1 comment 0 reactions 0 assignees View on GitHub
Platform: Java
Dominant language
Kotlin
Stars
1.4k
Forks
478
Avg merge
2d 23h
Merged PRs (30d)
67

Description

Audit finding **C1 — theoretical, LOW-MEDIUM**.

`AndroidProfiler` computes `timestampDiff` (the elapsedRealtime↔wall offset) once at profile end and applies it to every wall-stamped `PerformanceCollectionData` sample (`sentry-android-core/src/main/java/io/sentry/android/core/AndroidProfiler.java:309-324`). A wall step during the profile shifts all earlier CPU/memory samples relative to the trace.

Source: [JAVA-557]() §C1.

Contributor guide

Open the contributing guide

Research direction

Read AndroidProfiler.java at lines 309-324 and trace how timestampDiff is computed at profile end and applied to PerformanceCollectionData samples. Verify the behavior around a wall-clock step during profiling, then ensure earlier CPU and memory samples are not shifted relative to the trace; confirm the corrected timestamp alignment with the relevant profiler coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.