Introduce app click events (#2070)

Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
This commit is contained in:
jason plumb 2025-05-01 12:19:53 -07:00 committed by GitHub
parent c921649595
commit 48c9127770
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 188 additions and 0 deletions

22
.chloggen/click_events.yaml Executable file
View File

@ -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:

88
docs/app/app.md Normal file
View File

@ -0,0 +1,88 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: App
--->
# App
**Status**: [Development][DocumentStatus]
This document defines events related to client-side applications
(e.g. web apps or mobile apps).
<!-- toc -->
- [Click Events](#click-events)
- [Event: `app.screen.click`](#event-appscreenclick)
- [Event: `app.widget.click`](#event-appwidgetclick)
- [Attributes](#attributes)
<!-- tocstop -->
## Click Events
### Event: `app.screen.click`
<!-- semconv event.app.screen.click -->
<!-- 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:** ![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) |
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
### Event: `app.widget.click`
<!-- semconv event.app.widget.click -->
<!-- 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:** ![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.
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->
## 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

View File

@ -10,6 +10,10 @@ Describes attributes related to client-side applications (e.g. web apps or mobil
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| <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) |
| <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) |
| <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) |
| <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) |
| <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) |
**[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.

39
model/app/events.yaml Normal file
View File

@ -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

View File

@ -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" ]