Observability
hlid keeps a bounded ring buffer of every request it handles and exposes it over HTTP. No dashboard to run, no metrics stack to deploy — curl and jq are the UI.
List recent requests
bash
curl -s http://localhost:8080/hlid/requests | jq .Inspect one request
bash
curl -s http://localhost:8080/hlid/requests/<request-id> | jq .What a capture contains
| Field | Meaning |
|---|---|
id | Unique request id (use it in the URL above) |
timestamp | When the request arrived |
path | Inbound endpoint (/v1/messages, /v1/chat/completions, …) |
model | Model name the agent asked for |
backend_url | Where the registry sent it |
inbound_dialect | What the agent spoke |
backend_dialect | What the backend speaks |
translated | Whether hlid converted between dialects |
status | Upstream HTTP status |
latency_ms | Full round-trip time |
token_usage | Prompt/completion tokens, when the backend reports them |
error | The error, if the request failed |
The buffer
observe_buffer_size (default 1000) bounds how many captures are kept; the oldest are evicted first. Captures hold metadata about the trip — backend credentials are never stored in them.
toml
observe_buffer_size = 1000Health check
bash
curl http://localhost:8080/health
# → {"status": "ok"}Wire this into your compose healthcheck or uptime monitor.
Logs
hlid emits structured tracing logs. Control verbosity with the standard RUST_LOG variable:
bash
RUST_LOG=hlid=debug ./hlid