dd-sdk-android
dd-sdk-android copied to clipboard
RUM-10907: Support `process_uptime` attribute for telemetry debug/error events
What does this PR do?
- Adds new method to the
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. - Fixes some assert messages that was copy-pasted and contained wrong values.
- Reduces code duplications for
TimeInfoinstance 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)
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.
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 |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.