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

Log CWV events to the console #77

Open
rviscomi opened this issue Oct 21, 2020 · 5 comments · Fixed by #115
Open

Log CWV events to the console #77

rviscomi opened this issue Oct 21, 2020 · 5 comments · Fixed by #115
Labels
enhancement New feature or request

Comments

@rviscomi
Copy link
Member

Is your feature request related to a problem? Please describe.
The CWV values reported by the extension are useful snapshots of the UX, but they don't necessarily have any diagnostic information for developers to understand what could have caused adverse experiences.

Describe the solution you'd like
I'd like to see the extension utilize console logging more to leave an audit trail to assist developers with debugging CWV issues. For example, log the times at which CLS changes and if possible attribute each shift to the culprit element. Or for LCP, log the elements that are considered the largest and the times at which they are painted. For FID, it'd be helpful to know the timestamp of the first input and what was clicked.

The extension can be a first class developer tool for not only understanding how pages are experienced but also debugging how to make them better. Stretch goal: maybe like a VisBug for performance?

@rviscomi rviscomi added the enhancement New feature or request label Oct 21, 2020
@gilbertococchi
Copy link
Contributor

Hi @rviscomi and @addyosmani I've opened a PR with a proposed Console Logging option here: #80

@rviscomi
Copy link
Member Author

Comment from the related PR:

Maybe we can support different logging levels, such as debug (metric name + value) and verbose (metric name, value, metric object with all the entries).
WDYT?

I think the way you have it here is a good first step for this PR and we can keep #77 open to revisit it with enhancements like the one you suggested.

@rviscomi
Copy link
Member Author

Leaving this open to continue exploring the logging levels feature described in the previous comment.

@tunetheweb
Copy link
Member

tunetheweb commented Apr 19, 2023

So #115 introduced a summary table of key info, as well as the full, detailed, Performance Observer entries, with extension options to have one or the other or both.

Rick's suggestion is to link these to the console log levels:

image

Perhaps tables as Info (since console.table only logs at Info level anyway) and PO entries as Verbose.

@tunetheweb
Copy link
Member

Thinking about this some more I'm not 100% sure using the DevTools levels are are better way of going compared to turning it off an on in the extension options. I do wonder if we should leave those levels for the developer to manage in their own apps and it if might be more confusing to enable something and not see it if they have verbose turned on/off by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants