Request logs
Every request with its model, provider, tokens, latency and trace ID, in one searchable log.
What is Request logs?
Request logs are a per-request record of every call an AI gateway handles. On Spro each request is logged with its model, provider, input and output tokens, cost, latency, status and a trace ID, so you can debug one call or follow a multi-step agent run. Send your own trace ID in a header, or let Spro assign one.
When an AI feature misbehaves, you need to see exactly what happened: which model answered, how many tokens it used, whether a fallback ran and how long it took. Request logs keep that record for every call, without adding logging code to your app.
Spro picks each request's trace ID from three sources, in order: your x-spro-trace-id header, metadata.trace_id in the request body, or an ID Spro generates. Use one shared ID across the steps of an agent, and the whole run groups under one trace.
Key features
What this feature does for your requests.
- A per-request record with model, provider, tokens, cost, latency and status
- Trace IDs from a header, from the request body, or generated by Spro
- Group an agent run under one trace with a shared trace ID
- Response headers show the resolved model, cache result and attempts
- Filter by model, key, project and trace in the dashboard
How it works
4 steps, from setup to the first request.
- 01
Send a trace ID
Add x-spro-trace-id to group related requests.
- 02
Send the request
Use any endpoint. Every request is logged.
- 03
Find it
Search the logs by request ID, trace, model or key.
- 04
Read the details
See tokens, cost, latency, the provider and any fallback reasons.
Is it the right fit?
Specific situations where this feature helps, and where it does not.
Good fit if
- Debugging a failing or slow call across several models and providers
- Checking spend by model, key or time window
- Confirming which model and provider answered each request
Not a good fit if
- Compliance that needs full prompt and response history. Check your data-handling settings first
- Questions about a multi-step agent run. Tracing is built for that
- Business dashboards. Logs hold per-call detail, not summaries
Request logs FAQs
Common questions about Request logs.
Route every AI request through SPRO.
One OpenAI-compatible API for 350+ models, with intelligent routing, 29 built-in guardrails, observability, and automatic failover.
