Reproduce RUMS-5184: Missing request duration breakdown (ResourceId UUID mismatch)#3362
Closed
Reproduce RUMS-5184: Missing request duration breakdown (ResourceId UUID mismatch)#3362
Conversation
…tadogEventListener.Factory.create()
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.
Reproduction for RUMS-5184
Jira: RUMS-5184
Issue Summary
Request duration breakdown (DNS, connect, SSL, TTFB, download) is missing from Android RUM Resource events. The bug was introduced when
DatadogEventListener.Factory.create()was changed to callbuildResourceId(generateUuid = true), generating a UUID that never matches the one registered byDatadogInterceptor.Root Cause
DatadogEventListener.Factory.create()callsbuildResourceId(generateUuid = true), producingResourceId(key, UUID_B).DatadogInterceptor.intercept()independently callsbuildResourceId(generateUuid = true), producingResourceId(key, UUID_A). SinceResourceId.equals()requires both UUIDs to match when both are non-null, andUUID_A ≠ UUID_B(independently generated), everywaitForResourceTimingandaddResourceTimingcall from the EventListener fails to find the matchingRumResourceScope. Thetimingfield remains null and the resource event is serialized without any breakdown fields.Reproduction Tests
DatadogEventListenerFactoryTest,ResourceIdTest)What the Tests Prove
DatadogEventListenerFactoryTest:Factory.create()returns aDatadogEventListenerwhosekey.uuidis non-null (a random UUID). The test asserts it should be null, and FAILS — proving the mismatch.ResourceIdTest: Documents the equality contract — twoResourceIdinstances with the same key but independently generated UUIDs are never equal, which is the mechanism that makes the mismatch fatal.Key Failure Output
Call Chain
Generated by rum:tee-triage-insights