Logging
Record headers, bodies and query data for chosen requests.
The gateway records a short entry for every request, with or without policies: method, host, path, status, timing and the deployment that answered. The Requests page and the charts are built from these entries.
A Logging policy records more for the requests it matches. You choose what, separately:
| Option | Records |
|---|---|
| Request headers | Request headers, the user agent and the client IP |
| Response headers | Response headers |
| Request body | The request body, up to a size limit |
| Response body | The response body, up to a size limit |
| Query | The query string and its parameters |
When several Logging policies match a request, their options add up.
Be deliberate about what you record
Headers, bodies and query strings often contain personal data, tokens or passwords. Record them only where you need to, for example by matching a path you're debugging, and remove the policy when you're done. The Authorization header is always redacted before anything is stored.
Examples
- Debug one endpoint: match the path
/api/checkoutwith the request and response body options. - See who calls you: no conditions, request headers only.