dd-sdk-android icon indicating copy to clipboard operation
dd-sdk-android copied to clipboard

RUM-10907: Support `process_uptime` attribute for telemetry debug/error events

Open satween opened this issue 1 week ago • 1 comments

What does this PR do?

  • Adds new method to the TimeProvider allowing 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.
  • Fixes some assert messages that was copy-pasted and contained wrong values.
  • Reduces code duplications for TimeInfo instance creation.

Review checklist (to be filled by reviewers)

  • [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • [ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • [ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

satween avatar Nov 18 '25 14:11 satween

Codecov Report

:x: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 71.13%. Comparing base (2a08737) to head (2633d21). :warning: Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
...n/com/datadog/android/core/internal/CoreFeature.kt 0.00% 1 Missing :warning:
...tadog/android/core/internal/NoOpContextProvider.kt 0.00% 1 Missing :warning:
...tadog/android/core/internal/NoOpInternalSdkCore.kt 66.67% 1 Missing :warning:
.../com/datadog/android/internal/time/TimeProvider.kt 0.00% 1 Missing :warning:
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     
Files with missing lines Coverage Δ
...kotlin/com/datadog/android/api/context/TimeInfo.kt 100.00% <100.00%> (ø)
...kotlin/com/datadog/android/core/InternalSdkCore.kt 0.00% <ø> (ø)
...og/android/core/internal/DatadogContextProvider.kt 97.73% <100.00%> (-0.39%) :arrow_down:
...n/com/datadog/android/core/internal/DatadogCore.kt 77.59% <100.00%> (-0.60%) :arrow_down:
.../core/internal/time/DefaultAppStartTimeProvider.kt 100.00% <100.00%> (ø)
...g/android/core/internal/time/KronosTimeProvider.kt 100.00% <ø> (ø)
...adog/android/core/internal/time/TimeProviderExt.kt 100.00% <100.00%> (ø)
...tadog/android/internal/time/DefaultTimeProvider.kt 0.00% <ø> (ø)
...ndroid/telemetry/internal/TelemetryEventHandler.kt 83.85% <100.00%> (-2.23%) :arrow_down:
...n/com/datadog/android/core/internal/CoreFeature.kt 84.73% <0.00%> (-0.24%) :arrow_down:
... and 3 more

... and 30 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Nov 18 '25 17:11 codecov-commenter