ccproxy.core.plugins.hooks.implementations.http_tracer¶
ccproxy.core.plugins.hooks.implementations.http_tracer
¶
Core HTTP request tracer hook implementation.
HTTPTracerHook
¶
Bases: Hook
Core hook for tracing all HTTP requests and responses.
This hook captures HTTP_REQUEST, HTTP_RESPONSE, and HTTP_ERROR events for both client-side (CCProxy → providers) and server-side (client → CCProxy) HTTP traffic. It uses injected formatters for consistent logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_formatter
|
Any
|
JSONFormatter instance for structured logging |
None
|
raw_formatter
|
Any
|
RawHTTPFormatter instance for raw HTTP logging |
None
|
enabled
|
bool
|
Whether the hook is enabled |
True
|