open-telemetry / opentelemetry-js-contrib

OpenTelemetry instrumentation for JavaScript modules
https://opentelemetry.io
Apache License 2.0
691 stars 507 forks source link

Core Web Vitals Plugin #1461

Open austinlparker opened 1 year ago

austinlparker commented 1 year ago

Is your instrumentation request related to a problem? Please describe

Core Web Vitals is a widely accepted and utilized set of measurements for web client performance. Frontend developers rely on CWV in creating SLIs and SLOs for their applications.

Is it applicable for Node or Browser or both?

Browser

Do you expect this instrumentation to be commonly used?

I would expect this to be come a default part of the web instrumentation.

What version of instrumentation are you interested in using?

n/a

Additional context

I'm mostly adding this request as I don't see it anywhere already and wanted to have a public record/discussion of it. Perhaps this has been discussed in the SIG previously?

pkanal commented 1 year ago

There was a PR a while back to add web vitals auto-instrumentation that eventually went stale because it was built around traces and spans. Ultimately it seems like it was decided that traces and spans were not the right way to describe web vitals.

There's also an open issue in the JS sandbox repo to create a POC of web vitals auto-instrumentation that is only based on events.

weyert commented 1 year ago

Can you use metrics in a web client? Sounds like that would be a reasonable use case for core web vitals?

scheler commented 4 months ago

This will be implemented using (Log) Events. Now that we have Events API and SDK merged, we should be able to get this out soon.