From 48c9127770d7c4f816f590b83c0a0ddea85c00fe Mon Sep 17 00:00:00 2001 From: jason plumb <75337021+breedx-splk@users.noreply.github.com> Date: Thu, 1 May 2025 12:19:53 -0700 Subject: [PATCH] Introduce app click events (#2070) Co-authored-by: Liudmila Molkova --- .chloggen/click_events.yaml | 22 +++++++++ docs/app/app.md | 88 +++++++++++++++++++++++++++++++++ docs/attributes-registry/app.md | 8 +++ model/app/events.yaml | 39 +++++++++++++++ model/app/registry.yaml | 31 ++++++++++++ 5 files changed, 188 insertions(+) create mode 100755 .chloggen/click_events.yaml create mode 100644 docs/app/app.md create mode 100644 model/app/events.yaml diff --git a/.chloggen/click_events.yaml b/.chloggen/click_events.yaml new file mode 100755 index 000000000..21811369c --- /dev/null +++ b/.chloggen/click_events.yaml @@ -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: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: app + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Defines two new click events for the app domain + +# 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: [2070] + +# (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: diff --git a/docs/app/app.md b/docs/app/app.md new file mode 100644 index 000000000..770a505fe --- /dev/null +++ b/docs/app/app.md @@ -0,0 +1,88 @@ + + +# App + +**Status**: [Development][DocumentStatus] + +This document defines events related to client-side applications +(e.g. web apps or mobile apps). + + + +- [Click Events](#click-events) + - [Event: `app.screen.click`](#event-appscreenclick) + - [Event: `app.widget.click`](#event-appwidgetclick) +- [Attributes](#attributes) + + + +## Click Events + +### Event: `app.screen.click` + + + + + + + + +**Status:** ![Development](https://img.shields.io/badge/-development-blue) + +The event name MUST be `app.screen.click`. + +This event represents an instantaneous click on the screen of an application. + +The `app.screen.click` event can be used to indicate that a user has clicked or tapped on the screen portion of an application. Clicks outside of an application's active area SHOULD NOT generate this event. This event does not differentiate between touch/mouse down and touch/mouse up. Implementations SHOULD give preference to generating this event at the time the click is complete, typically on touch release or mouse up. The location of the click event MUST be provided in absolute screen pixels. + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`app.screen.coordinate.x`](/docs/attributes-registry/app.md) | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`app.screen.coordinate.y`](/docs/attributes-registry/app.md) | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + +### Event: `app.widget.click` + + + + + + + + +**Status:** ![Development](https://img.shields.io/badge/-development-blue) + +The event name MUST be `app.widget.click`. + +This event indicates that an application widget has been clicked. + +Use this event to indicate that visual application component has been clicked, typically through a user's manual interaction. + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`app.widget.id`](/docs/attributes-registry/app.md) | string | An identifier that uniquely differentiates this widget from other widgets in the same application. [1] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `submit_order_1829` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`app.screen.coordinate.x`](/docs/attributes-registry/app.md) | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`app.screen.coordinate.y`](/docs/attributes-registry/app.md) | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`app.widget.name`](/docs/attributes-registry/app.md) | string | The name of an application widget. [2] | `submit`; `attack`; `Clear Cart` | `Opt-In` | ![Development](https://img.shields.io/badge/-development-blue) | + +**[1] `app.widget.id`:** A widget is an application component, typically an on-screen visual GUI element. + +**[2] `app.widget.name`:** A widget is an application component, typically an on-screen visual GUI element. + + + + + + +## Attributes + +See the [app attributes](/docs/attributes-registry/app.md) registry for all +application-related attributes that may appear on telemetry items. + +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status diff --git a/docs/attributes-registry/app.md b/docs/attributes-registry/app.md index 676329712..1aab1d78c 100644 --- a/docs/attributes-registry/app.md +++ b/docs/attributes-registry/app.md @@ -10,6 +10,10 @@ Describes attributes related to client-side applications (e.g. web apps or mobil | Attribute | Type | Description | Examples | Stability | |---|---|---|---|---| | `app.installation.id` | 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) | +| `app.screen.coordinate.x` | int | The x (horizontal) coordinate of a screen coordinate, in screen pixels. | `0`; `131` | ![Development](https://img.shields.io/badge/-development-blue) | +| `app.screen.coordinate.y` | int | The y (vertical) component of a screen coordinate, in screen pixels. | `12`; `99` | ![Development](https://img.shields.io/badge/-development-blue) | +| `app.widget.id` | 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) | +| `app.widget.name` | string | The name of an application widget. [3] | `submit`; `attack`; `Clear Cart` | ![Development](https://img.shields.io/badge/-development-blue) | **[1] `app.installation.id`:** Its value SHOULD persist across launches of the same application installation, including through application upgrades. It SHOULD change if the application is uninstalled or if all applications of the vendor are uninstalled. @@ -28,3 +32,7 @@ For Android, examples of `app.installation.id` implementations include: - [`Settings.getString(Settings.Secure.ANDROID_ID)`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID). More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids). + +**[2] `app.widget.id`:** A widget is an application component, typically an on-screen visual GUI element. + +**[3] `app.widget.name`:** A widget is an application component, typically an on-screen visual GUI element. diff --git a/model/app/events.yaml b/model/app/events.yaml new file mode 100644 index 000000000..dda948424 --- /dev/null +++ b/model/app/events.yaml @@ -0,0 +1,39 @@ +groups: + - id: event.app.screen.click + stability: development + type: event + name: app.screen.click + brief: > + This event represents an instantaneous click on the screen of an application. + note: > + The `app.screen.click` event can be used to indicate that a user has + clicked or tapped on the screen portion of an application. Clicks + outside of an application's active area SHOULD NOT generate this event. + This event does not differentiate between touch/mouse down and + touch/mouse up. Implementations SHOULD give preference to generating + this event at the time the click is complete, typically on touch + release or mouse up. The location of the click event MUST be provided + in absolute screen pixels. + attributes: + - ref: app.screen.coordinate.x + requirement_level: required + - ref: app.screen.coordinate.y + requirement_level: required + - id: event.app.widget.click + stability: development + type: event + name: app.widget.click + brief: > + This event indicates that an application widget has been clicked. + note: > + Use this event to indicate that visual application component has been + clicked, typically through a user's manual interaction. + attributes: + - ref: app.widget.id + requirement_level: required + - ref: app.widget.name + requirement_level: opt_in + - ref: app.screen.coordinate.x + requirement_level: opt_in + - ref: app.screen.coordinate.y + requirement_level: opt_in diff --git a/model/app/registry.yaml b/model/app/registry.yaml index 4c3030b0e..e97a115d8 100644 --- a/model/app/registry.yaml +++ b/model/app/registry.yaml @@ -31,3 +31,34 @@ groups: More information about Android identifier best practices can be found [here](https://developer.android.com/training/articles/user-data-ids). examples: - 2ab2916d-a51f-4ac8-80ee-45ac31a28092 + - id: app.screen.coordinate.x + type: int + brief: The x (horizontal) coordinate of a screen coordinate, in screen pixels. + stability: development + examples: [ 0, 131 ] + - id: app.screen.coordinate.y + type: int + brief: > + The y (vertical) component of a screen coordinate, in screen pixels. + stability: development + examples: [ 12, 99 ] + - id: app.widget.id + type: string + stability: development + brief: > + An identifier that uniquely differentiates this widget from other + widgets in the same application. + note: > + A widget is an application component, typically an on-screen visual + GUI element. + examples: + - f9bc787d-ff05-48ad-90e1-fca1d46130b3 + - submit_order_1829 + - id: app.widget.name + type: string + stability: development + brief: The name of an application widget. + note: > + A widget is an application component, typically an on-screen visual + GUI element. + examples: [ "submit", "attack", "Clear Cart" ]