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

Web Vitals autoinstrumentation #12

Closed
pkanal opened this issue Jan 2, 2024 · 0 comments · Fixed by #84
Closed

Web Vitals autoinstrumentation #12

pkanal opened this issue Jan 2, 2024 · 0 comments · Fixed by #84
Assignees
Labels
type: enhancement New feature or request
Milestone

Comments

@pkanal
Copy link
Contributor

pkanal commented Jan 2, 2024

Add web vitals auto-instrumentation to this repo. The most up to date version lives in the docs repo.

Open Question: Should this be packaged separately? Do we need npm workspaces support for this repo?

@pkanal pkanal added the type: enhancement New feature or request label Jan 2, 2024
@pkanal pkanal modified the milestones: Alpha, Beta Jan 2, 2024
@ahrbnsn ahrbnsn self-assigned this Jan 19, 2024
@pkanal pkanal self-assigned this Feb 15, 2024
pkanal added a commit that referenced this issue Feb 27, 2024
## Which problem is this PR solving?
Adds basic web vitals span based auto-instrumentation. Heavily based on
[what will be available
upstream](https://github.com/open-telemetry/opentelemetry-sandbox-web-js/blob/auto-instrumentation-poc/pkgs/instrumentations/web/web-vitals/src/web-vitals.ts),
with the main difference being that the upstream instrumentation will be
based on events, we'll have to support that down the line as well.

Should align very closely with the spec laid out in #61 
- Closes #12 

## Short description of the changes
- Adds web vitals auto-instrumentation based on the web-vitals package
- Adds option to specify which vitals should be tracked as well as a
default of tracking CLS, LCP and INP.
- Adds tests to check spans created have the attributes we expect

## Out of scope for this PR
This PR is really aimed at getting the base instrumentation into the
package so there will be follow up work to:
- Add more options based on the options available for configuring
web-vitals in the main package
- Automatically initializing web vitals and the config to make that
happen
- Smoke tests

## How to verify that this has the expected result
- Run the example app to see web vitals spans being sent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants