Skip to content

Commit bc33058

Browse files
Add client-side jank event (#2552)
Co-authored-by: Liudmila Molkova <[email protected]>
1 parent 4c7fa26 commit bc33058

File tree

5 files changed

+103
-4
lines changed

5 files changed

+103
-4
lines changed

.chloggen/jank-event.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: app
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Defines a new jank event in the app domain
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [2552]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/app/app.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This document defines events related to client-side applications
1414
- [Click Events](#click-events)
1515
- [Event: `app.screen.click`](#event-appscreenclick)
1616
- [Event: `app.widget.click`](#event-appwidgetclick)
17+
- [Jank Event](#jank-event)
18+
- [Event: `app.jank`](#event-appjank)
1719
- [Attributes](#attributes)
1820

1921
<!-- tocstop -->
@@ -80,6 +82,42 @@ Use this event to indicate that visual application component has been clicked, t
8082
<!-- END AUTOGENERATED TEXT -->
8183
<!-- endsemconv -->
8284

85+
## Jank Event
86+
87+
### Event: `app.jank`
88+
89+
Jank is a disruption in UI rendering, resulting in a display that can feel
90+
sluggish or even unresponsive/frozen. Applications that are able to detect
91+
jank can report it with the following events:
92+
93+
<!-- semconv event.app.jank -->
94+
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
95+
<!-- see templates/registry/markdown/snippet.md.j2 -->
96+
<!-- prettier-ignore-start -->
97+
<!-- markdownlint-capture -->
98+
<!-- markdownlint-disable -->
99+
100+
**Status:** ![Development](https://img.shields.io/badge/-development-blue)
101+
102+
The event name MUST be `app.jank`.
103+
104+
This event indicates that the application has detected substandard UI rendering performance.
105+
106+
Jank happens when the UI is rendered slowly enough for the user to experience some disruption or sluggishness.
107+
108+
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
109+
|---|---|---|---|---|---|
110+
| [`app.jank.frame_count`](/docs/registry/attributes/app.md) | int | A number of frame renders that experienced jank. [1] | `9`; `42` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
111+
| [`app.jank.period`](/docs/registry/attributes/app.md) | double | The time period, in seconds, for which this jank is being reported. | `1.0`; `5.0`; `10.24` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
112+
| [`app.jank.threshold`](/docs/registry/attributes/app.md) | double | The minimum rendering threshold for this jank, in seconds. | `0.016`; `0.7`; `1.024` | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) |
113+
114+
**[1] `app.jank.frame_count`:** Depending on platform limitations, the value provided MAY be approximation.
115+
116+
<!-- markdownlint-restore -->
117+
<!-- prettier-ignore-end -->
118+
<!-- END AUTOGENERATED TEXT -->
119+
<!-- endsemconv -->
120+
83121
## Attributes
84122

85123
See the [app attributes](/docs/registry/attributes/app.md) registry for all

docs/registry/attributes/app.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ Describes attributes related to client-side applications (e.g. web apps or mobil
1111
|---|---|---|---|---|
1212
| <a id="app-build-id" href="#app-build-id">`app.build_id`</a> | string | Unique identifier for a particular build or compilation of the application. | `6cff0a7e-cefc-4668-96f5-1273d8b334d0`; `9f2b833506aa6973a92fde9733e6271f`; `my-app-1.0.0-code-123` | ![Development](https://img.shields.io/badge/-development-blue) |
1313
| <a id="app-installation-id" href="#app-installation-id">`app.installation.id`</a> | string | A unique identifier representing the installation of an application on a specific device [1] | `2ab2916d-a51f-4ac8-80ee-45ac31a28092` | ![Development](https://img.shields.io/badge/-development-blue) |
14+
| <a id="app-jank-frame-count" href="#app-jank-frame-count">`app.jank.frame_count`</a> | int | A number of frame renders that experienced jank. [2] | `9`; `42` | ![Development](https://img.shields.io/badge/-development-blue) |
15+
| <a id="app-jank-period" href="#app-jank-period">`app.jank.period`</a> | double | The time period, in seconds, for which this jank is being reported. | `1.0`; `5.0`; `10.24` | ![Development](https://img.shields.io/badge/-development-blue) |
16+
| <a id="app-jank-threshold" href="#app-jank-threshold">`app.jank.threshold`</a> | double | The minimum rendering threshold for this jank, in seconds. | `0.016`; `0.7`; `1.024` | ![Development](https://img.shields.io/badge/-development-blue) |
1417
| <a id="app-screen-coordinate-x" href="#app-screen-coordinate-x">`app.screen.coordinate.x`</a> | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | ![Development](https://img.shields.io/badge/-development-blue) |
1518
| <a id="app-screen-coordinate-y" href="#app-screen-coordinate-y">`app.screen.coordinate.y`</a> | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | ![Development](https://img.shields.io/badge/-development-blue) |
16-
| <a id="app-widget-id" href="#app-widget-id">`app.widget.id`</a> | string | An identifier that uniquely differentiates this widget from other widgets in the same application. [2] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `submit_order_1829` | ![Development](https://img.shields.io/badge/-development-blue) |
17-
| <a id="app-widget-name" href="#app-widget-name">`app.widget.name`</a> | string | The name of an application widget. [3] | `submit`; `attack`; `Clear Cart` | ![Development](https://img.shields.io/badge/-development-blue) |
19+
| <a id="app-widget-id" href="#app-widget-id">`app.widget.id`</a> | string | An identifier that uniquely differentiates this widget from other widgets in the same application. [3] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `submit_order_1829` | ![Development](https://img.shields.io/badge/-development-blue) |
20+
| <a id="app-widget-name" href="#app-widget-name">`app.widget.name`</a> | string | The name of an application widget. [4] | `submit`; `attack`; `Clear Cart` | ![Development](https://img.shields.io/badge/-development-blue) |
1821

1922
**[1] `app.installation.id`:** Its value SHOULD persist across launches of the same application installation, including through application upgrades.
2023
It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled.
@@ -34,6 +37,8 @@ For Android, examples of `app.installation.id` implementations include:
3437

3538
More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).
3639

37-
**[2] `app.widget.id`:** A widget is an application component, typically an on-screen visual GUI element.
40+
**[2] `app.jank.frame_count`:** Depending on platform limitations, the value provided MAY be approximation.
3841

39-
**[3] `app.widget.name`:** A widget is an application component, typically an on-screen visual GUI element.
42+
**[3] `app.widget.id`:** A widget is an application component, typically an on-screen visual GUI element.
43+
44+
**[4] `app.widget.name`:** A widget is an application component, typically an on-screen visual GUI element.

model/app/events.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,20 @@ groups:
3737
requirement_level: opt_in
3838
- ref: app.screen.coordinate.y
3939
requirement_level: opt_in
40+
- id: event.app.jank
41+
stability: development
42+
type: event
43+
name: app.jank
44+
brief: >
45+
This event indicates that the application has detected substandard UI
46+
rendering performance.
47+
note: >
48+
Jank happens when the UI is rendered slowly enough for the user to
49+
experience some disruption or sluggishness.
50+
attributes:
51+
- ref: app.jank.frame_count
52+
requirement_level: recommended
53+
- ref: app.jank.threshold
54+
requirement_level: recommended
55+
- ref: app.jank.period
56+
requirement_level: recommended

model/app/registry.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ groups:
3131
More information about Android identifier best practices can be found in the [Android user data IDs guide](https://developer.android.com/training/articles/user-data-ids).
3232
examples:
3333
- 2ab2916d-a51f-4ac8-80ee-45ac31a28092
34+
- id: app.jank.frame_count
35+
type: int
36+
stability: development
37+
brief: A number of frame renders that experienced jank.
38+
note: >
39+
Depending on platform limitations, the value provided MAY be approximation.
40+
examples: [ 9, 42 ]
41+
- id: app.jank.threshold
42+
stability: development
43+
type: double
44+
brief: The minimum rendering threshold for this jank, in seconds.
45+
examples: [ 0.016, 0.700, 1.024 ]
46+
- id: app.jank.period
47+
stability: development
48+
type: double
49+
brief: The time period, in seconds, for which this jank is being reported.
50+
examples: [ 1.0, 5.0, 10.24 ]
3451
- id: app.screen.coordinate.x
3552
type: int
3653
brief: The x (horizontal) coordinate of a screen coordinate, in screen pixels.

0 commit comments

Comments
 (0)