Semantic conventions for browser events

Status: Development

This document defines semantic conventions for browser (web) instrumentations that emit events.

WebVital Event

Status: Development

The event name MUST be browser.web_vital.

This event describes the website performance metrics introduced by Google, See web vitals.

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
browser.web_vital.deltaDevelopmentRequireddoubleThe delta between the current value and the last-reported value. See delta.0.2
browser.web_vital.idDevelopmentRequiredstringA unique ID representing this particular metric instance.v3-1677874579383-6381583661209
browser.web_vital.nameDevelopmentRequiredstringName of the web vital.cls
browser.web_vital.valueDevelopmentRequireddoubleValue of the web vital.1.0
browser.web_vital.navigation_typeDevelopmentRecommendedstringThe type of navigation, as reported by the Navigation Timing API, with additional values reported by the web-vitals library.navigate
browser.web_vital.ratingDevelopmentRecommendedstringThe rating of the web vital value against the “good”, “needs improvement”, and “poor” thresholds defined for the metric.good

browser.web_vital.name has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
clsCumulative Layout Shift. See cls.Development
fcpFirst Contentful Paint. See fcp.Development
inpInteraction to Next Paint. See inp.Development
lcpLargest Contentful Paint. See lcp.Development
ttfbTime to First Byte. See ttfb.Development

browser.web_vital.navigation_type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
back-forwardNavigation through the browser’s history traversal (e.g. back/forward buttons).Development
back-forward-cacheNavigation restoring a page from the back/forward cache (bfcache).Development
navigateNavigation started by clicking a link, entering a URL, form submission, or a script operation.Development
prerenderNavigation to a page that was prerendered.Development
reloadNavigation through a reload operation or a Location.reload() call.Development
restoreNavigation restoring a page that was previously discarded by the browser.Development

browser.web_vital.rating has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
goodThe metric value is within the “good” threshold.Development
needs-improvementThe metric value is within the “needs improvement” threshold.Development
poorThe metric value is within the “poor” threshold.Development