Public Identifiers To Capture
Do not store provider task IDs, provider URLs, provider identifiers, Redis keys, or sensitive execution metadata as customer-facing records.
What To Log
Log enough to diagnose the request without leaking secrets:- Endpoint, HTTP method, model, status code, timestamp, and latency.
- Public identifiers:
request_id,task_id,poll_url, andbilling_transaction_idwhen present. - Sanitized request shape: which fields were present, not the full prompt or private media content.
- Terminal async status responses, including public error fields.
- Client retry count and whether the retry created a new task or resumed an existing one.
Authorization, API keys, signed URLs, private media URLs, full prompts, and user personal data unless you have explicit permission to retain them.
Troubleshooting Matrix
Support Packet Template
When contacting support, include:request_id.task_idandpoll_urlfor async work.billing_transaction_idwhen present.- Endpoint, method, model, timestamp, and status code.
- Sanitized request shape and public error body.
- Your expected result and what the user actually saw.
Operational Checks
- Alert on repeated
401,402,429, and5xxresponses separately; they usually have different owners. - Track async jobs that remain non-terminal longer than your product SLA.
- Track duplicate create attempts for the same user job ID.
- Sample completed jobs and verify the user-visible asset, usage record, and stored task record agree.