Add FID deprecation warn on web vital measure
What?
When the FID metric is measured, a warning will be logged to let users know to move away from working with browser_web_vital_fid and instead use browser_web_vital_inp.
Why?
FID has been deprecated -- ttps://web.dev/blog/fid.
Checklist
- [x] I have performed a self-review of my code.
- [ ] I have commented on my code, particularly in hard-to-understand areas.
- [ ] I have added tests for my changes.
- [x] I have run linter and tests locally (
make check) and all pass.
Checklist: Documentation (only for k6 maintainers and if relevant)
Please do not merge this PR until the following items are filled out.
- [ ] I have added the correct milestone and labels to the PR.
- [ ] I have updated the release notes: link
- [ ] I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
- [ ] I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable
Related PR(s)/Issue(s)
https://github.com/grafana/k6/issues/5179
👋🏻 I have no strong opinion because I'd say I don't know our Browser users enough to have so. For instance, I don't know how important the FID metric is for those k6 users that run Browser tests, and whether the deprecation is more because it's not relevant for them or because the standards have changed and now others are considered "vital", but FID remains important for them.
Compared to our HTTP metrics, if we would be dropping a metric like TLS handshake, or similar, that I'm pretty sure almost nobody cares about, then I'd probably prefer to not leave a warning.
Given that we will be dropping this in k6 v2 ... I feel like maybe a better way will be for this to go in the Release notes "Future breaking changes and plans" section and stay there until v2 and then we can have it in there.
I do like this idea, and indeed I think we might want to use it also for other changes that we plan by v2.0.
We have aligned and opted not to log a warning whenever the browser_web_vital_fid metric is emitted. As mentioned in comments already, the main issue is that the warning wouldn't result from a deliberate user action and therefore could be seen as noise and ignored since the warning would be issue every time the browser module would be used.
We will add the deprecation warning in the release notes instead until the metric is dropped in v2.