✨ Add view_update support to developer extension#4319
Conversation
- eventRow.tsx: add view_update to event type color map - eventRow.tsx: add ViewUpdateDescription component showing document version, view name, and count of changed fields - eventRow.tsx: fix URL construction crash for relative URLs in getViewName - eventCollection.ts: handle nullable date in compareEvents (view_update has optional date per ViewProperties schema)
view_update support to developer extension
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41bbd47c2f
ℹ️ 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".
| // Sort events chronologically | ||
| if (a.date !== b.date) { | ||
| return b.date - a.date | ||
| return (b.date ?? 0) - (a.date ?? 0) |
There was a problem hiding this comment.
Keep undated events out of epoch-based sort
Coercing missing timestamps to 0 makes any event without date sort as if it happened at Unix epoch, so view_update entries with omitted dates are pushed to the bottom and can be dropped by the slice(0, MAXIMUM_LOGGED_EVENTS) retention logic under normal traffic. This regresses the new view_update workflow because recent updates become hard to see or disappear entirely when date is absent.
Useful? React with 👍 / 👎.
developer-extension/src/panel/components/tabs/eventsTab/eventRow.tsx
Outdated
Show resolved
Hide resolved
…tion, comment and naming cleanup
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 4255372 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Motivation
With the
partial_view_updatesexperimental feature enabled, the SDK now emitsview_updateevents alongside regularviewevents. Without this change, those events would silently appear in the extension as unstyled/unlabeled — no color, no description, just a raw JSON blob. Sinceview_updateis the whole point of the feature, engineers debugging it need to see these events clearly.Changes
Added a
ViewUpdateDescriptioncomponent that shows the document version, view name, and a count of changed fields in the event. The color map now recognizesview_update(same blue asview), and event sorting handles the optionaldatefield thatview_updatecarries per the schema.Also fixed a pre-existing crash in
getViewName—new URL(relativeUrl)throws when the URL is a path like/home, which is common in SPAs. Wrapped it in a try/catch and fall back to the raw string.Test instructions
datadogRum.init({ enableExperimentalFeatures: ['partial_view_updates'] })view_updateevents appear in blue with a description likeView update v3 · /home · 2 fields changedChecklist
🤖 Generated with Claude Code