Title: Profiler samples are re-anchored once at profile end · Issue #5581 · getsentry/sentry-java · GitHub
Open Graph Title: Profiler samples are re-anchored once at profile end · Issue #5581 · getsentry/sentry-java
X Title: Profiler samples are re-anchored once at profile end · Issue #5581 · getsentry/sentry-java
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/...
Open Graph 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 PerformanceCollectionDa...
X 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 PerformanceCollectionDa...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/5581
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Profiler samples are re-anchored once at profile end","articleBody":"Audit finding **C1 — theoretical, LOW-MEDIUM**.\n\n`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.\n\nSource: getsentry/sentry-java#5530 §C1.\n\n## Also in `PerfettoContinuousProfiler`\n\n`PerfettoContinuousProfiler.ChunkMeasurementCollector.stop()` does the same thing. It reads the wall clock and `SystemClock.elapsedRealtimeNanos()` once when the chunk ends, and projects every CPU and memory sample with that one offset (`PerfettoContinuousProfiler.java:676-677`, `:738-739` on `main` at `812682636b`). Fix both in the same change.\n\n## Decision\n\nLands on main (decided 2026-11-12). It changes the sample offsets sent only when the wall clock steps during a profile, and it doesn't change a critical metric, a duration or an API.","author":{"url":"https://github.com/runningcode","@type":"Person","name":"runningcode"},"datePublished":"2026-06-22T09:05:10Z","url":"https://github.com/getsentry/sentry-java/issues/5581"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8bd75649-454e-c96a-629e-3d8f8c99b6fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B28:2D0B15:95800F:CBF110:6B0480B6 |
| html-safe-nonce | 3c17bdbc1ed7a5ec58ed860dc16729c76b0c5e2edab017fad5bd5b9d0c9220eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjI4OjJEMEIxNTo5NTgwMEY6Q0JGMTEwOjZCMDQ4MEI2IiwidmlzaXRvcl9pZCI6Ijc2NzkwNzc5OTE0NTIwMTY4MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0778da5a3a1fde15ba4a0577e7fd4d7c5a29cb9a4e6cca357b306548c1f802e6 |
| hovercard-subject-tag | issue:4715081150 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/5581/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d787922823173cc062ac2b83683455b714f082e27de5f5388e36dd5c3a1fd8f4/getsentry/sentry-java/issues/5581 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d787922823173cc062ac2b83683455b714f082e27de5f5388e36dd5c3a1fd8f4/getsentry/sentry-java/issues/5581 |
| og:image:alt | Audit finding C1 — theoretical, LOW-MEDIUM. AndroidProfiler computes timestampDiff (the elapsedRealtime↔wall offset) once at profile end and applies it to every wall-stamped PerformanceCollectionDa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | runningcode |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ed3f2e01f6b7672780c586c8af0e72726374d7b6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width