René's URL Explorer Experiment


Title: Breaking clock changes for v9: span timing and ICurrentDateProvider removal · Issue #6506 · getsentry/sentry-java · GitHub

Open Graph Title: Breaking clock changes for v9: span timing and ICurrentDateProvider removal · Issue #6506 · getsentry/sentry-java

X Title: Breaking clock changes for v9: span timing and ICurrentDateProvider removal · Issue #6506 · getsentry/sentry-java

Description: The project plan holds back every breaking clock change until v9. No other open issue in this project tracks those changes. This one does. Each item below is breaking. It either changes a critical customer metric or breaks the public API...

Open Graph Description: The project plan holds back every breaking clock change until v9. No other open issue in this project tracks those changes. This one does. Each item below is breaking. It either changes a critical ...

X Description: The project plan holds back every breaking clock change until v9. No other open issue in this project tracks those changes. This one does. Each item below is breaking. It either changes a critical ...

Opengraph URL: https://github.com/getsentry/sentry-java/issues/6506

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Breaking clock changes for v9: span timing and ICurrentDateProvider removal","articleBody":"The project plan holds back every breaking clock change until v9. No other open issue in this project tracks those changes. This one does.\n\nEach item below is breaking. It either changes a critical customer metric or breaks the public API.\n\n## 1. Span timing on one `AnchoredClock` per transaction\n\nToday each span reads the wall clock for its own start (`Span` calls `options.getDateProvider().now()`). Its end is that start plus a `System.nanoTime()` difference. So the starts of two spans are two separate wall-clock readings. If the wall clock steps between them, a child span can start before its parent.\n\nThe fix is the design that #6045 shipped as API only. Create one `AnchoredClock` per transaction in `SentryTracer`, and project every span timestamp from it. Nothing calls `AnchoredClock` yet.\n\nWhy it's breaking:\n\n* **Durations start counting deep sleep on Android.** The ticker there is `CLOCK_BOOTTIME`. `System.nanoTime()` is `CLOCK_MONOTONIC`, which stops in deep sleep. Any span or transaction that crosses a deep sleep gets longer. This matches iOS, which is a project goal, but it changes span and transaction durations customers chart and alert on.\n* **Child span** `start_timestamp`**s move by less than a millisecond.** Root spans don't change.\n\nTwo more sites move with this:\n\n* `SpanFrameMetricsCollector.toNanoTime()` reads the wall-to-`nanoTime` offset again each time a span finishes (getsentry/sentry-java#5582 §C5). Draft #6098 anchors it once at SDK init. Fold that fix in here instead of landing it on main (decided 2026-11-12), because it changes the slow, frozen and delayed frame counts on app-start spans.\n* `sentry-android-sqlite`'s `DriverSpans.computeNanoStartTimestampForChild()` builds a child's start from its parent's `SentryNanotimeDate` plus `System.nanoTime()`. That is the same anchor, built by hand.\n\n## 2. Decide whether app start follows\n\n`TimeSpan` runs on `SystemClock.uptimeMillis()`, which also stops in deep sleep. It drives the app start, process init, `Application.onCreate`, content provider and activity lifecycle spans.\n\nOpen question: should app start count deep sleep too? getsentry/sentry-java#5752 argued that launches with a Doze in the middle don't reflect what users actually experience. If app start does switch, it's breaking twice:\n\n* **Metric:** a launch where the device sleeps before the first frame would include the sleep instead of leaving it out, so app-start p95/p99 go up. getsentry/sentry-java#5752 was closed without an SDK change, because these launches are filtered out in the dashboard instead.\n* **API:** `TimeSpan` is in `sentry-android-core.api`. Its methods are named for uptime (`setStartedAt(uptimeMs)`, `getStartUptimeMs()`), and `InternalSentrySdk` serializes it for the hybrid SDKs.\n\ngetsentry/sentry-java#6104's `AndroidEnvelopeCache` call site doesn't depend on this decision. It can take its own boottime reading at SDK init.\n\n## 3. Remove `ICurrentDateProvider`\n\n* `ICurrentDateProvider` and `CurrentDateProvider` are `@ApiStatus.Internal` but listed in `sentry.api`. Neither is deprecated yet.\n* The public `ReplayIntegration` constructors take an `ICurrentDateProvider`. The sentry-dart Android plugin calls the four-argument constructor with `CurrentDateProvider.getInstance()`, so removing it breaks Flutter. Coordinate the change with sentry-dart.\n* `AndroidCurrentDateProvider` is internal and not in the `.api` file (deprecated by getsentry/sentry-java#6102). Delete it once getsentry/sentry-java#6104 has moved its callers.\n* `RateLimiter(ICurrentDateProvider, SentryOptions)` is public API too (`sentry.api`). Remove it along with the interface.\n* Remove the members that getsentry/sentry-java#6586 deprecates on main.\n\n## Other v9 clock tickets\n\n* getsentry/sentry-java#6585: end a backgrounded session when its timeout ran out, not when the device wakes.\n* getsentry/sentry-java#5580: session `seq` and the `Math.abs` session duration.\n\n## Done when\n\n* Spans and transactions take their timestamps from one `AnchoredClock` per transaction.\n* The app-start decision is made, and either implemented or explicitly deferred.\n* `ICurrentDateProvider` is gone from `sentry.api`, and sentry-dart has been updated.\n* The v9 changelog lists each change.\n\n\u003cdetails>\u003csummary>Agent notes\u003c/summary>\n\nVerified on `main` at `1b8668ae2b` (2026-11-06).\n\n* Span start: `sentry/src/main/java/io/sentry/Span.java:68`, `:86`. Span end: `SentryNanotimeDate.laterDateNanosTimestampByDiff`, serialized in `protocol/SentrySpan.java:73-75` and `protocol/SentryTransaction.java:62-68`.\n* Android date provider: `SentryAndroidDateProvider` → `SentryNanotimeDate` (`System.currentTimeMillis()` + `System.nanoTime()`).\n* Ticker: `AndroidMonotonicTicker.tickNanos()` = `SystemClock.elapsedRealtimeNanos()`. Epoch: `SentryOptions.getEpochClock()`.\n* `AnchoredClock` lives in `sentry/src/main/java/io/sentry/time/AnchoredClock.java`. Nothing outside `io.sentry.time` uses it.\n* Constraint for item 1: `Choreographer` frame timestamps are on `CLOCK_MONOTONIC`. `SpanFrameMetricsCollector` has to convert between the two clocks instead of subtracting across them.\n* `TimeSpan`: `sentry-android-core/src/main/java/io/sentry/android/core/performance/TimeSpan.java`. Serialized for hybrid SDKs in `InternalSentrySdk.java:366-370`.\n* sentry-dart caller: `packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt`, around line 293.\n* `SpanFrameMetricsCollector.java:317-330` (`toNanoTime`). #6098 is the draft fix.\n* `DriverSpans.kt:112-116` (`computeNanoStartTimestampForChild`).\n* `RateLimiter` public constructor: `sentry/api/sentry.api:7832`.\n* The three items above were checked on `main` at `812682636b` (2026-11-12).\n\n\u003c/details>","author":{"url":"https://github.com/runningcode","@type":"Person","name":"runningcode"},"datePublished":"2026-11-06T14:51:26Z","url":"https://github.com/getsentry/sentry-java/issues/6506"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b4264d4d-158b-277d-bb03-518e236c1365
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCA9E:3C4279:1DA194:2A0C18:6B046869
html-safe-noncef70b57149eea4bfd51802dc96de5cbb3dbb973d035fd72eb8d59a11b9dc015eb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTlFOjNDNDI3OToxREExOTQ6MkEwQzE4OjZCMDQ2ODY5IiwidmlzaXRvcl9pZCI6IjY4Mjg2NzQzOTI4MDg3NTYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7d7ea6db6187acdabbd8e78a29400d47c9b1df552058fa5a4a0a9924156734ab
hovercard-subject-tagissue:6244860051
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/6506/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a4477062e305b39545480f070b935ca95c439c00d2ff5fac7f06daba84e4d696/getsentry/sentry-java/issues/6506
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a4477062e305b39545480f070b935ca95c439c00d2ff5fac7f06daba84e4d696/getsentry/sentry-java/issues/6506
og:image:altThe project plan holds back every breaking clock change until v9. No other open issue in this project tracks those changes. This one does. Each item below is breaking. It either changes a critical ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerunningcode
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3368190
octolytics-dimension-repository_nwogetsentry/sentry-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3368190
octolytics-dimension-repository_network_root_nwogetsentry/sentry-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-java/issues/6506#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fissues%2F6506
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-java%2Fissues%2F6506
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-java
Reloadhttps://github.com/getsentry/sentry-java/issues/6506
Reloadhttps://github.com/getsentry/sentry-java/issues/6506
Reloadhttps://github.com/getsentry/sentry-java/issues/6506
getsentryhttps://github.com/getsentry
sentry-javahttps://github.com/getsentry/sentry-java
Codehttps://github.com/getsentry/sentry-java
Issues266 (266)https://github.com/getsentry/sentry-java/issues
Pull requests57 (57)https://github.com/getsentry/sentry-java/pulls
Discussionshttps://github.com/getsentry/sentry-java/discussions
Actionshttps://github.com/getsentry/sentry-java/actions
Projectshttps://github.com/getsentry/sentry-java/projects
Security and quality2 (2)https://github.com/getsentry/sentry-java/security
Insightshttps://github.com/getsentry/sentry-java/insights
https://github.com/getsentry/sentry-java
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6506
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6506
Breaking clock changes for v9: span timing and ICurrentDateProvider removalhttps://github.com/getsentry/sentry-java/issues/6506#top
https://github.com/runningcode
Next Majorhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Next%20Major%22
Platform: Androidhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Android%22
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
breaking changehttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22breaking%20change%22
https://github.com/runningcode
runningcodehttps://github.com/runningcode
on Nov 6, 2026https://github.com/getsentry/sentry-java/issues/6506#issue-6244860051
#6045https://github.com/getsentry/sentry-java/pull/6045
Remaining low-priority clock issues and clock-step regression coverage #5582https://github.com/getsentry/sentry-java/issues/5582
fix(android): Anchor the frame-metrics time projection (JAVA-579) #6098https://github.com/getsentry/sentry-java/pull/6098
#5752https://github.com/getsentry/sentry-java/issues/5752
Incorrect app start transaction duration when app goes in sleep #5752https://github.com/getsentry/sentry-java/issues/5752
#6104https://github.com/getsentry/sentry-java/issues/6104
Deprecate AndroidCurrentDateProvider in favor of MonotonicTicker #6102https://github.com/getsentry/sentry-java/issues/6102
Clean up the remaining AndroidCurrentDateProvider usages #6104https://github.com/getsentry/sentry-java/issues/6104
Deprecate the legacy clock and date-provider APIs #6586https://github.com/getsentry/sentry-java/issues/6586
End a backgrounded session when its timeout ran out, not when the device wakes #6585https://github.com/getsentry/sentry-java/issues/6585
Session seq is raw epoch millis; duration is masked with Math.abs #5580https://github.com/getsentry/sentry-java/issues/5580
fix(android): Anchor the frame-metrics time projection (JAVA-579) #6098https://github.com/getsentry/sentry-java/pull/6098
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Nov 6, 2026https://github.com/getsentry/sentry-java/issues/6506#issuecomment-6687689104
Linear Codehttps://linear.app
JAVA-827https://linear.app/getsentry/issue/JAVA-827
runningcodehttps://github.com/runningcode
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
Next Majorhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Next%20Major%22
breaking changehttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22breaking%20change%22
Platform: Androidhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Android%22
on Nov 6, 2026https://github.com/getsentry/sentry-java/issues/6506#event-35358811618
runningcodehttps://github.com/runningcode
on Nov 12, 2026https://github.com/getsentry/sentry-java/issues/6506#event-35889708487
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-java/issues/6506
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-java/issues/6506
runningcodehttps://github.com/runningcode
Next Majorhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Next%20Major%22
Platform: Androidhttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Android%22
Platform: Javahttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Java%22
breaking changehttps://github.com/getsentry/sentry-java/issues?q=state%3Aopen%20label%3A%22breaking%20change%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.