Skip to content

Observability

Use observability to answer one debugging question at a time without leaking private prompts, API keys, or unnecessary upstream details.

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
  • Authorization headers
  • API keys
  • private prompts
  • unnecessary private upstream URL details

These rules implement Behavior Contract C23–C25.

  1. 1Choose the questionWhat do you need to see: client input, provider request, upstream response, or final outbound response?
  2. 2Pick the phaseUse the narrowest capture phase that can answer the question.
  3. 3Enable brieflyUse `proxai capture enable ...` or `[capture]` switches for a short debugging window.
  4. 4Reproduce onceSend one minimal sanitized request.
  5. 5Disable and sanitizeKeep captures local; sanitize before turning anything into a fixture.

CLI example:

Terminal window
proxai capture status
proxai capture enable provider-request
# reproduce once
proxai capture disable provider-request
QuestionPhase
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 = false
provider_request_enabled = false
upstream_response_enabled = false
outbound_response_enabled = false

For exact phase boundaries and privacy risks, see Capture Phases.

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

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 typeUseful for
Detected request protocolConfirming path-based ingress behavior
Model and route summaryChecking provider selection without logging prompts
Streaming outcomeUnderstanding whether terminal events were seen
Upstream status summarySeparating provider failure from local translation failure