Skip to content

⚗️feat: collect INP sub-parts RUM-14310#4158

Open
HugoGarrido wants to merge 14 commits intomainfrom
hugo.garridoysaez/feat/support-inp-subparts
Open

⚗️feat: collect INP sub-parts RUM-14310#4158
HugoGarrido wants to merge 14 commits intomainfrom
hugo.garridoysaez/feat/support-inp-subparts

Conversation

@HugoGarrido
Copy link
Collaborator

@HugoGarrido HugoGarrido commented Feb 10, 2026

Motivation

Similar to LCP subparts, this PR goal is to collect INP subparts.

This feature is gated behind the inp_subparts experimental feature flag and is based on Chrome's implementation.

Subpart Meaning
Input Delay Time from user input to processing start
Processing Time Event handler execution time
Presentation Delay Rendering time happening after processing

You can review commit by commit

TODO rum-events-format PR

Changes

  • Add the flag 42c483f
  • Update relevant types 6fc488f
  • Add logic to group entries by interactionId to compute the parts with correct values 190734d
  • Compute and report the subparts breakdown f03e852
  • Empty the Map storing the groups in the stop() callback
  • Add tests

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@HugoGarrido HugoGarrido changed the title Hugo.garridoysaez/feat/support inp subparts ⚗️feat: collect INP sub-parts RUM-14310 Feb 10, 2026
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 10, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 168.98 KiB 170.26 KiB +1.28 KiB +0.76%
Rum Profiler 4.31 KiB 4.31 KiB 0 B 0.00%
Rum Recorder 24.54 KiB 24.54 KiB 0 B 0.00%
Logs 56.27 KiB 56.30 KiB +30 B +0.05%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 125.82 KiB 127.05 KiB +1.23 KiB +0.98%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0051 0.0043 -15.69%
RUM - add action 0.0186 0.0187 +0.54%
RUM - add error 0.016 0.0173 +8.12%
RUM - add timing 0.0033 0.003 -9.09%
RUM - start view 0.0169 0.0216 +27.81%
RUM - start/stop session replay recording 0.0009 0.0011 +22.22%
Logs - log message 0.0205 0.0191 -6.83%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 27.78 KiB 27.71 KiB -63 B
RUM - add action 52.25 KiB 50.56 KiB -1.69 KiB
RUM - add timing 26.63 KiB 26.88 KiB +248 B
RUM - add error 56.50 KiB 55.31 KiB -1.19 KiB
RUM - start/stop session replay recording 25.49 KiB 25.27 KiB -232 B
RUM - start view 452.97 KiB 457.48 KiB +4.52 KiB
Logs - log message 46.33 KiB 46.67 KiB +341 B

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 10, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@HugoGarrido HugoGarrido marked this pull request as ready for review February 10, 2026 16:50
@HugoGarrido HugoGarrido requested a review from a team as a code owner February 10, 2026 16:50
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fbf5a1ee4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HugoGarrido
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecc7e42b2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@HugoGarrido
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5189c309de

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +181 to +182
if (isExperimentalFeatureEnabled(ExperimentalFeature.INP_SUBPARTS)) {
interactionToNextPaintSubParts = computeInpSubParts(newInteraction, sanitizeInpValue(interactionToNextPaint))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update INP subparts only when selected interaction changes

interactionToNextPaintSubParts is recomputed on every newInteraction even when newInteraction.duration is unchanged, while time and targetSelector are intentionally not updated in that case. If p98 switches to a different interaction with the same duration (for example when interaction count crosses a 50-interaction bucket and tied durations exist), the payload can mix sub_parts from one interaction with timestamp/target_selector from another, which corrupts attribution data.

Useful? React with 👍 / 👎.

}

// Create new group
groupsByInteractionId.set(entry.interactionId, {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cap grouped interaction map per view

With inp_subparts enabled, every interaction ID is stored in groupsByInteractionId and never evicted until stop(), so long-lived views grow this map linearly with user interactions. That introduces unbounded per-view memory growth (despite the existing MAX_INTERACTION_ENTRIES guard for INP tracking) and can degrade pages with many interactions; groups that can no longer affect the p98 candidate should be pruned.

Useful? React with 👍 / 👎.

@HugoGarrido
Copy link
Collaborator Author

/to-staging

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Feb 12, 2026

View all feedbacks in Devflow UI.

2026-02-12 15:13:09 UTC ℹ️ Start processing command /to-staging


2026-02-12 15:13:18 UTC ℹ️ Branch Integration: starting soon, merge expected in approximately 14m (p90)

Commit 5189c309de will soon be integrated into staging-07.


2026-02-12 15:27:19 UTC ℹ️ Branch Integration: this commit was successfully integrated

Commit 5189c309de has been merged into staging-07 in merge commit 106178662f.

Check out the triggered DDCI request.

If you need to revert this integration, you can use the following command: /code revert-integration -b staging-07

gh-worker-dd-mergequeue-cf854d bot added a commit that referenced this pull request Feb 12, 2026
…aging-07

Integrated commit sha: 5189c30

Co-authored-by: HugoGarrido <9059402+HugoGarrido@users.noreply.github.com>
Co-authored-by: hugo.garridoysaez <hugo.garridoysaez@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant