-
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 Resource Timing Event #1943
base: main
Are you sure you want to change the base?
Changes from all commits
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,49 @@ | ||
<!--- 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. | ||
|
||
## Resource Timing Event | ||
|
||
<!-- semconv event.browser.resource_timing --> | ||
<!-- 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.resource_timing`. | ||
|
||
This event describes the timing metrics as provided by PerformanceResourceTiming Performance API. These metrics are related to fetching a resource, such as XMLHttpRequest, Fetch, sendBeacon APIs, SVG, image or script. | ||
|
||
This event captures data from the [ResourceTiming](https://www.w3.org/TR/resource-timing/). It is recommended to be captured by using the PerformanceResourceTiming API. If the page starts unloading before the page loads, then the partial data can be captured by calling the [performance.getEntriesByType](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType) method. | ||
|
||
**Body fields:** | ||
|
||
| Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | ||
|---|---|---|---|---|---| | ||
| `connectEnd` | double | The time immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as SSL handshake and SOCKS authentication. completes, and it is measured in milliseconds. | `476.6000000014906` | `Recommended` |  | | ||
| `connectStart` | double | The time immediately immediately before the user agent starts establishing the connection to the server to retrieve the resource, and it is measured in milliseconds. | `476.6000000014901` | `Recommended` |  | | ||
| `domainLookupEnd` | double | The time immediately after the browser finishes the domain name lookup for the resource, and it is measured in milliseconds. | `100.6000000014906` | `Recommended` |  | | ||
| `domainLookupStart` | double | The time immediately before the browser starts the domain name lookup for the resource, and it is measured in milliseconds. | `100.6000000014901` | `Recommended` |  | | ||
| `fetchStart` | double | The time immediately before the browser starts to fetch the resource, and it is measured in milliseconds. | `9.600000000558794` | `Recommended` |  | | ||
| `name` | string | The resolved URL of the requested resource. | `https://en.wikipedia.org/wiki/Main_Page` | `Recommended` |  | | ||
| `requestStart` | double | The time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request, and it is measured in milliseconds. | `506.70000000298023` | `Recommended` |  | | ||
| `responseEnd` | double | The time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first, and it is measured in milliseconds. | `510.6000000014906` | `Recommended` |  | | ||
| `responseStart` | double | The time immediately after the browser receives the first byte of the response from the server, cache, or local resource, and it is measured in milliseconds. | `508.6000000014901` | `Recommended` |  | | ||
| `secureConnectionStart` | double | The time immediately before immediately before the browser starts the handshake process to secure the current connection, and it is measured in milliseconds. | `476.6000000014903` | `Recommended` |  | | ||
|
||
<!-- 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,104 @@ | ||
groups: | ||
- id: event.browser.resource_timing | ||
stability: development | ||
type: event | ||
name: browser.resource_timing | ||
brief: > | ||
This event describes the timing metrics as provided by PerformanceResourceTiming Performance API. | ||
These metrics are related to fetching a resource, such as | ||
XMLHttpRequest, Fetch, sendBeacon APIs, SVG, image or script. | ||
note: > | ||
This event captures data from the [ResourceTiming](https://www.w3.org/TR/resource-timing/). | ||
It is recommended to be captured by using the PerformanceResourceTiming API. | ||
If the page starts unloading before the page loads, | ||
then the partial data can be captured by calling the [performance.getEntriesByType](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType) method. | ||
|
||
body: | ||
id: browser.resource_timing | ||
requirement_level: required | ||
stability: development | ||
type: map | ||
fields: | ||
- id: name | ||
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 don't think 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. Yeah, now that Lets change this to |
||
type: string | ||
stability: development | ||
brief: The resolved URL of the requested resource. | ||
requirement_level: recommended | ||
examples: ["https://en.wikipedia.org/wiki/Main_Page"] | ||
- id: fetchStart | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately before the browser starts to fetch the resource, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [9.600000000558794] | ||
- id: domainLookupStart | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately before the browser starts the domain name lookup for the resource, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [100.6000000014901] | ||
- id: domainLookupEnd | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately after the browser finishes the domain name lookup for the resource, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [100.6000000014906] | ||
- id: connectStart | ||
type: double | ||
stability: development | ||
brief: > | ||
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. need to reformat/shorten the brief to make the generated table look nicer |
||
The time immediately immediately before the user agent starts establishing the connection to the server to retrieve the resource, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [476.6000000014901] | ||
- id: secureConnectionStart | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately before immediately before the browser starts the handshake process to secure the current connection, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [476.6000000014903] | ||
- id: connectEnd | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately after the browser finishes establishing the connection to the server to retrieve the resource. | ||
The timestamp value includes the time interval to establish the transport connection, | ||
as well as other time intervals such as SSL handshake and SOCKS authentication. | ||
completes, and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [476.6000000014906] | ||
- id: requestStart | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately before the browser starts requesting the resource from the server, cache, or local resource. | ||
If the transport connection fails and the browser retires the request, | ||
the value returned will be the start of the retry request, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [506.70000000298023] | ||
- id: responseStart | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately after the browser receives the first byte of the response from the server, cache, or local resource, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [508.6000000014901] | ||
- id: responseEnd | ||
type: double | ||
stability: development | ||
brief: > | ||
The time immediately after the browser receives the last byte of the resource | ||
or immediately before the transport connection is closed, whichever comes first, | ||
and it is measured in milliseconds. | ||
requirement_level: recommended | ||
examples: [510.6000000014906] |
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.
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.