A Rust based compute starter kit for a Network Error Logging reporting endpoint.
For more details about this and other starter kits for Fastly Compute, see the Fastly developer hub
From MDN:
Network Error Logging is a mechanism that can be configured via the
NEL
HTTP response header. This experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
Our starter kit will bootstrap a Fastly service that can receive network error reports, parse them, enrich them with information available at the edge, and dispatch them to your logging provider.
- Exposes a
POST /reports
endpoint to receive NEL reports - Deserializes individual reports from JSON to Rust data structures
- Adds additional information at the edge, such as geo IP data
- Sends reports to a logging endpoint as individual JSON lines
- Responds with a synthetic 204 response to the client
The following resources need to exist on your active Fastly service version for this starter kit to work:
- A logging endpoint called
reports
.
Please see our SECURITY.md for guidance on reporting security-related issues.