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 support #486

Open
tombruijn opened this issue Jul 12, 2021 · 4 comments
Open

Web Vitals support #486

tombruijn opened this issue Jul 12, 2021 · 4 comments

Comments

@tombruijn
Copy link
Member

As discussed in https://3.basecamp.com/4738529/buckets/18166704/messages/3942605857
Research if we can add Web Vital support in the JavaScript libraries.

@wesoudshoorn
Copy link
Member

What could be useful
The Web Vital package can track web vitals from your browser and send them to an endpoint. We currently already do something like this through our Next.js integration. Apparently, Next.js has built-in support for this.

Showing metrics on a dashboard
This was a dashboard created from a blog post on our blog. It graphs the web vitals over time, which can be very useful for debugging front-end performance.
image

What we're missing ourselves: Samples
When making AppSignal.com faster, it's easy to get metrics like these over time (Vercel has an analytics product that does this). The missing link is getting some type of sample for a request with bad Web Vitals. We're now being old there are requests which take 5S to show the first content, but we don't know what browser/country/connection is being used.

It would be awesome if there's some way to also load samples into AppSignal of the requests with the slowest web vitals.

Other products that do something with Web Vitals
https://www.debugbear.com/
https://www.speedlify.dev/
https://calibreapp.com/
https://speedcurve.com/

@matsimitsu
Copy link
Member

The missing link is getting some type of sample for a request with bad Web Vitals.

The JS integration is currently not setup to collect samples, I'm also not entirely sure what it should collect. But we can update the integration to emit samples if needed, and have the public endpoint collect them. Note that the public endpoint s limited in what it accepts size-wise for samples. Samples with 10k events will be rejected by the endpoint, for example.

@matsimitsu
Copy link
Member

matsimitsu commented Jul 14, 2021

Our public endpoint already accepts web-vitals btw, on /metrics/webvitals in the following format:

[
    {
        "id": "1596275342516-3380393974949",
        "label": "custom",
        "name": "Next.js-hydration",
        "startTime": 1135,
        "value": 12,
    },
    {
        "id": "1596275342519-1731783822324",
        "label": "web-vital",
        "name": "FCP",
        "startTime": 1171.295000007376,
        "value": 1171.295000007376
    }
]

@tombruijn
Copy link
Member Author

@unflxw unflxw mentioned this issue Dec 11, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants