RUM-10907: Support process_uptime attribute for telemetry debug/error events#3013
Merged
Conversation
0xnm
reviewed
Nov 18, 2025
Comment on lines
+17
to
+18
| * @property deviceTimeSinceProcessStartMs the time spend since application's process start (for Android SDK >= 24) or | ||
| * between the class being loaded for Android < N as a fallback. |
Member
There was a problem hiding this comment.
I'm curious if it is fine to have a different behavior for the same property. Maybe it is worth to make this property nullable and return null for API 23? And then it will be up to the caller what to do.
Otherwise we may see inconsistent data if the result of this property is used in some data we send.
WDYT?
Contributor
Author
There was a problem hiding this comment.
Well I was trying to find a balance between support complexity and value it provides:
getStartElapsedRealtimeis supported from the version 24 of Android SDK, currentminSdkis 23. So the amount of such devices is relatively small.- This attribute represents the amount of time spend from some moment in the past and represents relativity, not the actual time, from that perspective seems like there no so big difference from which point it would be calculated as the point remains the same for each device.
- After @aleksandr-gringauz's suggestion, I changed logic to use
AppStartTimeProviderso the value will be more even precise
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3013 +/- ##
===========================================
- Coverage 71.32% 71.13% -0.19%
===========================================
Files 859 861 +2
Lines 31315 31308 -7
Branches 5276 5276
===========================================
- Hits 22334 22268 -66
- Misses 7511 7534 +23
- Partials 1470 1506 +36
🚀 New features to boost your workflow:
|
satween
force-pushed
the
tvaleev/feature/RUM-10907
branch
3 times, most recently
from
November 18, 2025 18:16
251e297 to
97946d9
Compare
satween
force-pushed
the
tvaleev/feature/RUM-10907
branch
from
November 19, 2025 15:45
97946d9 to
2633d21
Compare
aleksandr-gringauz
approved these changes
Nov 19, 2025
0xnm
approved these changes
Nov 20, 2025
| * The offsets are always 0. | ||
| */ | ||
| class DefaultTimeProvider : TimeProvider { | ||
| override fun getDeviceTimestamp(): Long = System.currentTimeMillis() |
jonathanmos
approved these changes
Nov 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
TimeProviderallowing to get the amount of time (in milliseconds) since process start. The api for that was added only for Android SDK 24, so for previous versions class load time gonna be used.TimeInfoinstance creation.Review checklist (to be filled by reviewers)