Skip to content

Conversation

@logaretm
Copy link
Collaborator

@logaretm logaretm commented Oct 29, 2025

Fixes interaction elements showing up as <unknown> in case they get removed from the DOM.

The implementation adds global listeners to listen for interaction events and store the most recent 50 events in an LRU-like cache then matches that with the performance entry timestamp.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2025

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 24.64 kB - -
@sentry/browser - with treeshaking flags 23.13 kB - -
@sentry/browser (incl. Tracing) 41.26 kB +0.69% +281 B 🔺
@sentry/browser (incl. Tracing, Profiling) 45.54 kB +0.62% +278 B 🔺
@sentry/browser (incl. Tracing, Replay) 79.51 kB +0.24% +186 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.2 kB +0.26% +176 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 84.21 kB +0.22% +179 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 96.38 kB +0.19% +179 B 🔺
@sentry/browser (incl. Feedback) 41.31 kB - -
@sentry/browser (incl. sendFeedback) 29.31 kB - -
@sentry/browser (incl. FeedbackAsync) 34.24 kB - -
@sentry/react 26.32 kB - -
@sentry/react (incl. Tracing) 43.24 kB +0.63% +270 B 🔺
@sentry/vue 29.13 kB - -
@sentry/vue (incl. Tracing) 43.05 kB +0.61% +261 B 🔺
@sentry/svelte 24.65 kB - -
CDN Bundle 26.9 kB - -
CDN Bundle (incl. Tracing) 41.8 kB +0.41% +169 B 🔺
CDN Bundle (incl. Tracing, Replay) 78.07 kB +0.22% +169 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 83.56 kB +0.22% +178 B 🔺
CDN Bundle - uncompressed 78.89 kB - -
CDN Bundle (incl. Tracing) - uncompressed 124.01 kB +0.43% +530 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 239.2 kB +0.22% +508 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 251.96 kB +0.21% +508 B 🔺
@sentry/nextjs (client) 45.36 kB +0.55% +245 B 🔺
@sentry/sveltekit (client) 41.67 kB +0.65% +269 B 🔺
@sentry/node-core 50.81 kB - -
@sentry/node 157.88 kB - -
@sentry/node - without tracing 92.69 kB - -
@sentry/aws-serverless 106.42 kB - -

View base workflow run

}

const elementName = htmlTreeAsString(target);
const timestamp = Math.round(event.timeStamp);
Copy link
Member

Choose a reason for hiding this comment

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

just a question: why is it rounded here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The event.timeStamp is a DOMHighResTimeStamp, so to increase the chances of a hit on the map I'm rounding it because the decimals might throw it off.

@logaretm logaretm marked this pull request as ready for review October 29, 2025 15:59
cursor[bot]

This comment was marked as outdated.

@logaretm logaretm force-pushed the awad/inp-element-name-after-unmount branch from 5682e8d to 3e68970 Compare October 29, 2025 16:06
@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,000 - 8,737 +3%
GET With Sentry 1,377 15% 1,353 +2%
GET With Sentry (error only) 6,106 68% 6,020 +1%
POST Baseline 1,210 - 1,196 +1%
POST With Sentry 508 42% 505 +1%
POST With Sentry (error only) 1,061 88% 1,049 +1%
MYSQL Baseline 3,280 - 3,278 +0%
MYSQL With Sentry 448 14% 489 -8%
MYSQL With Sentry (error only) 2,670 81% 2,685 -1%

View base workflow run

@logaretm logaretm force-pushed the awad/inp-element-name-after-unmount branch 2 times, most recently from 7d1349a to 6d8754a Compare October 31, 2025 12:27
@logaretm logaretm force-pushed the awad/inp-element-name-after-unmount branch from 6d8754a to c6f3d50 Compare October 31, 2025 13:37
@logaretm logaretm merged commit 94190f8 into develop Oct 31, 2025
287 of 290 checks passed
@logaretm logaretm deleted the awad/inp-element-name-after-unmount branch October 31, 2025 14:32
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.

3 participants