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

RUM-12891: Fix RUM resource duration breakdown

Open ambushwork opened this issue 2 months ago • 2 comments

What does this PR do?

This PRs fixes the resource duration breakdown feature which is broken since the version 2.12.0, more precisely from this commit.

The main cause of issue:

We have DatadogInteceptor generating the RUM event startResource with the ResourceId(requestUrl, randomUUID) as the key of the resource when intercepting a request, also we have DatadogEventListener to add waitForResourceTiming event and addResourceTiming to report the resource timing for this duration breakdown.

The issue is that, both DatadogInteceptor and DatadogEventListener are generating their own UUID for the same request, so in our event processing they won’t be able to match.

The fix is to remove the generation of UUID in DatadogEventListener since its key is only used for enhancing the current resource.

Motivation

RUM-12891

Demo

Before image
After image

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)

ambushwork avatar Nov 18 '25 09:11 ambushwork

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 76.52% (+5.27%)
View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2e3e915 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 71.12%. Comparing base (bc35e34) to head (2e3e915). :warning: Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3010      +/-   ##
===========================================
+ Coverage    71.08%   71.12%   +0.03%     
===========================================
  Files          859      859              
  Lines        31315    31316       +1     
  Branches      5276     5276              
===========================================
+ Hits         22260    22271      +11     
+ Misses        7552     7547       -5     
+ Partials      1503     1498       -5     
Files with missing lines Coverage Δ
...com/datadog/android/okhttp/DatadogEventListener.kt 96.05% <100.00%> (-0.10%) :arrow_down:

... and 38 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 10:11 codecov-commenter