inspector.restDocs

Shared filters

The filter set that summarize_requests, top_values, list_requests and search_bodies share: time range, outcome, status, method, host, path, labels, durations, sizes and body search.

summarize_requests, top_values, list_requests, search_bodies take the same filters. The app uses the same names and rules for its filter panel and its shareable links.

Rules

  • Several values of one filter are combined with OR. Different filters are combined with AND.
  • labels entries are key:value or just key (“the label exists”). Values of the same key are OR, different keys are AND. Split happens at the first :.
  • since and until accept a duration back from now (15s, 15m, 2h, 7d, 2w) or an ISO 8601 time. The default range is the last 24 hours. Times without a zone are UTC.
  • status_class: "error" matches every request whose outcome is error, including domain errors that returned HTTP 200. Requests without a response (network errors) are matched with outcome: "network".
  • method is converted to upper case.
  • text and regex cannot be combined. in only applies together with one of them.
  • text searches the first 256 KB of each body. Binary bodies are not indexed.
  • Unknown filters are rejected with unknown_filter and the valid names in the hint. Every result lists applied_filters.

Filters

FilterTypeDescription
sincestringStart of the time range: a duration back from now (15m, 2h, 7d) or an ISO 8601 time. Default 24h.
untilstringEnd of the time range: a duration back from now or an ISO 8601 time. Default now.
outcomearray of "ok" | "error" | "network" | "pending" | "abandoned"ok, error, network (no response), pending or abandoned (pending for over 10 minutes).
statusarray of integer (100 to 599)Exact HTTP status codes, e.g. [502, 503].
status_classarray of "2xx" | "3xx" | "4xx" | "5xx" | "error"2xx, 3xx, 4xx, 5xx or error. error = outcome error, including domain errors that returned HTTP 200.
error_namearray of stringExact error name, e.g. RateLimitedError.
retriedbooleantrue = requests with more than one attempt, false = single attempt.
methodarray of stringHTTP methods; converted to upper case.
hostarray of stringExact host names.
patharray of stringExact paths (no query string).
path_prefixstringPaths starting with this prefix, e.g. /v1/customers.
path_templatearray of stringPath templates, where id-like segments are :id, e.g. /v1/customers/:id/charges.
labelsarray of stringLabel filters: “key:value”, or “key” for “the label exists”. Same key = OR, different keys = AND.
servicearray of stringService names set in the SDK.
duration_ms_minintegerMinimum duration in milliseconds.
duration_ms_maxintegerMaximum duration in milliseconds.
size_minintegerMinimum response size in bytes.
size_maxintegerMaximum response size in bytes.
textstringFull-text search in request and response bodies (words, or a prefix like abc*). Only the first 256 KB of each body is indexed.
regexstringRegular expression matched against bodies. Slower than text; combine with other filters to narrow the range.
in"request" | "response" | "both"Which bodies text or regex search: request, response or both (default).

Listing parameters

Besides the filters, list_requests takes:

ParameterTypeDescription
order"started_at_desc" | "started_at_asc" | "duration_ms_desc" | "duration_ms_asc"Sort order. Default started_at_desc (newest first).
limitinteger (1 to 200)Number of rows. Default 20 (MCP) or 50 (app), maximum 200.
cursorstringOpaque cursor from next_cursor of the previous page.

order is one of started_at_desc, started_at_asc, duration_ms_desc, duration_ms_asc. Paging uses an opaque cursor that is stable for rows with the same start time.

Dimensions

summarize_requests (group_by, at most two) and top_values (dimension) use these dimensions:

  • status
  • status_class
  • outcome
  • method
  • host
  • path
  • path_template
  • error_name
  • service
  • label:<key>: the values of one label key
  • time:<bucket> (group_by only): time buckets 5m, 1h, 1d
  • label_keys (top_values only): the label keys that exist

As a dimension, status_class is the HTTP class of the response (2xx to 5xx). Requests without a response (network errors) form a group with the value null, and a domain error that came back with HTTP 200 stays in 2xx. To count failures, group by outcome or filter with status_class: ["error"].

Metrics and fields

  • summarize_requests metrics: count, error_rate, p50, p95, p99, size. error_rate is a fraction from 0 to 1, durations are milliseconds and size is the total response size in bytes.
  • list_requests fields: id, started_at, method, host, path, status, outcome, duration_ms, attempts, error_name, url, error_message, service, size, path_template. The default fields are id, started_at, method, host, path, status, outcome, duration_ms, attempts, error_name.

Path templates

When a request is ingested its path is also stored as a template: segments that look like ids become :id. For example /v1/customers/cus_8fK2xQ9aLm/charges becomes /v1/customers/:id/charges. Numbers, UUIDs, hex strings of at least 8 characters and long token-like segments are replaced. Group and filter by path_template to treat all customers’ calls as one endpoint.