The XDN platform exposes three types of logs to users:
- Build logs capture all the build output from your XDN deploys.
- Server logs capture your XDN serverless console output at real time.
- Access logs capture information about all the requests served by XDN.
Each time you deploy to the XDN using the
xdn deploy command, information about the deployment is logged, including the output of the
xdn deploy command itself. You can view these logs in real-time by viewing your deployment on moovweb.app.
The output of
console.error, etc... calls within your code can be viewed in real time from the "Server" tab on any deployment:
Here you can limit the output to only those statements coming from your IP address, or filter by regex. This can use useful when trying to sift through noisy logs on high-traffic sites.
XDN Enterprise tier customers can receive streaming access logs that capture information about each request served by the XDN. To do so refer to the "Access Logs" tab:
Note that if you are not an Enterprise tier customer you will see a message to contact support to upgrade your account.
Access logs contain the following fields:
Millisecond resolution of the request start time in UNIX epoch.
The application's XDN version processing this request.
The application's build number processing this request.
The active environment ID in XDN.
Available since XDN v2.9.0.
The active environment version number.
IP of the most downstream client, determined either through XFF or by reading socket infromation.
Host header as received from the downstream.
Flag indicating whether downstream connection is http/2 or not
Flag indicating whether this request is an http/2 server-side push or not
HTTP response status code
Flag indicating whether this request was cacheable even in theory
Country code per geo-location.
Size of the request in bytes.
Size of the response in bytes.
Destination, determined by split testing rules
Backend, determined by split testing rules
Split testing bucket cookie value
Flag indicating whether the response is compressed or not.
Unique request ID
WAF security state: geo for geo blocking, bl for black list, dl-<list name> for dynamic lists if the request was blocked; wl for whitelist, by for bypass if the request was passed.
Flag indicating whether the request was shielded.
Device type desktop, smartphone, tablet, mobile
Vendor: apple, microsoft, android
Browser: chrome, safari, firefox
Flag indicating whether the requet was made by a bot.
Flag indicating whether the request was responded from edge (not true for cache hits, just for synthetic requests)
Cache level on which the request was responded or 0 if it was a miss
Indicates if the response was stale or not (0, 1)
Flag indicating if the response has completed (analogous to 499 in Nginx)
Caching status (why something was or wasn't cached)
Response content type.
Request header x-xdn-matched-routes, logs all routes matched and is required to order the routes table in caching metrics
Referrer request header (note the misspelling per HTTP standard)
Response x-xdn-t header with different critical path timings
Response x-xdn-user-t header with different user performance metrics
Response x-xdn-status header with different critical path status codes
If xdn_prefetch parameter was specified value of 1, otherwise not present.
Time to live in seconds of the response if it was cached.
The response vary header received from upstream; it's sometimes different to what's sent downstream as we inject user-agent in moov_deliver, but it's this value what actually splits the cache; we don't have access to beresp from moov_log so we preserve it in req
IP of the backend that responded to the request