MonoRelay records every API request to a SQLite database, giving you a complete audit trail of relay traffic. Each entry captures timing, token usage, the full request and response content, and detailed error information when a call fails. Logs are viewable in real time through the Request Logs page in the admin dashboard, which uses Server-Sent Events to stream new entries as they arrive.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/MonoRelay/llms.txt
Use this file to discover all available pages before exploring further.
What gets logged
Each log entry stores the following fields:| Field | Description |
|---|---|
timestamp | Unix timestamp of when the request was received |
model | Model name as resolved by MonoRelay’s routing engine |
provider | Upstream provider that handled the request |
key_label | Label of the API key used for the upstream call |
client_ip | IP address of the downstream client |
user_agent | User-Agent header sent by the client |
latency_ms | Total round-trip time in milliseconds |
first_token_ms | Time to first token for streaming requests |
input_tokens | Prompt token count |
output_tokens | Completion token count |
cache_hit_tokens | Number of tokens served from prompt cache |
status_code | HTTP status code returned to the client |
request_preview | Truncated preview of the upstream request body |
response_preview | Truncated preview of the upstream response body |
request_full | Full upstream request body (loaded on demand) |
response_full | Full upstream response body (loaded on demand) |
error_message | Human-readable error description if the request failed |
error_type | Error category (e.g. rate limit, timeout, auth failure) |
error_code | Provider error code |
error_details | Raw error payload from the upstream provider |
Viewing logs in the dashboard
Open the Request Logs page from the sidebar. New requests appear at the top of the table in real time without needing a manual refresh. Click any row to expand it and view the full request and response content side by side. Error entries are automatically expanded so failures are immediately visible. The expanded view has two tabs — Relay shows the upstream request sent to the provider, and Client shows the downstream request received from your application. Each content block can be toggled between a readable conversational view and raw JSON. Admins see logs for all users; regular users see only their own requests.Log retention
Entries older thanmax_age_days days are automatically deleted on startup. Set this to 0 to disable automatic cleanup and retain all logs indefinitely.
Logging configuration
Add alogging block to config.yml to control where logs are stored and how much content is captured:
config.yml
| Option | Default | Description |
|---|---|---|
enabled | true | Enable or disable request logging entirely |
db_path | ./data/requests.db | Path to the SQLite database file |
max_age_days | 30 | Delete entries older than this many days; 0 keeps all |
content_preview_length | 200 | Character limit for inline previews in the table view |
Full request and response bodies are always stored regardless of
content_preview_length. The preview length only affects the truncated summary shown in the table. Full content is fetched on demand when you expand a log entry.