GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.35k stars 105 forks source link

[Feature request] Add whitelist for console logging #128

Closed XCanG closed 1 year ago

XCanG commented 1 year ago

Is your feature request related to a problem? Please describe. I want to enable console logging feature all the time, but only for websites I currently developing, so I want to use is on 127.0.0.1 + domains I currently use.

Describe the solution you'd like Add text field where we can put all IPs / domains where to enable console logging.

Additional context

tunetheweb commented 1 year ago

@XCanG could you test out the option-to-restrict-logging-to-url-patterns branch and see if that addresses your requirement? Details in #145

To test it go to chrome://extensions, enable Developer mode, and then drag the entire checked out repo onto that screen and this should add a new version of this extension. Make sure to disable to production version so you don't get them confused.

Let me know how you get on.

rviscomi commented 1 year ago

While I can appreciate that the extension can be a bit noisy when you're not trying to debug CWV issues, I think there are already enough controls in place to minimize the disruption.

  1. Disable the console logging feature on the options page until it's needed.
  2. Use -Vitals in the console filter to silence Web Vitals Extension logs.
  3. Use a different browser profile with the extension enabled as needed.

None are perfect solutions for this exact use case, but I'm not sure the solution in #145 is something many other users would find useful without confusing the rest.

XCanG commented 1 year ago

@rviscomi That's so unfortunate, I was really hoped for that PR to roll out. I did tested extension on that version and it work as intended.

Is there a way to still include it, may be in more simpler way? There is not that many changes, that was added there, but they were very useful for me.