Skip to content
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

Semantic conventions for browser events #30

Closed
wants to merge 4 commits into from

Conversation

scheler
Copy link
Contributor

@scheler scheler commented May 15, 2023

Introduces semantic conventions for events emitted by browser instrumentations. This document serves more for the purpose as a schema for the events than the semantic conventions as supported in Otel today.

Related PRs open-telemetry/opentelemetry-specification#2926

…entations. This document serves more for the purpose as a schema for the events than the semantic conventions as supported in Otel today.

Related PRs open-telemetry/opentelemetry-specification#2926
@joaopgrassi
Copy link
Member

joaopgrassi commented May 16, 2023

Hey @scheler the semantic conventions moved to a new repo, https://github.com/open-telemetry/semantic-conventions so you will need to submit your PR there.

Also, the conventions need to be introduced in a .yaml file, so the table and etc is auto-generated and populated in the markdown file.

|---|---|
| `0` | physical_page - Initial page load within the browser and will generally also precede a PageNavigationTiming event.|
| `1` | virtual_page - This is for Single Page Applications (SPA) where the framework provides the ability to perform client side only page "navigation", the exact definition of what a virtual page change is determined by the SPA and the framework it is using.|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have an attribute to show the change in state that happened on soft navigation (virtual pages) like pushState and replaceState. Name can be changeState

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.


### ResourceTiming

**Event name**:`resource_timing`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this include an attribute denoting the resource that was fetched?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added name property that denotes the URL of the resource fetched. This is as per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/name

**Event name**:`page_navigation_timing`

This event describes the timing metrics of a page navigation as provided by
`PerformanceNavigationTiming` Performance API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this include the page that is loading somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added name property that denotes the URL of the page loaded. This is as per https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/name


### Exception

**Event name**:`exception`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this redefined? Shouldn't this just leverage existing exception specification, e.g. https://github.com/open-telemetry/semantic-conventions/blob/main/specification/logs/semantic_conventions/exceptions.md


### WebVital

**Event name**:`web_vital`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you outline in more detail what this is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a short description for this event type.


### UserAction

**Event name**:`user_action`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you outline in more detail what user actions should be captured?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few user actions captured using this Event.

@@ -0,0 +1,205 @@
# Semantic conventions for browser events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should make use of semantic conventions YAML definitions for attributes, where possible.

@jsuereth
Copy link
Contributor

Can you please reopen this against the current main branch, including using yaml files to define schema?

@jsuereth jsuereth closed this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants