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 #3286

Closed
wants to merge 7 commits into from

Conversation

scheler
Copy link
Contributor

@scheler scheler commented Mar 3, 2023

Changes

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.

This is also added in the spec repo and not in the javascript language repo, as WASM enables the possibility of browser instrumentations in more languages than just JavaScript.

Related PRs #2926

@scheler scheler marked this pull request as ready for review March 8, 2023 03:31
@scheler scheler requested review from a team March 8, 2023 03:31
| Value | Description |
|---|---|
| `0` | physical_page |
| `1` | virtual_page |
Copy link
Contributor

@MSNev MSNev Mar 14, 2023

Choose a reason for hiding this comment

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

It might be worth calling out what is meant by virtual page so that non client readers understand a bit better.

ie.

  • physical_page -> Initial page load within the browser and will generally also precede a PageNavigationTiming event.
  • 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.


**Event name**:`page_navigation_timing`

This event may be represented in a Span Event on the Span representing the
Copy link
Contributor

Choose a reason for hiding this comment

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

No, this is an event definition.
You have already called out above that events may be sent as a Log Event or Span Event and this event is no different.

And this document is about the definitions (semantic conventions) of events


**Event name**:`http_request_timing`

This event may be represented using a Span Event on the Spans represening HTTP
Copy link
Contributor

Choose a reason for hiding this comment

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

Same again, please remove the "Span Event" wording.

I would prefer to have at the top level (where you mention that events may be Logs or Span events), to include wording along the lines that All Events even when passed as a Log Event may be linked to the current span to group all relevant events together.

Copy link
Contributor

Choose a reason for hiding this comment

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

As all event (should) have the option to be associated with a Span

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 22, 2023

### 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.

Where are the codesCLS, LCP, and FID defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jmacd Those are the possible values for name in the payload for the web_vital event.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 29, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Apr 7, 2023
|responseStart | long | || Recommended |
|responseEnd | long | || Recommended |

### HttpRequestTiming
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this event can be removed because HTTP requests would also be covered as ResourceTiming events.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@martinkuba what about the fields within these 2 events - they seem to be a bit different - can you review them both and let me know what fields would be there in the consolidated event?

@scheler
Copy link
Contributor Author

scheler commented Apr 27, 2023

@open-telemetry/spec-approvers can someone reopen this PR? thanks.

@arminru arminru reopened this May 11, 2023
@arminru arminru requested a review from a team May 11, 2023 15:53
@github-actions github-actions bot removed the Stale label May 12, 2023
Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

@reyang reyang added the area:semantic-conventions Related to semantic conventions label May 12, 2023
@scheler
Copy link
Contributor Author

scheler commented May 15, 2023

This PR is moved to open-telemetry/semantic-conventions#30

@scheler scheler closed this May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants