judgevet.adapters.outbound.http_events
Status: draft.
judgevet.adapters.outbound.http_events
Emit one terminal HTTP diagnostic with scoped correlation and typed metadata.
Unconfigured library calls stay silent. Composition roots configure the existing logging adapter; this module never changes global configuration.
Examples:
from judgevet.adapters.outbound.http_events import call_event
with call_event("jev-latest", 1) as event:
event.status_code = 200
event.outcome = "success"
See Also
- judgevet.adapters.outbound.http: Sync and async call sites.
- judgevet.adapters.inbound.logs: Application logging configuration.
CallEvent
dataclass
Hold terminal status and successful response metadata, never customer content.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
int | None
|
HTTP status, or None when no answer arrived. |
outcome |
str
|
Error until typed parsing succeeds. |
resolved_model |
str | None
|
Model from a successful typed response. |
input_tokens |
int | None
|
Successful typed input token count. |
output_tokens |
int | None
|
Successful typed output token count. |
Examples:
assert CallEvent().outcome == "error"
call_event(model, question_count)
Emit filtered model, correlation and terminal metadata when logging is configured.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
Effective requested model identifier. |
required |
question_count
|
int
|
Number of questions in the call. |
required |
Yields:
| Type | Description |
|---|---|
CallEvent
|
Mutable terminal metadata populated by the adapter. |