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

The LCP metric should only include entries relevant to that LCP value #216

Closed
philipwalton opened this issue Apr 23, 2022 · 0 comments
Closed
Milestone

Comments

@philipwalton
Copy link
Member

The intention of the Metric.entries array was that it could be used to create and report additional debug information that would allow developers to identify common real-user problems in their aggregate data.

For LCP, however, the entries array was populated with all entries reported by the underlying Largest Contentful Paint API, which may be helpful in some cases, but also still requires the developer to know that some of those entries are not relevant to the current metric value, so it could lead to bugs.

Also, for all of the other metrics reported by this library, the entries array only contains entries that are relevant to the metric value. LCP is the exception.

For the sake of consistency as well as to help prevent cases where a developer might accidentally infer debug information from an irrelevant LCP entry, I think it makes the most sense to only report the final one in the entries array. Developers who want access to all entries can always just use the native API to get them.

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

No branches or pull requests

1 participant