Skip to content

feat(js): Document element timing option in browser tracing#16337

Open
Lms24 wants to merge 2 commits intomasterfrom
lms/feat-document-element-timing
Open

feat(js): Document element timing option in browser tracing#16337
Lms24 wants to merge 2 commits intomasterfrom
lms/feat-document-element-timing

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Feb 10, 2026

This PR adds documentation for the enableElementTiming option in the browser tracing integration

This PR adds:

  • Documentation in the "What's Captured Automatically" table
  • A new configuration option section for enableElementTiming with examples and usage instructions
  • Information about how element timing spans appear in traces

Closes #16334

Add documentation for the enableElementTiming option that captures
performance data for elements marked with the elementtiming attribute.

Closes #16334

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Feb 10, 2026 4:32pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Feb 10, 2026 4:32pm

Request Review

Copy link
Member

@nikolovlazar nikolovlazar left a comment

Choose a reason for hiding this comment

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

Thanks @Lms24!

| **HTTP requests** | All fetch/XHR calls | Duration, status, URL |
| **User interactions** | Clicks, inputs that trigger work | INP (responsiveness) |
| **Long tasks** | Main thread blocking > 50ms | Duration, attribution |
| **Element timing** | Elements marked with `elementtiming` attribute | Render/load times for critical UI elements |
Copy link
Member

Choose a reason for hiding this comment

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

l: probably should mention that only specific elements are reported here.

Comment on lines +194 to +196
Enable/disable automatic spans for [Element Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming) entries. When enabled, Sentry captures performance data for elements marked with the `elementtiming` attribute.

This is useful for tracking when critical UI elements (like hero images or important text) are rendered on the page:
Copy link
Member

Choose a reason for hiding this comment

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

Same thing here, maybe "supported elements" or something like that to signal that it doesn't work for all elements as readers can be optimistic and try slapping the attribute on a bunch of elements.

Copy link
Member

@logaretm logaretm left a comment

Choose a reason for hiding this comment

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

Minor comments on clarifying that not all elements can be reported.

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

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.

Document element timing option in browser tracing docs

4 participants