Reporting API v1 is here!
A new version of the Reporting API has been released that hopefully will get supported across more browsers. The legacy Reporting API (v0) is currently only supported by Chrome and Edge browsers.
If you have already implemented the Reporting API v0, you can migrate to the new v1 by adding a new HTTP response header. A detailed description can be found here: https://web.dev/reporting-api-migration/.
The header value is no longer a JSON but a string of one or a series of comma-separated key-value pairs. The key represents the endpoint name, and the value is the endpoint URL. Here is an example:
Reporting-Endpoints: endpoint-1="https://reports.example/foo", endpoint-2="https://reports.example/bar", default="https://reports.example/default"
You can choose an endpoint name to your liking but keep in mind that you need to have at least
default to receive deprecation, intervention, and crash reports.
If you use Network Error Logging, you should not remove the
Report-To HTTP response header for now because Network Error Logging isn't supported in the Reporting API v1. A new mechanism for NEL is being developed.
We've updated the Getting Started pages for URIports users that want to implement or upgrade to the Reporting API v1. In addition, we will keep you up to date when a new mechanism arrives for Network Error Logging.