-
Notifications
You must be signed in to change notification settings - Fork 282
Add Browser UserAction Event #1941
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
Changes from 6 commits
39243d9
4971c2d
58bf03b
750650f
2de2559
1621e7e
2d284b7
dae1e17
61e6e3d
ba58a7f
f6d0474
e8de18c
6af8246
d1448f5
dae27fe
f39d6f3
ae86a44
aaf8137
32af685
752adaa
562eb61
1de02d1
e91ea37
c06296c
e5c6f18
7a4813a
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,56 @@ | ||
| <!--- 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. | ||
|
|
||
| ## UserAction Event | ||
|
|
||
| <!-- semconv event.browser.user_action --> | ||
| <!-- 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.user_action`. | ||
|
|
||
| This event describes actions performed by the user such as click, scroll, zoom, resize, etc. | ||
|
|
||
| **Body fields:** | ||
|
|
||
| | Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | | ||
| |---|---|---|---|---|---| | ||
| | `click_coordinates` | string | Click coordinates captured as a string in the format {x}X{y}. | `345X23` | `Recommended` |  | | ||
| | `element` | string | Target element tag name and it is obtained via event.target.tagName. | `button` | `Recommended` |  | | ||
| | `element_xpath` | string | Target element xpath | `//*[@id='testBtn']` | `Recommended` |  | | ||
| | `tags` | string | Grab data from data-otel-* attributes in tree. | `id` | `Recommended` |  | | ||
| | `user_action_type` | enum | Type of interaction. See enum [here](https://github.com/microsoft/ApplicationInsights-JS/blob/main/extensions/applicationinsights-clickanalytics-js/src/Enums.ts) for potential values we could add support for. | `cl` | `Required` |  | | ||
|
|
||
| `user_action_type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | ||
|
|
||
| | Value | Description | Stability | | ||
| |---|---|---| | ||
| | `cl` | An element is left clicked by a user. |  | | ||
| | `cm` | An element is middle clicked by a user. |  | | ||
| | `cr` | An element is right clicked by a user. |  | | ||
| | `ke` | An element is entered via keyboard by a user. |  | | ||
| | `ks` | A space is entered via keyboard by a user. |  | | ||
| | `o` | User actions that are not listed above. |  | | ||
| | `r` | An element is resized by a user. |  | | ||
| | `s` | An element is scrolled by a user. |  | | ||
| | `z` | An element is zoomed by a user. |  | | ||
|
|
||
| <!-- 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,82 @@ | ||
| groups: | ||
| - id: event.browser.user_action | ||
|
Contributor
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. Would like to see the id/name be related to the group they come from with the list defined at: https://www.w3schools.com/jsref/obj_events.asp that way we can have a more tailored body/attributes. |
||
| stability: development | ||
| type: event | ||
| name: browser.user_action | ||
breedx-splk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| brief: > | ||
| This event describes actions performed by the user such as click, scroll, zoom, resize, etc. | ||
| body: | ||
trask marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| id: browser.user_action | ||
| requirement_level: required | ||
| stability: development | ||
| type: map | ||
| fields: | ||
| - id: element | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: string | ||
| stability: development | ||
| brief: Target element tag name and it is obtained via event.target.tagName. | ||
Karlie-777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| requirement_level: recommended | ||
| examples: ["button"] | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - id: element_xpath | ||
Karlie-777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: string | ||
| stability: development | ||
| brief: Target element xpath | ||
| requirement_level: recommended | ||
| examples: ["//*[@id='testBtn']"] | ||
| - id: user_action_type | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: enum | ||
Karlie-777 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| members: | ||
| - id: clickleft | ||
| value: "cl" | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| stability: development | ||
| brief: An element is left clicked by a user. | ||
| - id: clickright | ||
| value: "cr" | ||
| stability: development | ||
| brief: An element is right clicked by a user. | ||
| - id: clickmiddle | ||
| value: "cm" | ||
| stability: development | ||
| brief: An element is middle clicked by a user. | ||
| - id: scroll | ||
| value: "s" | ||
| stability: development | ||
| brief: An element is scrolled by a user. | ||
| - id: zoom | ||
| value: "z" | ||
| stability: development | ||
| brief: An element is zoomed by a user. | ||
| - id: resize | ||
| value: "r" | ||
| stability: development | ||
| brief: An element is resized by a user. | ||
| - id: keyboardenter | ||
| value: "ke" | ||
| stability: development | ||
| brief: An element is entered via keyboard by a user. | ||
|
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. This description is not clear to me. is that similar to If so I wonder why we want to differentiate between these two keys. |
||
| - id: keyboardspace | ||
| value: "ks" | ||
| stability: development | ||
| brief: A space is entered via keyboard by a user. | ||
| - id: other | ||
|
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. another interesting event IMHO is input |
||
| value: "o" | ||
| stability: development | ||
| brief: User actions that are not listed above. | ||
| stability: development | ||
| brief: > | ||
| Type of interaction. | ||
| See enum [here](https://github.com/microsoft/ApplicationInsights-JS/blob/main/extensions/applicationinsights-clickanalytics-js/src/Enums.ts) for potential values we could add support for. | ||
| requirement_level: required | ||
| examples: ["cl"] | ||
| - id: click_coordinates | ||
Karlie-777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: string | ||
| stability: development | ||
| brief: Click coordinates captured as a string in the format {x}X{y}. | ||
| requirement_level: recommended | ||
| examples: ["345X23"] | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - id: tags | ||
| type: string | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| stability: development | ||
| brief: Grab data from data-otel-* attributes in tree. | ||
| requirement_level: recommended | ||
| examples: ["id"] | ||
Uh oh!
There was an error while loading. Please reload this page.