sentry-javascript
sentry-javascript copied to clipboard
Support Element Timing API in Browser SDK
Description
We want to add support for https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming in the Browser SDK.
Some initial thoughts:
- The API is really cool and allows greater user input than e.g. LCP and we could probably add it to BrowserTracing
- The element loading time seems to be measured from performance.timeOrigin onwards
- No guarantees that the tagged element is loaded within the pageload span. So it probably makes sense to send this span standalone
- Really just an idea but could we inject the
elementtimingattribute into user-html via bundler plugins?
Quick experiment:
A PR closing this issue has just been released 🚀
This issue was referenced by PR #16589, which was included in the 9.35.0 release.