Observability
Observability
Section titled “Observability”Use observability to answer one debugging question at a time without leaking private prompts, API keys, or unnecessary upstream details.
Read logs safely
Section titled “Read logs safely”Logs should be compact, structured, and privacy-preserving by default. They can help identify routing decisions, provider selection, upstream status, stream outcomes, and request hints without storing full payloads.
Logs should not include:
- request bodies
Authorizationheaders- API keys
- private prompts
- unnecessary private upstream URL details
These rules implement Behavior Contract C23–C25.
Capture one request
Section titled “Capture one request”- 1Choose the questionWhat do you need to see: client input, provider request, upstream response, or final outbound response?
- 2Pick the phaseUse the narrowest capture phase that can answer the question.
- 3Enable brieflyUse `proxai capture enable ...` or `[capture]` switches for a short debugging window.
- 4Reproduce onceSend one minimal sanitized request.
- 5Disable and sanitizeKeep captures local; sanitize before turning anything into a fixture.
CLI example:
proxai capture statusproxai capture enable provider-request# reproduce onceproxai capture disable provider-requestChoose the phase
Section titled “Choose the phase”| Question | Phase |
|---|---|
| What did the local client send? | inbound_request |
| Which provider payload did ProxAI prepare? | provider_request |
| What status, headers, or bytes did the upstream return? | upstream_response |
| What did ProxAI return to the client? | outbound_response |
The capture directory is fixed under the app directory. Config only controls whether each phase is written:
[capture]inbound_request_enabled = falseprovider_request_enabled = falseupstream_response_enabled = falseoutbound_response_enabled = falseFor exact phase boundaries and privacy risks, see Capture Phases.
Sanitize a capture
Section titled “Sanitize a capture”Before sharing or committing anything derived from a capture:
- remove API keys and Authorization headers
- remove private prompts, files, tool arguments, and model outputs
- trim unrelated request/response data
- replace private upstream URLs with sanitized placeholders
- keep only the smallest payload that reproduces the behavior
Understand request hints
Section titled “Understand request hints”Request hints are small protocol-aware summaries used for diagnostics. They should help identify common routing/proxy issues without logging full payloads.
Useful hints include:
| Hint type | Useful for |
|---|---|
| Detected request protocol | Confirming path-based ingress behavior |
| Model and route summary | Checking provider selection without logging prompts |
| Streaming outcome | Understanding whether terminal events were seen |
| Upstream status summary | Separating provider failure from local translation failure |