ccproxy.services.tracing¶
ccproxy.services.tracing
¶
Request tracing services for monitoring and debugging.
RequestTracer
¶
Bases: ABC
Base interface for request tracing across all providers.
trace_request
abstractmethod
async
¶
Record request details for debugging/monitoring.
- Logs to console with redacted sensitive headers
- Writes complete request to file if verbose mode enabled
- Tracks request timing and metadata
Source code in ccproxy/services/tracing/interfaces.py
trace_response
abstractmethod
async
¶
Record response details.
- Logs response with body preview to console
- Writes complete response to file for debugging
- Handles JSON pretty-printing when applicable
Source code in ccproxy/services/tracing/interfaces.py
StreamingTracer
¶
Bases: ABC
Interface for tracing streaming operations.
trace_stream_start
abstractmethod
async
¶
trace_stream_chunk
abstractmethod
async
¶
Record individual stream chunk (optional, for deep debugging).
trace_stream_complete
abstractmethod
async
¶
Mark stream completion with statistics.
- Total chunks processed
- Total bytes transferred
- Stream duration
Source code in ccproxy/services/tracing/interfaces.py
NullRequestTracer
¶
Bases: RequestTracer, StreamingTracer
No-op implementation of request tracer.
Used as a fallback when the request_tracer plugin is disabled.