-
Notifications
You must be signed in to change notification settings - Fork 282
Add Browser Resource Timing Event #3069
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
b1c5f5e
8c50e42
ab692c4
2c6131b
1ec403b
3237950
2be2a9d
284d653
e735550
dbc3d14
46474ce
ac3f365
4e5537e
da240e4
99922ed
2ff9b02
238ede6
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,22 @@ | ||
| # Use this changelog template to create an entry for release notes. | ||
| # | ||
| # If your change doesn't affect end users you should instead start | ||
| # your pull request title with [chore] or use the "Skip Changelog" label. | ||
|
|
||
| # One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
| change_type: new_component | ||
|
|
||
| # The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) | ||
| component: browser | ||
|
|
||
| # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
| note: Add `browser.resource_timing` event. | ||
|
|
||
| # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
| # The values here must be integers. | ||
| issues: [3069] | ||
|
|
||
| # (Optional) One or more lines of additional information to render under the primary note. | ||
| # These lines will be padded with 2 spaces and then inserted directly into the document. | ||
| # Use pipe (|) for multiline entries. | ||
| subtext: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| <!--- 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:** | ||
|
|
||
| :warning: Body fields will be moved to complex attributes once the | ||
| semantic convention tooling supports complex attributes | ||
| (see [#1870](https://github.com/open-telemetry/semantic-conventions/issues/1870)). | ||
|
|
||
| | Field Name | Stability | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values | | ||
| |---|---|---|---|---|---| | ||
| | `connectEnd` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after the browser finishes establishing the connection to the server to retrieve the resource, in milliseconds. See [connectEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/connectEnd). | `476.6000000014906` | | ||
| | `connectStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before the user agent starts establishing the connection to the server to retrieve the resource, in milliseconds. See [connectStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/connectStart). | `476.6000000014901` | | ||
| | `domainLookupEnd` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after the browser finishes the domain name lookup for the resource, in milliseconds. See [domainLookupEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/domainLookupEnd). | `100.6000000014906` | | ||
| | `domainLookupStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before the browser starts the domain name lookup for the resource, in milliseconds. See [domainLookupStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/domainLookupStart). | `100.6000000014901` | | ||
| | `fetchStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before the browser starts to fetch the resource, in milliseconds. See [fetchStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/fetchStart). | `9.600000000558794` | | ||
| | `requestStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before the browser starts requesting the resource from the server, cache, or local resource, in milliseconds. See [requestStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/requestStart). | `506.70000000298023` | | ||
| | `responseEnd` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first, in milliseconds. See [responseEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseEnd). | `510.6000000014906` | | ||
| | `responseStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after the browser receives the first byte of the response from the server, cache, or local resource, in milliseconds. See [responseStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStart). | `508.6000000014901` | | ||
| | `secureConnectionStart` |  | `Recommended` | double | The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before the browser starts the handshake process to secure the current connection, in milliseconds. See [secureConnectionStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/secureConnectionStart). | `476.6000000014903` | | ||
| | `url` |  | `Required` | string | The full URL of the resource being fetched. [1] | `https://www.example.com/path`; `//localhost` | | ||
|
||
|
|
||
| **[1]:** This is the URL of the resource being measured, not the page URL. Generally the url doesn't include any query strings or any leading credentials, and it's formatted as scheme://full domain/path only, for example https://user:[email protected]/path?a=b&c=d would be sent as https://www.example.com/path by both removing any potential PII and reducing the cardinality of the name. | ||
|
|
||
| <!-- 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 |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ groups: | |
| type: event | ||
| name: browser.web_vital | ||
| brief: > | ||
| This event describes the website performance metrics introduced by Google, See [web vitals](https://web.dev/vitals). | ||
| This event describes the website performance metrics introduced by Google. See [web vitals](https://web.dev/vitals). | ||
| body: | ||
| id: browser.web_vital | ||
| requirement_level: required | ||
|
|
@@ -28,7 +28,7 @@ groups: | |
| stability: development | ||
| - id: inp | ||
| value: 'inp' | ||
| brief: Interation to Next Paint. See [inp](https://web.dev/articles/inp). | ||
| brief: Interaction to Next Paint. See [inp](https://web.dev/articles/inp). | ||
| stability: development | ||
| stability: development | ||
| brief: Name of the web vital. | ||
|
|
@@ -52,3 +52,114 @@ groups: | |
| brief: A unique ID representing this particular metric instance. | ||
| requirement_level: required | ||
| examples: ["v3-1677874579383-6381583661209"] | ||
| - 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: url | ||
hectorhdzg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: string | ||
| stability: development | ||
| brief: The full URL of the resource being fetched. | ||
| requirement_level: required | ||
| examples: ["https://www.example.com/path", "//localhost"] | ||
| note: > | ||
| This is the URL of the resource being measured, not the page URL. | ||
| Generally the url doesn't include any query strings or any leading credentials, | ||
| and it's formatted as scheme://full domain/path only, for example https://user:[email protected]/path?a=b&c=d | ||
hectorhdzg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| would be sent as https://www.example.com/path by both removing any potential PII and reducing the cardinality of the name. | ||
| - id: fetchStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before | ||
| the browser starts to fetch the resource, in milliseconds. | ||
| See [fetchStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/fetchStart). | ||
| requirement_level: recommended | ||
| examples: [9.600000000558794] | ||
| - id: domainLookupStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before | ||
| the browser starts the domain name lookup for the resource, in milliseconds. | ||
| See [domainLookupStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/domainLookupStart). | ||
| requirement_level: recommended | ||
| examples: [100.6000000014901] | ||
| - id: domainLookupEnd | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after | ||
| the browser finishes the domain name lookup for the resource, in milliseconds. | ||
| See [domainLookupEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/domainLookupEnd). | ||
| requirement_level: recommended | ||
| examples: [100.6000000014906] | ||
| - id: connectStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before | ||
| the user agent starts establishing the connection to the server to retrieve the resource, in milliseconds. | ||
| See [connectStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/connectStart). | ||
| requirement_level: recommended | ||
| examples: [476.6000000014901] | ||
| - id: secureConnectionStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before | ||
| the browser starts the handshake process to secure the current connection, in milliseconds. | ||
| See [secureConnectionStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/secureConnectionStart). | ||
| requirement_level: recommended | ||
| examples: [476.6000000014903] | ||
| - id: connectEnd | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after | ||
| the browser finishes establishing the connection to the server to retrieve the resource, in milliseconds. | ||
| See [connectEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/connectEnd). | ||
| requirement_level: recommended | ||
| examples: [476.6000000014906] | ||
| - id: requestStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately before | ||
| the browser starts requesting the resource from the server, cache, or local resource, in milliseconds. | ||
| See [requestStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/requestStart). | ||
| requirement_level: recommended | ||
| examples: [506.70000000298023] | ||
| - id: responseStart | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after | ||
| the browser receives the first byte of the response from the server, cache, or local resource, in milliseconds. | ||
| See [responseStart](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStart). | ||
| requirement_level: recommended | ||
| examples: [508.6000000014901] | ||
| - id: responseEnd | ||
| type: double | ||
| stability: development | ||
| brief: > | ||
| The [time](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp) immediately after | ||
| the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first, | ||
| in milliseconds. See [responseEnd](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseEnd). | ||
| requirement_level: recommended | ||
| examples: [510.6000000014906] | ||
Uh oh!
There was an error while loading. Please reload this page.