custom-metrics
custom-metrics copied to clipboard
Improve coverage of Speculation Rules custom metrics
In performance.js we're capturing the speculation rules themselves. This tells us how the links should be prefetched/prerendered, but not which ones actually are.
Add new metadata to the custom metric that captures which requests are actually speculatively loaded. We can look for the Sec-Purpose
header and log which requests are prefetched or prerendered.
The custom metric also currently only looks for script tags with the Speculation Rules JSON. But it's also possible to configure the rules via the Speculation-Rules
header. The custom metric should check there as well as the script tags.