-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Browser Web Vitals Event #1940
base: main
Are you sure you want to change the base?
Changes from 5 commits
7f56583
8e8f6fc
0457a2e
5d7aab9
6e0dab9
457c66d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!--- Hugo front matter used to generate the website version of this page: | ||
linkTitle: Events | ||
---> | ||
|
||
# Semantic conventions for browser events | ||
|
||
**Status**: [Development][DocumentStatus] | ||
|
||
This document defines semantic conventions for browser (web) instrumentations | ||
that emit events. | ||
|
||
## WebVital Event | ||
|
||
<!-- semconv event.browser.web_vital --> | ||
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. --> | ||
<!-- see templates/registry/markdown/snippet.md.j2 --> | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-capture --> | ||
<!-- markdownlint-disable --> | ||
|
||
**Status:**  | ||
|
||
The event name MUST be `browser.web_vital`. | ||
|
||
This event describes the website performance metrics introduced by Google, See [web vitals](https://web.dev/vitals). | ||
|
||
**Body fields:** | ||
|
||
| Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | ||
|---|---|---|---|---|---| | ||
| `delta` | double | The delta between the current value and the last-reported value. | `0.2` | `Required` |  | | ||
| `id` | string | A unique ID representing this particular metric instance. | `v3-1677874579383-6381583661209` | `Required` |  | | ||
| `name` | enum | Name of the web vital. | `cls` | `Required` |  | | ||
| `value` | double | Value of the web vital. | `1.0` | `Required` |  | | ||
|
||
`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. | ||
|
||
| Value | Description | Stability | | ||
|---|---|---| | ||
| `cls` | Cumulative Layout Shift. |  | | ||
| `fid` | First Input Delay. |  | | ||
| `inp` | Interation to Next Paint. |  | | ||
| `lcp` | Largest Contentful Paint. |  | | ||
Comment on lines
+40
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these values (e.g. |
||
|
||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> | ||
<!-- END AUTOGENERATED TEXT --> | ||
<!-- endsemconv --> | ||
|
||
[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
groups: | ||
- id: event.browser.web_vital | ||
stability: development | ||
type: event | ||
name: browser.web_vital | ||
brief: > | ||
This event describes the website performance metrics introduced by Google, See [web vitals](https://web.dev/vitals). | ||
body: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to see a comment here to clarify that this is temporary or that this will actually be an attribute. That way readers do not expect to find content in the actual body. |
||
id: browser.web_vital | ||
requirement_level: required | ||
stability: development | ||
type: map | ||
fields: | ||
- id: name | ||
type: enum | ||
members: | ||
- id: cls | ||
value: 'cls' | ||
brief: Cumulative Layout Shift. | ||
stability: development | ||
- id: lcp | ||
value: 'lcp' | ||
brief: Largest Contentful Paint. | ||
stability: development | ||
- id: fid | ||
value: 'fid' | ||
brief: First Input Delay. | ||
stability: development | ||
- id: inp | ||
value: 'inp' | ||
brief: Interation to Next Paint. | ||
stability: development | ||
stability: development | ||
brief: Name of the web vital. | ||
requirement_level: required | ||
examples: ["cls"] | ||
- id: value | ||
type: double | ||
stability: development | ||
brief: Value of the web vital. | ||
requirement_level: required | ||
examples: [1.0] | ||
- id: delta | ||
type: double | ||
stability: development | ||
brief: The delta between the current value and the last-reported value. | ||
requirement_level: required | ||
examples: [0.2] | ||
- id: id | ||
type: string | ||
stability: development | ||
brief: A unique ID representing this particular metric instance. | ||
requirement_level: required | ||
examples: ["v3-1677874579383-6381583661209"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you consider
cls.delta
,cls.id
,cls.value
etc?