AI Gateway adds selective payload logging control
Key Points
- New header controls AI Gateway payload logging
- Metadata logging preserved without sensitive data
- Enhanced privacy for AI request monitoring
Summary
AI Gateway introduces the cf-aig-collect-log-payload header to control whether request and response payloads are stored in logs. This feature enables logging of essential metadata while optionally excluding sensitive payload data.
Key Points
- New header control:
cf-aig-collect-log-payloadheader determines payload storage behavior - Default behavior: Header defaults to
true, maintaining current logging functionality - Metadata preservation: Setting header to
falsestill logs metadata including token counts, model, provider, status code, cost, and duration - Privacy enhancement: Allows collection of usage metrics without persisting sensitive prompt or response data
- Simple implementation: Add header with
falsevalue to API requests to skip payload storage