Network Error Logging (NEL) provides out-of-band reporting of network errors via the Reporting API (see//net/reporting
). Site operators can specify a NEL policy that defines the Reporting endpoint(s) on which they wish to receive reports about client-side errors encountered while connecting to the site. The draft spec can be foundhere.
This directory contains the core implementation of NEL.
Most of the action takes place inNetworkErrorLoggingService
, which handles receiving/processingNEL:
response headers and generating/queueing reports about network requests. TheNetworkErrorLoggingService
is owned by theURLRequestContext
.
Information about network requests comes directly fromHttpNetworkTransaction
, which informsNetworkErrorLoggingService
of the details of the request such as the remote IP address and outcome (anet::Error
code).
TheNetworkErrorLoggingService
finds a NEL policy applicable to the request (previously set by aNEL
header), and if one exists, potentially queues a NEL report to be uploaded out-of-band to the policy's specified Reporting endpoint via theReportingService
.
Received NEL policies are persisted to disk by aPersistentNelStore
, whose main implementation is theSqlitePersistentReportingAndNelStore
.