Skip to content

RUM-18337: Fix slow frame continuity measurement and resend duration corrections in partial view updates - #3980

Draft
hamorillo wants to merge 2 commits into
developfrom
hector.morilloprieto/RUM-18337
Draft

hamorillo wants to merge 2 commits into
developfrom
hector.morilloprieto/RUM-18337

Conversation

@hamorillo

Copy link
Copy Markdown
Collaborator

What does this PR do?

Two related fixes to RUM slow-frame tracking:

  1. DefaultSlowFramesListener now measures the gap between consecutive slow frames from the end of the previous record (start + duration) instead of its start, so genuinely back-to-back slow frames are correctly merged into a single record instead of incorrectly starting a new one.
  2. diffViewEvent's diffSlowFrames now resends the last known slow-frame record in a view update whenever its duration has changed, not just when a newer record with a later start appears — fixing a case where a growing record's duration correction was silently dropped from the diff after its first transmission.

Motivation

The two bugs compound each other: the first makes slow frames merge far more often once fixed, which increases exposure to the second.

Additional Notes

  • No API surface changes.
  • Also fixes a pre-existing test issue in DefaultSlowFramesListenerTest ("separate janks") where the listener was built with a hardcoded continuousSlowFrameThresholdNs = 16 instead of the test's own forged parameter.
  • New regression tests added for both fixes; existing tests for the touched code paths pass unchanged.

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)

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 71.79% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2b391e8 | Docs | View more details | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant