Skip to content

🎨 Gate view_update events behind datadogMode in developer extension#4622

Open
mormubis wants to merge 1 commit into
mainfrom
adlrb/gate-view-updates-datadog-mode
Open

🎨 Gate view_update events behind datadogMode in developer extension#4622
mormubis wants to merge 1 commit into
mainfrom
adlrb/gate-view-updates-datadog-mode

Conversation

@mormubis
Copy link
Copy Markdown
Contributor

@mormubis mormubis commented May 14, 2026

Motivation

Follow-up from #4319. view_update events are an implementation detail of partial view updates. Customers don't need to see them when debugging.

The full view event is still sent to the extension on every intermediate update via RUM_EVENT_COLLECTED, so views stay up to date in the list.

Changes

The "Show only the latest View event" checkbox now controls view_update visibility:

  • Checked (default): only the latest view is shown, no view_update events, no intermediate views
  • Unchecked: all events shown, but if a view_update exists for a specific view.id + document_version, the corresponding full view is skipped to avoid redundancy

The checkbox itself is hidden behind datadogMode. Customers always get the default behavior.

Known limitation: the facet sidebar counts view_update events even when they are filtered from the list. This is a pre-existing limitation of how facet counts are computed from all collected events, not from the filtered set.

Test instructions

  1. Enable partial_view_updates experimental feature and open the developer extension
  2. With datadogMode off: view_update events don't appear, view events update normally
  3. Enable datadogMode, checkbox checked: same as above
  4. Enable datadogMode, uncheck "Show only the latest View event": view_update diffs appear, corresponding full views are hidden

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

@mormubis mormubis requested a review from a team as a code owner May 14, 2026 10:10
Copy link
Copy Markdown

@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: 4c1c113bb0

ℹ️ 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 +53 to +55
const visibleEvents = datadogMode
? filteredEvents
: filteredEvents.filter((event) => !('type' in event && event.type === 'view_update'))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter hidden view updates out of facets

When datadogMode is off and partial view updates are enabled, this only removes view_update items from the returned events array; the unchanged facetRegistry still contains those events and is passed to EventsTabSide, which renders counts from facetRegistry.getFacetValueCounts(...). As a result, customers still see a view_update facet/count, and selecting it produces an empty list because the events are hidden afterward. The registry or events used for facets should be built from the same visibility set.

Useful? React with 👍 / 👎.

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 14, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 169.51 KiB 169.51 KiB 0 B 0.00%
Rum Profiler 5.97 KiB 5.97 KiB 0 B 0.00%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.70 KiB 0 B 0.00%
Rum Slim 127.85 KiB 127.85 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0031 0.0022 -29.03%
RUM - add action 0.0176 0.0107 -39.20%
RUM - add error 0.0173 0.0133 -23.12%
RUM - add timing 0.0009 0.0006 -33.33%
RUM - start view 0.0177 0.0097 -45.20%
RUM - start/stop session replay recording 0.0013 0.0007 -46.15%
Logs - log message 0.0266 0.0148 -44.36%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 38.33 KiB 38.31 KiB -16 B
RUM - add action 69.79 KiB 69.01 KiB -799 B
RUM - add timing 37.35 KiB 37.21 KiB -141 B
RUM - add error 70.04 KiB 69.20 KiB -866 B
RUM - start/stop session replay recording 41.12 KiB 45.85 KiB +4.73 KiB
RUM - start view 485.13 KiB 482.71 KiB -2.42 KiB
Logs - log message 54.80 KiB 54.23 KiB -579 B

🔗 RealWorld

@datadog-prod-us1-3
Copy link
Copy Markdown

datadog-prod-us1-3 Bot commented May 14, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 76.85% (-0.11%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 266234a | Docs | Datadog PR Page | Give us feedback!

@mormubis mormubis force-pushed the adlrb/gate-view-updates-datadog-mode branch from 4c1c113 to eadac27 Compare May 14, 2026 10:47
Copy link
Copy Markdown
Collaborator

@thomas-lebeau thomas-lebeau left a comment

Choose a reason for hiding this comment

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

shouldn't this use "show only the last view Event"?

  • if it's checked, the view update are merged into the view event.
  • if it's no checked, then we show each view and view update events.

Then if we want we can hide this checkbox when in non-datadog mode.

we need to make sure to keep the compatibility with both mechanism (old view update and the new one)

Image

@mormubis mormubis force-pushed the adlrb/gate-view-updates-datadog-mode branch 3 times, most recently from 3663d16 to d37adda Compare May 14, 2026 11:54
@mormubis mormubis force-pushed the adlrb/gate-view-updates-datadog-mode branch from d37adda to 266234a Compare May 14, 2026 12:04
@mormubis
Copy link
Copy Markdown
Contributor Author

shouldn't this use "show only the last view Event"?

  • if it's checked, the view update are merged into the view event.
  • if it's no checked, then we show each view and view update events.

Then if we want we can hide this checkbox when in non-datadog mode.

we need to make sure to keep the compatibility with both mechanism (old view update and the new one)

Image

@thomas-lebeau Updated! The "Show only the latest View event" checkbox now controls view_update visibility. When checked (default), only the latest view is shown, no view_updates. When unchecked, both show, but if a view_update exists for a specific document_version, the corresponding full view is skipped to avoid redundancy. The checkbox itself is hidden behind datadogMode. What do you think?

@mormubis mormubis requested a review from thomas-lebeau May 14, 2026 12:16
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.

2 participants