Observability
Request Logging
What each router records about its requests, and the Storage Policy that caps it.
Request logging is the setting on each router that decides what Multi-Router records about the router's requests. It has two parts: request metadata, which is the request record shown in Traffic, and payloads, which are the full request and response. An administrator's Storage Policy sets the most any router can record, and each router records at or below that level. A router that has no setting of its own follows the Storage Policy.
Request metadata
Request metadata is the request record shown in Traffic. The Request Metadata setting has these levels:
| Level | Dashboard description | Records |
|---|---|---|
| Full Metadata | Complete request metadata is logged. | Every field of every request. |
| Anonymous Metadata | All request metadata except user-identifying fields are logged. | Every request, with the customer id, session id and peer IP left empty. |
| Failures only | Only failed requests are logged. | Requests that returned a status of 400 or above, or recorded an error during the response. |
| None | Request logging for this router is disabled. | No records. Traffic and its stats leave out the router's requests. |
Budget enforcement counts every request whatever the router logs. The spend shown on the Budgets pages comes from request records, so it includes a router's requests when the router records them. Anonymous Metadata suits routers that serve end users, keeping usage, latency and cost complete while leaving the identifying fields empty; payloads, when stored, hold the request as sent, including any customer id in its body.
Payloads
The Request and Response Payloads setting decides which requests have their full request and response stored:
| Level | Stores |
|---|---|
| All Payloads | Every request and response. |
| Sample | A chosen percentage of requests, up to the administrator's limit. |
| Failures only | Requests that returned a status of 400 or above. |
| None | Payload storage off. |
Payloads depend on metadata: with metadata at None, payload storage is off, and with metadata at Failures only, payloads are stored for failures at most. Sampling picks requests by their request id, so each request's place in the sample is fixed, and the share matches the percentage over many requests.
Setting it in the dashboard
The Request Logging panel on a router's page shows the current Request metadata and Request payloads. Edit opens both settings; levels above the administrator's Storage Policy are shown as Administrator managed and stay unselected. For a fallback or weighted router, logging follows each member router, and the panel says so; set logging on the members. See Router Settings.
Through the API, the levels are observability.metadata_level with the values full, anonymous, failures_only and none, and observability.request_capture with the values all, sample, error_only and none, with the sample share in observability.payload_sample_pct. Both settings also take inherit, the default, which follows the Storage Policy:
Storage Policy
The Storage Policy is the administrator setting that caps what every router in the installation can record. Its traffic logging switch turns request records on or off for every router, and its mode sets the cap:
| Mode | Most a router can record |
|---|---|
| Anonymous request metadata (usage only) | Anonymous Metadata, with payload storage off. This is the default. |
| All request metadata | Full Metadata, with payload storage off. |
| Store everything | Full Metadata and payloads, up to the administrator's payload capture level and sample percentage. |
With the default mode, Traffic holds usage, latency and cost for every request with the customer id, session id and peer IP left empty, and holds usage figures only.
How payloads are protected
Payloads are stored encrypted, separately for each organization, and are read only through the organization's own Traffic page. Before storage, credential headers, which are Authorization, x-api-key, X-MR-Api-Token, anthropic-api-key, cookie, set-cookie and any header whose name contains token, key, secret, password or auth, are replaced with [redacted]. A body larger than 32 MiB is stored up to that size and marked truncated.
Fields by level
The levels differ in which fields they keep:
| Field | Full Metadata | Anonymous Metadata |
|---|---|---|
| Routing, model, provider, region | Kept | Kept |
| Tokens, cost, latency, status, errors | Kept | Kept |
| API key id | Kept | Kept |
| Correlation id | Kept | Kept |
Customer id (user or metadata.user_id) | Kept | Empty |
| Session id | Kept | Empty |
| Peer IP | Kept | Empty |