Network Error Logging (NEL)
What is Network Error Logging?
Network Error Logging (NEL) defines a new HTTP response header called NEL
that gives you a way to define an endpoint for the browser to report network errors encountered by your users.
NEL integrates with the Reporting API to deliver the network errors.
Please note that NEL is a draft specification and is not fully supported by all browsers.
Getting started
Setting up NEL can be as simple as adding a couple of HTTP response header to your website.
1. Ensure the Reporting API is configured
Ensure you have the Report-To
header defined as described in setting up the Reporting API.
2. Add the NEL header
Add the NEL header to your website. Note that "raygun" here is the named endpoint defined in the Report-To
header above.
NEL: {
"report_to": "raygun",
"max_age": 10886400,
}
Customising reports
NEL uses the Reporting API to deliver network errors to Raygun. This allows you to attach user information, custom data, tags and a version number using the method described in the Reporting API setup.